|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mindswap.pellet.tbox.impl.TBoxImpl
public class TBoxImpl
TBox implementation that keeps track of explanations and allows flexible absorption algorithms.
Field Summary | |
---|---|
static java.util.logging.Logger |
log
|
Constructor Summary | |
---|---|
TBoxImpl(KnowledgeBase kb)
|
Method Summary | |
---|---|
boolean |
addAxiom(aterm.ATermAppl axiom)
Add a TBox axiom. |
boolean |
addClass(aterm.ATermAppl term)
Add a named class declaration |
boolean |
containsAxiom(aterm.ATermAppl axiom)
|
java.util.Set<aterm.ATermAppl> |
getAllClasses()
Return all the named classes plus TOP and BOTTOM |
java.util.Collection<aterm.ATermAppl> |
getAssertedAxioms()
Return all the asserted axioms in this TBox |
java.util.Set<aterm.ATermAppl> |
getAxiomExplanation(aterm.ATermAppl axiom)
Return a single explanation for the given TBox axiom. |
java.util.Set<java.util.Set<aterm.ATermAppl>> |
getAxiomExplanations(aterm.ATermAppl axiom)
Return multiple explanations for the given TBox axiom. |
java.util.Collection<aterm.ATermAppl> |
getAxioms()
Return all the axioms defined in this TBox (may include new axioms introduced during absorption) |
java.util.Collection<aterm.ATermAppl> |
getAxioms(aterm.ATermAppl term)
Return all the sub and equivalent class axioms that have the given concept on the left hand side |
java.util.Set<aterm.ATermAppl> |
getClasses()
Return all the named classes |
KnowledgeBase |
getKB()
|
boolean |
isPrimitive(aterm.ATermAppl c)
Returns if a concept has only primitive definitions in this TBox. |
void |
prepare()
Make any preparation necessary before reasoning. |
void |
print()
|
void |
print(java.lang.Appendable str)
|
boolean |
removeAxiom(aterm.ATermAppl axiom)
Remove axiom from TBox and all other axioms that depend on it. |
boolean |
removeAxiom(aterm.ATermAppl dependantAxiom,
aterm.ATermAppl explanationAxiom)
Remove all explanations for dependantAxiom that contain
explanationAxiom . |
java.lang.String |
toString()
|
java.util.Iterator<Unfolding> |
unfold(aterm.ATermAppl c)
Lazy unfold the given concept |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.util.logging.Logger log
Constructor Detail |
---|
public TBoxImpl(KnowledgeBase kb)
Method Detail |
---|
public KnowledgeBase getKB()
public java.util.Set<aterm.ATermAppl> getAllClasses()
TBox
getAllClasses
in interface TBox
public java.util.Set<java.util.Set<aterm.ATermAppl>> getAxiomExplanations(aterm.ATermAppl axiom)
TBox
getAxiomExplanations
in interface TBox
public java.util.Set<aterm.ATermAppl> getAxiomExplanation(aterm.ATermAppl axiom)
TBox
getAxiomExplanation
in interface TBox
public boolean addAxiom(aterm.ATermAppl axiom)
TBox
addAxiom
in interface TBox
public boolean removeAxiom(aterm.ATermAppl axiom)
TBox
axiom
from TBox and all other axioms that depend on it. An
axiom depends on another axiom if it is a syntactic transformation (as in
disjoint axiom is transformed into subclass) or it is obtained via
absorption (as equivalent class axioms are absorbed into subclass
axioms). This method is syntactic sugar for
TBox.removeAxiom(ATermAppl, ATermAppl)
where both parameters are
axiom
.
removeAxiom
in interface TBox
public boolean removeAxiom(aterm.ATermAppl dependantAxiom, aterm.ATermAppl explanationAxiom)
TBox
dependantAxiom
that contain
explanationAxiom
. If no explanations remain,
dependantAxiom
is removed and all axioms which depend on it are
updated (and will be removed if they have no additional explanations).
removeAxiom
in interface TBox
public java.util.Collection<aterm.ATermAppl> getAxioms()
TBox
getAxioms
in interface TBox
public java.util.Collection<aterm.ATermAppl> getAssertedAxioms()
TBox
getAssertedAxioms
in interface TBox
public boolean containsAxiom(aterm.ATermAppl axiom)
public void print()
public java.lang.String toString()
toString
in class java.lang.Object
public void print(java.lang.Appendable str) throws java.io.IOException
java.io.IOException
public boolean addClass(aterm.ATermAppl term)
TBox
addClass
in interface TBox
true
if TBox changed as a result of this callpublic java.util.Set<aterm.ATermAppl> getClasses()
TBox
getClasses
in interface TBox
public java.util.Collection<aterm.ATermAppl> getAxioms(aterm.ATermAppl term)
TBox
getAxioms
in interface TBox
public java.util.Iterator<Unfolding> unfold(aterm.ATermAppl c)
TBox
unfold
in interface TBox
public boolean isPrimitive(aterm.ATermAppl c)
TBox
false
for complex class
expressions.
isPrimitive
in interface TBox
c
- a concept (named concept or a concept expression)
true
if the concept is not complex and has only
primitive definitionspublic void prepare()
TBox
prepare
in interface TBox
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |