Class Clean2DAction
- java.lang.Object
-
- chemaxon.standardizer.AbstractStandardizerAction
-
- chemaxon.standardizer.advancedactions.Clean2DAction
-
- All Implemented Interfaces:
chemaxon.license.Licensable
,StandardizerAction
,PropertyChangeListener
,Cloneable
,EventListener
@PublicAPI public class Clean2DAction extends AbstractStandardizerAction
Clean molecule graph in 2D standardizer action- Since:
- 6.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Clean2DAction.Type
Type of clean action (partial, full, template based or convert 3D to 2D)
-
Field Summary
Fields Modifier and Type Field Description static String
PARTIAL_CLEAN_KEY
Key for partial clean necessary property changestatic String
TEMPLATE_FILE_KEY
Key of template file for parsing and property changestatic String
TEMPLATES_KEY
Key for templates property changestatic String
TYPE_KEY
Key of type for parsing and property change-
Fields inherited from class chemaxon.standardizer.AbstractStandardizerAction
CONFIG_PATH_KEY, FORMAT_KEY, ID_KEY, support
-
-
Constructor Summary
Constructors Constructor Description Clean2DAction(Map<String,String> params)
Initializes the action with parameters
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Clean2DAction
clone()
Molecule[]
getTemplates()
Gets the template molecules of the clean actionClean2DAction.Type
getType()
Gets the type of actionvoid
setTemplates(Molecule[] cleanTemplates)
Sets the clean templates of the actionvoid
setType(Clean2DAction.Type type)
Sets the type of actionprotected Changes
standardize1(Molecule molecule)
This method contains the current standardization mechanism.String
toString()
-
Methods inherited from class chemaxon.standardizer.AbstractStandardizerAction
addPropertyChangeListener, addPropertyChangeListener, anyBooleanPropertyTrue, cloneItem, getComponents, getDescriptor, getID, isActive, isAvailable, isLicensed, isValid, propertyChange, removePropertyChangeListener, removePropertyChangeListener, setActive, setID, setLicenseEnvironment, setValid, standardize
-
-
-
-
Field Detail
-
TYPE_KEY
public static final String TYPE_KEY
Key of type for parsing and property change- See Also:
- Constant Field Values
-
TEMPLATE_FILE_KEY
public static final String TEMPLATE_FILE_KEY
Key of template file for parsing and property change- See Also:
- Constant Field Values
-
PARTIAL_CLEAN_KEY
public static final String PARTIAL_CLEAN_KEY
Key for partial clean necessary property change- See Also:
- Constant Field Values
-
TEMPLATES_KEY
public static final String TEMPLATES_KEY
Key for templates property change- See Also:
- Constant Field Values
-
-
Method Detail
-
setType
public void setType(Clean2DAction.Type type)
Sets the type of action- Parameters:
type
- the type of action
-
getType
public Clean2DAction.Type getType()
Gets the type of action- Returns:
- the type of action
-
standardize1
protected Changes standardize1(Molecule molecule) throws IllegalArgumentException
Description copied from class:AbstractStandardizerAction
This method contains the current standardization mechanism. Descendants needs to implement this method.
Special molecules containing more components (e.g.RgMolecule
,RxnMolecule
) are decomponented by the methodAbstractStandardizerAction.getComponents(Molecule)
, andAbstractStandardizerAction.standardize1(Molecule)
method is called on each component, before applied on the original molecule. If a descendant does not want this to occur, this method must be overridden.
Logs of standardization should be generated to aLogger
, that can be collected by usingStandardizerLogger.getLogger()
method.- Specified by:
standardize1
in classAbstractStandardizerAction
- Parameters:
molecule
- theMolecule
instance to be standardized- Returns:
- the changes applied on the molecule during the standardization process
- Throws:
IllegalArgumentException
- if the provided molecule or the provided parameters of the action are invalid
-
clone
public Clean2DAction clone() throws CloneNotSupportedException
- Overrides:
clone
in classAbstractStandardizerAction
- Throws:
CloneNotSupportedException
-
setTemplates
public void setTemplates(Molecule[] cleanTemplates)
Sets the clean templates of the action- Parameters:
cleanTemplates
- the clean templates of the action
-
toString
public String toString()
- Overrides:
toString
in classAbstractStandardizerAction
-
getTemplates
public Molecule[] getTemplates()
Gets the template molecules of the clean action- Returns:
- null if not template based clean, or templates are empty
-
-