|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.uzh.ifi.attempto.acewiki.core.CachingReasoner
public class CachingReasoner
This reasoner class wraps another reasoner and adds caching functionality.
| Method Summary | |
|---|---|
boolean |
areCachedConceptsUpToDate(Individual ind)
Returns true if the concepts of the given individual are cached and up-to-date and thus do not have to be recalculated. |
boolean |
areCachedIndividualsUpToDate(Concept concept)
Returns true if the individuals of the given concept are cached and up-to-date and thus do not have to be recalculated. |
boolean |
areCachedSubConceptsUpToDate(Concept concept)
Returns true if the sub-concepts of the given concept are cached and up-to-date and thus do not have to be recalculated. |
boolean |
areCachedSuperConceptsUpToDate(Concept concept)
Returns true if the suber-concepts of the given concept are cached and up-to-date and thus do not have to be recalculated. |
void |
flushElements()
This method can finalize the loading or unloading of elements. |
java.util.List<AnswerElement> |
getAnswer(Question question)
Returns the answer for the given question. |
java.util.List<AnswerElement> |
getCachedAnswer(Question question)
Returns the cached answer for the given question, or null if no cached answer exists. |
java.util.List<Concept> |
getCachedConcepts(Individual ind)
Returns the cached concepts for the given individual or null if there are no cached concepts. |
java.util.List<Individual> |
getCachedIndividuals(Concept concept)
Returns the cached individuals for the given concept or null if there are no cached individuals. |
java.util.List<Concept> |
getCachedSubConcepts(Concept concept)
Returns the cached sub-concepts for the given concept or null if there are no cached sub-concepts. |
java.util.List<Concept> |
getCachedSuperConcepts(Concept concept)
Returns the cached super-concepts for the given concept or null if there are no cached super-concepts. |
java.util.List<Concept> |
getConcepts(Individual ind)
Should return all concepts the given individual belongs to. |
java.util.List<Individual> |
getIndividuals(Concept concept)
Should return all individuals that belong to the given concept. |
java.util.Map<java.lang.String,java.lang.String> |
getInfo()
This method can return a map of name/value pairs with information about the reasoner. |
java.lang.String |
getReasonerName()
Returns the name of the reasoner. |
java.lang.String |
getReasonerType()
Return the type of the reasoner. |
java.lang.String |
getReasonerVersion()
Return the version of the reasoner. |
java.util.List<Concept> |
getSubConcepts(Concept concept)
Should return all the sub-concepts of the given concept. |
java.util.List<Concept> |
getSuperConcepts(Concept concept)
Should return all super-concepts of the given concept. |
AceWikiReasoner |
getWrappedReasoner()
Returns the wrapped reasoner. |
void |
init(Ontology ontology)
This is the first method to be called and provides the ontology object. |
boolean |
isCachedAnswerUpToDate(Question question)
Returns whether the there is an up-to-date cached answer for the given question. |
boolean |
isConsistent()
Should return true if the ontology is consistent. |
boolean |
isSatisfiable(Concept concept)
Should check if the given concept is satisfiable. |
void |
load()
Loads the reasoner or reasoner interface. |
void |
loadElement(OntologyElement element)
Loads the given ontology element. |
void |
loadSentence(Sentence sentence)
Loads the given sentence. |
void |
unloadElement(OntologyElement element)
Unloads the given ontology element. |
void |
unloadSentence(Sentence sentence)
Unloads the given sentence. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void init(Ontology ontology)
AceWikiReasoner
init in interface AceWikiReasonerontology - The ontology object.public AceWikiReasoner getWrappedReasoner()
public boolean isCachedAnswerUpToDate(Question question)
question - The question.
public java.util.List<AnswerElement> getCachedAnswer(Question question)
question - The question.
public java.util.List<AnswerElement> getAnswer(Question question)
getAnswer in interface AceWikiReasonerquestion - The question to be answered.
public boolean areCachedConceptsUpToDate(Individual ind)
ind - The individual.
public java.util.List<Concept> getCachedConcepts(Individual ind)
ind - The individual.
public java.util.List<Concept> getConcepts(Individual ind)
AceWikiReasoner
getConcepts in interface AceWikiReasonerind - The individual.
public boolean areCachedIndividualsUpToDate(Concept concept)
concept - The concept.
public java.util.List<Individual> getCachedIndividuals(Concept concept)
concept - The concept.
public java.util.List<Individual> getIndividuals(Concept concept)
AceWikiReasoner
getIndividuals in interface AceWikiReasonerconcept - The concept.
public boolean areCachedSuperConceptsUpToDate(Concept concept)
concept - The concept.
public java.util.List<Concept> getCachedSuperConcepts(Concept concept)
concept - The concept.
public java.util.List<Concept> getSuperConcepts(Concept concept)
AceWikiReasoner
getSuperConcepts in interface AceWikiReasonerconcept - The concept for which all super-concepts should be returned.
public boolean areCachedSubConceptsUpToDate(Concept concept)
concept - The concept.
public java.util.List<Concept> getCachedSubConcepts(Concept concept)
concept - The concept.
public java.util.List<Concept> getSubConcepts(Concept concept)
AceWikiReasoner
getSubConcepts in interface AceWikiReasonerconcept - The concept for which all sub-concepts should be returned.
public java.lang.String getReasonerName()
getReasonerName in interface AceWikiReasonerpublic java.lang.String getReasonerVersion()
getReasonerVersion in interface AceWikiReasonerpublic java.lang.String getReasonerType()
getReasonerType in interface AceWikiReasonerpublic java.util.Map<java.lang.String,java.lang.String> getInfo()
AceWikiReasoner
getInfo in interface AceWikiReasonerpublic void load()
load in interface AceWikiReasonerpublic void loadElement(OntologyElement element)
AceWikiReasoner
loadElement in interface AceWikiReasonerelement - The ontology element.public void unloadElement(OntologyElement element)
AceWikiReasoner
unloadElement in interface AceWikiReasonerelement - The ontology element.public boolean isConsistent()
AceWikiReasoner
isConsistent in interface AceWikiReasonerpublic boolean isSatisfiable(Concept concept)
AceWikiReasoner
isSatisfiable in interface AceWikiReasonerconcept - The concept.
public void loadSentence(Sentence sentence)
AceWikiReasoner
loadSentence in interface AceWikiReasonersentence - The sentence.public void unloadSentence(Sentence sentence)
AceWikiReasoner
unloadSentence in interface AceWikiReasonersentence - The sentence.public void flushElements()
AceWikiReasoner
flushElements in interface AceWikiReasoner
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||