toxTree.tree
Class BatchDecisionResultsList

java.lang.Object
  extended by java.util.Observable
      extended by toxTree.tree.DecisionMethodsList
          extended by toxTree.tree.DecisionResultsList
              extended by toxTree.tree.BatchDecisionResultsList
All Implemented Interfaces:
ambit2.core.data.IStructureDiagramHighlights, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.Observer, IDecisionMethod, IDecisionMethodPrority, IDecisionMethodsList, IDecisionResult, IProgressStatus, XMLSerializable

public class BatchDecisionResultsList
extends DecisionResultsList
implements IDecisionMethod, IDecisionResult

Encapsulates DecisionResultsList as IDecisionMethod.

Author:
Nina Jeliazkova nina@acad.bg Modified Dec 17, 2006
See Also:
Serialized Form

Field Summary
protected  java.awt.Dimension imageSize
           
protected  java.beans.PropertyChangeSupport pssupport
           
protected  ProgressStatus status
           
 
Fields inherited from class toxTree.tree.DecisionMethodsList
list
 
Fields inherited from interface toxTree.core.XMLSerializable
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 Summary
BatchDecisionResultsList()
           
 
Method Summary
 void addDecisionRule(IDecisionRule rule)
           
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
           
 void addRuleResult(IDecisionRule rule, boolean value, org.openscience.cdk.interfaces.IAtomContainer molecule)
           
 void assignResult(org.openscience.cdk.interfaces.IAtomContainer mol)
           
 boolean classify(org.openscience.cdk.interfaces.IAtomContainer mol)
           
 boolean classify(org.openscience.cdk.interfaces.IAtomContainer mol, IDecisionResult result)
           
 int compareTo(java.lang.Object o)
           
 IDecisionResult createDecisionResult()
           
 java.lang.StringBuffer explain(boolean verbose)
           
 java.lang.StringBuffer explainRules(IDecisionResult result, boolean verbose)
           
