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 Details

  • Constructor Details

    • CreateGroupAction

      public CreateGroupAction(Map<String,String> params)
      Initializes a create group standardizes action
      Parameters:
      params - the parameter map of the action
  • Method Details

    • 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 index
      abbreviation - 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 index
      molecule - 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 change
      groupDefinition - 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 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.
      Logs of standardization should be generated to a Logger, that can be collected by using StandardizerLogger.getLogger() method.
      Specified by:
      standardize1 in class AbstractStandardizerAction
      Parameters:
      mol - the Molecule instance to be standardized
      Returns:
      the changes applied on the molecule during the standardization process
    • clone

      Overrides:
      clone in class AbstractStandardizerAction
      Throws:
      CloneNotSupportedException
    • getGroupList

      public List<GroupDefinition> 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 class AbstractStandardizerAction