chemaxon.checkers
Class AbbreviatedGroupChecker

java.lang.Object
  extended by chemaxon.checkers.AbstractStructureChecker
      extended by chemaxon.checkers.AbbreviatedGroupChecker
All Implemented Interfaces:
StructureChecker, chemaxon.license.Licensable, java.beans.PropertyChangeListener, java.lang.Cloneable, java.util.EventListener

public class AbbreviatedGroupChecker
extends AbstractStructureChecker

A descendant of AbstractStructureChecker detecting abbreviations ("COOH", "Ala", "NO2", etc.) in a Molecule instance represented in abbreviated group form.

Since:
Marvin 5.3
Version:
5.7
Author:
Attila Szabo

Field Summary
static java.lang.String PROPERTY_KEY_CONTRACTED
          This public constant String represents the name of the configuration file property which is responsible for searching contracted abbreviated groups
static java.lang.String PROPERTY_KEY_EXPANDED
          This public constant String represents the name of the configuration file property which is responsible for searching expanded abbreviated groups
static java.lang.String PROPERTY_KEY_SEARCH_CONTRACTED
          This public constant String represents the name of the property which is responsible for searching contracted abbreviated groups
static java.lang.String PROPERTY_KEY_SEARCH_EXPANDED
          This public constant String represents the name of the property which is responsible for searching expanded abbreviated groups
 
Fields inherited from class chemaxon.checkers.AbstractStructureChecker
errorType, propertyChangeSupport
 
Fields inherited from interface chemaxon.checkers.StructureChecker
PROPERTY_KEY_VALID
 
Constructor Summary
AbbreviatedGroupChecker()
          Default constructor.
AbbreviatedGroupChecker(java.util.Map<java.lang.String,java.lang.String> params)
          Parameterized constructor.
 
Method Summary
protected  StructureCheckerResult check1(Molecule molecule)
          This method contains the current checking mechanism.
protected  void convertResult(Molecule originalMolecule, Molecule expandedMolecule, StructureCheckerResult result, java.util.Map<MolAtom,MolAtom> atomMap, java.util.Map<MolBond,MolBond> bondMap)
          This implementation does nothing.
 boolean equals(java.lang.Object obj)
           
protected  Molecule expandMolecule(Molecule molecule, java.util.Map<MolAtom,MolAtom> atomMap, java.util.Map<MolBond,MolBond> bondMap)
          This implementation does nothing.
 int hashCode()
           
 boolean isSearchContracted()
          Returns if the checker is searching for contracted SGroups or not
 boolean isSearchExpanded()
          Returns if the checker is searching for expanded SGroups or not
 void setSearchContracted(boolean searchContracted)
          Sets the checker should search for contracted abbreviated groups or not
 void setSearchExpanded(boolean searchExpanded)
          Sets the checker should search for expanded abbreviated groups or not
 
Methods inherited from class chemaxon.checkers.AbstractStructureChecker
addPropertyChangeListener, addPropertyChangeListener, check, clone, cloneItem, getDescription, getDescriptor, getEditorClassName, getErrorCode, getErrorDescription, getErrorType, getHelpText, getIcon, getLocalMenuName, getName, isAvailable, isLicensed, isValid, propertyChange, removePropertyChangeListener, removePropertyChangeListener, setDescription, setHelpText, setIcon, setLicenseEnvironment, setLocalMenuName, setMoreErrorMessage, setName, setNoErrorMessage, setOneErrorMessage, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

PROPERTY_KEY_EXPANDED

public static final java.lang.String PROPERTY_KEY_EXPANDED
This public constant String represents the name of the configuration file property which is responsible for searching expanded abbreviated groups

Since:
5.4
See Also:
Constant Field Values

PROPERTY_KEY_CONTRACTED

public static final java.lang.String PROPERTY_KEY_CONTRACTED
This public constant String represents the name of the configuration file property which is responsible for searching contracted abbreviated groups

Since:
5.4
See Also:
Constant Field Values

PROPERTY_KEY_SEARCH_CONTRACTED

public static final java.lang.String PROPERTY_KEY_SEARCH_CONTRACTED
This public constant String represents the name of the property which is responsible for searching contracted abbreviated groups

Since:
5.7
See Also:
Constant Field Values

PROPERTY_KEY_SEARCH_EXPANDED

public static final java.lang.String PROPERTY_KEY_SEARCH_EXPANDED
This public constant String represents the name of the property which is responsible for searching expanded abbreviated groups

Since:
5.7
See Also:
Constant Field Values
Constructor Detail

AbbreviatedGroupChecker

public AbbreviatedGroupChecker()
Default constructor. Search for both expanded and contracted abbreviated groups.


AbbreviatedGroupChecker

public AbbreviatedGroupChecker(java.util.Map<java.lang.String,java.lang.String> params)
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 - a Map instance which contains String pairs. Key is the name of the parameter.
Method Detail

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,
                                  java.util.Map<MolAtom,MolAtom> atomMap,
                                  java.util.Map<MolBond,MolBond> bondMap)
This implementation does nothing.

Overrides:
expandMolecule in class AbstractStructureChecker
Parameters:
molecule - the molecule to check
Returns:
the molecule

convertResult

protected void convertResult(Molecule originalMolecule,
                             Molecule expandedMolecule,
                             StructureCheckerResult result,
                             java.util.Map<MolAtom,MolAtom> atomMap,
                             java.util.Map<MolBond,MolBond> bondMap)
This implementation does nothing.

Overrides:
convertResult in class AbstractStructureChecker
Parameters:
originalMolecule - the original molecule
expandedMolecule - the cloned then expanded molecule
result - the structure checker result on cloned molecule
atomMap - the mapping of cloned molecule and original molecule atoms
bondMap - the mapping of cloned molecule and original molecule bonds

check1

protected StructureCheckerResult check1(Molecule molecule)
Description copied from class: AbstractStructureChecker
This method contains the current checking mechanism.

Specified by:
check1 in class AbstractStructureChecker
Parameters:
molecule - the Molecule instance to be checked for problems
Returns:
a StructureCheckerResult which represents the problem or null if no problem found

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class AbstractStructureChecker

hashCode

public int hashCode()
Overrides:
hashCode in class AbstractStructureChecker

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