protected  void firePropertyChangeEvent(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
           
 IDecisionCategories getAssignedCategories()
           
 IDecisionRule getBranch(IDecisionRule rule, boolean answer)
           
 IDecisionCategories getCategories()
           
 IDecisionCategory getCategory()
           
 IDecisionCategory getCategory(IDecisionRule rule, boolean answer)
           
 IDecisionCategory getCategory(int index)
           
 IDecisionMethod getDecisionMethod()
           
 IDecisionMethodEditor getEditor()
          Each rule provides an editor, which is a class implementing IDecisionMethodEditor.
 java.lang.String getExplanation()
           
 java.util.List<CategoryFilter> getFilters()
           
 java.awt.image.BufferedImage getImage(org.openscience.cdk.interfaces.IAtomContainer mol)
           
 java.awt.image.BufferedImage getImage(org.openscience.cdk.interfaces.IAtomContainer mol, java.lang.String ruleID, int width, int height, boolean atomnumbers)
           
 java.awt.Dimension getImageSize()
           
 java.awt.image.BufferedImage getLegend(int width, int height)
           
 org.openscience.cdk.interfaces.IAtomContainer getMolecule(int index)
           
 int getNumberOfClasses()
           
 int getNumberOfRules()
           
 int getPriority()
           
 java.beans.PropertyChangeListener[] getPropertyChangeListeners()
           
 java.lang.String[] getResultPropertyNames()
          Returns the name of the property that will contain the result
 IDecisionRule getRule(int id)
           
 IDecisionRule getRule(java.lang.String name)
           
 RuleResult getRuleResult(int index)
           
 int getRuleResultsCount()
           
 IDecisionRuleList getRules()
           
 java.lang.String getTitle()
           
 IDecisionRule getTopRule()
           
 IDecisionRuleList hasUnreachableRules()
           
 IDecisionCategories hasUnusedCategories()
           
 void hilightAlert(IDecisionRule rule)
           
 void hilightAlert(RuleResult ruleresult)
           
 boolean isEditable()
           
 boolean isError()
           
 boolean isEstimated()
           
 boolean isEstimating()
           
 boolean isModified()
           
 boolean isNotify()
           
 boolean isWeb()
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
           
 void setCategory(IDecisionCategory classID)
           
 void setDecisionMethod(IDecisionMethod method)
           
 void setDecisionRule(IDecisionRule rule)
           
 void setEditable(boolean value)
           
 void setError(java.lang.String message)
           
 void setEstimated()
           
 void setEstimated(boolean value)
           
 void setEstimating()
           
 void setExplanation(java.lang.String value)
           
 void setImageSize(java.awt.Dimension imageSize)
           
 void setModified(boolean value)
           
 void setMolecule(org.openscience.cdk.interfaces.IAtomContainer molecule)
           
 void setNotify(boolean notify)
           
 void setParameters(org.openscience.cdk.interfaces.IAtomContainer mol)
           
 void setPercentEstimated(int percent)
           
 void setPriority(int priority)
           
 void setSilent(boolean silent)
           
 void setTitle(java.lang.String value)
           
 void setWeb(java.lang.Boolean web)
           
 java.lang.String toString()
           
 void update(java.util.Observable arg0, java.lang.Object arg1)
           
 boolean verifyRules(org.openscience.cdk.interfaces.IAtomContainer mol, IDecisionResult result)
           
 void walkRules(IDecisionRule rule, IProcessRule processor)
           
 
Methods inherited from class toxTree.tree.DecisionResultsList
addDecisionMethod, getMethod, getResult, remove, remove
 
Methods inherited from class toxTree.tree.DecisionMethodsList
add, add, addAll, addAll, clear, contains, containsAll, fromXML, get, getList, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, loadAllFromPlugins, loadFromPlugins, removeAll, retainAll, set, setList, setMethods, size, subList, toArray, toArray, toShallowXML, toXML
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface toxTree.core.IDecisionResult
clear
 
Methods inherited from interface java.util.List
equals, hashCode
 

Field Detail

pssupport

protected java.beans.PropertyChangeSupport pssupport

status

protected ProgressStatus status

imageSize

protected java.awt.Dimension imageSize
Constructor Detail

BatchDecisionResultsList

public BatchDecisionResultsList()
Method Detail

getImageSize

public java.awt.Dimension getImageSize()
Specified by:
getImageSize in interface ambit2.core.data.IStructureDiagramHighlights

setImageSize

public void setImageSize(java.awt.Dimension imageSize)
Specified by:
setImageSize in interface ambit2.core.data.IStructureDiagramHighlights

addDecisionRule

public void addDecisionRule(IDecisionRule rule)
                     throws DecisionMethodException
Specified by:
addDecisionRule in interface IDecisionMethod
Throws:
DecisionMethodException

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Specified by:
addPropertyChangeListener in interface IDecisionMethod
Specified by:
addPropertyChangeListener in interface IDecisionResult

firePropertyChangeEvent

protected void firePropertyChangeEvent(java.lang.String propertyName,
                                       java.lang.Object oldValue,
                                       java.lang.Object newValue)

setParameters

public void setParameters(org.openscience.cdk.interfaces.IAtomContainer mol)
Specified by:
setParameters in interface IDecisionMethod

classify

public boolean classify(org.openscience.cdk.interfaces.IAtomContainer mol,
                        IDecisionResult result)
                 throws DecisionMethodException
Specified by:
classify in interface IDecisionMethod
Throws:
DecisionMethodException

assignResult

public void assignResult(org.openscience.cdk.interfaces.IAtomContainer mol)
                  throws DecisionResultException
Specified by:
assignResult in interface IDecisionResult
Throws:
DecisionResultException

createDecisionResult

public IDecisionResult createDecisionResult()
Specified by:
createDecisionResult in interface IDecisionMethod

explainRules

public java.lang.StringBuffer explainRules(IDecisionResult result,
                                           boolean verbose)
                                    throws DecisionMethodException
Specified by:
explainRules in interface IDecisionMethod
Throws:
DecisionMethodException

getBranch

public IDecisionRule getBranch(IDecisionRule rule,
                               boolean answer)
Specified by:
getBranch in interface IDecisionMethod

getCategories

public IDecisionCategories getCategories()
Specified by:
getCategories in interface IDecisionMethod

getCategory

public IDecisionCategory getCategory(IDecisionRule rule,
                                     boolean answer)
Specified by:
getCategory in interface IDecisionMethod

getAssignedCategories

public IDecisionCategories getAssignedCategories()
Specified by:
getAssignedCategories in interface IDecisionResult

getEditor

public IDecisionMethodEditor getEditor()
Description copied from interface: IDecisionMethod
Each rule provides an editor, which is a class implementing IDecisionMethodEditor. The editor shall provide user interface for visualization and modification of various method settings.

Specified by:
getEditor in interface IDecisionMethod
Returns:
IDecisionMethodEditor

getExplanation

public java.lang.String getExplanation()
Specified by:
getExplanation in interface IDecisionMethod

getNumberOfClasses

public int getNumberOfClasses()
Specified by:
getNumberOfClasses in interface IDecisionMethod

getNumberOfRules

public int getNumberOfRules()
Specified by:
getNumberOfRules in interface IDecisionMethod

getRule

public IDecisionRule getRule(int id)
Specified by:
getRule in interface IDecisionMethod
Specified by:
getRule in interface IDecisionResult

getRule

public IDecisionRule getRule(java.lang.String name)
Specified by:
getRule in interface IDecisionMethod

getRules

public IDecisionRuleList getRules()
Specified by:
getRules in interface IDecisionMethod

getTitle

public java.lang.String getTitle()
Specified by:
getTitle in interface IDecisionMethod

getTopRule

public IDecisionRule getTopRule()
Specified by:
getTopRule in interface IDecisionMethod

hasUnreachableRules

public IDecisionRuleList hasUnreachableRules()
Specified by:
hasUnreachableRules in interface IDecisionMethod

isEditable

public boolean isEditable()
Specified by:
isEditable in interface IDecisionMethod

isModified

public boolean isModified()
Specified by:
isModified in interface IDecisionMethod

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Specified by:
removePropertyChangeListener in interface IDecisionMethod
Specified by:
removePropertyChangeListener in interface IDecisionResult

getPropertyChangeListeners

public java.beans.PropertyChangeListener[] getPropertyChangeListeners()
Specified by:
getPropertyChangeListeners in interface IDecisionResult

setDecisionRule

public void setDecisionRule(IDecisionRule rule)
                     throws DecisionMethodException
Specified by:
setDecisionRule in interface IDecisionMethod
Throws:
DecisionMethodException

setEditable

public void setEditable(boolean value)
Specified by:
setEditable in interface IDecisionMethod

setExplanation

public void setExplanation(java.lang.String value)
Specified by:
setExplanation in interface IDecisionMethod

setModified

public void setModified(boolean value)
Specified by:
setModified in interface IDecisionMethod

setTitle

public void setTitle(java.lang.String value)
Specified by:
setTitle in interface IDecisionMethod

verifyRules

public boolean verifyRules(org.openscience.cdk.interfaces.IAtomContainer mol,
                           IDecisionResult result)
                    throws DecisionMethodException
Specified by:
verifyRules in interface IDecisionMethod
Throws:
DecisionMethodException

addRuleResult

public void addRuleResult(IDecisionRule rule,
                          boolean value,
                          org.openscience.cdk.interfaces.IAtomContainer molecule)
                   throws DecisionResultException
Specified by:
addRuleResult in interface IDecisionResult
Throws:
DecisionResultException

classify

public boolean classify(org.openscience.cdk.interfaces.IAtomContainer mol)
                 throws DecisionResultException
Specified by:
classify in interface IDecisionResult
Throws:
DecisionResultException

setMolecule

public void setMolecule(org.openscience.cdk.interfaces.IAtomContainer molecule)
                 throws DecisionResultException
Specified by:
setMolecule in interface IDecisionResult
Throws:
DecisionResultException

setSilent

public void setSilent(boolean silent)
               throws DecisionResultException
Specified by:
setSilent in interface IDecisionResult
Throws:
DecisionResultException

explain

public java.lang.StringBuffer explain(boolean verbose)
                               throws DecisionResultException
Specified by:
explain in interface IDecisionResult
Throws:
DecisionResultException

getCategory

public IDecisionCategory getCategory()
Specified by:
getCategory in interface IDecisionResult

getCategory

public IDecisionCategory getCategory(int index)
                              throws DecisionResultException
Specified by:
getCategory in interface IDecisionResult
Throws:
DecisionResultException

getDecisionMethod

public IDecisionMethod getDecisionMethod()
Specified by:
getDecisionMethod in interface IDecisionResult

getMolecule

public org.openscience.cdk.interfaces.IAtomContainer getMolecule(int index)
                                                          throws DecisionResultException
Specified by:
getMolecule in interface IDecisionResult
Throws:
DecisionResultException

getRuleResult

public RuleResult getRuleResult(int index)
                         throws DecisionResultException
Specified by:
getRuleResult in interface IDecisionResult
Throws:
DecisionResultException

getRuleResultsCount

public int getRuleResultsCount()
Specified by:
getRuleResultsCount in interface IDecisionResult

setCategory

public void setCategory(IDecisionCategory classID)
Specified by:
setCategory in interface IDecisionResult

setDecisionMethod

public void setDecisionMethod(IDecisionMethod method)
Specified by:
setDecisionMethod in interface IDecisionResult

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

isError

public boolean isError()
Specified by:
isError in interface IProgressStatus

setError

public void setError(java.lang.String message)
Specified by:
setError in interface IProgressStatus

isEstimated

public boolean isEstimated()
Specified by:
isEstimated in interface IProgressStatus

isEstimating

public boolean isEstimating()
Specified by:
isEstimating in interface IProgressStatus

setEstimating

public void setEstimating()
Specified by:
setEstimating in interface IProgressStatus

setPercentEstimated

public void setPercentEstimated(int percent)
Specified by:
setPercentEstimated in interface IProgressStatus

setEstimated

public void setEstimated()
Specified by:
setEstimated in interface IProgressStatus

setEstimated

public void setEstimated(boolean value)
Specified by:
setEstimated in interface IProgressStatus

hasUnusedCategories

public IDecisionCategories hasUnusedCategories()
Specified by:
hasUnusedCategories in interface IDecisionMethod

getResultPropertyNames

public java.lang.String[] getResultPropertyNames()
Description copied from interface: IDecisionResult
Returns the name of the property that will contain the result

Specified by:
getResultPropertyNames in interface IDecisionResult

getPriority

public int getPriority()
Specified by:
getPriority in interface IDecisionMethodPrority

setPriority

public void setPriority(int priority)
Specified by:
setPriority in interface IDecisionMethodPrority

update

public void update(java.util.Observable arg0,
                   java.lang.Object arg1)
Specified by:
update in interface java.util.Observer
Overrides:
update in class DecisionResultsList

walkRules

public void walkRules(IDecisionRule rule,
                      IProcessRule processor)
               throws DecisionMethodException
Specified by:
walkRules in interface IDecisionMethod
Throws:
DecisionMethodException

getFilters

public java.util.List<CategoryFilter> getFilters()
Specified by:
getFilters in interface IDecisionResult

isNotify

public boolean isNotify()

setNotify

public void setNotify(boolean notify)
Specified by:
setNotify in interface IDecisionResult

toString

public java.lang.String toString()
Specified by:
toString in interface IDecisionResult
Overrides:
toString in class java.lang.Object

hilightAlert

public void hilightAlert(IDecisionRule rule)
                  throws DecisionResultException
Specified by:
hilightAlert in interface IDecisionResult
Throws:
DecisionResultException

hilightAlert

public void hilightAlert(RuleResult ruleresult)
                  throws DecisionResultException
Specified by:
hilightAlert in interface IDecisionResult
Throws:
DecisionResultException

getImage

public java.awt.image.BufferedImage getImage(org.openscience.cdk.interfaces.IAtomContainer mol,
                                             java.lang.String ruleID,
                                             int width,
                                             int height,
                                             boolean atomnumbers)
                                      throws ambit2.base.exceptions.AmbitException
Specified by:
getImage in interface ambit2.core.data.IStructureDiagramHighlights
Throws:
ambit2.base.exceptions.AmbitException

getImage

public java.awt.image.BufferedImage getImage(org.openscience.cdk.interfaces.IAtomContainer mol)
                                      throws ambit2.base.exceptions.AmbitException
Specified by:
getImage in interface ambit2.core.data.IStructureDiagramHighlights
Throws:
ambit2.base.exceptions.AmbitException

setWeb

public void setWeb(java.lang.Boolean web)
Specified by:
setWeb in interface IDecisionMethod
Specified by:
setWeb in interface IDecisionResult

isWeb

public boolean isWeb()
Specified by:
isWeb in interface IDecisionMethod

getLegend

public java.awt.image.BufferedImage getLegend(int width,
                                              int height)
                                       throws ambit2.base.exceptions.AmbitException
Specified by:
getLegend in interface ambit2.core.data.IStructureDiagramHighlights
Throws:
ambit2.base.exceptions.AmbitException


Copyright © 2004-2012 Ideaconsult Ltd.. All Rights Reserved.