Package chemaxon.checkers
Class AttachedDataChecker
- java.lang.Object
-
- chemaxon.checkers.AbstractStructureChecker
-
- chemaxon.checkers.AttachedDataChecker
-
- All Implemented Interfaces:
StructureChecker
,chemaxon.license.Licensable
,PropertyChangeListener
,Cloneable
,EventListener
@PublicAPI public class AttachedDataChecker extends AbstractStructureChecker
A descendant ofAbstractStructureChecker
detecting attached data in the molecule.- Since:
- Marvin 5.3
-
-
Field Summary
Fields Modifier and Type Field Description static String
PROPERTY_KEY_EXCLUDED
This public constantString
represents the name of the property which is responsible for the list of excluded data.static String
PROPERTY_KEY_IS_EXCLUSION_REGEXP
The name of the property, which is responsible for the decision if the excluded data should be treated as a regular expression instead of a (comma separated) list of strings.static String
PROPERTY_KEY_SEARCH_EXCLUDED
static String
PROPERTY_KEY_SEARCH_WITH_REGEXP_EXCLUSION
-
Fields inherited from class chemaxon.checkers.AbstractStructureChecker
errorType, propertyChangeSupport
-
Fields inherited from interface chemaxon.checkers.StructureChecker
PROPERTY_KEY_VALID
-
-
Constructor Summary
Constructors Constructor Description AttachedDataChecker()
Default constructor.AttachedDataChecker(Map<String,String> params)
Parameterized constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StructureCheckerResult
check1(Molecule molecule)
Detects attached data in the moleculeboolean
equals(Object obj)
chemaxon.checkers.util.DataExclusionList
getExcluded()
Any attached data that matches this descriptor won't appear as the result of this checker.int
hashCode()
boolean
isExclusionRegexp()
Tells how to interpret theAtomLabels
: A comma separated list or a regular expression.boolean
isValid()
Returns true if the checker's configuration is valid, false otherwisevoid
setExcluded(chemaxon.checkers.util.DataExclusionList excluded)
void
setExclusionRegexp(boolean value)
Sets if the descriptor of the excluded-data (AtomLabels
) should be treated as a regular expression (see also:isExclusionRegexp()
-
Methods inherited from class chemaxon.checkers.AbstractStructureChecker
addPropertyChangeListener, addPropertyChangeListener, check, clone, cloneItem, convertResult, expandMolecule, getDescription, getDescriptor, getEditorClassName, getErrorCode, getErrorDescription, getErrorType, getHelpText, getIcon, getLocalMenuName, getName, isAvailable, isLicensed, propertyChange, removePropertyChangeListener, removePropertyChangeListener, setDescription, setHelpText, setIcon, setLicenseEnvironment, setLocalMenuName, setMoreErrorMessage, setName, setNoErrorMessage, setOneErrorMessage, toString
-
-
-
-
Field Detail
-
PROPERTY_KEY_EXCLUDED
public static final String PROPERTY_KEY_EXCLUDED
This public constantString
represents the name of the property which is responsible for the list of excluded data.- See Also:
- Constant Field Values
-
PROPERTY_KEY_IS_EXCLUSION_REGEXP
public static final String PROPERTY_KEY_IS_EXCLUSION_REGEXP
The name of the property, which is responsible for the decision if the excluded data should be treated as a regular expression instead of a (comma separated) list of strings.- See Also:
- Constant Field Values
-
PROPERTY_KEY_SEARCH_EXCLUDED
public static final String PROPERTY_KEY_SEARCH_EXCLUDED
- See Also:
- Constant Field Values
-
PROPERTY_KEY_SEARCH_WITH_REGEXP_EXCLUSION
public static final String PROPERTY_KEY_SEARCH_WITH_REGEXP_EXCLUSION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AttachedDataChecker
public AttachedDataChecker()
Default constructor. No exclusion is done on data.
-
AttachedDataChecker
public AttachedDataChecker(Map<String,String> params)
Parameterized constructor. If "excluded" parameter is given, then the data, that "matches" this parameter value, won't appear in the result. Here "matches" can mean two things:- If the "isExclusionRegexp" parameter is not set to "true", then the parameter value is treated as a comma separated list. Any exact match from this list is a match.
- The parameter is treated as a regular expression otherwise (see
Pattern
). A match to this regular expression is a match.
- Parameters:
params
- aMap
instance which contains String pairs. Key is the name of the parameter. (exclusion
-
-
Method Detail
-
check1
protected StructureCheckerResult check1(Molecule molecule)
Detects attached data in the molecule- Specified by:
check1
in classAbstractStructureChecker
- Parameters:
molecule
- theMolecule
instance to be checked for problems- Returns:
- a
StructureCheckerResult
which represents the problem or null if no problem found
-
getExcluded
public chemaxon.checkers.util.DataExclusionList getExcluded()
Any attached data that matches this descriptor won't appear as the result of this checker. (The descriptor can be interpreted as a comma separated list of excluded values or as a regular expression for such values. This is governed by theisExclusionRegexp()
property, which can be set through thesetExclusionRegexp(boolean)
method.)
-
setExcluded
public void setExcluded(chemaxon.checkers.util.DataExclusionList excluded)
-
isValid
public boolean isValid()
Description copied from interface:StructureChecker
Returns true if the checker's configuration is valid, false otherwise- Specified by:
isValid
in interfaceStructureChecker
- Overrides:
isValid
in classAbstractStructureChecker
- Returns:
- true if the checker's configuration is valid, false otherwise
-
isExclusionRegexp
public boolean isExclusionRegexp()
Tells how to interpret theAtomLabels
: A comma separated list or a regular expression. The value can be set through thesetExcluded(DataExclusionList)
method and retrieved through thegetExcluded()
method.- Returns:
- true if the excluded data is a regular expression.
-
setExclusionRegexp
public void setExclusionRegexp(boolean value)
Sets if the descriptor of the excluded-data (AtomLabels
) should be treated as a regular expression (see also:isExclusionRegexp()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractStructureChecker
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classAbstractStructureChecker
-
-