Class TransformAction
- java.lang.Object
-
- chemaxon.standardizer.AbstractStandardizerAction
-
- chemaxon.standardizer.advancedactions.TransformAction
-
- All Implemented Interfaces:
chemaxon.license.Licensable
,StandardizerAction
,PropertyChangeListener
,Cloneable
,EventListener
@PublicAPI public final class TransformAction extends AbstractStandardizerAction
Transformation standardizer action- Since:
- 5.11
-
-
Field Summary
Fields Modifier and Type Field Description static String
EXACT_KEY
Key of exact for parsing and property changeprotected static String
LINE_SEP
Line separator.static String
SEARCH_OPTIONS_KEY
Key of search options for parsing and property changestatic String
STRUCTURE_KEY
Key of query molecule 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 TransformAction(Map<String,String> params)
Initializes the action with parameters
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description TransformAction
clone()
protected List<Molecule>
getComponents(Molecule molecule)
A recursive algorithm getting all components (reactants, agents and products of reaction molecules, R-group definitions of Rg-Molecules) of the molecule.String
getSearchOptions()
Gets the search options of the actionString
getStructure()
Deprecated.RxnMolecule
getTransform()
Gets the transformation molecule of the actionString
getType()
Gets the type of transformationboolean
isEditable()
Returns if this action is editable.boolean
isExact()
Gets the exact value of the actionvoid
setEditable(boolean editable)
Sets if this action is editable.void
setExact(boolean exact)
Sets the exact value of the actionvoid
setSearchOptions(String optionString)
Sets the search options of the actionvoid
setStructure(String structure)
Deprecated.usesetTransform(RxnMolecule)
method insteadvoid
setTransform(RxnMolecule structure)
Sets the transformationprotected Changes
standardize1(Molecule molecule)
This method contains the current standardization mechanism.String
toString()
-
Methods inherited from class chemaxon.standardizer.AbstractStandardizerAction
addPropertyChangeListener, addPropertyChangeListener, anyBooleanPropertyTrue, cloneItem, getDescriptor, getID, isActive, isAvailable, isLicensed, isValid, propertyChange, removePropertyChangeListener, removePropertyChangeListener, setActive, setID, setLicenseEnvironment, setValid, standardize
-
-
-
-
Field Detail
-
EXACT_KEY
public static final String EXACT_KEY
Key of exact for parsing and property change- See Also:
- Constant Field Values
-
SEARCH_OPTIONS_KEY
public static final String SEARCH_OPTIONS_KEY
Key of search options for parsing and property change- See Also:
- Constant Field Values
-
STRUCTURE_KEY
public static final String STRUCTURE_KEY
Key of query molecule for parsing and property change- See Also:
- Constant Field Values
-
LINE_SEP
protected static final String LINE_SEP
Line separator.
-
-
Method Detail
-
setSearchOptions
public void setSearchOptions(String optionString)
Sets the search options of the action- Parameters:
optionString
- the search options of the action
-
getSearchOptions
public String getSearchOptions()
Gets the search options of the action- Returns:
- the search options of the action
-
setEditable
public void setEditable(boolean editable)
Sets if this action is editable.- Parameters:
editable
- the new editable flag
-
isEditable
public boolean isEditable()
Returns if this action is editable.- Returns:
true
if the action is editable
-
setExact
public void setExact(boolean exact)
Sets the exact value of the action- Parameters:
exact
- the exact value of the action
-
isExact
public boolean isExact()
Gets the exact value of the action- Returns:
- the exact value of the action
-
setStructure
@Deprecated public void setStructure(String structure)
Deprecated.usesetTransform(RxnMolecule)
method insteadSets the transformation- Parameters:
structure
- the molecule defining the transformation
-
setTransform
public void setTransform(RxnMolecule structure)
Sets the transformation- Parameters:
structure
- the molecule defining the transformation
-
getStructure
@Deprecated public String getStructure()
Deprecated.Gets the transformation- Returns:
- the string representation of the molecule defining the transformation
-
getTransform
public RxnMolecule getTransform()
Gets the transformation molecule of the action- Returns:
- the transformation molecule of the action
-
getType
public String getType()
Gets the type of transformation- Returns:
- the type of the transformation
-
standardize1
protected Changes standardize1(Molecule molecule)
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
-
getComponents
protected List<Molecule> getComponents(Molecule molecule)
Description copied from class:AbstractStandardizerAction
A recursive algorithm getting all components (reactants, agents and products of reaction molecules, R-group definitions of Rg-Molecules) of the molecule. Used to collect all. If components must not be standardized, this method should be overridden.- Overrides:
getComponents
in classAbstractStandardizerAction
- Parameters:
molecule
- the target molecule- Returns:
- the resulted list of components
-
clone
public TransformAction clone() throws CloneNotSupportedException
- Overrides:
clone
in classAbstractStandardizerAction
- Throws:
CloneNotSupportedException
-
toString
public String toString()
- Overrides:
toString
in classAbstractStandardizerAction
-
-