|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Reasoner
Provides methods to answer questions over an ontology. Instances of this class are obtained from Ontology. After usage, they should be closed using dispose(); otherwise, serious resource leakage is possible. All reasoning methods can be interrupted. Reasoner objects are not thread-safe objects; however, you can use different reasoner instances on different threads.
| Method Summary | |
|---|---|
Query |
createQuery(java.util.List<Literal> queryLiterals,
java.util.List<Variable> distinguishedVariables)
Creates a conjunctive DL-safe query over the ontology owned by the reasoner. |
Query |
createQuery(java.util.List<Literal> queryLiterals,
java.util.List<Variable> distinguishedVariables,
java.util.List<Rule> additionalRules,
java.util.List<Literal> constructPattern)
Creates a conjunctive DL-safe query over the ontology owned by the reasoner. |
Query |
createQuery(Literal[] queryLiterals,
Variable[] distinguishedVariables)
Creates a conjunctive DL-safe query over the ontology owned by the reasoner. |
Query |
createQuery(Literal[] queryLiterals,
Variable[] distinguishedVariables,
Rule[] additionalRules,
Literal[] constructPattern)
Creates a conjunctive DL-safe query over the ontology owned by the reasoner. |
Query |
createQuery(Predicate predicate)
Creates a conjunctive DL-safe query which returns the complete extension of the supplied predicate. |
Query |
createQuerySPARQL(Namespaces namespaces,
java.lang.String queryText)
Creates a query object from a SPARQL query text. |
void |
dispose()
Frees the resources used by this reasoner. |
boolean |
equivalent(Description description1,
Description description2)
Checks if descriptions are equivalent. |
Ontology |
getOntology()
Returns the ontology to which this reasoner is attached. |
java.lang.Object |
getParameter(java.lang.String parameterName)
Returns the parameter of the reasoner. |
java.util.List<Rule> |
getReductionToDisjunctiveDatalog(boolean processABox,
boolean unfoldNewPredicates,
boolean unfoldNonAtomicDescriptionsInABox,
boolean includeRules)
Reduces the ontology to disjunctive datalog and returns thus obtained rules. |
java.util.List<Rule> |
getReductionToDLP(boolean processABox,
boolean unfoldNewPredicates,
boolean unfoldNonAtomicDescriptionsInABox,
boolean includeRules)
Reduces to ontology to disjunctive datalog, provided that it is in the DLP fragment. |
SubsumptionHierarchy |
getSubsumptionHierarchy()
Computes the subsumption hierarchy for the knowledge base managed by this reasoner. |
void |
interrupt()
Interrupts the current reasoning operation conducted by this reasoner. |
boolean |
isSatisfiable()
Checks if the knowledge base is satisfiable. |
boolean |
isSatisfiable(Description description)
Checks if a description is satisfiable w.r.t. the TBox and the RBox. |
boolean |
isTBoxRBoxSatisfiable()
Checks if the TBox and RBox of an ontology are satisfiable (i.e. it takes only terminological information into accout). |
void |
setParameter(java.lang.String parameterName,
java.lang.Object parameterValue)
Sets the parameter of the reasoner. |
void |
setTrace(java.lang.String target,
boolean state,
java.io.PrintWriter out,
Namespaces namespaces)
Activates or deactivates tracing in this reasoner. |
boolean |
subsumedBy(Description subDescription,
Description superDescription)
Checks if one description subsumes the other w.r.t. the knowledge base. |
| Method Detail |
|---|
Ontology getOntology()
void dispose()
void interrupt()
throws KAON2Exception
KAON2Exception - thrown if there is an error
void setParameter(java.lang.String parameterName,
java.lang.Object parameterValue)
throws KAON2Exception
parameterName - the name of the parameterparameterValue - the value of the parameter
KAON2Exception - thrown if there is an error
KAON2Exception - thrown if the parameter name of value are incorrect
java.lang.Object getParameter(java.lang.String parameterName)
throws KAON2Exception
null is returned.
parameterName - the name of the parameter
null if the parameter is not supported
KAON2Exception - thrown if the parameter name of value are incorrect
void setTrace(java.lang.String target,
boolean state,
java.io.PrintWriter out,
Namespaces namespaces)
throws KAON2Exception
target - the target of the trace (can be "queryAnswering", "reasoner", "theoremProver", "clausification", "clausificationSPASS" or "clausificationTPTP")state - true if the tracing is to be turned onout - the print writer receiving the outputnamespaces - the namespaces object used to abbreviate names in the output
KAON2Exception - thrown if the parameter name of value are incorrect
boolean isTBoxRBoxSatisfiable()
throws KAON2Exception,
java.lang.InterruptedException
true if the terminological part of the ontology is satisfiable
KAON2Exception - thrown if there is an error
java.lang.InterruptedException - thrown if reasoning is interrupted
boolean subsumedBy(Description subDescription,
Description superDescription)
throws KAON2Exception,
java.lang.InterruptedException
subDescription - the subdescriptionsuperDescription - the superdescription
true if the subdescription is subsumed by the superdescription
KAON2Exception - thrown if there is an error
java.lang.InterruptedException - thrown if reasoning is interrupted
boolean equivalent(Description description1,
Description description2)
throws KAON2Exception,
java.lang.InterruptedException
description1 - the first descriptiondescription2 - the second description
true if the descriptions are equivalent
KAON2Exception - thrown if there is an error
java.lang.InterruptedException - thrown if reasoning is interrupted
boolean isSatisfiable(Description description)
throws KAON2Exception,
java.lang.InterruptedException
description - the description
true if the description is satisfiable
KAON2Exception - thrown if there is an error
java.lang.InterruptedException - thrown if reasoning is interrupted
boolean isSatisfiable()
throws KAON2Exception,
java.lang.InterruptedException
true if this knowledge base is satisfiable
KAON2Exception - thrown if there is an error
java.lang.InterruptedException - thrown if reasoning is interrupted
SubsumptionHierarchy getSubsumptionHierarchy()
throws KAON2Exception,
java.lang.InterruptedException
KAON2Exception - thrown if there is an error
java.lang.InterruptedException - thrown if reasoning is interrupted
java.util.List<Rule> getReductionToDisjunctiveDatalog(boolean processABox,
boolean unfoldNewPredicates,
boolean unfoldNonAtomicDescriptionsInABox,
boolean includeRules)
throws KAON2Exception,
java.lang.InterruptedException
processABox - true if ABox is to be processed as wellunfoldNewPredicates - true if the predicates introduced in the reduction should removed by rule unfoldingunfoldNonAtomicDescriptionsInABox - true if the new predicates should be unfolded from the ABox assertions as wellincludeRules - true if the rules should be included in the translation
KAON2Exception - thrown if there is an error
java.lang.InterruptedException - thrown if reasoning is interrupted
java.util.List<Rule> getReductionToDLP(boolean processABox,
boolean unfoldNewPredicates,
boolean unfoldNonAtomicDescriptionsInABox,
boolean includeRules)
throws KAON2Exception,
java.lang.InterruptedException
processABox - true if ABox is to be processed as wellunfoldNewPredicates - true if the predicates introduced in the reduction should removed by rule unfoldingunfoldNonAtomicDescriptionsInABox - true if the new predicates should be unfolded from the ABox assertions as wellincludeRules - true if the rules should be included in the translation
KAON2Exception - thrown if there is an error
java.lang.InterruptedException - thrown if the process is interrupted
Query createQuery(Literal[] queryLiterals,
Variable[] distinguishedVariables)
throws KAON2Exception
queryLiterals - the literals of the querydistinguishedVariables - the distinguished (returned) variables
KAON2Exception - thrown if there is an error
Query createQuery(Literal[] queryLiterals,
Variable[] distinguishedVariables,
Rule[] additionalRules,
Literal[] constructPattern)
throws KAON2Exception
queryLiterals - the literals of the querydistinguishedVariables - the distinguished (returned) variablesadditionalRules - the array of additional rulesconstructPattern - the construct pattern of the query (may be null)
KAON2Exception - thrown if there is an error
Query createQuery(java.util.List<Literal> queryLiterals,
java.util.List<Variable> distinguishedVariables)
throws KAON2Exception
queryLiterals - the literals of the querydistinguishedVariables - the distinguished (returned) variables
KAON2Exception - thrown if there is an error
Query createQuery(java.util.List<Literal> queryLiterals,
java.util.List<Variable> distinguishedVariables,
java.util.List<Rule> additionalRules,
java.util.List<Literal> constructPattern)
throws KAON2Exception
queryLiterals - the literals of the querydistinguishedVariables - the distinguished (returned) variablesadditionalRules - the array of additional rulesconstructPattern - the construct pattern of the query (may be null)
KAON2Exception - thrown if there is an error
Query createQuery(Predicate predicate)
throws KAON2Exception
predicate - the predicate whose extension is retrieved
KAON2Exception - thrown if there is an error
Query createQuerySPARQL(Namespaces namespaces,
java.lang.String queryText)
throws KAON2Exception
namespaces - the namespaces object (will be extended by the prefixes found in the query)queryText - the text of the query
KAON2Exception - thrown if there is an error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||