de.dfki.mycbr.core.explanation
Class ExplanationManager

java.lang.Object
  extended by java.util.Observable
      extended by de.dfki.mycbr.core.explanation.ExplanationManager
All Implemented Interfaces:
java.util.Observer

public final class ExplanationManager
extends java.util.Observable
implements java.util.Observer

Class ExplanationManager.


Constructor Summary
ExplanationManager()
           
 
Method Summary
 ConceptExplanation explain(AttributeDesc desc, java.lang.String description)
           
 ConceptExplanation explain(Concept c, java.lang.String desc)
           
 ConceptExplanation explain(IExplainable exp, java.lang.String desc)
           
 ConceptExplanation explain(Instance i, java.lang.String description)
           
 ConceptExplanation explain(SimpleAttribute att, java.lang.String description)
           
 ConceptExplanation getExplanation(AttributeDesc desc)
           
 ConceptExplanation getExplanation(Concept c)
           
 ConceptExplanation getExplanation(Instance i)
           
 ConceptExplanation getExplanation(SimpleAttribute att)
           
 java.util.LinkedList<ConceptExplanation> getExplanations()
           
 boolean isEnabeled()
           
 void removeExplanation(IExplainable exp)
           
 void setEnabled(boolean enabled)
           
 void setExplanation(ConceptExplanation exp, AttributeDesc desc)
           
 void setExplanation(ConceptExplanation exp, Concept c)
           
 void setExplanation(ConceptExplanation exp, Instance i)
           
 void setExplanation(ConceptExplanation exp, SimpleAttribute att)
           
 void update(java.util.Observable o, java.lang.Object arg)
           
 
Methods inherited from class java.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExplanationManager

public ExplanationManager()
Method Detail

getExplanation

public ConceptExplanation getExplanation(Concept c)
Parameters:
c - the concept to be explained
Returns:
concept explanation for the given concept

getExplanation

public ConceptExplanation getExplanation(AttributeDesc desc)
Parameters:
desc - the attribute description to be explained
Returns:
the concept explanation for the description

getExplanation

public ConceptExplanation getExplanation(SimpleAttribute att)
Parameters:
att - the simple attribute to be explained
Returns:
the explanation for the given attribute

getExplanation

public ConceptExplanation getExplanation(Instance i)
Parameters:
i - the instance to be explained
Returns:
the explanation for the given instance

setExplanation

public void setExplanation(ConceptExplanation exp,
                           SimpleAttribute att)
Parameters:
exp - the new explanation for the given attribute
att - the attribute to be explained

setExplanation

public void setExplanation(ConceptExplanation exp,
                           Instance i)
Parameters:
exp - the explanation for the given instance
i - the instance to be explained

setExplanation

public void setExplanation(ConceptExplanation exp,
                           Concept c)
Parameters:
exp - the explanation for the given concept
c - the concept to be explained

setExplanation

public void setExplanation(ConceptExplanation exp,
                           AttributeDesc desc)
Parameters:
exp - the explanation for the given attribute desc
desc - the description to be explained

explain

public ConceptExplanation explain(Concept c,
                                  java.lang.String desc)
Parameters:
c - the concept to be explained
desc - the text for the explanation
Returns:
explanation for the given concept with description desc

explain

public ConceptExplanation explain(AttributeDesc desc,
                                  java.lang.String description)
Parameters:
desc - the attribute description to be explained
description - the text for the explanation
Returns:
explanation for the given attribute description with text desc

explain

public ConceptExplanation explain(SimpleAttribute att,
                                  java.lang.String description)
Parameters:
att - the simple attribute to be explained
description - the text for the explanation
Returns:
explanation for the given attribute with text desc

explain

public ConceptExplanation explain(Instance i,
                                  java.lang.String description)
Parameters:
i - the instance to be explained
description - the text for the explanation
Returns:
explanation for the given attribute with text desc

getExplanations

public java.util.LinkedList<ConceptExplanation> getExplanations()
Returns:
list containing the known explanations

explain

public ConceptExplanation explain(IExplainable exp,
                                  java.lang.String desc)
Parameters:
exp - the object to be explained
desc - the text for the explanation
Returns:
explanation for the given object with text desc

setEnabled

public void setEnabled(boolean enabled)
Parameters:
enabled - true, when the explanation manager should be enabled, false otherwise

isEnabeled

public boolean isEnabeled()
Returns:
true, when the explanation manager is enabled, false otherwise

removeExplanation

public void removeExplanation(IExplainable exp)

update

public void update(java.util.Observable o,
                   java.lang.Object arg)
Specified by:
update in interface java.util.Observer