Package chemaxon.standardizer.runner
Interface StandardizerActionRunner
- All Superinterfaces:
- Cloneable
- All Known Implementing Classes:
- BasicStandardizerRunner
The descendant of 
As standardizer configuration may contain actions in groups, using
By default, in case of the provided configuration containing error(s) the runner throws
If errors of configuration needs to be checked, use the
Standardization can be executed by
The applied standardizer actions can be collected using
Logs are generated to a
Note, that
StandardizerActionRunner interface has to provide
 the functionality to run StandardizerConfiguration instances
 automatically on the given molecule.As standardizer configuration may contain actions in groups, using
setTargetGroup(String) and setTargetGroups(String...)
 methods, the target groups, containing the actions to be executed can be
 defined.By default, in case of the provided configuration containing error(s) the runner throws
IllegalArgumentException. Configuration errors can be
 ignored using the method
 setIgnoreConfigurationErrors(boolean) with
 true as parameter. In this case the faulty actions are not executed, error
 message or exception should not occur! If errors of configuration needs to be checked, use the
getConfiguration() method to get the
 configuration, and check the validity of the configuration by using the
 function StandardizerConfiguration.isValid().Standardization can be executed by
standardize() and
 standardizeAndWait() method. The method standardize()
 executes the standardization in a background thread. The state of the
 standardization can be gathered using isRunning() method. Using
 standardizeAndWait() method the thread is blocked until the
 standardization finishes. The applied standardizer actions can be collected using
getAppliedActions(), and the changes applied on the molecule can be
 collected using getChanges() method.Logs are generated to a
System.Logger, that can be collected by using
 StandardizerLogger.getLogger() method.Note, that
setMolecule(Molecule) method must be called prior
 standardization.- Since:
- 5.11
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddPropertyChangeListener(PropertyChangeListener changeListener) Adds aPropertyChangeListenerthat will receive all thePropertyChangeEventfired by this classvoidaddPropertyChangeListener(String propertyName, PropertyChangeListener listener) Adds aPropertyChangeListenerthat will receive thePropertyChangeEventfired when the property with the given name is changedvoidcancel()Stops the background threadGets the list of actions applied in the configuration at the last executionGets the list of changes applied on the molecule.Gets the configuration of the runnerintGets the current progress percentGets whichStandardizerActioninstance run currentlyintGets the length of the standardization processbooleanThis function identifies the state of the standardizer threadvoidsetConfiguration(StandardizerConfiguration configuration) Sets the configuration of the runnervoidSets a new configuration for the runner.voidsetIgnoreConfigurationErrors(boolean ignore) Sets whether configuration errors should be ignoredvoidSets the license environment of the runnervoidsetMolecule(Molecule molecule) Sets the molecule to be standardized by the standardizer actionsvoidsetTargetGroup(String groupName) Sets the target group of standardizer action of the runnervoidsetTargetGroups(String... groupNames) Sets the target groups of standardizer action of the runnervoidInvoke a background thread which will run all standardizer actions on the given moleculeExecutes all standardizer actions contained by the pre-set configuration on the given molecule and returns the list of applied changes.
- 
Method Details- 
setConfigurationReaderSets a new configuration for the runner.- Parameters:
- reader- is the- StandardizerConfigurationReaderinstance which provides the current configuration
 
- 
standardizeInvoke a background thread which will run all standardizer actions on the given molecule- Throws:
- IllegalArgumentException- if the configuration or the molecule contains errors
 
- 
standardizeAndWaitExecutes all standardizer actions contained by the pre-set configuration on the given molecule and returns the list of applied changes. For each action of the configuration there is a change object (or null) in the list.- Returns:
- the list of changes applied on the molecule
- Throws:
- IllegalArgumentException- if the configuration or the molecule contains errors
 
- 
cancelvoid cancel()Stops the background thread
- 
isRunningboolean isRunning()This function identifies the state of the standardizer thread- Returns:
- true if the background thread runs false otherwise
 
- 
getCurrentint getCurrent()Gets the current progress percent- Returns:
- the current progress percent
 
- 
getCurrentActionNameString getCurrentActionName()Gets whichStandardizerActioninstance run currently- Returns:
- which StandardizerActioninstance run currently
 
- 
getProgessLengthint getProgessLength()Gets the length of the standardization process- Returns:
- the length of the standardization process
 
- 
getChangesGets the list of changes applied on the molecule. For each action of the configuration there is a change object (or null) in the list.- Returns:
- the list of changes applied on the molecule
 
- 
setMoleculeSets the molecule to be standardized by the standardizer actions- Parameters:
- molecule- a- Moleculeinstance to be standardized
 
- 
addPropertyChangeListenerAdds aPropertyChangeListenerthat will receive all thePropertyChangeEventfired by this class- Parameters:
- changeListener- a- PropertyChangeListenerinstance
 
- 
addPropertyChangeListenerAdds aPropertyChangeListenerthat will receive thePropertyChangeEventfired when the property with the given name is changed- Parameters:
- propertyName- the name of the property to be listened
- listener- a- PropertyChangeListenerinstance
 
- 
getConfigurationStandardizerConfiguration getConfiguration()Gets the configuration of the runner- Returns:
- the configuration of the runner
 
- 
setConfigurationSets the configuration of the runner- Parameters:
- configuration- the configuration to be set to the runner
 
- 
getAppliedActionsList<StandardizerAction> getAppliedActions()Gets the list of actions applied in the configuration at the last execution- Returns:
- the list of applied actions at the last execution
 
- 
setTargetGroupSets the target group of standardizer action of the runner- Parameters:
- groupName- the name of the group of standardizer actions
 
- 
setTargetGroupsSets the target groups of standardizer action of the runner- Parameters:
- groupNames- the names of the groups of standardizer actions
 
- 
setLicenseEnvironmentSets the license environment of the runner- Parameters:
- env- the license environment of the runner
 
- 
setIgnoreConfigurationErrorsvoid setIgnoreConfigurationErrors(boolean ignore) Sets whether configuration errors should be ignored- Parameters:
- ignore- whether configuration errors should be ignored
 
 
-