Interface StandardizerAction

All Known Implementing Classes:
AbsoluteStereoAction, AbstractSgroupAction, AbstractStandardizerAction, AddExplicitHydrogensAction, AliasToAtomAction, AliasToGroupAction, AromatizeAction, Clean2DAction, Clean3DAction, ClearIsotopesAction, ClearStereoAction, ContractSgroupsAction, ConvertDoubleBondsAction, ConvertPiMetalBondsAction, ConvertToEnhancedStereoAction, CreateGroupAction, DearomatizeAction, DisconnectMetalAtomsAction, ExpandAction, ExpandSgroupsAction, InvalidStandardizerAction, MapAction, MapReactionAction, MesomerizeAction, NeutralizeAction, RearrangeReactionAction, RemoveAbsoluteStereoAction, RemoveAtomValuesAction, RemoveAttachedDataAction, RemoveExplicitHydrogensAction, RemoveFragmentAction, RemoveRGroupDefinitionsAction, RemoveSolventsAction, RemoveStereoCareBoxAction, ReplaceAtomsAction, SetAbsoluteStereoAction, SetHydrogenIsotopeSymbolAction, StripSaltsAction, TautomerizeAction, TransformAction, UngroupSgroupsAction, UnmapAction, WedgeCleanAction

@PublicApi public interface StandardizerAction
Interface of standardizer actions.

Actions are the basic individual components of the standardization process. An action can standardize an instance of Molecule, and return with the Changes applied on the molecule by the method standardize(Molecule)

The standardizer action must have a StandardizerActionDescriptor that stores information related to user interfaces.

Logs of standardization should be generated to a System.Logger, that can be collected by using StandardizerLogger.getLogger() method.

Since:
5.11
  • Method Details

    • getDescriptor

      Gets the descriptor of the standardizer action. Contains all necessary informations of the action for user interfaces.
      Returns:
      the descriptor of the standardizer action.
    • standardize

      Changes standardize(Molecule molecule) throws IllegalArgumentException
      Standardizes the provided molecule.
      Logs of standardization should be generated to a System.Logger, that can be collected by using StandardizerLogger.getLogger() method.
      Parameters:
      molecule - the target molecule of the standardization process
      Returns:
      the change set of the molecule
      Throws:
      IllegalArgumentException - on invalid molecules as input
    • isValid

      boolean isValid()
      Returns true if the action's parameters are valid, false otherwise
      Returns:
      true if the action's parameters are valid, false otherwise
    • isAvailable

      boolean isAvailable()
      Returns true if the action is available, and can be used
      Returns:
      true if the action is available, and can be used
    • isActive

      boolean isActive()
      Returns true if the action is active, and can be used
      Returns:
      true if the action is active, and can be used
    • setActive

      void setActive(boolean active)
      Sets whether the action is active, and can be used
      Parameters:
      active - whether the action should be active, and can be used
    • cloneItem

      StandardizerAction cloneItem()
      Returns a clone of this StandardizerAction instance
      Returns:
      a clone of this StandardizerAction instance
    • getID

      String getID()
      Gets the identifier of the standardizer task
      Returns:
      the identifier of the standardizer task
    • removePropertyChangeListener

      void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
      Remove a PropertyChangeListener for a specific property. If listener was added more than once to the same event source for the specified property, it will be notified one less time after being removed. If propertyName is null, no exception is thrown and no action is taken. If listener is null, or was never added for the specified property, no exception is thrown and no action is taken.
      Parameters:
      propertyName - The name of the property that was listened on.
      listener - The PropertyChangeListener to be removed
      See Also:
    • addPropertyChangeListener

      void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
      Add a PropertyChangeListener for a specific property. The listener will be invoked only when a call on firePropertyChange names that specific property. The same listener object may be added more than once. For each property, the listener will be invoked the number of times it was added for that property. If propertyName or listener is null, no exception is thrown and no action is taken.
      Parameters:
      propertyName - The name of the property to listen on.
      listener - The PropertyChangeListener to be added
      See Also:
    • removePropertyChangeListener

      void removePropertyChangeListener(PropertyChangeListener listener)
      Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties. If listener was added more than once to the same event source, it will be notified one less time after being removed. If listener is null, or was never added, no exception is thrown and no action is taken.
      Parameters:
      listener - The PropertyChangeListener to be removed
      See Also:
    • addPropertyChangeListener

      void addPropertyChangeListener(PropertyChangeListener listener)
      Add a PropertyChangeListener to the listener list. The listener is registered for all properties. The same listener object may be added more than once, and will be called as many times as it is added. If listener is null, no exception is thrown and no action is taken.
      Parameters:
      listener - The PropertyChangeListener to be added
      See Also:
    • setLicenseEnvironment

      void setLicenseEnvironment(String env)
      Sets the license environment of the action
      Parameters:
      env - the license environment of the action