public class AdvancedCheckerRunner extends BasicCheckerRunner
CheckerRunner
implementation with advanced fixing capabilities.StructureFixer
selection is based on provided fixer class if
available, or falls back to StructureCheckerResult
based selection.Modifier and Type | Field and Description |
---|---|
protected chemaxon.checkers.logger.StructureCheckerLogger |
logger |
backgroundThread, molecule
Constructor and Description |
---|
AdvancedCheckerRunner(ConfigurationReader configurationReader)
Constructs
CheckerRunner with more advanced fixing capabilities. |
Modifier and Type | Method and Description |
---|---|
void |
check()
Invoke a background thread which will run all checkers on the given molecule
|
List<StructureCheckerResult> |
checkAndWait()
Execute all the checker instances on the given molecule and return a
List of StructureCheckerResult
which contains all the identified problems |
boolean |
fix()
Checks the structure, then fixes the problems based on configuration.
NOTE: FixMode and fixerClassName from configuration is used to
choose best fixer. |
boolean |
fix(StructureCheckerResult result)
Fixes the given result based on the fixer defined for the checker.
|
protected boolean |
fix(StructureChecker checker,
StructureCheckerResult result)
Tries to fix the problem detected by the specified checker, or falls back
to result based behavior.
|
chemaxon.checkers.logger.StructureCheckerLogger |
getLogger()
Returns the current logger.
|
protected boolean |
isFallBackToBasic()
Returns
true if runner should fall back to basic runner when preferred fix failed. |
void |
setLogger(chemaxon.checkers.logger.StructureCheckerLogger logger)
Sets the logger.
|
void |
setMolecule(Molecule molecule)
Sets the molecule to be checked by the checkers
|
addPropertyChangeListener, addPropertyChangeListener, cancel, convertResult, getChangeSupport, getCheckerConfiguration, getCheckerList, getCurrent, getCurrentCheckerName, getFixers, getIndex, getMolecule, getProgessLength, getResultList, getStrategy, isCanceled, isChecking, isDoodle, setCanceled, setChangeSupport, setCheckerList, setConfigurationReader, setDoodle, setIgnoreConfigurationErrors, setIndex, setResultList
public AdvancedCheckerRunner(ConfigurationReader configurationReader)
CheckerRunner
with more advanced fixing capabilities.configurationReader
- the checker configurationpublic boolean fix(StructureCheckerResult result)
fix
in interface CheckerRunner
fix
in class BasicCheckerRunner
result
- the checker result to fixprotected boolean fix(StructureChecker checker, StructureCheckerResult result)
FixMode
is different from
FixMode.FIX
, no fixing attempt will be performed.checker
- the checker that detected the problemresult
- the result of checktrue
if problem is fixedprotected boolean isFallBackToBasic()
true
if runner should fall back to basic runner when preferred fix failed.true
if runner should fall back to basic runner when preferred fix failedpublic boolean fix()
FixMode
and fixerClassName from configuration is used to
choose best fixer. Checkers with FixMode FixMode.ASK
will not be
fixed. Runs multiple iterations for best fix results.fix
in interface CheckerRunner
fix
in class BasicCheckerRunner
public List<StructureCheckerResult> checkAndWait()
CheckerRunner
List
of StructureCheckerResult
which contains all the identified problemscheckAndWait
in interface CheckerRunner
checkAndWait
in class BasicCheckerRunner
List
of StructureCheckerResult
which contains all the
identified problem about the given moleculepublic void check()
CheckerRunner
check
in interface CheckerRunner
check
in class BasicCheckerRunner
public void setMolecule(Molecule molecule)
CheckerRunner
setMolecule
in interface CheckerRunner
setMolecule
in class BasicCheckerRunner
molecule
- a Molecule
instance to be checkedpublic chemaxon.checkers.logger.StructureCheckerLogger getLogger()
public void setLogger(chemaxon.checkers.logger.StructureCheckerLogger logger)
logger
- the new logger