chemaxon.checkers
Class ReactionChecker

java.lang.Object
  extended by chemaxon.checkers.AbstractStructureChecker
      extended by chemaxon.checkers.ReactionChecker
All Implemented Interfaces:
StructureChecker, chemaxon.license.Licensable, java.beans.PropertyChangeListener, java.lang.Cloneable, java.util.EventListener
Direct Known Subclasses:
ReactionMapErrorChecker

public abstract class ReactionChecker
extends AbstractStructureChecker

Descendants of ReactionChecker detect reaction scheme problems.

Since:
Marvin 5.3
Version:
5.7
Author:
Attila Szabo

Field Summary
 
Fields inherited from class chemaxon.checkers.AbstractStructureChecker
errorType, propertyChangeSupport
 
Fields inherited from interface chemaxon.checkers.StructureChecker
PROPERTY_KEY_VALID
 
Constructor Summary
ReactionChecker(StructureCheckerErrorType errorType, StructureChecker checker)
          Default constructor.
 
Method Summary
protected  StructureCheckerResult check1(Molecule molecule)
          This method contains the current checking mechanism.
protected  StructureCheckerResult createResult(Molecule molecule, java.util.List<StructureCheckerResult> resultList)
          This method a merged StructureCheckerResult from the List of StructureCheckerResult which contains the problems of the components in the reaction
protected 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
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReactionChecker

public ReactionChecker(StructureCheckerErrorType errorType,
                       StructureChecker checker)
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 checker
checker - is a standard StructureChecker which contains the checking logic for the components of the reaction
Method Detail

check1

protected StructureCheckerResult check1(Molecule molecule)
Description copied from class: AbstractStructureChecker
This method contains the current checking mechanism.

Specified by:
check1 in class AbstractStructureChecker
Parameters:
molecule - the Molecule instance to be checked for problems
Returns:
a StructureCheckerResult which represents the problem or null if no problem found

isCorrect

protected abstract boolean isCorrect(StructureCheckerResult result)
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 a StructureCheckerResult returned by the checker logic
Returns:
true if the reaction component is correct false otherwise

createResult

protected StructureCheckerResult createResult(Molecule molecule,
                                              java.util.List<StructureCheckerResult> resultList)
This method a merged StructureCheckerResult from the List of StructureCheckerResult which contains the problems of the components in the reaction

Parameters:
molecule - the Molecule instance which contains the problems
resultList - is a List of StructureCheckerResult which contains the problems of the components in the reaction
Returns:
a merged StructureCheckerResult from the List of StructureCheckerResult represented by resultList parameter