public abstract class AbstractRule extends Observable implements IDecisionRule, XMLSerializable
IDecisionRule interface. Used as a
base class for all rules in ToxTreeApp application.| Modifier and Type | Field and Description |
|---|---|
protected PropertyChangeSupport |
changes |
protected boolean |
editable |
static String |
ERR_STRUCTURENOTPREPROCESSED |
protected String[] |
examples |
protected StringBuffer |
explanation |
protected String |
id |
protected static Logger |
logger |
static String |
MSG_NO |
static String |
MSG_YES |
protected int |
no |
protected boolean |
residueIDHidden |
protected String |
title |
xmltag_CATEGORIES, xmltag_CATEGORY, xmltag_CATEGORYTHRESHOLD, xmltag_CLASS, xmltag_EXPLANATION, xmltag_ID, xmltag_METHOD, xmltag_METHODPARAMETER, xmltag_METHODS, xmltag_NAME, xmltag_RULE, xmltag_RULEEXAMPLE, xmltag_RULES, xmltag_TREEROOT| Constructor and Description |
|---|
AbstractRule()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener l) |
void |
clearFlags(org.openscience.cdk.interfaces.IAtomContainer mol)
When rules analyze a molecule, a set of properties are set.
|
Object |
clone() |
static IDecisionRule |
createRule(String className) |
boolean |
equals(Object obj) |
void |
fromXML(Element xml) |
IDecisionRuleEditor |
getEditor()
|
org.openscience.cdk.interfaces.IAtomContainer |
getExampleMolecule(boolean ruleResult)
if ruleResult is TRUE, returns the example molecule if the rule is answered YES
if ruleResult is FALSE, returns the example molecule if the rule is answered NO
|
String[] |
getExamples() |
String |
getExplanation()
Rule explanation is an arbitrary text, could be multiline and may contain
html tags.
|
String |
getID()
Rule identifier is an arbitrary string, preferably short one
|
int |
getNum() |
ambit2.rendering.IAtomContainerHighlights |
getSelector() |
String |
getTitle()
Rule name is an arbitrary string, preferably one line, reflecting the essence of the rule
(e.g. |
void |
hideResiduesID(boolean hide) |
boolean |
isEditable() |
boolean |
isImplemented() |
boolean |
isResidueIDHidden() |
protected void |
log(Level level,
String message) |
protected void |
log(Level level,
String message,
Object param) |
protected void |
log(Level level,
String message,
Object[] params) |
static org.openscience.cdk.interfaces.IAtomContainer |
makeMolecule(boolean yes)
This is to ensure each derived class will provide an example of a
molecule which resolves to the yes and no rule outcome
|
void |
removePropertyChangeListener(PropertyChangeListener l) |
void |
setEditable(boolean value) |
void |
setExampleMolecule(org.openscience.cdk.interfaces.IAtomContainer mol,
boolean ruleResult)
Sets example molecule for the YES or NO answer of the rule
|
void |
setExamples(String[] examples) |
void |
setExplanation(String message)
Sets rule explanation
|
void |
setID(String id)
Sets rule identifier
|
void |
setNum(int no) |
void |
setTitle(String name)
Sets rule name
|
Element |
toShallowXML(Document document) |
String |
toString() |
Element |
toXML(Document document) |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedfinalize, getClass, hashCode, notify, notifyAll, wait, wait, waitverifyRulepublic static transient String ERR_STRUCTURENOTPREPROCESSED
public static transient String MSG_YES
public static transient String MSG_NO
protected static transient Logger logger
protected transient PropertyChangeSupport changes
protected String title
protected StringBuffer explanation
protected String id
protected int no
protected String[] examples
protected boolean residueIDHidden
protected boolean editable
public String getID()
IDecisionRulegetID in interface IDecisionRuleIDecisionRule.getID()public void setID(String id)
IDecisionRulesetID in interface IDecisionRuleIDecisionRule.setID(String)public int getNum()
getNum in interface IDecisionRulepublic void setNum(int no)
setNum in interface IDecisionRulepublic String getTitle()
IDecisionRulegetTitle in interface IDecisionRuleIDecisionRule.getTitle()public void setTitle(String name)
IDecisionRulesetTitle in interface IDecisionRuleIDecisionRule.setTitle(java.lang.String)public String getExplanation()
IDecisionRulegetExplanation in interface IDecisionRuleIDecisionRule.getExplanation()public void setExplanation(String message)
IDecisionRulesetExplanation in interface IDecisionRuleIDecisionRule.setExplanation(java.lang.String)public boolean isImplemented()
isImplemented in interface IDecisionRulepublic String toString()
toString in interface IDecisionRuletoString in class Objectpublic static IDecisionRule createRule(String className) throws DecisionMethodException
DecisionMethodExceptionpublic static org.openscience.cdk.interfaces.IAtomContainer makeMolecule(boolean yes)
throws DecisionMethodException
yes - org.openscience.cdk.interfaces.MoleculeDecisionMethodExceptionpublic void setExampleMolecule(org.openscience.cdk.interfaces.IAtomContainer mol,
boolean ruleResult)
IDecisionRulesetExampleMolecule in interface IDecisionRulemol - org.openscience.cdk.interfaces.Moleculepublic org.openscience.cdk.interfaces.IAtomContainer getExampleMolecule(boolean ruleResult)
throws DecisionMethodException
IDecisionRulegetExampleMolecule in interface IDecisionRuleorg.openscience.cdk.interfaces.MoleculeDecisionMethodExceptionpublic void addPropertyChangeListener(PropertyChangeListener l)
addPropertyChangeListener in interface IDecisionRulepublic void removePropertyChangeListener(PropertyChangeListener l)
removePropertyChangeListener in interface IDecisionRulepublic void clearFlags(org.openscience.cdk.interfaces.IAtomContainer mol)
IDecisionRuleclearFlags in interface IDecisionRulemol - org.openscience.cdk.interfaces.Moleculepublic void hideResiduesID(boolean hide)
hideResiduesID in interface IDecisionRulepublic boolean isResidueIDHidden()
isResidueIDHidden in interface IDecisionRulepublic IDecisionRuleEditor getEditor()
getEditor in interface IDecisionRuleIDecisionRuleEditorpublic Object clone() throws CloneNotSupportedException
clone in interface IDecisionRuleclone in class ObjectCloneNotSupportedExceptionpublic boolean isEditable()
isEditable in interface IDecisionRulepublic void setEditable(boolean value)
setEditable in interface IDecisionRulepublic void fromXML(Element xml) throws XMLDecisionMethodException
fromXML in interface XMLSerializableXMLDecisionMethodExceptionpublic Element toShallowXML(Document document) throws XMLDecisionMethodException
toShallowXML in interface XMLSerializableXMLDecisionMethodExceptionpublic Element toXML(Document document) throws XMLDecisionMethodException
toXML in interface XMLSerializableXMLDecisionMethodExceptionpublic String[] getExamples()
public void setExamples(String[] examples)
public ambit2.rendering.IAtomContainerHighlights getSelector()
getSelector in interface IDecisionRuleCopyright © 2004–2018 Ideaconsult Ltd. All rights reserved.