public interface KnowledgeBase extends Profilable, Closeable
Modifier and Type | Method and Description |
---|---|
boolean |
addQuery(Query query) |
void |
close() |
Approach |
getApproach()
Returns the defined priority of this KnowledgeBase (ie saturation or
rewriting).
|
AtomSet |
getFacts()
Get the facts attached to this knowledgeBase.
|
RuleSet |
getOntology()
Get the ontology attached to this knowledge base.
|
Query |
getQuery(String name) |
Set<String> |
getQueryNames() |
Rule |
getRule(String name) |
Set<String> |
getRuleNames() |
CloseableIterator<Substitution> |
homomorphism(Query query)
Find an homomorphism of the query in the fact base associated with this
knowledge base.
|
boolean |
isConsistent()
Return true if this knowledge base is consistent, false otherwise.
|
CloseableIterator<Substitution> |
query(Query query)
Execute the query over this Knowledge Base.
|
CloseableIterator<Substitution> |
query(Query query,
long timeout)
Execute the query over this Knowledge Base.
|
void |
saturate()
Saturate this knowledge base.
|
void |
semiSaturate() |
getProfiler, setProfiler
RuleSet getOntology()
AtomSet getFacts()
boolean addQuery(Query query)
boolean isConsistent() throws KnowledgeBaseException
KnowledgeBaseException
void saturate() throws KnowledgeBaseException
KnowledgeBaseException
CloseableIterator<Substitution> homomorphism(Query query) throws KnowledgeBaseException
query
- KnowledgeBaseException
CloseableIterator<Substitution> query(Query query) throws KnowledgeBaseException
query(Query,long)
.query
- KnowledgeBaseException
CloseableIterator<Substitution> query(Query query, long timeout) throws KnowledgeBaseException, TimeoutException
TimeoutException
will be throw. Other steps in this method
is not taken into account for the timeout, these other steps can not be
infinite. Approach
is set to REWRITING_ONLY
or
SATURATION_ONLY, the knowledge base decidability analysis
will be bypass.
query
- timeout
- in secondsKnowledgeBaseException
TimeoutException
void semiSaturate() throws KnowledgeBaseException
KnowledgeBaseException
Approach getApproach()
void close()
close
in interface AutoCloseable
close
in interface Closeable
Copyright © 2014–2018 GraphIK (INRIA - LIRMM). All rights reserved.