public class SubstructureChecker extends AbstractStructureChecker
AbstractStructureChecker
is responsible for detecting substructures
in a Molecule
instance. Query has to be given as a reaction smarts (reactant->product type)errorType, propertyChangeSupport
PROPERTY_KEY_VALID
Constructor and Description |
---|
SubstructureChecker()
Default constructor.
|
SubstructureChecker(Map<String,String> params)
Parameterized constructor.
|
SubstructureChecker(String areactionSmarts)
Parameterized constructor.
|
Modifier and Type | Method and Description |
---|---|
protected StructureCheckerResult |
check1(Molecule molecule)
This method contains the current checking mechanism.
|
SubstructureChecker |
clone() |
StructureCheckerErrorType |
getErrorType() |
String |
getReactionSmarts()
Returns the reactionSmarts
|
boolean |
isAvailable()
Returns true if the checker is available, and can be used
|
boolean |
isValid()
Returns true if the checker's configuration is valid, false otherwise
|
void |
setReactionSmarts(String reactionSmarts)
Sets the reactionSmarts
|
String |
toString() |
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
public SubstructureChecker()
public SubstructureChecker(Map<String,String> params)
params
- a Map
instance which contains String pairs. Key is the name of the
parameter.public SubstructureChecker(String areactionSmarts) throws MolFormatException
areactionSmarts
- is the sMolFormatException
- when the given smarts string could not be recognizedpublic String getReactionSmarts()
public void setReactionSmarts(String reactionSmarts) throws MolFormatException
reactionSmarts
- the reactionSmarts to set. If reaction smarts is an empty string
the change is ignored.MolFormatException
- when the given smarts string could not be recognizedpublic StructureCheckerErrorType getErrorType()
getErrorType
in interface StructureChecker
getErrorType
in class AbstractStructureChecker
protected StructureCheckerResult check1(Molecule molecule)
AbstractStructureChecker
check1
in class AbstractStructureChecker
molecule
- the Molecule
instance to be checked for problemsStructureCheckerResult
which represents the problem or null
if no problem foundpublic boolean isValid()
StructureChecker
isValid
in interface StructureChecker
isValid
in class AbstractStructureChecker
public boolean isAvailable()
StructureChecker
isAvailable
in interface StructureChecker
isAvailable
in class AbstractStructureChecker
public SubstructureChecker clone() throws CloneNotSupportedException
clone
in class AbstractStructureChecker
CloneNotSupportedException
public String toString()
toString
in class AbstractStructureChecker