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, propertyChangeSupportFields inherited from interface chemaxon.checkers.StructureChecker
PROPERTY_KEY_VALID -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedReactionChecker(StructureCheckerErrorType errorType, StructureChecker checker) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected StructureCheckerResultThis method contains the current checking mechanism.protected StructureCheckerResultcreateResult(Molecule molecule, List<StructureCheckerResult> resultList) This method a merged StructureCheckerResult from theListofStructureCheckerResultwhich contains the problems of the components in the reactionprotected abstract booleanisCorrect(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 standardStructureCheckerwhich contains the checking logic for the components of the reaction
-
-
Method Details
-
check1
Description copied from class:AbstractStructureCheckerThis method contains the current checking mechanism.- Specified by:
check1in classAbstractStructureChecker- Parameters:
molecule- theMoleculeinstance to be checked for problems- Returns:
- a
StructureCheckerResultwhich 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 aStructureCheckerResultreturned 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 theListofStructureCheckerResultwhich contains the problems of the components in the reaction- Parameters:
molecule- theMoleculeinstance which contains the problemsresultList- is aListofStructureCheckerResultwhich contains the problems of the components in the reaction- Returns:
- a merged
StructureCheckerResultfrom theListofStructureCheckerResultrepresented by resultList parameter
-