Package chemaxon.standardizer.runner
Class BasicStandardizerRunner
java.lang.Object
chemaxon.standardizer.runner.BasicStandardizerRunner
- All Implemented Interfaces:
- StandardizerActionRunner,- Cloneable
This is the default implementation of 
 
StandardizerActionRunner
 interface.
 If the provided molecule is null or contains errors
 IllegalArgumentException should be thrown during the standardization
 procedure. 
 
 Logs are generated to a System.Logger, that can be collected by using
 StandardizerLogger.getLogger() method.
- Since:
- 5.11
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionBasicStandardizerRunner(StandardizerConfigurationReader configurationReader) Initialize aBasicStandardizerRunnerinstance with theStandardizerConfigurationread from the provided configuration reader.BasicStandardizerRunner(StandardizerConfiguration configuration) Initialize aBasicStandardizerRunnerinstance with specifiedStandardizerConfiguration.
- 
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 threadclone()Gets the list of actions applied in the configuration at the last executionGets the list of changes applied on the molecule.protected PropertyChangeSupportReturns the changeSupportGets the configuration of the runnerintGets the current progress percentGets whichStandardizerActioninstance run currentlyprotected intgetIndex()Returns the index of the actual action of the configurationReturns the target moleculeintGets the length of the standardization processprotected RunnableReturns the strategy to use.String[]Gets the target action groups of the standardizerprotected booleanReturns whether the process is cancelledbooleanThis function identifies the state of the standardizer threadprotected voidsetCanceled(boolean canceled) Sets whether the process is cancelledprotected voidsetChangeSupport(PropertyChangeSupport changeSupport) Sets the changeSupportvoidsetConfiguration(StandardizerConfiguration configuration) Sets the configuration of the runnervoidsetConfigurationReader(StandardizerConfigurationReader configurationReader) Sets a new configuration for the runner.voidsetIgnoreConfigurationErrors(boolean ignore) Sets whether configuration errors should be ignoredprotected voidsetIndex(int index) Sets the index of the actual action of the configurationvoidSets 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.
- 
Field Details- 
moleculeTheMoleculeinstance to standardize
- 
backgroundThread
 
- 
- 
Constructor Details- 
BasicStandardizerRunnerInitialize aBasicStandardizerRunnerinstance with theStandardizerConfigurationread from the provided configuration reader.- Parameters:
- configurationReader- a- StandardizerConfigurationReaderinstance, containing the configuration of the standardization process
 
- 
BasicStandardizerRunnerInitialize aBasicStandardizerRunnerinstance with specifiedStandardizerConfiguration.- Parameters:
- configuration- the configuration of the standardization procedure
 
 
- 
- 
Method Details- 
setConfigurationReaderDescription copied from interface:StandardizerActionRunnerSets a new configuration for the runner.- Specified by:
- setConfigurationReaderin interface- StandardizerActionRunner
- Parameters:
- configurationReader- is the- StandardizerConfigurationReaderinstance which provides the current configuration
 
- 
setMoleculeDescription copied from interface:StandardizerActionRunnerSets the molecule to be standardized by the standardizer actions- Specified by:
- setMoleculein interface- StandardizerActionRunner
- Parameters:
- molecule- a- Moleculeinstance to be standardized
 
- 
standardizeDescription copied from interface:StandardizerActionRunnerInvoke a background thread which will run all standardizer actions on the given molecule- Specified by:
- standardizein interface- StandardizerActionRunner
- Throws:
- IllegalArgumentException- if the configuration or the molecule contains errors
 
- 
cancelpublic void cancel()Description copied from interface:StandardizerActionRunnerStops the background thread- Specified by:
- cancelin interface- StandardizerActionRunner
 
- 
getCurrentpublic int getCurrent()Description copied from interface:StandardizerActionRunnerGets the current progress percent- Specified by:
- getCurrentin interface- StandardizerActionRunner
- Returns:
- the current progress percent
 
- 
getCurrentActionNameDescription copied from interface:StandardizerActionRunnerGets whichStandardizerActioninstance run currently- Specified by:
- getCurrentActionNamein interface- StandardizerActionRunner
- Returns:
- which StandardizerActioninstance run currently
 
- 
getProgessLengthpublic int getProgessLength()Description copied from interface:StandardizerActionRunnerGets the length of the standardization process- Specified by:
- getProgessLengthin interface- StandardizerActionRunner
- Returns:
- the length of the standardization process
 
