|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchemaxon.checkers.runner.BasicCheckerRunner
public class BasicCheckerRunner
This is the default basic implementation of CheckerRunner
interface/
Field Summary | |
---|---|
protected java.lang.Thread |
backgroundThread
|
protected Molecule |
molecule
The Molecule instance to check |
Constructor Summary | |
---|---|
BasicCheckerRunner(ConfigurationReader configurationReader)
Initiate a BasicCheckerRunner instance which will can execute StructureChecker instances read from
configurationReader |
|
BasicCheckerRunner(ConfigurationReader configurationReader,
chemaxon.fixers.StructureFixerFactory fixerFactory)
Initiate a BasicCheckerRunner instance which will can execute StructureChecker instances read from
configurationReader |
|
BasicCheckerRunner(java.util.List<StructureChecker> checkerList)
Initiate a BasicCheckerRunner instance with specified StructureChecker list. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener changeListener)
Adds a PropertyChangeListener that will receive all the PropertyChangeEvent fired by this class |
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener that will receive the PropertyChangeEvent fired when the property with
the given name is changed |
void |
cancel()
Stops the background thread |
void |
check()
Invoke a background thread which will run all checkers on the given molecule |
java.util.List<StructureCheckerResult> |
checkAndWait()
Execute all the checker instances on the given molecule and return a List of StructureCheckerResult
which contains all the identified problems |
protected void |
convertResult(StructureCheckerResult result)
This method provides the possibility to convert back the affected properties of the result if there was any convert in the molecule structure before check. |
boolean |
fix()
Runs all StructureChecker on the given molecule and after that fixes all
identified problems with the first StructureFixer which is associated with the current problem. |
boolean |
fix(StructureCheckerResult result)
Fixes the problem identified by result with the first StructureFixer which
is associated with the StructureCheckerErrorType of the result. |
protected java.beans.PropertyChangeSupport |
getChangeSupport()
Returns the changeSupport |
java.util.List<StructureChecker> |
getCheckerConfiguration()
Gets the list of available checkers |
protected java.util.List<StructureChecker> |
getCheckerList()
Returns the checkerList |
int |
getCurrent()
|
java.lang.String |
getCurrentCheckerName()
|
java.util.List<StructureFixer> |
getFixers(StructureCheckerResult result)
Returns all the StructureFixer instances which associated with the
StructureCheckerErrorType of the result |
protected int |
getIndex()
Returns the index |
protected Molecule |
getMolecule()
Returns the molecule |
int |
getProgessLength()
|
java.util.List<StructureCheckerResult> |
getResultList()
|
protected java.lang.Runnable |
getStrategy()
Returns the strategy to use. |
protected boolean |
isCanceled()
Returns the canceled |
boolean |
isChecking()
This function identifies the state of the checker thread |
protected boolean |
isDoodle()
Returns the isDoodle |
protected void |
setCanceled(boolean canceled)
Sets the canceled |
protected void |
setChangeSupport(java.beans.PropertyChangeSupport changeSupport)
Sets the changeSupport |
protected void |
setCheckerList(java.util.List<StructureChecker> checkerList)
Sets the checkerList |
void |
setConfigurationReader(ConfigurationReader configurationReader)
Sets a new configuration for the Runner. |
protected void |
setDoodle(boolean isDoodle)
Sets the isDoodle |
void |
setIgnoreConfigurationErrors(boolean ignore)
Sets whether configuration errors should be ignored on execution. |
protected void |
setIndex(int index)
Sets the index |
void |
setMolecule(Molecule molecule)
Sets the molecule to be checked by the checkers |
protected void |
setResultList(java.util.List<StructureCheckerResult> resultList)
Sets the resultList |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Molecule molecule
Molecule
instance to check
protected java.lang.Thread backgroundThread
Constructor Detail |
---|
public BasicCheckerRunner(ConfigurationReader configurationReader)
BasicCheckerRunner
instance which will can execute StructureChecker
instances read from
configurationReader
configurationReader
- a ConfigurationReader
instancepublic BasicCheckerRunner(ConfigurationReader configurationReader, chemaxon.fixers.StructureFixerFactory fixerFactory)
BasicCheckerRunner
instance which will can execute StructureChecker
instances read from
configurationReader
configurationReader
- a ConfigurationReader
instancefixerFactory
- the fixer factorypublic BasicCheckerRunner(java.util.List<StructureChecker> checkerList)
BasicCheckerRunner
instance with specified StructureChecker
list.
checkerList
- the checker listMethod Detail |
---|
public void setConfigurationReader(ConfigurationReader configurationReader)
CheckerRunner
setConfigurationReader
in interface CheckerRunner
configurationReader
- is the ConfigurationReader
instance which provides the current configuraitonpublic boolean fix()
CheckerRunner
StructureChecker
on the given molecule and after that fixes all
identified problems with the first StructureFixer
which is associated with the current problem.
fix
in interface CheckerRunner
public boolean fix(StructureCheckerResult result)
CheckerRunner
StructureFixer
which
is associated with the StructureCheckerErrorType
of the result.
fix
in interface CheckerRunner
result
- a StructureCheckerResult
instance which identifies the problem
public java.util.List<StructureFixer> getFixers(StructureCheckerResult result)
CheckerRunner
StructureFixer
instances which associated with the
StructureCheckerErrorType
of the result
getFixers
in interface CheckerRunner
result
- a StructureCheckerResult
instance which identifies the current problem
List
of StructureFixer
public void setMolecule(Molecule molecule)
CheckerRunner
setMolecule
in interface CheckerRunner
molecule
- a Molecule
instance to be checkedpublic void check()
CheckerRunner
check
in interface CheckerRunner
public void cancel()
CheckerRunner
cancel
in interface CheckerRunner
public int getCurrent()
getCurrent
in interface CheckerRunner
public java.lang.String getCurrentCheckerName()
getCurrentCheckerName
in interface CheckerRunner
StructureChecker
instance run currentlypublic int getProgessLength()
getProgessLength
in interface CheckerRunner
public java.util.List<StructureCheckerResult> getResultList()
getResultList
in interface CheckerRunner
List
of StructureCheckerResult
which contains all the
dentified problem about the given moleculepublic boolean isChecking()
CheckerRunner
isChecking
in interface CheckerRunner
public void addPropertyChangeListener(java.beans.PropertyChangeListener changeListener)
CheckerRunner
PropertyChangeListener
that will receive all the PropertyChangeEvent
fired by this class
addPropertyChangeListener
in interface CheckerRunner
changeListener
- a PropertyChangeListener
instancepublic void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
CheckerRunner
PropertyChangeListener
that will receive the PropertyChangeEvent
fired when the property with
the given name is changed
addPropertyChangeListener
in interface CheckerRunner
propertyName
- the name of the property to be listenedlistener
- a PropertyChangeListener
instancepublic java.util.List<StructureCheckerResult> checkAndWait()
CheckerRunner
List
of StructureCheckerResult
which contains all the identified problems
checkAndWait
in interface CheckerRunner
List
of StructureCheckerResult
which contains all the
identified problem about the given moleculeprotected void convertResult(StructureCheckerResult result)
result
- the StructureCheckerResult
instanceprotected java.lang.Runnable getStrategy()
protected void setCanceled(boolean canceled)
canceled
- the canceled to setprotected boolean isCanceled()
protected void setDoodle(boolean isDoodle)
isDoodle
- the isDoodle to setprotected boolean isDoodle()
protected void setIndex(int index)
index
- the index to setprotected int getIndex()
protected void setResultList(java.util.List<StructureCheckerResult> resultList)
resultList
- the resultList to setprotected void setCheckerList(java.util.List<StructureChecker> checkerList)
checkerList
- the checkerList to setprotected java.util.List<StructureChecker> getCheckerList()
protected Molecule getMolecule()
protected void setChangeSupport(java.beans.PropertyChangeSupport changeSupport)
changeSupport
- the changeSupport to setprotected java.beans.PropertyChangeSupport getChangeSupport()
public java.util.List<StructureChecker> getCheckerConfiguration()
CheckerRunner
getCheckerConfiguration
in interface CheckerRunner
public void setIgnoreConfigurationErrors(boolean ignore)
CheckerRunner
setIgnoreConfigurationErrors
in interface CheckerRunner
ignore
- true if configuration errors should be ignored on execution
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |