|
|||||||||
| 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(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 |
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 |
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(java.util.List<StructureChecker> checkerList)
BasicCheckerRunner instance with specified StructureChecker list.
checkerList - the checker list| Method Detail |
|---|
public void setConfigurationReader(ConfigurationReader configurationReader)
CheckerRunner
setConfigurationReader in interface CheckerRunnerconfigurationReader - is the ConfigurationReader instance which provides the current configuraitonpublic boolean fix()
CheckerRunnerStructureChecker 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 CheckerRunnerpublic boolean fix(StructureCheckerResult result)
CheckerRunnerStructureFixer which
is associated with the StructureCheckerErrorType of the result.
fix in interface CheckerRunnerresult - a StructureCheckerResult instance which identifies the problem
public java.util.List<StructureFixer> getFixers(StructureCheckerResult result)
CheckerRunnerStructureFixer instances which associated with the
StructureCheckerErrorType of the result
getFixers in interface CheckerRunnerresult - a StructureCheckerResult instance which identifies the current problem
List of StructureFixerpublic void setMolecule(Molecule molecule)
CheckerRunner
setMolecule in interface CheckerRunnermolecule - a Molecule instance to be checkedpublic void check()
CheckerRunner
check in interface CheckerRunnerpublic void cancel()
CheckerRunner
cancel in interface CheckerRunnerpublic int getCurrent()
getCurrent in interface CheckerRunnerpublic java.lang.String getCurrentCheckerName()
getCurrentCheckerName in interface CheckerRunnerStructureChecker instance run currentlypublic int getProgessLength()
getProgessLength in interface CheckerRunnerpublic java.util.List<StructureCheckerResult> getResultList()
getResultList in interface CheckerRunnerList of StructureCheckerResult which contains all the
dentified problem about the given moleculepublic boolean isChecking()
CheckerRunner
isChecking in interface CheckerRunnerpublic void addPropertyChangeListener(java.beans.PropertyChangeListener changeListener)
CheckerRunnerPropertyChangeListener that will receive all the PropertyChangeEvent fired by this class
addPropertyChangeListener in interface CheckerRunnerchangeListener - a PropertyChangeListener instance
public void addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
CheckerRunnerPropertyChangeListener that will receive the PropertyChangeEvent fired when the property with
the given name is changed
addPropertyChangeListener in interface CheckerRunnerpropertyName - the name of the property to be listenedlistener - a PropertyChangeListener instancepublic java.util.List<StructureCheckerResult> checkAndWait()
CheckerRunnerList of StructureCheckerResult
which contains all the identified problems
checkAndWait in interface CheckerRunnerList 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()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||