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, propertyChangeSupport
Fields inherited from interface chemaxon.checkers.StructureChecker
PROPERTY_KEY_VALID
-
Constructor Summary
ConstructorDescriptionDefault constructor.SubstructureChecker
(String areactionSmarts) Parameterized constructor.SubstructureChecker
(Map<String, String> params) Parameterized constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected StructureCheckerResult
This method contains the current checking mechanism.clone()
Returns the reactionSmartsboolean
Returns true if the checker is available, and can be usedboolean
isValid()
Returns true if the checker's configuration is valid, false otherwisevoid
setReactionSmarts
(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
- aMap
instance 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:
getErrorType
in interfaceStructureChecker
- Overrides:
getErrorType
in classAbstractStructureChecker
- Returns:
- the error type of this checker
-
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
-
isValid
public boolean isValid()Description copied from interface:StructureChecker
Returns true if the checker's configuration is valid, false otherwise- Specified by:
isValid
in interfaceStructureChecker
- Overrides:
isValid
in classAbstractStructureChecker
- Returns:
- true if the checker's configuration is valid, false otherwise
-
isAvailable
public boolean isAvailable()Description copied from interface:StructureChecker
Returns true if the checker is available, and can be used- Specified by:
isAvailable
in interfaceStructureChecker
- Overrides:
isAvailable
in classAbstractStructureChecker
- Returns:
- true if the checker is available, and can be used
-
clone
- Overrides:
clone
in classAbstractStructureChecker
- Throws:
CloneNotSupportedException
-
toString
- Overrides:
toString
in classAbstractStructureChecker
-