Package chemaxon.standardizer.actions
Class MapReactionAction
- java.lang.Object
-
- chemaxon.standardizer.AbstractStandardizerAction
-
- chemaxon.standardizer.actions.MapReactionAction
-
- All Implemented Interfaces:
chemaxon.license.Licensable
,StandardizerAction
,PropertyChangeListener
,Cloneable
,EventListener
@PublicAPI public final class MapReactionAction extends AbstractStandardizerAction
Map reaction standardizer action- Since:
- 5.11
-
-
Field Summary
Fields Modifier and Type Field Description static String
KEEP_MAPPING
keep mapping propertystatic String
MAPPING_STYLE
mapping style propertystatic String
MARK_BONDS
mark bonds property-
Fields inherited from class chemaxon.standardizer.AbstractStandardizerAction
CONFIG_PATH_KEY, FORMAT_KEY, ID_KEY, support
-
-
Constructor Summary
Constructors Constructor Description MapReactionAction(Map<String,String> params)
Initializes the action
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<Molecule>
getComponents(Molecule target)
A recursive algorithm getting all components (reactants, agents and products of reaction molecules, R-group definitions of Rg-Molecules) of the molecule.Mapper.MappingStyle
getMappingStyle()
Returns the mapping style of the underlying mapper.boolean
isKeepMapping()
Returns if underlying mapper keeps existing maps should be kept when mapping.boolean
isMarkBonds()
Returns if bonds are marked while mapping.void
setKeepMapping(boolean keepMapping)
Sets keep mapping for the underlying mapper.void
setMappingStyle(Mapper.MappingStyle mappingStyle)
Sets Mapping Style for the underlying mapper.void
setMarkBonds(boolean markBonds)
Sets mark bonds for the underlying mapper.protected Changes
standardize1(Molecule molecule)
This method contains the current standardization mechanism.String
toString()
-
Methods inherited from class chemaxon.standardizer.AbstractStandardizerAction
addPropertyChangeListener, addPropertyChangeListener, anyBooleanPropertyTrue, clone, cloneItem, getDescriptor, getID, isActive, isAvailable, isLicensed, isValid, propertyChange, removePropertyChangeListener, removePropertyChangeListener, setActive, setID, setLicenseEnvironment, setValid, standardize
-
-
-
-
Field Detail
-
MAPPING_STYLE
public static final String MAPPING_STYLE
mapping style property- See Also:
- Constant Field Values
-
MARK_BONDS
public static final String MARK_BONDS
mark bonds property- See Also:
- Constant Field Values
-
KEEP_MAPPING
public static final String KEEP_MAPPING
keep mapping property- See Also:
- Constant Field Values
-
-
Method Detail
-
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 target)
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:
target
- the target molecule- Returns:
- the resulted list of components
-
setMappingStyle
public void setMappingStyle(Mapper.MappingStyle mappingStyle)
Sets Mapping Style for the underlying mapper.- Parameters:
mappingStyle
- the new mapping style- Since:
- 6.1
-
setKeepMapping
public void setKeepMapping(boolean keepMapping)
Sets keep mapping for the underlying mapper.- Parameters:
keepMapping
-true
indicates existing maps should be kept when mapping- Since:
- 6.1
-
setMarkBonds
public void setMarkBonds(boolean markBonds)
Sets mark bonds for the underlying mapper.- Parameters:
markBonds
-true
indicates bond marks should be added when mapping
-
getMappingStyle
public Mapper.MappingStyle getMappingStyle()
Returns the mapping style of the underlying mapper.- Returns:
- the mapping style of the underlying mapper
- Since:
- 6.1
-
isKeepMapping
public boolean isKeepMapping()
Returns if underlying mapper keeps existing maps should be kept when mapping.- Returns:
true
if underlying mapper keeps existing maps should be kept when mapping- Since:
- 6.1
-
isMarkBonds
public boolean isMarkBonds()
Returns if bonds are marked while mapping.- Returns:
true
when bonds are marked while mapping- Since:
- 6.1
-
toString
public String toString()
- Overrides:
toString
in classAbstractStandardizerAction
-
-