Package chemaxon.checkers
Class SubstructureChecker
java.lang.Object
chemaxon.checkers.AbstractStructureChecker
chemaxon.checkers.SubstructureChecker
- All Implemented Interfaces:
StructureChecker,chemaxon.license.Licensable,PropertyChangeListener,Cloneable,EventListener
This descendant of
AbstractStructureChecker is responsible for detecting substructures
in a Molecule instance. Query has to be given as a reaction smarts (reactant->product type)- Since:
- JChem 5.5, Marvin 5.6
-
Field Summary
Fields inherited from class chemaxon.checkers.AbstractStructureChecker
errorType, propertyChangeSupportFields inherited from interface chemaxon.checkers.StructureChecker
PROPERTY_KEY_VALID -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.SubstructureChecker(String areactionSmarts) Parameterized constructor.SubstructureChecker(Map<String, String> params) Parameterized constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected StructureCheckerResultThis method contains the current checking mechanism.clone()Returns the reactionSmartsbooleanReturns true if the checker is available, and can be usedbooleanisValid()Returns true if the checker's configuration is valid, false otherwisevoidsetReactionSmarts(String reactionSmarts) Sets the reactionSmartstoString()Methods inherited from class chemaxon.checkers.AbstractStructureChecker
addPropertyChangeListener, addPropertyChangeListener, check, cloneItem, convertResult, equals, expandMolecule, getDescription, getDescriptor, getEditorClassName, getErrorCode, getErrorDescription, getHelpText, getIcon, getLocalMenuName, getName, hashCode, isLicensed, propertyChange, removePropertyChangeListener, removePropertyChangeListener, setDescription, setHelpText, setIcon, setLicenseEnvironment, setLocalMenuName, setMoreErrorMessage, setName, setNoErrorMessage, setOneErrorMessage
-
Constructor Details
-
SubstructureChecker
public SubstructureChecker()Default constructor. Calling this constructor developer has to set explicitly the needed smarts reaction directly. -
SubstructureChecker
Parameterized constructor. If the reactionsmarts parameter given it sets the reaction smarts property.- Parameters:
params- aMapinstance which contains String pairs. Key is the name of the parameter.
-
SubstructureChecker
Parameterized constructor.- Parameters:
areactionSmarts- is the s- Throws:
MolFormatException- when the given smarts string could not be recognized
-
-
Method Details
-
getReactionSmarts
Returns the reactionSmarts- Returns:
- the reactionSmarts
-
setReactionSmarts
Sets the reactionSmarts- Parameters:
reactionSmarts- the reactionSmarts to set. If reaction smarts is an empty string the change is ignored.- Throws:
MolFormatException- when the given smarts string could not be recognized
-
getErrorType
- Specified by:
getErrorTypein interfaceStructureChecker- Overrides:
getErrorTypein classAbstractStructureChecker- Returns:
- the error type of this checker
-
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
-
isValid
public boolean isValid()Description copied from interface:StructureCheckerReturns true if the checker's configuration is valid, false otherwise- Specified by:
isValidin interfaceStructureChecker- Overrides:
isValidin classAbstractStructureChecker- Returns:
- true if the checker's configuration is valid, false otherwise
-
isAvailable
public boolean isAvailable()Description copied from interface:StructureCheckerReturns true if the checker is available, and can be used- Specified by:
isAvailablein interfaceStructureChecker- Overrides:
isAvailablein classAbstractStructureChecker- Returns:
- true if the checker is available, and can be used
-
clone
- Overrides:
clonein classAbstractStructureChecker- Throws:
CloneNotSupportedException
-
toString
- Overrides:
toStringin classAbstractStructureChecker
-