Package chemaxon.checkers
Class ReactionChecker
java.lang.Object
chemaxon.checkers.AbstractStructureChecker
chemaxon.checkers.ReactionChecker
- All Implemented Interfaces:
StructureChecker
,chemaxon.license.Licensable
,PropertyChangeListener
,Cloneable
,EventListener
- Direct Known Subclasses:
ReactionMapErrorChecker
Descendants of ReactionChecker detect reaction scheme problems.
- Since:
- Marvin 5.3
-
Field Summary
Fields inherited from class chemaxon.checkers.AbstractStructureChecker
errorType, propertyChangeSupport
Fields inherited from interface chemaxon.checkers.StructureChecker
PROPERTY_KEY_VALID
-
Constructor Summary
ModifierConstructorDescriptionprotected
ReactionChecker
(StructureCheckerErrorType errorType, StructureChecker checker) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected StructureCheckerResult
This method contains the current checking mechanism.protected StructureCheckerResult
createResult
(Molecule molecule, List<StructureCheckerResult> resultList) This method a merged StructureCheckerResult from theList
ofStructureCheckerResult
which contains the problems of the components in the reactionprotected abstract boolean
isCorrect
(StructureCheckerResult result) This method determines if a component of the reaction correct or not.Methods inherited from class chemaxon.checkers.AbstractStructureChecker
addPropertyChangeListener, addPropertyChangeListener, check, clone, cloneItem, convertResult, equals, expandMolecule, getDescription, getDescriptor, getEditorClassName, getErrorCode, getErrorDescription, getErrorType, getHelpText, getIcon, getLocalMenuName, getName, hashCode, isAvailable, isLicensed, isValid, propertyChange, removePropertyChangeListener, removePropertyChangeListener, setDescription, setHelpText, setIcon, setLicenseEnvironment, setLocalMenuName, setMoreErrorMessage, setName, setNoErrorMessage, setOneErrorMessage, toString
-
Constructor Details
-
ReactionChecker
Default constructor. Sets the error type of the checker, and the checker logic, which contains the rule(s) will have to be checked on the components of the reaction.- Parameters:
errorType
- the type of the error checked by the checkerchecker
- is a standardStructureChecker
which contains the checking logic for the components of the reaction
-
-
Method Details
-
check1
Description copied from class:AbstractStructureChecker
This method contains the current checking mechanism.- Specified by:
check1
in classAbstractStructureChecker
- Parameters:
molecule
- theMolecule
instance to be checked for problems- Returns:
- a
StructureCheckerResult
which represents the problem or null if no problem found
-
isCorrect
This method determines if a component of the reaction correct or not. Override it in descendants to define the criteria which should be fulfilled by the components.- Parameters:
result
- is aStructureCheckerResult
returned by the checker logic- Returns:
- true if the reaction component is correct false otherwise
-
createResult
protected StructureCheckerResult createResult(Molecule molecule, List<StructureCheckerResult> resultList) This method a merged StructureCheckerResult from theList
ofStructureCheckerResult
which contains the problems of the components in the reaction- Parameters:
molecule
- theMolecule
instance which contains the problemsresultList
- is aList
ofStructureCheckerResult
which contains the problems of the components in the reaction- Returns:
- a merged
StructureCheckerResult
from theList
ofStructureCheckerResult
represented by resultList parameter
-