Class CreateGroupAction
- java.lang.Object
-
- chemaxon.standardizer.AbstractStandardizerAction
-
- chemaxon.standardizer.advancedactions.CreateGroupAction
-
- All Implemented Interfaces:
chemaxon.license.Licensable
,StandardizerAction
,PropertyChangeListener
,Cloneable
,EventListener
@PublicAPI public final class CreateGroupAction extends AbstractStandardizerAction
Create Group standardizer action- Since:
- 5.11
-
-
Field Summary
Fields Modifier and Type Field Description static String
GROUP_LIST_KEY
Property key for group list modification-
Fields inherited from class chemaxon.standardizer.AbstractStandardizerAction
CONFIG_PATH_KEY, FORMAT_KEY, ID_KEY, support
-
-
Constructor Summary
Constructors Constructor Description CreateGroupAction(Map<String,String> params)
Initializes a create group standardizes action
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addGroup(GroupDefinition group)
Adds a group definition to the group list of the actionvoid
addGroup(String abbreviation)
Adds a group to the list defined by its abbreviationCreateGroupAction
clone()
GroupDefinition
get(int index)
Returns the group definition at specified index.String
getAbbreviation(int index)
Gets the abbreviation at the provided indexint
getGroupCount()
Gets the count of the groups of the actionchemaxon.standardizer.advancedactions.GroupList
getGroupList()
Gets the list of groups set for the actionMolecule
getMolecule(int index)
Gets the molecule at the provided indexvoid
removeAllGroups()
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 actionGroupDefinition
set(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.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
-
GROUP_LIST_KEY
public static final String GROUP_LIST_KEY
Property key for group list modification- See Also:
- Constant Field Values
-
-
Method Detail
-
addGroup
public void addGroup(GroupDefinition group)
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
public void addGroup(String abbreviation)
Adds a group to the list defined by its abbreviation- Parameters:
abbreviation
- the abbreviation of the group to be added
-
setAbbreviation
public void setAbbreviation(int index, String abbreviation)
Sets the abbreviation of the group at the provided index- Parameters:
index
- the target indexabbreviation
- the abbreviation to be set
-
setMolecule
public void setMolecule(int index, Molecule molecule)
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
public Molecule getMolecule(int index)
Gets the molecule at the provided index- Parameters:
index
- the required index- Returns:
- the molecule at the provided index
-
getAbbreviation
public String getAbbreviation(int index)
Gets the abbreviation at the provided index- Parameters:
index
- the required index- Returns:
- the abbreviation at the provided index
-
removeGroup
public void removeGroup(GroupDefinition group)
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
public GroupDefinition get(int index)
Returns the group definition at specified index.- Parameters:
index
- the index of group definition- Returns:
- the group definition at specified index
-
set
public GroupDefinition set(int index, GroupDefinition groupDefinition)
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
protected Changes standardize1(Molecule mol)
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
public CreateGroupAction clone() throws CloneNotSupportedException
- Overrides:
clone
in classAbstractStandardizerAction
- Throws:
CloneNotSupportedException
-
getGroupList
public chemaxon.standardizer.advancedactions.GroupList getGroupList()
Gets the list of groups set for the action- Returns:
- the list of groups set for the action
-
toString
public String toString()
- Overrides:
toString
in classAbstractStandardizerAction
-
-