Package chemaxon.checkers
Class AbbreviatedGroupChecker
java.lang.Object
chemaxon.checkers.AbstractStructureChecker
chemaxon.checkers.AbbreviatedGroupChecker
- All Implemented Interfaces:
StructureChecker
,chemaxon.license.Licensable
,PropertyChangeListener
,Cloneable
,EventListener
A descendant of
AbstractStructureChecker
detecting abbreviations
("COOH", "Ala", "NO2", etc.) in a Molecule instance represented in
abbreviated group form.- Since:
- Marvin 5.3
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
This public constantString
represents the name of the configuration file property which is responsible for searching contracted abbreviated groupsstatic final String
This public constantString
represents the name of the property which is responsible for the list of excluded groupsstatic final String
This public constantString
represents the name of the configuration file property which is responsible for searching expanded abbreviated groupsstatic final String
This public constantString
represents the name of the property which is responsible for searching contracted abbreviated groupsstatic final String
This public constantString
represents the name of the property which is responsible for the list of excluded groupsstatic final String
This public constantString
represents the name of the property which is responsible for searching expanded abbreviated groupsFields inherited from class chemaxon.checkers.AbstractStructureChecker
errorType, propertyChangeSupport
Fields inherited from interface chemaxon.checkers.StructureChecker
PROPERTY_KEY_VALID
-
Constructor Summary
ConstructorDescriptionDefault constructor.AbbreviatedGroupChecker
(Map<String, String> params) Parameterized constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected StructureCheckerResult
This method contains the current checking mechanism.protected void
convertResult
(Molecule originalMolecule, Molecule expandedMolecule, StructureCheckerResult result, Map<MolAtom, MolAtom> atomMap, Map<MolBond, MolBond> bondMap) This implementation does nothing.boolean
protected Molecule
This implementation does nothing.Gets the excluded abbreviationsint
hashCode()
boolean
Returns if the checker is searching for contracted SGroups or notboolean
Returns if the checker is searching for expanded SGroups or notboolean
isValid()
Excluded object is initialized.void
setExcluded
(AtomLabels excluded) Sets the abbreviations to be excludedvoid
setSearchContracted
(boolean searchContracted) Sets the checker should search for contracted abbreviated groups or notvoid
setSearchExpanded
(boolean searchExpanded) Sets the checker should search for expanded abbreviated groups or notMethods inherited from class chemaxon.checkers.AbstractStructureChecker
addPropertyChangeListener, addPropertyChangeListener, check, clone, cloneItem, 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_EXPANDED
This public constantString
represents the name of the configuration file property which is responsible for searching expanded abbreviated groups- Since:
- 5.4
- See Also:
-
PROPERTY_KEY_CONTRACTED
This public constantString
represents the name of the configuration file property which is responsible for searching contracted abbreviated groups- Since:
- 5.4
- See Also:
-
PROPERTY_KEY_SEARCH_CONTRACTED
This public constantString
represents the name of the property which is responsible for searching contracted abbreviated groups- Since:
- 5.7
- See Also:
-
PROPERTY_KEY_SEARCH_EXPANDED
This public constantString
represents the name of the property which is responsible for searching expanded abbreviated groups- Since:
- 5.7
- See Also:
-
PROPERTY_KEY_EXCLUDED
This public constantString
represents the name of the property which is responsible for the list of excluded groups- Since:
- 5.12
- See Also:
-
PROPERTY_KEY_SEARCH_EXCLUDED
This public constantString
represents the name of the property which is responsible for the list of excluded groups- Since:
- 5.12
- See Also:
-
-
Constructor Details
-
AbbreviatedGroupChecker
public AbbreviatedGroupChecker()Default constructor. Search for both expanded and contracted abbreviated groups. -
AbbreviatedGroupChecker
Parameterized constructor. If "expanded" parameter given, and its value is "true" expanded abbreviated groups will be detected during the checking mechanism. Otherwise no expanded group will be found. If "contracted" parameter given, and its value is "true" contracted abbreviated groups will be detected during the checking mechanism. Otherwise no contracted group will be found.- Parameters:
params
- aMap
instance which contains String pairs. Key is the name of the parameter.
-
-
Method Details
-
isSearchContracted
public boolean isSearchContracted()Returns if the checker is searching for contracted SGroups or not- Returns:
- if the checker is searching for contracted SGroups or not
-
isSearchExpanded
public boolean isSearchExpanded()Returns if the checker is searching for expanded SGroups or not- Returns:
- if the checker is searching for expanded SGroups or not
-
expandMolecule
protected Molecule expandMolecule(Molecule molecule, Map<MolAtom, MolAtom> atomMap, Map<MolBond, MolBond> bondMap) This implementation does nothing.- Overrides:
expandMolecule
in classAbstractStructureChecker
- Parameters:
molecule
- the molecule to check- Returns:
- the molecule
-
convertResult
protected void convertResult(Molecule originalMolecule, Molecule expandedMolecule, StructureCheckerResult result, Map<MolAtom, MolAtom> atomMap, Map<MolBond, MolBond> bondMap) This implementation does nothing.- Overrides:
convertResult
in classAbstractStructureChecker
- Parameters:
originalMolecule
- the original moleculeexpandedMolecule
- the cloned then expanded moleculeresult
- the structure checker result on cloned moleculeatomMap
- the mapping of cloned molecule and original molecule atomsbondMap
- the mapping of cloned molecule and original molecule bonds
-
check1
Description copied from class:AbstractStructureChecker
This method contains the current checking mechanism.- 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
-
equals
- Overrides:
equals
in classAbstractStructureChecker
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAbstractStructureChecker
-
setSearchExpanded
public void setSearchExpanded(boolean searchExpanded) Sets the checker should search for expanded abbreviated groups or not- Parameters:
searchExpanded
- is a boolean property. If true expanded abbreviated groups will be checked during the checking mechanism.- Since:
- 5.4
-
setSearchContracted
public void setSearchContracted(boolean searchContracted) Sets the checker should search for contracted abbreviated groups or not- Parameters:
searchContracted
- is a boolean property. If true contracted abbreviated groups will be checked during the checking mechanism.- Since:
- 5.4
-
setExcluded
Sets the abbreviations to be excluded- Parameters:
excluded
- the abbreviations to be excluded
-
isValid
public boolean isValid()Excluded object is initialized. If it is null, the parse was not successful.- Specified by:
isValid
in interfaceStructureChecker
- Overrides:
isValid
in classAbstractStructureChecker
- Returns:
- true if the checker's configuration is valid, false otherwise
-
getExcluded
Gets the excluded abbreviations- Returns:
- the excluded abbreviations
-