Class CreateGroupAction
java.lang.Object
chemaxon.standardizer.AbstractStandardizerAction
chemaxon.standardizer.advancedactions.CreateGroupAction
- All Implemented Interfaces:
chemaxon.license.Licensable
,StandardizerAction
,PropertyChangeListener
,Cloneable
,EventListener
Create Group standardizer action
- Since:
- 5.11
-
Field Summary
Fields inherited from class chemaxon.standardizer.AbstractStandardizerAction
CONFIG_PATH_KEY, FORMAT_KEY, ID_KEY, support
-
Constructor Summary
ConstructorDescriptionCreateGroupAction
(Map<String, String> params) Initializes a create group standardizes action -
Method Summary
Modifier and TypeMethodDescriptionvoid
addGroup
(GroupDefinition group) Adds a group definition to the group list of the actionvoid
Adds a group to the list defined by its abbreviationclone()
get
(int index) Returns the group definition at specified index.getAbbreviation
(int index) Gets the abbreviation at the provided indexint
Gets the count of the groups of the actionGets the list of groups set for the actiongetMolecule
(int index) Gets the molecule at the provided indexvoid
Removes all group definitions from the group list of the action.void
removeGroup
(GroupDefinition group) Removes a group definition from the group list of the actionset
(int index, GroupDefinition groupDefinition) Sets the group definition at specified index, and returns the previous value.void
setAbbreviation
(int index, String abbreviation) Sets the abbreviation of the group at the provided indexvoid
setMolecule
(int index, Molecule molecule) Sets the molecule of the group at the provided indexprotected Changes
standardize1
(Molecule mol) This method contains the current standardization mechanism.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 Details
-
GROUP_LIST_KEY
Property key for group list modification- See Also:
-
-
Constructor Details
-
CreateGroupAction
Initializes a create group standardizes action- Parameters:
params
- the parameter map of the action
-
-
Method Details
-
addGroup
Adds a group definition to the group list of the action- Parameters:
group
- group definition to be added to the group list of the action
-
addGroup
Adds a group to the list defined by its abbreviation- Parameters:
abbreviation
- the abbreviation of the group to be added
-
setAbbreviation
Sets the abbreviation of the group at the provided index- Parameters:
index
- the target indexabbreviation
- the abbreviation to be set
-
setMolecule
Sets the molecule of the group at the provided index- Parameters:
index
- the target indexmolecule
- the molecule to be set
-
getGroupCount
public int getGroupCount()Gets the count of the groups of the action- Returns:
- the count of the groups of the action
-
getMolecule
Gets the molecule at the provided index- Parameters:
index
- the required index- Returns:
- the molecule at the provided index
-
getAbbreviation
Gets the abbreviation at the provided index- Parameters:
index
- the required index- Returns:
- the abbreviation at the provided index
-
removeGroup
Removes a group definition from the group list of the action- Parameters:
group
- group definition to be removed from the group list of the action
-
removeAllGroups
public void removeAllGroups()Removes all group definitions from the group list of the action. -
get
Returns the group definition at specified index.- Parameters:
index
- the index of group definition- Returns:
- the group definition at specified index
-
set
Sets the group definition at specified index, and returns the previous value.- Parameters:
index
- the index of element to changegroupDefinition
- the new group definition to set- Returns:
- the previous group definition at specified index
-
standardize1
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:
mol
- theMolecule
instance to be standardized- Returns:
- the changes applied on the molecule during the standardization process
-
clone
- Overrides:
clone
in classAbstractStandardizerAction
- Throws:
CloneNotSupportedException
-
getGroupList
Gets the list of groups set for the action- Returns:
- the list of groups set for the action
-
toString
- Overrides:
toString
in classAbstractStandardizerAction
-