@PublicAPI public final class MapAction extends AbstractStandardizerAction
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
KEEP_MAPPING
keep mapping property
|
static java.lang.String |
MAPPING_STYLE
mapping style property
|
static java.lang.String |
MARK_BONDS
mark bonds property
|
CONFIG_PATH_KEY, FORMAT_KEY, ID_KEY, support
Constructor and Description |
---|
MapAction(java.util.Map<java.lang.String,java.lang.String> params)
Initializes the action
|
Modifier and Type | Method and Description |
---|---|
protected java.util.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.
|
java.lang.String |
toString() |
addPropertyChangeListener, addPropertyChangeListener, clone, cloneItem, getDescriptor, getID, isActive, isAvailable, isLicensed, isValid, propertyChange, removePropertyChangeListener, removePropertyChangeListener, setActive, setID, setLicenseEnvironment, setValid, standardize
public static final java.lang.String MAPPING_STYLE
public static final java.lang.String MARK_BONDS
public static final java.lang.String KEEP_MAPPING
public MapAction(java.util.Map<java.lang.String,java.lang.String> params)
params
- the parameters of the actionprotected Changes standardize1(Molecule molecule)
AbstractStandardizerAction
RgMolecule
,
RxnMolecule
) are decomponented by the method
AbstractStandardizerAction.getComponents(Molecule)
, and AbstractStandardizerAction.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.Logger
, that can
be collected by using StandardizerLogger.getLogger()
method.standardize1
in class AbstractStandardizerAction
molecule
- the Molecule
instance to be standardizedprotected java.util.List<Molecule> getComponents(Molecule target)
AbstractStandardizerAction
getComponents
in class AbstractStandardizerAction
target
- the target moleculepublic void setMappingStyle(Mapper.MappingStyle mappingStyle)
mappingStyle
- the new mapping stylepublic void setKeepMapping(boolean keepMapping)
keepMapping
- true
indicates existing maps should be kept when mappingpublic void setMarkBonds(boolean markBonds)
markBonds
- true
indicates bond marks should be added when mappingpublic Mapper.MappingStyle getMappingStyle()
public boolean isKeepMapping()
true
if underlying mapper keeps existing maps should be kept when mappingpublic boolean isMarkBonds()
true
when bonds are marked while mappingpublic java.lang.String toString()
toString
in class AbstractStandardizerAction