public class KnowledgeBase extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
KnowledgeBase.AssertionType |
static class |
KnowledgeBase.ChangeType |
protected static class |
KnowledgeBase.ReasoningState
The state of KB w.r.t.
|
| Modifier and Type | Field and Description |
|---|---|
protected ABox |
abox |
protected MultiValueMap<KnowledgeBase.AssertionType,aterm.ATermAppl> |
aboxAssertions |
protected TaxonomyBuilder |
builder |
protected boolean |
canUseIncConsistency |
protected EnumSet<KnowledgeBase.ChangeType> |
changes |
static Logger |
log |
protected RBox |
rbox |
protected EnumSet<KnowledgeBase.ReasoningState> |
state |
protected TBox |
tbox |
Timers |
timers
Timers used in various different parts of KB.
|
| Modifier | Constructor and Description |
|---|---|
|
KnowledgeBase() |
protected |
KnowledgeBase(KnowledgeBase kb,
boolean emptyABox)
Create a KB based on an existing one.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAllDifferent(aterm.ATermList list) |
boolean |
addAnnotation(aterm.ATermAppl s,
aterm.ATermAppl p,
aterm.ATermAppl o) |
boolean |
addAnnotationProperty(aterm.ATerm p) |
void |
addAntisymmetricProperty(aterm.ATermAppl p)
Deprecated.
|
void |
addAsymmetricProperty(aterm.ATermAppl p) |
void |
addClass(aterm.ATermAppl c) |
void |
addComplementClass(aterm.ATermAppl c1,
aterm.ATermAppl c2) |
void |
addDataPropertyValue(aterm.ATermAppl p,
aterm.ATermAppl s,
aterm.ATermAppl o)
Deprecated.
Use addPropertyValue instead
|
void |
addDatatype(aterm.ATermAppl p) |
boolean |
addDatatypeDefinition(aterm.ATermAppl name,
aterm.ATermAppl datarange)
Adds a new datatype defined to be equivalent to the given data range expression.
|
boolean |
addDatatypeProperty(aterm.ATerm p)
Add a new object property.
|
void |
addDifferent(aterm.ATermAppl i1,
aterm.ATermAppl i2) |
void |
addDisjointClass(aterm.ATermAppl c1,
aterm.ATermAppl c2) |
void |
addDisjointClasses(aterm.ATermList classes) |
void |
addDisjointClasses(List<aterm.ATermAppl> classes) |
void |
addDisjointProperties(aterm.ATermList properties) |
void |
addDisjointProperties(List<aterm.ATermAppl> properties) |
void |
addDisjointProperty(aterm.ATermAppl p1,
aterm.ATermAppl p2) |
void |
addDisjointProperty(aterm.ATermAppl p1,
aterm.ATermAppl p2,
DependencySet ds) |
void |
addDomain(aterm.ATerm p,
aterm.ATermAppl c) |
void |
addDomain(aterm.ATerm p,
aterm.ATermAppl c,
Set<aterm.ATermAppl> explain)
For internal use when domain axioms come from TBox absorption
|
void |
addEquivalentClass(aterm.ATermAppl c1,
aterm.ATermAppl c2) |
void |
addEquivalentProperty(aterm.ATermAppl p1,
aterm.ATermAppl p2) |
void |
addFunctionalProperty(aterm.ATermAppl p) |
Individual |
addIndividual(aterm.ATermAppl i) |
void |
addInverseFunctionalProperty(aterm.ATerm p) |
void |
addInverseProperty(aterm.ATermAppl p1,
aterm.ATermAppl p2) |
void |
addIrreflexiveProperty(aterm.ATermAppl p) |
void |
addKey(aterm.ATermAppl c,
Set<aterm.ATermAppl> properties) |
boolean |
addNegatedPropertyValue(aterm.ATermAppl p,
aterm.ATermAppl s,
aterm.ATermAppl o) |
boolean |
addObjectProperty(aterm.ATerm p)
Add a new object property.
|
void |
addObjectPropertyValue(aterm.ATermAppl p,
aterm.ATermAppl s,
aterm.ATermAppl o)
Deprecated.
Use addPropertyValue instead
|
void |
addOntologyProperty(aterm.ATermAppl p)
Deprecated.
|
void |
addProperty(aterm.ATermAppl p) |
boolean |
addPropertyValue(aterm.ATermAppl p,
aterm.ATermAppl s,
aterm.ATermAppl o) |
void |
addRange(aterm.ATerm p,
aterm.ATermAppl c) |
void |
addRange(aterm.ATerm p,
aterm.ATermAppl c,
Set<aterm.ATermAppl> explain)
For internal use when range axioms come from TBox absorption
|
void |
addReflexiveProperty(aterm.ATermAppl p) |
boolean |
addRule(Rule rule)
Add a rule to the KB.
|
void |
addSame(aterm.ATermAppl i1,
aterm.ATermAppl i2) |
void |
addSubClass(aterm.ATermAppl sub,
aterm.ATermAppl sup) |
void |
addSubProperty(aterm.ATerm sub,
aterm.ATermAppl sup) |
void |
addSymmetricProperty(aterm.ATermAppl p) |
void |
addTransitiveProperty(aterm.ATermAppl p) |
void |
addType(aterm.ATermAppl i,
aterm.ATermAppl c) |
void |
addType(aterm.ATermAppl i,
aterm.ATermAppl c,
DependencySet ds) |
void |
binaryInstanceRetrieval(aterm.ATermAppl c,
List<aterm.ATermAppl> candidates,
Collection<aterm.ATermAppl> results) |
protected boolean |
canUseIncConsistency()
Check if we can use incremental consistency checking
|
void |
classify() |
void |
clear() |
void |
clearABox() |
KnowledgeBase |
copy()
Create a copy of this KB with a completely new ABox copy but pointing to
the same RBox and TBox.
|
KnowledgeBase |
copy(boolean emptyABox)
Create a copy of this KB.
|
boolean |
doExplanation() |
void |
ensureConsistency() |
void |
ensureIncConsistency(boolean aboxDeletion) |
ABox |
getABox() |
Set<aterm.ATermAppl> |
getABoxAssertions(KnowledgeBase.AssertionType assertionType) |
Set<aterm.ATermAppl> |
getAboxDataRoleAssertions()
Deprecated.
|
Set<aterm.ATermAppl> |
getAboxMembershipAssertions()
Deprecated.
|
Set<aterm.ATermAppl> |
getAboxObjectRoleAssertions()
Deprecated.
|
Set<aterm.ATermAppl> |
getAllClasses()
Return the set of all named classes including TOP and BOTTOM.
|
Set<aterm.ATermAppl> |
getAllEquivalentClasses(aterm.ATermAppl c)
Returns all the classes that are equivalent to class c, including c
itself.
|
Set<aterm.ATermAppl> |
getAllEquivalentProperties(aterm.ATermAppl prop) |
Set<aterm.ATermAppl> |
getAllSames(aterm.ATermAppl name)
Return all the indviduals asserted to be equal to the given individual
inluding the individual itself.
|
Set<Set<aterm.ATermAppl>> |
getAllSubProperties(aterm.ATermAppl prop) |
Set<Set<aterm.ATermAppl>> |
getAllSuperProperties(aterm.ATermAppl prop) |
Set<aterm.ATermAppl> |
getAllUnsatisfiableClasses()
Returns all unsatisfiable classes in the KB including the BOTTOM concept.
|
Set<aterm.ATermAppl> |
getAnnotationProperties() |
Set<aterm.ATermAppl> |
getAnnotations(aterm.ATermAppl s,
aterm.ATermAppl p) |
Set<aterm.ATermAppl> |
getAnnotationSubjects()
Returns the set of key values of the annotations map
|
Set<aterm.ATermAppl> |
getAntisymmetricProperties()
Deprecated.
|
Set<aterm.ATermAppl> |
getAsymmetricProperties() |
Set<aterm.ATermAppl> |
getClasses()
Return the set of all named classes.
|
Set<aterm.ATermAppl> |
getComplements(aterm.ATermAppl c) |
Set<aterm.ATermAppl> |
getDataProperties()
Return the set of all object properties.
|
List<aterm.ATermAppl> |
getDataPropertyValues(aterm.ATermAppl r,
aterm.ATermAppl x)
Return all literal values for a given dataproperty and subject value.
|
List<aterm.ATermAppl> |
getDataPropertyValues(aterm.ATermAppl r,
aterm.ATermAppl x,
aterm.ATermAppl datatype)
Return all literal values for a given dataproperty that belongs to the
specified datatype.
|
List<aterm.ATermAppl> |
getDataPropertyValues(aterm.ATermAppl r,
aterm.ATermAppl x,
String lang)
Return all literal values for a given dataproperty that has the specified
language identifier.
|
DatatypeReasoner |
getDatatypeReasoner() |
Set<aterm.ATermAppl> |
getDeletedAssertions() |
DependencyIndex |
getDependencyIndex()
Get the dependency index for syntactic assertions in this kb
|
Set<aterm.ATermAppl> |
getDifferents(aterm.ATermAppl name) |
Set<Set<aterm.ATermAppl>> |
getDisjointClasses(aterm.ATermAppl c) |
Set<Set<aterm.ATermAppl>> |
getDisjointClasses(aterm.ATermAppl c,
boolean direct) |
Set<Set<aterm.ATermAppl>> |
getDisjointProperties(aterm.ATermAppl p) |
Set<Set<aterm.ATermAppl>> |
getDisjointProperties(aterm.ATermAppl p,
boolean direct) |
Set<Set<aterm.ATermAppl>> |
getDisjoints(aterm.ATermAppl c) |
boolean |
getDoDependencyAxioms()
Deprecated.
Use getExplanation instead
|
Set<aterm.ATermAppl> |
getDomains(aterm.ATermAppl name)
Return the domain restrictions on the property.
|
Set<aterm.ATermAppl> |
getEquivalentClasses(aterm.ATermAppl c)
Returns all the classes that are equivalent to class c, excluding c
itself.
|
Set<aterm.ATermAppl> |
getEquivalentProperties(aterm.ATermAppl prop)
Return all the properties that are equivalent to p.
|
String |
getExplanation() |
Set<aterm.ATermAppl> |
getExplanationSet() |
Expressivity |
getExpressivity() |
ExpressivityChecker |
getExpressivityChecker() |
Set<aterm.ATermAppl> |
getFunctionalProperties() |
Set<aterm.ATermAppl> |
getIndividuals()
Return the set of all individuals.
|
Set<aterm.ATermAppl> |
getIndividualsWithAnnotation(aterm.ATermAppl p,
aterm.ATermAppl o) |
List<aterm.ATermAppl> |
getIndividualsWithDataProperty(aterm.ATermAppl r,
aterm.ATermAppl litValue)
List all subjects with the given literal value for the specified data
property.
|
List<aterm.ATermAppl> |
getIndividualsWithObjectProperty(aterm.ATermAppl r,
aterm.ATermAppl o)
List all subjects with the given value for the specified object property.
|
List<aterm.ATermAppl> |
getIndividualsWithProperty(aterm.ATermAppl r,
aterm.ATermAppl x)
List all subjects with a given property and property value.
|
String |
getInfo() |
Set<aterm.ATermAppl> |
getInstances(aterm.ATermAppl c)
Returns all the instances of concept c.
|
Set<aterm.ATermAppl> |
getInstances(aterm.ATermAppl c,
boolean direct)
Returns the instances of class c.
|
aterm.ATermAppl |
getInverse(aterm.ATerm name)
Returns the inverse of given property.
|
Set<aterm.ATermAppl> |
getInverseFunctionalProperties() |
Set<aterm.ATermAppl> |
getInverses(aterm.ATerm name)
Return the named inverse property and all its equivalent properties.
|
Set<aterm.ATermAppl> |
getIrreflexiveProperties() |
Map<Rule,Rule> |
getNormalizedRules()
Return the asserted rules with their normalized form.
|
Set<aterm.ATermAppl> |
getObjectProperties()
Return the set of all object properties.
|
List<aterm.ATermAppl> |
getObjectPropertyValues(aterm.ATermAppl r,
aterm.ATermAppl x)
Return all property values for a given object property and subject value.
|
Set<aterm.ATermAppl> |
getProperties()
Return the set of all properties.
|
List<aterm.ATermAppl> |
getProperties(aterm.ATermAppl s,
aterm.ATermAppl o)
List all properties asserted between a subject and object.
|
Role |
getProperty(aterm.ATerm r) |
PropertyType |
getPropertyType(aterm.ATerm r) |
Map<aterm.ATermAppl,List<aterm.ATermAppl>> |
getPropertyValues(aterm.ATermAppl pred) |
List<aterm.ATermAppl> |
getPropertyValues(aterm.ATermAppl r,
aterm.ATermAppl x)
Return all property values for a given property and subject value.
|
Set<aterm.ATermAppl> |
getRanges(aterm.ATerm name)
Return the domain restrictions on the property.
|
RBox |
getRBox() |
Set<aterm.ATermAppl> |
getReflexiveProperties() |
Role |
getRole(aterm.ATerm term) |
Taxonomy<aterm.ATermAppl> |
getRoleTaxonomy(aterm.ATermAppl r) |
Taxonomy<aterm.ATermAppl> |
getRoleTaxonomy(boolean objectTaxonomy) |
Set<Rule> |
getRules()
Return all the asserted rules.
|
Set<aterm.ATermAppl> |
getSames(aterm.ATermAppl name)
Return all the individuals asserted to be equal to the given individual
but not the the individual itself.
|
SizeEstimate |
getSizeEstimate() |
Set<Set<aterm.ATermAppl>> |
getSubClasses(aterm.ATermAppl c)
Returns all the (named) subclasses of class c.
|
Set<Set<aterm.ATermAppl>> |
getSubClasses(aterm.ATermAppl c,
boolean direct)
Returns the (named) subclasses of class c.
|
Set<Set<aterm.ATermAppl>> |
getSubProperties(aterm.ATermAppl prop)
Return all the sub properties of p.
|
Set<Set<aterm.ATermAppl>> |
getSubProperties(aterm.ATermAppl prop,
boolean direct)
Return the sub properties of p.
|
Set<Set<aterm.ATermAppl>> |
getSuperClasses(aterm.ATermAppl c)
Returns all the superclasses (implicitly or explicitly defined) of class
c.
|
Set<Set<aterm.ATermAppl>> |
getSuperClasses(aterm.ATermAppl c,
boolean direct)
Returns the (named) superclasses of class c.
|
Set<Set<aterm.ATermAppl>> |
getSuperProperties(aterm.ATermAppl prop)
Return all the super properties of p.
|
Set<Set<aterm.ATermAppl>> |
getSuperProperties(aterm.ATermAppl prop,
boolean direct)
Return the super properties of p.
|
Set<aterm.ATermAppl> |
getSymmetricProperties() |
Set<aterm.ATermAppl> |
getSyntacticAssertions()
Get syntactic assertions in the kb
|
Taxonomy<aterm.ATermAppl> |
getTaxonomy()
Get the classification results.
|
TaxonomyBuilder |
getTaxonomyBuilder() |
TBox |
getTBox() |
Map<aterm.ATermAppl,Set<aterm.ATermAppl>> |
getToldDisjoints() |
Taxonomy<aterm.ATermAppl> |
getToldTaxonomy() |
Set<aterm.ATermAppl> |
getTransitiveProperties() |
aterm.ATermAppl |
getType(aterm.ATermAppl ind) |
aterm.ATermAppl |
getType(aterm.ATermAppl ind,
boolean direct) |
Set<Set<aterm.ATermAppl>> |
getTypes(aterm.ATermAppl ind)
Get all the (named) classes individual belongs to.
|
Set<Set<aterm.ATermAppl>> |
getTypes(aterm.ATermAppl ind,
boolean direct)
Returns the (named) classes individual belongs to.
|
Set<aterm.ATermAppl> |
getUnsatisfiableClasses()
Returns all unsatisfiable classes in the KB excluding the BOTTOM concept.
|
protected static void |
handleUndefinedEntity(String s) |
boolean |
hasDomain(aterm.ATermAppl p,
aterm.ATermAppl c) |
boolean |
hasInstance(aterm.ATerm d)
Returns true if there is at least one named individual that belongs to
the given class
|
Bool |
hasKnownPropertyValue(aterm.ATermAppl s,
aterm.ATermAppl p,
aterm.ATermAppl o)
Answers the hasPropertyValue question without doing any satisfiability
check.
|
boolean |
hasPropertyValue(aterm.ATermAppl s,
aterm.ATermAppl p,
aterm.ATermAppl o) |
boolean |
hasRange(aterm.ATermAppl p,
aterm.ATermAppl c) |
boolean |
isABoxChanged() |
boolean |
isABoxProperty(aterm.ATerm p) |
boolean |
isAnnotation(aterm.ATermAppl s,
aterm.ATermAppl p,
aterm.ATermAppl o) |
boolean |
isAnnotationProperty(aterm.ATerm p) |
boolean |
isAntisymmetricProperty(aterm.ATermAppl p)
Deprecated.
|
boolean |
isAsymmetricProperty(aterm.ATermAppl p) |
boolean |
isChanged() |
boolean |
isChanged(KnowledgeBase.ChangeType change) |
boolean |
isClass(aterm.ATerm c) |
boolean |
isClassified()
Returns true if the classification check has been done and nothing in the
KB has changed after that.
|
boolean |
isComplement(aterm.ATermAppl c1,
aterm.ATermAppl c2) |
boolean |
isConsistencyDone()
Returns true if the consistency check has been done and nothing in th KB
has changed after that.
|
boolean |
isConsistent() |
boolean |
isDatatype(aterm.ATermAppl c) |
boolean |
isDatatypeProperty(aterm.ATerm p) |
boolean |
isDifferentFrom(aterm.ATermAppl t1,
aterm.ATermAppl t2) |
boolean |
isDisjoint(aterm.ATermAppl c1,
aterm.ATermAppl c2) |
boolean |
isDisjointClass(aterm.ATermAppl c1,
aterm.ATermAppl c2) |
boolean |
isDisjointProperty(aterm.ATermAppl r1,
aterm.ATermAppl r2) |
boolean |
isEquivalentClass(aterm.ATermAppl c1,
aterm.ATermAppl c2)
Check if class c1 is equivalent to class c2.
|
boolean |
isEquivalentProperty(aterm.ATermAppl p1,
aterm.ATermAppl p2) |
boolean |
isExplainOnlyInconsistency()
Returns current value of explainOnlyInconsistency option.
|
boolean |
isFunctionalProperty(aterm.ATermAppl p) |
boolean |
isIndividual(aterm.ATerm ind) |
boolean |
isInverse(aterm.ATermAppl r1,
aterm.ATermAppl r2) |
boolean |
isInverseFunctionalProperty(aterm.ATermAppl p) |
boolean |
isIrreflexiveProperty(aterm.ATermAppl p) |
Bool |
isKnownType(aterm.ATermAppl x,
aterm.ATermAppl c)
Answers the isType question without doing any satisfiability check.
|
boolean |
isObjectProperty(aterm.ATerm p) |
boolean |
isOntologyProperty(aterm.ATerm p)
Deprecated.
|
boolean |
isProperty(aterm.ATerm p) |
boolean |
isRBoxChanged() |
boolean |
isRealized() |
boolean |
isReflexiveProperty(aterm.ATermAppl p) |
boolean |
isSameAs(aterm.ATermAppl t1,
aterm.ATermAppl t2) |
boolean |
isSatisfiable(aterm.ATermAppl c) |
boolean |
isSubClassOf(aterm.ATermAppl c1,
aterm.ATermAppl c2)
Check if class c1 is subclass of class c2.
|
boolean |
isSubPropertyOf(aterm.ATermAppl sub,
aterm.ATermAppl sup) |
boolean |
isSymmetricProperty(aterm.ATermAppl p) |
boolean |
isTBoxChanged() |
boolean |
isTransitiveProperty(aterm.ATermAppl r) |
boolean |
isType(aterm.ATermAppl x,
aterm.ATermAppl c) |
void |
linearInstanceRetrieval(aterm.ATermAppl c,
List<aterm.ATermAppl> candidates,
Collection<aterm.ATermAppl> results) |
void |
loadKRSS(Reader reader) |
void |
prepare() |
void |
printClassTree()
Print the class hierarchy on the standard output.
|
void |
printClassTree(PrintWriter out) |
void |
realize() |
boolean |
removeAxiom(aterm.ATermAppl axiom)
Removes (if possible) the given TBox axiom from the KB and return
true if removal was successful. |
boolean |
removeDomain(aterm.ATerm p,
aterm.ATermAppl c)
Removes (if possible) the given property domain axiom from the KB and
return
true if removal was successful. |
boolean |
removePropertyValue(aterm.ATermAppl p,
aterm.ATermAppl i1,
aterm.ATermAppl i2) |
boolean |
removeRange(aterm.ATerm p,
aterm.ATermAppl c)
Removes (if possible) the given property range axiom from the KB and
return
true if removal was successful. |
boolean |
removeType(aterm.ATermAppl ind,
aterm.ATermAppl c) |
Set<aterm.ATermAppl> |
retrieve(aterm.ATermAppl d,
Collection<aterm.ATermAppl> individuals)
Return all the individuals that belong to the given class which is not
necessarily a named class.
|
List<aterm.ATermAppl> |
retrieveIndividualsWithProperty(aterm.ATermAppl r)
Retrieve individuals which possibly have a property value for the given
property.
|
void |
setDoDependencyAxioms(boolean doDepAxioms)
Deprecated.
Use setDoExplanation instead
|
void |
setDoExplanation(boolean doExplanation) |
void |
setExplainOnlyInconsistency(boolean explainOnlyInconsistency)
Controls what kind of explanations can be generated using this KB.
|
void |
setRBox(RBox rbox) |
void |
setTaxonomyBuilderProgressMonitor(ProgressMonitor progressMonitor) |
void |
setTBox(TBox tbox) |
void |
setTimeout(long timeout)
Set a timeout for the main timer.
|
void |
tracingBasedInstanceRetrieval(aterm.ATermAppl c,
List<aterm.ATermAppl> candidates,
Collection<aterm.ATermAppl> results) |
void |
updateExpressivity(aterm.ATermAppl i,
aterm.ATermAppl c)
This method is used for incremental reasoning.
|
public static final Logger log
protected ABox abox
protected TBox tbox
protected RBox rbox
protected TaxonomyBuilder builder
protected EnumSet<KnowledgeBase.ReasoningState> state
public Timers timers
protected MultiValueMap<KnowledgeBase.AssertionType,aterm.ATermAppl> aboxAssertions
protected EnumSet<KnowledgeBase.ChangeType> changes
protected boolean canUseIncConsistency
public KnowledgeBase()
protected KnowledgeBase(KnowledgeBase kb, boolean emptyABox)
kb - public Expressivity getExpressivity()
public ExpressivityChecker getExpressivityChecker()
public void clear()
public void clearABox()
public KnowledgeBase copy()
public KnowledgeBase copy(boolean emptyABox)
emptyABox either a completely new copy of ABox will be
created or the new KB will have an empty ABox. If emptyABox
parameter is true but the original KB contains nominals in its RBox or
TBox the new KB will have the definition of those individuals (but not )
In either case, the new KB will point to the same RBox and TBox so
changing one KB's RBox or TBox will affect other.emptyABox - If true ABox is not copied to the new KBpublic void loadKRSS(Reader reader) throws IOException
IOExceptionpublic void addClass(aterm.ATermAppl c)
public void addSubClass(aterm.ATermAppl sub,
aterm.ATermAppl sup)
public void addEquivalentClass(aterm.ATermAppl c1,
aterm.ATermAppl c2)
public void addKey(aterm.ATermAppl c,
Set<aterm.ATermAppl> properties)
public void addDisjointClasses(aterm.ATermList classes)
public void addDisjointClasses(List<aterm.ATermAppl> classes)
public void addDisjointClass(aterm.ATermAppl c1,
aterm.ATermAppl c2)
public void addComplementClass(aterm.ATermAppl c1,
aterm.ATermAppl c2)
public void addDataPropertyValue(aterm.ATermAppl p,
aterm.ATermAppl s,
aterm.ATermAppl o)
p - Datatype Propertyind - Individual value being added toliteralValue - A literal ATerm which should be constructed with one of
ATermUtils.makeXXXLiteral functionspublic Individual addIndividual(aterm.ATermAppl i)
public void addType(aterm.ATermAppl i,
aterm.ATermAppl c)
public void addType(aterm.ATermAppl i,
aterm.ATermAppl c,
DependencySet ds)
public void addSame(aterm.ATermAppl i1,
aterm.ATermAppl i2)
public void addAllDifferent(aterm.ATermList list)
public void addDifferent(aterm.ATermAppl i1,
aterm.ATermAppl i2)
public void addObjectPropertyValue(aterm.ATermAppl p,
aterm.ATermAppl s,
aterm.ATermAppl o)
public boolean addPropertyValue(aterm.ATermAppl p,
aterm.ATermAppl s,
aterm.ATermAppl o)
public boolean addNegatedPropertyValue(aterm.ATermAppl p,
aterm.ATermAppl s,
aterm.ATermAppl o)
public void addProperty(aterm.ATermAppl p)
public boolean addObjectProperty(aterm.ATerm p)
p - Name of the propertypublic boolean addDatatypeProperty(aterm.ATerm p)
p - @Deprecated public void addOntologyProperty(aterm.ATermAppl p)
public boolean addAnnotationProperty(aterm.ATerm p)
public boolean addAnnotation(aterm.ATermAppl s,
aterm.ATermAppl p,
aterm.ATermAppl o)
public Set<aterm.ATermAppl> getAnnotations(aterm.ATermAppl s, aterm.ATermAppl p)
public Set<aterm.ATermAppl> getIndividualsWithAnnotation(aterm.ATermAppl p, aterm.ATermAppl o)
public boolean isAnnotation(aterm.ATermAppl s,
aterm.ATermAppl p,
aterm.ATermAppl o)
public void addSubProperty(aterm.ATerm sub,
aterm.ATermAppl sup)
public void addEquivalentProperty(aterm.ATermAppl p1,
aterm.ATermAppl p2)
public void addDisjointProperties(aterm.ATermList properties)
public void addDisjointProperties(List<aterm.ATermAppl> properties)
public void addDisjointProperty(aterm.ATermAppl p1,
aterm.ATermAppl p2)
public void addDisjointProperty(aterm.ATermAppl p1,
aterm.ATermAppl p2,
DependencySet ds)
public void addInverseProperty(aterm.ATermAppl p1,
aterm.ATermAppl p2)
public void addTransitiveProperty(aterm.ATermAppl p)
public void addSymmetricProperty(aterm.ATermAppl p)
public void addAntisymmetricProperty(aterm.ATermAppl p)
addAsymmetricProperty(ATermAppl)public void addAsymmetricProperty(aterm.ATermAppl p)
public void addReflexiveProperty(aterm.ATermAppl p)
public void addIrreflexiveProperty(aterm.ATermAppl p)
public void addFunctionalProperty(aterm.ATermAppl p)
public void addInverseFunctionalProperty(aterm.ATerm p)
public void addDomain(aterm.ATerm p,
aterm.ATermAppl c)
public void addDomain(aterm.ATerm p,
aterm.ATermAppl c,
Set<aterm.ATermAppl> explain)
public void addRange(aterm.ATerm p,
aterm.ATermAppl c)
public void addRange(aterm.ATerm p,
aterm.ATermAppl c,
Set<aterm.ATermAppl> explain)
public void addDatatype(aterm.ATermAppl p)
public boolean addDatatypeDefinition(aterm.ATermAppl name,
aterm.ATermAppl datarange)
name - name of the datatypedatarange - a data range expressionpublic boolean removeDomain(aterm.ATerm p,
aterm.ATermAppl c)
true if removal was successful. See also
addDomain(ATerm, ATermAppl).p - Property in domain axiomc - Class in domain axiomtrue if axiom is removed, false if
removal failedpublic boolean removePropertyValue(aterm.ATermAppl p,
aterm.ATermAppl i1,
aterm.ATermAppl i2)
public boolean removeRange(aterm.ATerm p,
aterm.ATermAppl c)
true if removal was successful. See also
addRange(ATerm, ATermAppl).p - Property in range axiomc - Class or datatype in range axiomtrue if axiom is removed, false if
removal failedpublic boolean removeType(aterm.ATermAppl ind,
aterm.ATermAppl c)
public boolean removeAxiom(aterm.ATermAppl axiom)
true if removal was successful.axiom - TBox axiom to removetrue if axiom is removed, false if
removal failedpublic void prepare()
public void updateExpressivity(aterm.ATermAppl i,
aterm.ATermAppl c)
public String getInfo()
public boolean isConsistencyDone()
public boolean isClassified()
public boolean isRealized()
public boolean isChanged()
public boolean isChanged(KnowledgeBase.ChangeType change)
public boolean isTBoxChanged()
public boolean isRBoxChanged()
public boolean isABoxChanged()
public Set<aterm.ATermAppl> getUnsatisfiableClasses()
public Set<aterm.ATermAppl> getAllUnsatisfiableClasses()
public boolean isConsistent()
public Taxonomy<aterm.ATermAppl> getToldTaxonomy()
public void ensureConsistency()
public void classify()
public void realize()
public Set<aterm.ATermAppl> getClasses()
public Set<aterm.ATermAppl> getAllClasses()
public Set<aterm.ATermAppl> getProperties()
public Set<aterm.ATermAppl> getObjectProperties()
public Set<aterm.ATermAppl> getAnnotationProperties()
public Set<aterm.ATermAppl> getTransitiveProperties()
public Set<aterm.ATermAppl> getSymmetricProperties()
public Set<aterm.ATermAppl> getAntisymmetricProperties()
getAntisymmetricProperties()public Set<aterm.ATermAppl> getAsymmetricProperties()
public Set<aterm.ATermAppl> getReflexiveProperties()
public Set<aterm.ATermAppl> getIrreflexiveProperties()
public Set<aterm.ATermAppl> getFunctionalProperties()
public Set<aterm.ATermAppl> getInverseFunctionalProperties()
public Set<aterm.ATermAppl> getDataProperties()
public Set<aterm.ATermAppl> getIndividuals()
public Set<aterm.ATermAppl> getAnnotationSubjects()
public Role getProperty(aterm.ATerm r)
public PropertyType getPropertyType(aterm.ATerm r)
public boolean isClass(aterm.ATerm c)
public boolean isProperty(aterm.ATerm p)
public boolean isDatatypeProperty(aterm.ATerm p)
public boolean isObjectProperty(aterm.ATerm p)
public boolean isABoxProperty(aterm.ATerm p)
public boolean isAnnotationProperty(aterm.ATerm p)
@Deprecated public boolean isOntologyProperty(aterm.ATerm p)
public boolean isIndividual(aterm.ATerm ind)
public boolean isTransitiveProperty(aterm.ATermAppl r)
public boolean isSymmetricProperty(aterm.ATermAppl p)
public boolean isFunctionalProperty(aterm.ATermAppl p)
public boolean isInverseFunctionalProperty(aterm.ATermAppl p)
public boolean isReflexiveProperty(aterm.ATermAppl p)
public boolean isIrreflexiveProperty(aterm.ATermAppl p)
public boolean isAntisymmetricProperty(aterm.ATermAppl p)
isAsymmetricProperty(ATermAppl)public boolean isAsymmetricProperty(aterm.ATermAppl p)
public boolean isSubPropertyOf(aterm.ATermAppl sub,
aterm.ATermAppl sup)
public boolean isEquivalentProperty(aterm.ATermAppl p1,
aterm.ATermAppl p2)
public boolean isInverse(aterm.ATermAppl r1,
aterm.ATermAppl r2)
public boolean hasDomain(aterm.ATermAppl p,
aterm.ATermAppl c)
public boolean hasRange(aterm.ATermAppl p,
aterm.ATermAppl c)
public boolean isDatatype(aterm.ATermAppl c)
public boolean isSatisfiable(aterm.ATermAppl c)
public boolean hasInstance(aterm.ATerm d)
c - public boolean isSubClassOf(aterm.ATermAppl c1,
aterm.ATermAppl c2)
c1 - c2 - public boolean isEquivalentClass(aterm.ATermAppl c1,
aterm.ATermAppl c2)
c1 - c2 - public boolean isDisjoint(aterm.ATermAppl c1,
aterm.ATermAppl c2)
public boolean isDisjointClass(aterm.ATermAppl c1,
aterm.ATermAppl c2)
public boolean isDisjointProperty(aterm.ATermAppl r1,
aterm.ATermAppl r2)
public boolean isComplement(aterm.ATermAppl c1,
aterm.ATermAppl c2)
public Bool isKnownType(aterm.ATermAppl x, aterm.ATermAppl c)
Bool.TRUE, Bool.FALSE, or
Bool.UNKNOWN. If Bool.UNKNOWN is returned
isType function needs to be called to get the answer.x - c - public boolean isType(aterm.ATermAppl x,
aterm.ATermAppl c)
public boolean isSameAs(aterm.ATermAppl t1,
aterm.ATermAppl t2)
public boolean isDifferentFrom(aterm.ATermAppl t1,
aterm.ATermAppl t2)
public Set<aterm.ATermAppl> getDifferents(aterm.ATermAppl name)
public boolean hasPropertyValue(aterm.ATermAppl s,
aterm.ATermAppl p,
aterm.ATermAppl o)
public Bool hasKnownPropertyValue(aterm.ATermAppl s, aterm.ATermAppl p, aterm.ATermAppl o)
Boolean.TRUE,
Boolean.FALSE, or null (unknown). If the
null value is returned hasPropertyValue function needs to
be called to get the answer.s - Subjectp - Predicateo - Object (null can be used as wildcard)public ABox getABox()
public RBox getRBox()
public TBox getTBox()
public DatatypeReasoner getDatatypeReasoner()
public Set<Set<aterm.ATermAppl>> getSuperClasses(aterm.ATermAppl c, boolean direct)
*** This function will first classify the whole ontology ***
c - class whose superclasses are returnedpublic Set<Set<aterm.ATermAppl>> getSubClasses(aterm.ATermAppl c)
*** This function will first classify the whole ontology ***
c - class whose subclasses are returnedpublic Set<Set<aterm.ATermAppl>> getDisjointClasses(aterm.ATermAppl c, boolean direct)
public Set<Set<aterm.ATermAppl>> getDisjointProperties(aterm.ATermAppl p, boolean direct)
public Set<aterm.ATermAppl> getComplements(aterm.ATermAppl c)
public Set<Set<aterm.ATermAppl>> getTypes(aterm.ATermAppl ind, boolean direct)
ind - An individual namedirect - If true return only the direct types, otherwise return all
typespublic Set<Set<aterm.ATermAppl>> getTypes(aterm.ATermAppl ind)
*** This function will first realize the whole ontology ***
ind - An individual namepublic aterm.ATermAppl getType(aterm.ATermAppl ind)
public aterm.ATermAppl getType(aterm.ATermAppl ind,
boolean direct)
public Set<aterm.ATermAppl> getInstances(aterm.ATermAppl c)
c - class whose instances are returnedpublic Set<aterm.ATermAppl> getInstances(aterm.ATermAppl c, boolean direct)
*** This function will first realize the whole ontology ***
c - class whose instances are returneddirect - if true return only the direct instances, otherwise return all
the instancespublic Set<aterm.ATermAppl> getEquivalentClasses(aterm.ATermAppl c)
*** This function will first classify the whole ontology ***
c - class whose equivalent classes are foundpublic Set<aterm.ATermAppl> getAllEquivalentClasses(aterm.ATermAppl c)
*** This function will first classify the whole ontology ***
c - class whose equivalent classes are foundpublic Set<Set<aterm.ATermAppl>> getSuperClasses(aterm.ATermAppl c)
*** This function will first classify the whole ontology ***
c - class whose superclasses are returnedpublic Set<Set<aterm.ATermAppl>> getSubClasses(aterm.ATermAppl c, boolean direct)
*** This function will first classify the whole ontology ***
c - class whose subclasses are returneddirect - If true return only the direct subclasses, otherwise return
all the subclassespublic Set<Set<aterm.ATermAppl>> getSuperProperties(aterm.ATermAppl prop)
prop - public Set<Set<aterm.ATermAppl>> getSuperProperties(aterm.ATermAppl prop, boolean direct)
prop - direct - If true return only the direct super properties, otherwise
return all the super propertiespublic Set<Set<aterm.ATermAppl>> getSubProperties(aterm.ATermAppl prop)
prop - public Set<Set<aterm.ATermAppl>> getSubProperties(aterm.ATermAppl prop, boolean direct)
prop - direct - If true return only the direct subproperties, otherwise return
all the subpropertiespublic Set<aterm.ATermAppl> getEquivalentProperties(aterm.ATermAppl prop)
prop - public Set<aterm.ATermAppl> getAllEquivalentProperties(aterm.ATermAppl prop)
public Set<aterm.ATermAppl> getInverses(aterm.ATerm name)
prop - public aterm.ATermAppl getInverse(aterm.ATerm name)
name - Property whose inverse being soughtpublic Set<aterm.ATermAppl> getDomains(aterm.ATermAppl name)
hasDomain(ATermAppl, ATermAppl) to get complete answers.prop - public Set<aterm.ATermAppl> getRanges(aterm.ATerm name)
hasRange(ATermAppl, ATermAppl) to get complete answers.prop - public Set<aterm.ATermAppl> getAllSames(aterm.ATermAppl name)
name - public Set<aterm.ATermAppl> getSames(aterm.ATermAppl name)
name - public List<aterm.ATermAppl> getDataPropertyValues(aterm.ATermAppl r, aterm.ATermAppl x, aterm.ATermAppl datatype)
r - x - lang - public List<aterm.ATermAppl> getDataPropertyValues(aterm.ATermAppl r, aterm.ATermAppl x, String lang)
r - x - lang - public List<aterm.ATermAppl> getDataPropertyValues(aterm.ATermAppl r, aterm.ATermAppl x)
r - x - public List<aterm.ATermAppl> getObjectPropertyValues(aterm.ATermAppl r, aterm.ATermAppl x)
r - x - public List<aterm.ATermAppl> getPropertyValues(aterm.ATermAppl r, aterm.ATermAppl x)
r - x - public List<aterm.ATermAppl> getIndividualsWithProperty(aterm.ATermAppl r, aterm.ATermAppl x)
r - x - If property is an object property an ATermAppl object that is
the URI of the individual, if the property is a data property
an ATerm object that contains the literal value (See {#link
#getIndividualsWithDataProperty(ATermAppl, ATermAppl)} for
details)public List<aterm.ATermAppl> getIndividualsWithDataProperty(aterm.ATermAppl r, aterm.ATermAppl litValue)
r - An ATerm object that contains the literal value in the form
literal(lexicalValue, langIdentifier, datatypeURI). Should be
created with ATermUtils.makeXXXLiteral() functions.x - public List<aterm.ATermAppl> getIndividualsWithObjectProperty(aterm.ATermAppl r, aterm.ATermAppl o)
r - o - An ATerm object that is the URI of an individualpublic List<aterm.ATermAppl> getProperties(aterm.ATermAppl s, aterm.ATermAppl o)
public Map<aterm.ATermAppl,List<aterm.ATermAppl>> getPropertyValues(aterm.ATermAppl pred)
public Set<aterm.ATermAppl> retrieve(aterm.ATermAppl d, Collection<aterm.ATermAppl> individuals)
d - public List<aterm.ATermAppl> retrieveIndividualsWithProperty(aterm.ATermAppl r)
public void tracingBasedInstanceRetrieval(aterm.ATermAppl c,
List<aterm.ATermAppl> candidates,
Collection<aterm.ATermAppl> results)
public void linearInstanceRetrieval(aterm.ATermAppl c,
List<aterm.ATermAppl> candidates,
Collection<aterm.ATermAppl> results)
public void binaryInstanceRetrieval(aterm.ATermAppl c,
List<aterm.ATermAppl> candidates,
Collection<aterm.ATermAppl> results)
public void printClassTree()
public void printClassTree(PrintWriter out)
public boolean doExplanation()
public void setDoExplanation(boolean doExplanation)
doExplanation - The doExplanation to set.public String getExplanation()
public void setDoDependencyAxioms(boolean doDepAxioms)
public boolean getDoDependencyAxioms()
public Set<aterm.ATermAppl> getExplanationSet()
public void setRBox(RBox rbox)
rbox - The rbox to set.public void setTBox(TBox tbox)
tbox - The tbox to set.public void setTimeout(long timeout)
timeout - public Role getRole(aterm.ATerm term)
term - public Taxonomy<aterm.ATermAppl> getTaxonomy()
public TaxonomyBuilder getTaxonomyBuilder()
public void setTaxonomyBuilderProgressMonitor(ProgressMonitor progressMonitor)
public Taxonomy<aterm.ATermAppl> getRoleTaxonomy(boolean objectTaxonomy)
public Taxonomy<aterm.ATermAppl> getRoleTaxonomy(aterm.ATermAppl r)
public SizeEstimate getSizeEstimate()
public boolean addRule(Rule rule)
public Map<Rule,Rule> getNormalizedRules()
protected boolean canUseIncConsistency()
public void ensureIncConsistency(boolean aboxDeletion)
public DependencyIndex getDependencyIndex()
public Set<aterm.ATermAppl> getSyntacticAssertions()
protected static void handleUndefinedEntity(String s)
public Set<aterm.ATermAppl> getABoxAssertions(KnowledgeBase.AssertionType assertionType)
public Set<aterm.ATermAppl> getAboxMembershipAssertions()
getABoxAssertions(org.mindswap.pellet.KnowledgeBase.AssertionType)
insteadpublic Set<aterm.ATermAppl> getAboxObjectRoleAssertions()
getABoxAssertions(org.mindswap.pellet.KnowledgeBase.AssertionType)
insteadpublic Set<aterm.ATermAppl> getAboxDataRoleAssertions()
getABoxAssertions(org.mindswap.pellet.KnowledgeBase.AssertionType)
insteadpublic Set<aterm.ATermAppl> getDeletedAssertions()
public boolean isExplainOnlyInconsistency()
setExplainOnlyInconsistency(boolean)public void setExplainOnlyInconsistency(boolean explainOnlyInconsistency)
explainOnlyInconsistency - new value for explainOnlyInconsistency optionCopyright © 2019. All rights reserved.