Package chemaxon.standardizer
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
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 Summary
Modifier and TypeMethodDescriptionvoid
Add a PropertyChangeListener to the listener list.void
addPropertyChangeListener
(String propertyName, PropertyChangeListener listener) Add a PropertyChangeListener for a specific property.Returns a clone of thisStandardizerAction
instanceGets the descriptor of the standardizer action.getID()
Gets the identifier of the standardizer taskboolean
isActive()
Returns true if the action is active, and can be usedboolean
Returns true if the action is available, and can be usedboolean
isValid()
Returns true if the action's parameters are valid, false otherwisevoid
Remove a PropertyChangeListener from the listener list.void
removePropertyChangeListener
(String propertyName, PropertyChangeListener listener) Remove a PropertyChangeListener for a specific property.void
setActive
(boolean active) Sets whether the action is active, and can be usedvoid
Sets the license environment of the actionstandardize
(Molecule molecule) Standardizes the provided molecule.
Logs of standardization should be generated to aSystem.Logger
, that can be collected by usingStandardizerLogger.getLogger()
method.
-
Method Details
-
getDescriptor
StandardizerActionDescriptor 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
Standardizes the provided molecule.
Logs of standardization should be generated to aSystem.Logger
, that can be collected by usingStandardizerLogger.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 thisStandardizerAction
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
Remove a PropertyChangeListener for a specific property. Iflistener
was added more than once to the same event source for the specified property, it will be notified one less time after being removed. IfpropertyName
is null, no exception is thrown and no action is taken. Iflistener
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
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. IfpropertyName
orlistener
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
Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties. Iflistener
was added more than once to the same event source, it will be notified one less time after being removed. Iflistener
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
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. Iflistener
is null, no exception is thrown and no action is taken.- Parameters:
listener
- The PropertyChangeListener to be added- See Also:
-
setLicenseEnvironment
Sets the license environment of the action- Parameters:
env
- the license environment of the action
-