Package chemaxon.checkers
Class AttachedDataChecker
java.lang.Object
chemaxon.checkers.AbstractStructureChecker
chemaxon.checkers.AttachedDataChecker
- All Implemented Interfaces:
StructureChecker
,chemaxon.license.Licensable
,PropertyChangeListener
,Cloneable
,EventListener
A descendant of
AbstractStructureChecker
detecting attached data in the molecule.- Since:
- Marvin 5.3
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
This public constantString
represents the name of the property which is responsible for the list of excluded data.static final String
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 final String
static final String
Fields inherited from class chemaxon.checkers.AbstractStructureChecker
errorType, propertyChangeSupport
Fields inherited from interface chemaxon.checkers.StructureChecker
PROPERTY_KEY_VALID
-
Constructor Summary
ConstructorDescriptionDefault constructor.AttachedDataChecker
(Map<String, String> params) Parameterized constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected StructureCheckerResult
Detects attached data in the moleculeboolean
Any attached data that matches this descriptor won't appear as the result of this checker.int
hashCode()
boolean
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
(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 Details
-
PROPERTY_KEY_EXCLUDED
This public constantString
represents the name of the property which is responsible for the list of excluded data.- See Also:
-
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:
-
PROPERTY_KEY_SEARCH_EXCLUDED
- See Also:
-
PROPERTY_KEY_SEARCH_WITH_REGEXP_EXCLUSION
- See Also:
-
-
Constructor Details
-
AttachedDataChecker
public AttachedDataChecker()Default constructor. No exclusion is done on data. -
AttachedDataChecker
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 Details
-
check1
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
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
-
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
- Overrides:
equals
in classAbstractStructureChecker
-