- 
isRunningpublic boolean isRunning()Description copied from interface:StandardizerActionRunnerThis function identifies the state of the standardizer thread- Specified by:
- isRunningin interface- StandardizerActionRunner
- Returns:
- true if the background thread runs false otherwise
 
- 
addPropertyChangeListenerDescription copied from interface:StandardizerActionRunnerAdds aPropertyChangeListenerthat will receive all thePropertyChangeEventfired by this class- Specified by:
- addPropertyChangeListenerin interface- StandardizerActionRunner
- Parameters:
- changeListener- a- PropertyChangeListenerinstance
 
- 
addPropertyChangeListenerDescription copied from interface:StandardizerActionRunnerAdds aPropertyChangeListenerthat will receive thePropertyChangeEventfired when the property with the given name is changed- Specified by:
- addPropertyChangeListenerin interface- StandardizerActionRunner
- Parameters:
- propertyName- the name of the property to be listened
- listener- a- PropertyChangeListenerinstance
 
- 
standardizeAndWaitDescription copied from interface:StandardizerActionRunnerExecutes 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.- Specified by:
- standardizeAndWaitin interface- StandardizerActionRunner
- Returns:
- the list of changes applied on the molecule
- Throws:
- IllegalArgumentException- if the configuration or the molecule contains errors
 
- 
getStrategyReturns the strategy to use.- Returns:
- the strategy
 
- 
setCanceledprotected void setCanceled(boolean canceled) Sets whether the process is cancelled- Parameters:
- canceled- whether the process should be cancelled
 
- 
isCanceledprotected boolean isCanceled()Returns whether the process is cancelled- Returns:
- whether the process is cancelled
 
- 
setIndexprotected void setIndex(int index) Sets the index of the actual action of the configuration- Parameters:
- index- the index of the actual action of the configuration
 
- 
getIndexprotected int getIndex()Returns the index of the actual action of the configuration- Returns:
- the index of the actual action of the configuration
 
- 
setConfigurationDescription copied from interface:StandardizerActionRunnerSets the configuration of the runner- Specified by:
- setConfigurationin interface- StandardizerActionRunner
- Parameters:
- configuration- the configuration to be set to the runner
 
- 
getMoleculeReturns the target molecule- Returns:
- the target molecule
 
- 
setChangeSupportSets the changeSupport- Parameters:
- changeSupport- the changeSupport to be set
 
- 
getChangeSupportReturns the changeSupport- Returns:
- the changeSupport
 
- 
getConfigurationDescription copied from interface:StandardizerActionRunnerGets the configuration of the runner- Specified by:
- getConfigurationin interface- StandardizerActionRunner
- Returns:
- the configuration of the runner
 
- 
getAppliedActionsDescription copied from interface:StandardizerActionRunnerGets the list of actions applied in the configuration at the last execution- Specified by:
- getAppliedActionsin interface- StandardizerActionRunner
- Returns:
- the list of applied actions at the last execution
 
- 
setTargetGroupDescription copied from interface:StandardizerActionRunnerSets the target group of standardizer action of the runner- Specified by:
- setTargetGroupin interface- StandardizerActionRunner
- Parameters:
- groupName- the name of the group of standardizer actions
 
- 
setTargetGroupsDescription copied from interface:StandardizerActionRunnerSets the target groups of standardizer action of the runner- Specified by:
- setTargetGroupsin interface- StandardizerActionRunner
- Parameters:
- groupNames- the names of the groups of standardizer actions
 
- 
getTargetGroupsGets the target action groups of the standardizer- Returns:
- the target action groups of the standardizer
 
- 
clone- Overrides:
- clonein class- Object
- Throws:
- CloneNotSupportedException
 
- 
setLicenseEnvironmentDescription copied from interface:StandardizerActionRunnerSets the license environment of the runner- Specified by:
- setLicenseEnvironmentin interface- StandardizerActionRunner
- Parameters:
- env- the license environment of the runner
 
- 
getChangesDescription copied from interface:StandardizerActionRunnerGets the list of changes applied on the molecule. For each action of the configuration there is a change object (or null) in the list.- Specified by:
- getChangesin interface- StandardizerActionRunner
- Returns:
- the list of changes applied on the molecule
 
- 
setIgnoreConfigurationErrorspublic void setIgnoreConfigurationErrors(boolean ignore) Description copied from interface:StandardizerActionRunnerSets whether configuration errors should be ignored- Specified by:
- setIgnoreConfigurationErrorsin interface- StandardizerActionRunner
- Parameters:
- ignore- whether configuration errors should be ignored
 
 
-