org.mindswap.pellet
Class KnowledgeBase

java.lang.Object
  extended by org.mindswap.pellet.KnowledgeBase

public class KnowledgeBase
extends java.lang.Object

Author:
Evren Sirin

Nested Class Summary
static class KnowledgeBase.AssertionType
           
static class KnowledgeBase.ChangeType
           
 
Field Summary
static java.util.logging.Logger log
           
 Timers timers
          Timers used in various different parts of KB.
 
Constructor Summary
KnowledgeBase()
           
 
Method Summary
 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. Use addAsymmetricProperty(ATermAppl)
 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(java.util.List<aterm.ATermAppl> classes)
           
 void addDisjointProperties(aterm.ATermList properties)
           
 void addDisjointProperties(java.util.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, java.util.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, java.util.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, java.util.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, java.util.List<aterm.ATermAppl> candidates, java.util.Collection<aterm.ATermAppl> results)
           
 void classify()
           
 void clear()
           
 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()
           
 java.util.Set<aterm.ATermAppl> getABoxAssertions(KnowledgeBase.AssertionType assertionType)
           
 java.util.Set<aterm.ATermAppl> getAboxDataRoleAssertions()
          Deprecated. Use getABoxAssertions(org.mindswap.pellet.KnowledgeBase.AssertionType) instead
 java.util.Set<aterm.ATermAppl> getAboxMembershipAssertions()
          Deprecated. Use getABoxAssertions(org.mindswap.pellet.KnowledgeBase.AssertionType) instead
 java.util.Set<aterm.ATermAppl> getAboxObjectRoleAssertions()
          Deprecated. Use getABoxAssertions(org.mindswap.pellet.KnowledgeBase.AssertionType) instead
 java.util.Set<aterm.ATermAppl> getAllClasses()
          Return the set of all named classes including TOP and BOTTOM.
 java.util.Set<aterm.ATermAppl> getAllEquivalentClasses(aterm.ATermAppl c)
          Returns all the classes that are equivalent to class c, including c itself.
 java.util.Set<aterm.ATermAppl> getAllEquivalentProperties(aterm.ATermAppl prop)
           
 java.util.Set<aterm.ATermAppl> getAllSames(aterm.ATermAppl name)
          Return all the indviduals asserted to be equal to the given individual inluding the individual itself.
 java.util.Set<java.util.Set<aterm.ATermAppl>> getAllSubProperties(aterm.ATermAppl prop)
           
 java.util.Set<java.util.Set<aterm.ATermAppl>> getAllSuperProperties(aterm.ATermAppl prop)
           
 java.util.Set<aterm.ATermAppl> getAllUnsatisfiableClasses()
          Returns all unsatisfiable classes in the KB including the BOTTOM concept.
 java.util.Set<aterm.ATermAppl> getAnnotationProperties()
           
 java.util.Set<aterm.ATermAppl> getAnnotations(aterm.ATermAppl s, aterm.ATermAppl p)
           
 java.util.Set<aterm.ATermAppl> getAnnotationSubjects()
          Returns the set of key values of the annotations map
 java.util.Set<aterm.ATermAppl> getAntisymmetricProperties()
          Deprecated. Use getAntisymmetricProperties()
 java.util.Set<aterm.ATermAppl> getAsymmetricProperties()
           
 java.util.Set<aterm.ATermAppl> getClasses()
          Return the set of all named classes.
 java.util.Set<aterm.ATermAppl> getComplements(aterm.ATermAppl c)
           
 java.util.Set<aterm.ATermAppl> getDataProperties()
          Return the set of all object properties.
 java.util.List<aterm.ATermAppl> getDataPropertyValues(aterm.ATermAppl r, aterm.ATermAppl x)
          Return all literal values for a given dataproperty and subject value.
 java.util.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.
 java.util.List<aterm.ATermAppl> getDataPropertyValues(aterm.ATermAppl r, aterm.ATermAppl x, java.lang.String lang)
          Return all literal values for a given dataproperty that has the specified language identifier.
 DatatypeReasoner getDatatypeReasoner()
           
 java.util.Set<aterm.ATermAppl> getDeletedAssertions()
           
 DependencyIndex getDependencyIndex()
          Get the dependency index for syntactic assertions in this kb
 java.util.Set<aterm.ATermAppl> getDifferents(aterm.ATermAppl name)
           
 java.util.Set<java.util.Set<aterm.ATermAppl>> getDisjointClasses(aterm.ATermAppl c)
           
 java.util.Set<java.util.Set<aterm.ATermAppl>> getDisjointClasses(aterm.ATermAppl c, boolean direct)
           
 java.util.Set<java.util.Set<aterm.ATermAppl>> getDisjointProperties(aterm.ATermAppl p)
           
 java.util.Set<java.util.Set<aterm.ATermAppl>> getDisjointProperties(aterm.ATermAppl p, boolean direct)
           
 java.util.Set<java.util.Set<aterm.ATermAppl>> getDisjoints(aterm.ATermAppl c)
           
 boolean getDoDependencyAxioms()
          Deprecated. Use getExplanation instead
 java.util.Set<aterm.ATermAppl> getDomains(aterm.ATermAppl name)
          Return the domain restrictions on the property.
 java.util.Set<aterm.ATermAppl> getEquivalentClasses(aterm.ATermAppl c)
          Returns all the classes that are equivalent to class c, excluding c itself.
 java.util.Set<aterm.ATermAppl> getEquivalentProperties(aterm.ATermAppl prop)
          Return all the properties that are equivalent to p.
 java.lang.String getExplanation()
           
 java.util.Set<aterm.ATermAppl> getExplanationSet()
           
 Expressivity getExpressivity()
           
 ExpressivityChecker getExpressivityChecker()
           
 java.util.Set<aterm.ATermAppl> getFunctionalProperties()
           
 java.util.Set<aterm.ATermAppl> getIndividuals()
          Return the set of all individuals.
 java.util.Set<aterm.ATermAppl> getIndividualsWithAnnotation(aterm.ATermAppl p, aterm.ATermAppl o)
           
 java.util.List<aterm.ATermAppl> getIndividualsWithDataProperty(aterm.ATermAppl r, aterm.ATermAppl litValue)
          List all subjects with the given literal value for the specified data property.
 java.util.List<aterm.ATermAppl> getIndividualsWithObjectProperty(aterm.ATermAppl r, aterm.ATermAppl o)
          List all subjects with the given value for the specified object property.
 java.util.List<aterm.ATermAppl> getIndividualsWithProperty(aterm.ATermAppl r, aterm.ATermAppl x)
          List all subjects with a given property and property value.
 java.lang.String getInfo()
           
 java.util.Set<aterm.ATermAppl> getInstances(aterm.ATermAppl c)
          Returns all the instances of concept c.
 java.util.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.
 java.util.Set<aterm.ATermAppl> getInverseFunctionalProperties()
           
 java.util.Set<aterm.ATermAppl> getInverses(aterm.ATerm name)
          Return the named inverse property and all its equivalent properties.
 java.util.Set<aterm.ATermAppl> getIrreflexiveProperties()
           
 java.util.Map<Rule,Rule> getNormalizedRules()
          Return the asserted rules with their normalized form.
 java.util.Set<aterm.ATermAppl> getObjectProperties()
          Return the set of all object properties.
 java.util.List<aterm.ATermAppl> getObjectPropertyValues(aterm.ATermAppl r, aterm.ATermAppl x)
          Return all property values for a given object property and subject value.
 java.util.Set<aterm.ATermAppl> getProperties()
          Return the set of all properties.
 java.util.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)
           
 java.util.Map<aterm.ATermAppl,java.util.List<aterm.ATermAppl>> getPropertyValues(aterm.ATermAppl pred)
           
 java.util.List<aterm.ATermAppl> getPropertyValues(aterm.ATermAppl r, aterm.ATermAppl x)
          Return all property values for a given property and subject value.
 java.util.Set<aterm.ATermAppl> getRanges(aterm.ATerm name)
          Return the domain restrictions on the property.
 RBox getRBox()
           
 java.util.Set<aterm.ATermAppl> getReflexiveProperties()
           
 Role getRole(aterm.ATerm term)
           
 Taxonomy<aterm.ATermAppl> getRoleTaxonomy(aterm.ATermAppl r)
           
 Taxonomy<aterm.ATermAppl> getRoleTaxonomy(boolean objectTaxonomy)
           
 java.util.Set<Rule> getRules()
          Return all the asserted rules.
 java.util.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()
           
 java.util.Set<java.util.Set<aterm.ATermAppl>> getSubClasses(aterm.ATermAppl c)
          Returns all the (named) subclasses of class c.
 java.util.Set<java.util.Set<aterm.ATermAppl>> getSubClasses(aterm.ATermAppl c, boolean direct)
          Returns the (named) subclasses of class c.
 java.util.Set<java.util.Set<aterm.ATermAppl>> getSubProperties(aterm.ATermAppl prop)
          Return all the sub properties of p.
 java.util.Set<java.util.Set<aterm.ATermAppl>> getSubProperties(aterm.ATermAppl prop, boolean direct)
          Return the sub properties of p.
 java.util.Set<java.util.Set<aterm.ATermAppl>> getSuperClasses(aterm.ATermAppl c)
          Returns all the superclasses (implicitly or explicitly defined) of class c.
 java.util.Set<java.util.Set<aterm.ATermAppl>> getSuperClasses(aterm.ATermAppl c, boolean direct)
          Returns the (named) superclasses of class c.
 java.util.Set<java.util.Set<aterm.ATermAppl>> getSuperProperties(aterm.ATermAppl prop)
          Return all the super properties of p.
 java.util.Set<java.util.Set<aterm.ATermAppl>> getSuperProperties(aterm.ATermAppl prop, boolean direct)
          Return the super properties of p.
 java.util.Set<aterm.ATermAppl> getSymmetricProperties()
           
 java.util.Set<aterm.ATermAppl> getSyntacticAssertions()
          Get syntactic assertions in the kb
 Taxonomy<aterm.ATermAppl> getTaxonomy()
          Get the classification results.
 TaxonomyBuilder getTaxonomyBuilder()
           
 TBox getTBox()
           
 java.util.Map<aterm.ATermAppl,java.util.Set<aterm.ATermAppl>> getToldDisjoints()
           
 Taxonomy<aterm.ATermAppl> getToldTaxonomy()
           
 java.util.Set<aterm.ATermAppl> getTransitiveProperties()
           
 aterm.ATermAppl getType(aterm.ATermAppl ind)
           
 aterm.ATermAppl getType(aterm.ATermAppl ind, boolean direct)
           
 java.util.Set<java.util.Set<aterm.ATermAppl>> getTypes(aterm.ATermAppl ind)
          Get all the (named) classes individual belongs to.
 java.util.Set<java.util.Set<aterm.ATermAppl>> getTypes(aterm.ATermAppl ind, boolean direct)
          Returns the (named) classes individual belongs to.
 java.util.Set<aterm.ATermAppl> getUnsatisfiableClasses()
          Returns all unsatisfiable classes in the KB excluding the BOTTOM concept.
 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. Use isAsymmetricProperty(ATermAppl)
 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, java.util.List<aterm.ATermAppl> candidates, java.util.Collection<aterm.ATermAppl> results)
           
 void loadKRSS(java.io.Reader reader)
           
 void prepare()
           
 void printClassTree()
          Print the class hierarchy on the standard output.
 void printClassTree(java.io.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)
           
 java.util.Set<aterm.ATermAppl> retrieve(aterm.ATermAppl d, java.util.Collection<aterm.ATermAppl> individuals)
          Return all the individuals that belong to the given class which is not necessarily a named class.
 java.util.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, java.util.List<aterm.ATermAppl> candidates, java.util.Collection<aterm.ATermAppl> results)
           
 void updateExpressivity(aterm.ATermAppl i, aterm.ATermAppl c)
          This method is used for incremental reasoning.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static final java.util.logging.Logger log

timers

public Timers timers
Timers used in various different parts of KB. There may be many different timers created here depending on the level of debugging or application requirements. However, there are three major timers that are guaranteed to exist.

Constructor Detail

KnowledgeBase

public KnowledgeBase()
Method Detail

getExpressivity

public Expressivity getExpressivity()

getExpressivityChecker

public ExpressivityChecker getExpressivityChecker()

clear

public void clear()

copy

public KnowledgeBase copy()
Create a copy of this KB with a completely new ABox copy but pointing to the same RBox and TBox.

Returns:
A copy of this KB

copy

public KnowledgeBase copy(boolean emptyABox)
Create a copy of this KB. Depending on the value of 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.

Parameters:
emptyABox - If true ABox is not copied to the new KB
Returns:
A copy of this KB

loadKRSS

public void loadKRSS(java.io.Reader reader)
              throws java.io.IOException
Throws:
java.io.IOException

addClass

public void addClass(aterm.ATermAppl c)

addSubClass

public void addSubClass(aterm.ATermAppl sub,
                        aterm.ATermAppl sup)

addEquivalentClass

public void addEquivalentClass(aterm.ATermAppl c1,
                               aterm.ATermAppl c2)

addKey

public void addKey(aterm.ATermAppl c,
                   java.util.Set<aterm.ATermAppl> properties)

addDisjointClasses

public void addDisjointClasses(aterm.ATermList classes)

addDisjointClasses

public void addDisjointClasses(java.util.List<aterm.ATermAppl> classes)

addDisjointClass

public void addDisjointClass(aterm.ATermAppl c1,
                             aterm.ATermAppl c2)

addComplementClass

public void addComplementClass(aterm.ATermAppl c1,
                               aterm.ATermAppl c2)

addDataPropertyValue

public void addDataPropertyValue(aterm.ATermAppl p,
                                 aterm.ATermAppl s,
                                 aterm.ATermAppl o)
Deprecated. Use addPropertyValue instead

Add the value of a DatatypeProperty.

Parameters:
p - Datatype Property
ind - Individual value being added to
literalValue - A literal ATerm which should be constructed with one of ATermUtils.makeXXXLiteral functions

addIndividual

public Individual addIndividual(aterm.ATermAppl i)

addType

public void addType(aterm.ATermAppl i,
                    aterm.ATermAppl c)

addType

public void addType(aterm.ATermAppl i,
                    aterm.ATermAppl c,
                    DependencySet ds)

addSame

public void addSame(aterm.ATermAppl i1,
                    aterm.ATermAppl i2)

addAllDifferent

public void addAllDifferent(aterm.ATermList list)

addDifferent

public void addDifferent(aterm.ATermAppl i1,
                         aterm.ATermAppl i2)

addObjectPropertyValue

public void addObjectPropertyValue(aterm.ATermAppl p,
                                   aterm.ATermAppl s,
                                   aterm.ATermAppl o)
Deprecated. Use addPropertyValue instead


addPropertyValue

public boolean addPropertyValue(aterm.ATermAppl p,
                                aterm.ATermAppl s,
                                aterm.ATermAppl o)

addNegatedPropertyValue

public boolean addNegatedPropertyValue(aterm.ATermAppl p,
                                       aterm.ATermAppl s,
                                       aterm.ATermAppl o)

addProperty

public void addProperty(aterm.ATermAppl p)

addObjectProperty

public boolean addObjectProperty(aterm.ATerm p)
Add a new object property. If property was earlier defined to be a datatype property then this function will simply return without changing the KB.

Parameters:
p - Name of the property
Returns:
True if property is added, false if not

addDatatypeProperty

public boolean addDatatypeProperty(aterm.ATerm p)
Add a new object property. If property was earlier defined to be a datatype property then this function will simply return without changing the KB.

Parameters:
p -
Returns:
True if property is added, false if not

addOntologyProperty

@Deprecated
public void addOntologyProperty(aterm.ATermAppl p)
Deprecated. 


addAnnotationProperty

public boolean addAnnotationProperty(aterm.ATerm p)

addAnnotation

public boolean addAnnotation(aterm.ATermAppl s,
                             aterm.ATermAppl p,
                             aterm.ATermAppl o)

getAnnotations

public java.util.Set<aterm.ATermAppl> getAnnotations(aterm.ATermAppl s,
                                                     aterm.ATermAppl p)

getIndividualsWithAnnotation

public java.util.Set<aterm.ATermAppl> getIndividualsWithAnnotation(aterm.ATermAppl p,
                                                                   aterm.ATermAppl o)

isAnnotation

public boolean isAnnotation(aterm.ATermAppl s,
                            aterm.ATermAppl p,
                            aterm.ATermAppl o)

addSubProperty

public void addSubProperty(aterm.ATerm sub,
                           aterm.ATermAppl sup)

addEquivalentProperty

public void addEquivalentProperty(aterm.ATermAppl p1,
                                  aterm.ATermAppl p2)

addDisjointProperties

public void addDisjointProperties(aterm.ATermList properties)

addDisjointProperties

public void addDisjointProperties(java.util.List<aterm.ATermAppl> properties)

addDisjointProperty

public void addDisjointProperty(aterm.ATermAppl p1,
                                aterm.ATermAppl p2)

addDisjointProperty

public void addDisjointProperty(aterm.ATermAppl p1,
                                aterm.ATermAppl p2,
                                DependencySet ds)

addInverseProperty

public void addInverseProperty(aterm.ATermAppl p1,
                               aterm.ATermAppl p2)

addTransitiveProperty

public void addTransitiveProperty(aterm.ATermAppl p)

addSymmetricProperty

public void addSymmetricProperty(aterm.ATermAppl p)

addAntisymmetricProperty

public void addAntisymmetricProperty(aterm.ATermAppl p)
Deprecated. Use addAsymmetricProperty(ATermAppl)


addAsymmetricProperty

public void addAsymmetricProperty(aterm.ATermAppl p)

addReflexiveProperty

public void addReflexiveProperty(aterm.ATermAppl p)

addIrreflexiveProperty

public void addIrreflexiveProperty(aterm.ATermAppl p)

addFunctionalProperty

public void addFunctionalProperty(aterm.ATermAppl p)

addInverseFunctionalProperty

public void addInverseFunctionalProperty(aterm.ATerm p)

addDomain

public void addDomain(aterm.ATerm p,
                      aterm.ATermAppl c)

addDomain

public void addDomain(aterm.ATerm p,
                      aterm.ATermAppl c,
                      java.util.Set<aterm.ATermAppl> explain)
For internal use when domain axioms come from TBox absorption


addRange

public void addRange(aterm.ATerm p,
                     aterm.ATermAppl c)

addRange

public void addRange(aterm.ATerm p,
                     aterm.ATermAppl c,
                     java.util.Set<aterm.ATermAppl> explain)
For internal use when range axioms come from TBox absorption


addDatatype

public void addDatatype(aterm.ATermAppl p)

addDatatypeDefinition

public boolean addDatatypeDefinition(aterm.ATermAppl name,
                                     aterm.ATermAppl datarange)
Adds a new datatype defined to be equivalent to the given data range expression.

Parameters:
name - name of the datatype
datarange - a data range expression
Returns:

removeDomain

public 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. See also addDomain(ATerm, ATermAppl).

Parameters:
p - Property in domain axiom
c - Class in domain axiom
Returns:
true if axiom is removed, false if removal failed

removePropertyValue

public boolean removePropertyValue(aterm.ATermAppl p,
                                   aterm.ATermAppl i1,
                                   aterm.ATermAppl i2)

removeRange

public 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. See also addRange(ATerm, ATermAppl).

Parameters:
p - Property in range axiom
c - Class or datatype in range axiom
Returns:
true if axiom is removed, false if removal failed

removeType

public boolean removeType(aterm.ATermAppl ind,
                          aterm.ATermAppl c)

removeAxiom

public boolean removeAxiom(aterm.ATermAppl axiom)
Removes (if possible) the given TBox axiom from the KB and return true if removal was successful.

Parameters:
axiom - TBox axiom to remove
Returns:
true if axiom is removed, false if removal failed

prepare

public void prepare()

updateExpressivity

public void updateExpressivity(aterm.ATermAppl i,
                               aterm.ATermAppl c)
This method is used for incremental reasoning. We do not want to recompute the expressivity from scratch.


getInfo

public java.lang.String getInfo()

isConsistencyDone

public boolean isConsistencyDone()
Returns true if the consistency check has been done and nothing in th KB has changed after that.


isClassified

public boolean isClassified()
Returns true if the classification check has been done and nothing in the KB has changed after that.


isRealized

public boolean isRealized()

isChanged

public boolean isChanged()

isChanged

public boolean isChanged(KnowledgeBase.ChangeType change)

isTBoxChanged

public boolean isTBoxChanged()

isRBoxChanged

public boolean isRBoxChanged()

isABoxChanged

public boolean isABoxChanged()

getUnsatisfiableClasses

public java.util.Set<aterm.ATermAppl> getUnsatisfiableClasses()
Returns all unsatisfiable classes in the KB excluding the BOTTOM concept. The result may be empty if there is no user-defined concept in the KB that is unsatisfiable.

Returns:
all unsatisfiable classes in the KB excluding the BOTTOM concept

getAllUnsatisfiableClasses

public java.util.Set<aterm.ATermAppl> getAllUnsatisfiableClasses()
Returns all unsatisfiable classes in the KB including the BOTTOM concept. Since BOTTOM concept is built-in the result will always have at least one element.

Returns:
all unsatisfiable classes in the KB including the BOTTOM concept

isConsistent

public boolean isConsistent()

getToldTaxonomy

public Taxonomy<aterm.ATermAppl> getToldTaxonomy()

getToldDisjoints

public java.util.Map<aterm.ATermAppl,java.util.Set<aterm.ATermAppl>> getToldDisjoints()

ensureConsistency

public void ensureConsistency()

classify

public void classify()

realize

public void realize()

getClasses

public java.util.Set<aterm.ATermAppl> getClasses()
Return the set of all named classes. Returned set is unmodifiable!

Returns:

getAllClasses

public java.util.Set<aterm.ATermAppl> getAllClasses()
Return the set of all named classes including TOP and BOTTOM. Returned set is modifiable.

Returns:

getProperties

public java.util.Set<aterm.ATermAppl> getProperties()
Return the set of all properties.

Returns:

getObjectProperties

public java.util.Set<aterm.ATermAppl> getObjectProperties()
Return the set of all object properties.

Returns:

getAnnotationProperties

public java.util.Set<aterm.ATermAppl> getAnnotationProperties()

getTransitiveProperties

public java.util.Set<aterm.ATermAppl> getTransitiveProperties()

getSymmetricProperties

public java.util.Set<aterm.ATermAppl> getSymmetricProperties()

getAntisymmetricProperties

public java.util.Set<aterm.ATermAppl> getAntisymmetricProperties()
Deprecated. Use getAntisymmetricProperties()


getAsymmetricProperties

public java.util.Set<aterm.ATermAppl> getAsymmetricProperties()

getReflexiveProperties

public java.util.Set<aterm.ATermAppl> getReflexiveProperties()

getIrreflexiveProperties

public java.util.Set<aterm.ATermAppl> getIrreflexiveProperties()

getFunctionalProperties

public java.util.Set<aterm.ATermAppl> getFunctionalProperties()

getInverseFunctionalProperties

public java.util.Set<aterm.ATermAppl> getInverseFunctionalProperties()

getDataProperties

public java.util.Set<aterm.ATermAppl> getDataProperties()
Return the set of all object properties.

Returns:

getIndividuals

public java.util.Set<aterm.ATermAppl> getIndividuals()
Return the set of all individuals. Returned set is unmodifiable!

Returns:

getAnnotationSubjects

public java.util.Set<aterm.ATermAppl> getAnnotationSubjects()
Returns the set of key values of the annotations map

Returns:

getProperty

public Role getProperty(aterm.ATerm r)

getPropertyType

public PropertyType getPropertyType(aterm.ATerm r)

isClass

public boolean isClass(aterm.ATerm c)

isProperty

public boolean isProperty(aterm.ATerm p)

isDatatypeProperty

public boolean isDatatypeProperty(aterm.ATerm p)

isObjectProperty

public boolean isObjectProperty(aterm.ATerm p)

isABoxProperty

public boolean isABoxProperty(aterm.ATerm p)

isAnnotationProperty

public boolean isAnnotationProperty(aterm.ATerm p)

isOntologyProperty

@Deprecated
public boolean isOntologyProperty(aterm.ATerm p)
Deprecated. 


isIndividual

public boolean isIndividual(aterm.ATerm ind)

isTransitiveProperty

public boolean isTransitiveProperty(aterm.ATermAppl r)

isSymmetricProperty

public boolean isSymmetricProperty(aterm.ATermAppl p)

isFunctionalProperty

public boolean isFunctionalProperty(aterm.ATermAppl p)

isInverseFunctionalProperty

public boolean isInverseFunctionalProperty(aterm.ATermAppl p)

isReflexiveProperty

public boolean isReflexiveProperty(aterm.ATermAppl p)

isIrreflexiveProperty

public boolean isIrreflexiveProperty(aterm.ATermAppl p)

isAntisymmetricProperty

public boolean isAntisymmetricProperty(aterm.ATermAppl p)
Deprecated. Use isAsymmetricProperty(ATermAppl)


isAsymmetricProperty

public boolean isAsymmetricProperty(aterm.ATermAppl p)

isSubPropertyOf

public boolean isSubPropertyOf(aterm.ATermAppl sub,
                               aterm.ATermAppl sup)

isEquivalentProperty

public boolean isEquivalentProperty(aterm.ATermAppl p1,
                                    aterm.ATermAppl p2)

isInverse

public boolean isInverse(aterm.ATermAppl r1,
                         aterm.ATermAppl r2)

hasDomain

public boolean hasDomain(aterm.ATermAppl p,
                         aterm.ATermAppl c)

hasRange

public boolean hasRange(aterm.ATermAppl p,
                        aterm.ATermAppl c)

isDatatype

public boolean isDatatype(aterm.ATermAppl c)

isSatisfiable

public boolean isSatisfiable(aterm.ATermAppl c)

hasInstance

public boolean hasInstance(aterm.ATerm d)
Returns true if there is at least one named individual that belongs to the given class

Parameters:
c -
Returns:

isSubClassOf

public boolean isSubClassOf(aterm.ATermAppl c1,
                            aterm.ATermAppl c2)
Check if class c1 is subclass of class c2.

Parameters:
c1 -
c2 -
Returns:

isEquivalentClass

public boolean isEquivalentClass(aterm.ATermAppl c1,
                                 aterm.ATermAppl c2)
Check if class c1 is equivalent to class c2.

Parameters:
c1 -
c2 -
Returns:

isDisjoint

public boolean isDisjoint(aterm.ATermAppl c1,
                          aterm.ATermAppl c2)

isDisjointClass

public boolean isDisjointClass(aterm.ATermAppl c1,
                               aterm.ATermAppl c2)

isDisjointProperty

public boolean isDisjointProperty(aterm.ATermAppl r1,
                                  aterm.ATermAppl r2)

isComplement

public boolean isComplement(aterm.ATermAppl c1,
                            aterm.ATermAppl c2)

isKnownType

public Bool isKnownType(aterm.ATermAppl x,
                        aterm.ATermAppl c)
Answers the isType question without doing any satisfiability check. It might return Bool.TRUE, Bool.FALSE, or Bool.UNKNOWN. If Bool.UNKNOWN is returned isType function needs to be called to get the answer.

Parameters:
x -
c -
Returns:

isType

public boolean isType(aterm.ATermAppl x,
                      aterm.ATermAppl c)

isSameAs

public boolean isSameAs(aterm.ATermAppl t1,
                        aterm.ATermAppl t2)

isDifferentFrom

public boolean isDifferentFrom(aterm.ATermAppl t1,
                               aterm.ATermAppl t2)

getDifferents

public java.util.Set<aterm.ATermAppl> getDifferents(aterm.ATermAppl name)

hasPropertyValue

public boolean hasPropertyValue(aterm.ATermAppl s,
                                aterm.ATermAppl p,
                                aterm.ATermAppl o)

hasKnownPropertyValue

public Bool hasKnownPropertyValue(aterm.ATermAppl s,
                                  aterm.ATermAppl p,
                                  aterm.ATermAppl o)
Answers the hasPropertyValue question without doing any satisfiability check. It might return Boolean.TRUE, Boolean.FALSE, or null (unknown). If the null value is returned hasPropertyValue function needs to be called to get the answer.

Parameters:
s - Subject
p - Predicate
o - Object (null can be used as wildcard)
Returns:

getABox

public ABox getABox()
Returns:
Returns the abox.

getRBox

public RBox getRBox()
Returns:
Returns the rbox.

getTBox

public TBox getTBox()
Returns:
Returns the tbox.

getDatatypeReasoner

public DatatypeReasoner getDatatypeReasoner()
Returns:
Returns the DatatypeReasoner

getSuperClasses

public java.util.Set<java.util.Set<aterm.ATermAppl>> getSuperClasses(aterm.ATermAppl c,
                                                                     boolean direct)
Returns the (named) superclasses of class c. Depending on the second parameter the resulting list will include either all or only the direct superclasses. A class d is a direct superclass of c iff
  1. d is superclass of c
  2. there is no other class x such that x is superclass of c and d is superclass of x
The class c itself is not included in the list but all the other classes that are sameAs c are put into the list. Also note that the returned list will always have at least one element. The list will either include one other concept from the hierarchy or the TOP concept if no other class subsumes c. By definition TOP concept is superclass of every concept.

*** This function will first classify the whole ontology ***

Parameters:
c - class whose superclasses are returned
Returns:
A set of sets, where each set in the collection represents an equivalence class. The elements of the inner class are ATermAppl objects.

getSubClasses

public java.util.Set<java.util.Set<aterm.ATermAppl>> getSubClasses(aterm.ATermAppl c)
Returns all the (named) subclasses of class c. The class c itself is not included in the list but all the other classes that are equivalent to c are put into the list. Also note that the returned list will always have at least one element, that is the BOTTOM concept. By definition BOTTOM concept is subclass of every concept. This function is equivalent to calling getSubClasses(c, true).

*** This function will first classify the whole ontology ***

Parameters:
c - class whose subclasses are returned
Returns:
A set of sets, where each set in the collection represents an equivalence class. The elements of the inner class are ATermAppl objects.

getDisjoints

public java.util.Set<java.util.Set<aterm.ATermAppl>> getDisjoints(aterm.ATermAppl c)

getDisjointClasses

public java.util.Set<java.util.Set<aterm.ATermAppl>> getDisjointClasses(aterm.ATermAppl c)

getDisjointClasses

public java.util.Set<java.util.Set<aterm.ATermAppl>> getDisjointClasses(aterm.ATermAppl c,
                                                                        boolean direct)

getDisjointProperties

public java.util.Set<java.util.Set<aterm.ATermAppl>> getDisjointProperties(aterm.ATermAppl p)

getDisjointProperties

public java.util.Set<java.util.Set<aterm.ATermAppl>> getDisjointProperties(aterm.ATermAppl p,
                                                                           boolean direct)

getComplements

public java.util.Set<aterm.ATermAppl> getComplements(aterm.ATermAppl c)

getTypes

public java.util.Set<java.util.Set<aterm.ATermAppl>> getTypes(aterm.ATermAppl ind,
                                                              boolean direct)
Returns the (named) classes individual belongs to. Depending on the second parameter the result will include either all types or only the direct types.

Parameters:
ind - An individual name
direct - If true return only the direct types, otherwise return all types
Returns:
A set of sets, where each set in the collection represents an equivalence class. The elements of the inner class are ATermAppl objects.

getTypes

public java.util.Set<java.util.Set<aterm.ATermAppl>> getTypes(aterm.ATermAppl ind)
Get all the (named) classes individual belongs to.

*** This function will first realize the whole ontology ***

Parameters:
ind - An individual name
Returns:
A set of sets, where each set in the collection represents an equivalence class. The elements of the inner class are ATermAppl objects.

getType

public aterm.ATermAppl getType(aterm.ATermAppl ind)

getType

public aterm.ATermAppl getType(aterm.ATermAppl ind,
                               boolean direct)

getInstances

public java.util.Set<aterm.ATermAppl> getInstances(aterm.ATermAppl c)
Returns all the instances of concept c. If TOP concept is used every individual in the knowledge base will be returned

Parameters:
c - class whose instances are returned
Returns:
A set of ATerm objects

getInstances

public java.util.Set<aterm.ATermAppl> getInstances(aterm.ATermAppl c,
                                                   boolean direct)
Returns the instances of class c. Depending on the second parameter the resulting list will include all or only the direct instances. An individual x is a direct instance of c iff x is of type c and there is no subclass d of c such that x is of type d.

*** This function will first realize the whole ontology ***

Parameters:
c - class whose instances are returned
direct - if true return only the direct instances, otherwise return all the instances
Returns:
A set of ATerm objects

getEquivalentClasses

public java.util.Set<aterm.ATermAppl> getEquivalentClasses(aterm.ATermAppl c)
Returns all the classes that are equivalent to class c, excluding c itself.

*** This function will first classify the whole ontology ***

Parameters:
c - class whose equivalent classes are found
Returns:
A set of ATerm objects

getAllEquivalentClasses

public java.util.Set<aterm.ATermAppl> getAllEquivalentClasses(aterm.ATermAppl c)
Returns all the classes that are equivalent to class c, including c itself.

*** This function will first classify the whole ontology ***

Parameters:
c - class whose equivalent classes are found
Returns:
A set of ATerm objects

getSuperClasses

public java.util.Set<java.util.Set<aterm.ATermAppl>> getSuperClasses(aterm.ATermAppl c)
Returns all the superclasses (implicitly or explicitly defined) of class c. The class c itself is not included in the list. but all the other classes that are sameAs c are put into the list. Also note that the returned list will always have at least one element, that is TOP concept. By definition TOP concept is superclass of every concept. This function is equivalent to calling getSuperClasses(c, true).

*** This function will first classify the whole ontology ***

Parameters:
c - class whose superclasses are returned
Returns:
A set of sets, where each set in the collection represents an equivalence class. The elements of the inner class are ATermAppl objects.

getSubClasses

public java.util.Set<java.util.Set<aterm.ATermAppl>> getSubClasses(aterm.ATermAppl c,
                                                                   boolean direct)
Returns the (named) subclasses of class c. Depending on the second parameter the result will include either all subclasses or only the direct subclasses. A class d is a direct subclass of c iff
  1. d is subclass of c
  2. there is no other class x different from c and d such that x is subclass of c and d is subclass of x
The class c itself is not included in the list but all the other classes that are sameAs c are put into the list. Also note that the returned list will always have at least one element. The list will either include one other concept from the hierarchy or the BOTTOM concept if no other class is subsumed by c. By definition BOTTOM concept is subclass of every concept.

*** This function will first classify the whole ontology ***

Parameters:
c - class whose subclasses are returned
direct - If true return only the direct subclasses, otherwise return all the subclasses
Returns:
A set of sets, where each set in the collection represents an equivalence class. The elements of the inner class are ATermAppl objects.

getAllSuperProperties

public java.util.Set<java.util.Set<aterm.ATermAppl>> getAllSuperProperties(aterm.ATermAppl prop)

getSuperProperties

public java.util.Set<java.util.Set<aterm.ATermAppl>> getSuperProperties(aterm.ATermAppl prop)
Return all the super properties of p.

Parameters:
prop -
Returns:
A set of sets, where each set in the collection represents a set of equivalent properties. The elements of the inner class are Role objects.

getSuperProperties

public java.util.Set<java.util.Set<aterm.ATermAppl>> getSuperProperties(aterm.ATermAppl prop,
                                                                        boolean direct)
Return the super properties of p. Depending on the second parameter the result will include either all super properties or only the direct super properties.

Parameters:
prop -
direct - If true return only the direct super properties, otherwise return all the super properties
Returns:
A set of sets, where each set in the collection represents a set of equivalent properties. The elements of the inner class are Role objects.

getAllSubProperties

public java.util.Set<java.util.Set<aterm.ATermAppl>> getAllSubProperties(aterm.ATermAppl prop)

getSubProperties

public java.util.Set<java.util.Set<aterm.ATermAppl>> getSubProperties(aterm.ATermAppl prop)
Return all the sub properties of p.

Parameters:
prop -
Returns:
A set of sets, where each set in the collection represents a set of equivalent properties. The elements of the inner class are ATermAppl objects.

getSubProperties

public java.util.Set<java.util.Set<aterm.ATermAppl>> getSubProperties(aterm.ATermAppl prop,
                                                                      boolean direct)
Return the sub properties of p. Depending on the second parameter the result will include either all subproperties or only the direct subproperties.

Parameters:
prop -
direct - If true return only the direct subproperties, otherwise return all the subproperties
Returns:
A set of sets, where each set in the collection represents a set of equivalent properties. The elements of the inner class are ATermAppl objects.

getEquivalentProperties

public java.util.Set<aterm.ATermAppl> getEquivalentProperties(aterm.ATermAppl prop)
Return all the properties that are equivalent to p.

Parameters:
prop -
Returns:
A set of ATermAppl objects.

getAllEquivalentProperties

public java.util.Set<aterm.ATermAppl> getAllEquivalentProperties(aterm.ATermAppl prop)

getInverses

public java.util.Set<aterm.ATermAppl> getInverses(aterm.ATerm name)
Return the named inverse property and all its equivalent properties.

Parameters:
prop -
Returns:

getInverse

public aterm.ATermAppl getInverse(aterm.ATerm name)
Returns the inverse of given property. This could possibly be an internal property created by the reasoner rather than a named property. In case the given property has more than one inverse any one of them can be returned.

Parameters:
name - Property whose inverse being sought
Returns:
Inverse property or null if given property is not defined or it is not an object property

getDomains

public java.util.Set<aterm.ATermAppl> getDomains(aterm.ATermAppl name)
Return the domain restrictions on the property. The results of this function is not guaranteed to be complete. Use hasDomain(ATermAppl, ATermAppl) to get complete answers.

Parameters:
prop -
Returns:

getRanges

public java.util.Set<aterm.ATermAppl> getRanges(aterm.ATerm name)
Return the domain restrictions on the property. The results of this function is not guaranteed to be complete. Use hasRange(ATermAppl, ATermAppl) to get complete answers.

Parameters:
prop -
Returns:

getAllSames

public java.util.Set<aterm.ATermAppl> getAllSames(aterm.ATermAppl name)
Return all the indviduals asserted to be equal to the given individual inluding the individual itself.

Parameters:
name -
Returns:

getSames

public java.util.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.

Parameters:
name -
Returns:

getDataPropertyValues

public java.util.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.

Parameters:
r -
x -
lang -
Returns:
List of ATermAppl objects representing literals. These objects are in the form literal(value, lang, datatypeURI).

getDataPropertyValues

public java.util.List<aterm.ATermAppl> getDataPropertyValues(aterm.ATermAppl r,
                                                             aterm.ATermAppl x,
                                                             java.lang.String lang)
Return all literal values for a given dataproperty that has the specified language identifier.

Parameters:
r -
x -
lang -
Returns:
List of ATermAppl objects.

getDataPropertyValues

public java.util.List<aterm.ATermAppl> getDataPropertyValues(aterm.ATermAppl r,
                                                             aterm.ATermAppl x)
Return all literal values for a given dataproperty and subject value.

Parameters:
r -
x -
Returns:
List of ATermAppl objects.

getObjectPropertyValues

public java.util.List<aterm.ATermAppl> getObjectPropertyValues(aterm.ATermAppl r,
                                                               aterm.ATermAppl x)
Return all property values for a given object property and subject value.

Parameters:
r -
x -
Returns:
A list of ATermAppl objects

getPropertyValues

public java.util.List<aterm.ATermAppl> getPropertyValues(aterm.ATermAppl r,
                                                         aterm.ATermAppl x)
Return all property values for a given property and subject value.

Parameters:
r -
x -
Returns:
List of ATermAppl objects.

getIndividualsWithProperty

public java.util.List<aterm.ATermAppl> getIndividualsWithProperty(aterm.ATermAppl r,
                                                                  aterm.ATermAppl x)
List all subjects with a given property and property value.

Parameters:
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)
Returns:
List of ATermAppl objects.

getIndividualsWithDataProperty

public java.util.List<aterm.ATermAppl> getIndividualsWithDataProperty(aterm.ATermAppl r,
                                                                      aterm.ATermAppl litValue)
List all subjects with the given literal value for the specified data property.

Parameters:
r - An ATerm object that contains the literal value in the form literal(lexicalValue, langIdentifier, datatypeURI). Should be created with ATermUtils.makeXXXLiteral() functions.
x -
Returns:
List of ATermAppl objects.

getIndividualsWithObjectProperty

public java.util.List<aterm.ATermAppl> getIndividualsWithObjectProperty(aterm.ATermAppl r,
                                                                        aterm.ATermAppl o)
List all subjects with the given value for the specified object property.

Parameters:
r -
o - An ATerm object that is the URI of an individual
Returns:
List of ATermAppl objects.

getProperties

public java.util.List<aterm.ATermAppl> getProperties(aterm.ATermAppl s,
                                                     aterm.ATermAppl o)
List all properties asserted between a subject and object.


getPropertyValues

public java.util.Map<aterm.ATermAppl,java.util.List<aterm.ATermAppl>> getPropertyValues(aterm.ATermAppl pred)

retrieve

public java.util.Set<aterm.ATermAppl> retrieve(aterm.ATermAppl d,
                                               java.util.Collection<aterm.ATermAppl> individuals)
Return all the individuals that belong to the given class which is not necessarily a named class.

Parameters:
d -
Returns:

retrieveIndividualsWithProperty

public java.util.List<aterm.ATermAppl> retrieveIndividualsWithProperty(aterm.ATermAppl r)
Retrieve individuals which possibly have a property value for the given property.


tracingBasedInstanceRetrieval

public void tracingBasedInstanceRetrieval(aterm.ATermAppl c,
                                          java.util.List<aterm.ATermAppl> candidates,
                                          java.util.Collection<aterm.ATermAppl> results)

linearInstanceRetrieval

public void linearInstanceRetrieval(aterm.ATermAppl c,
                                    java.util.List<aterm.ATermAppl> candidates,
                                    java.util.Collection<aterm.ATermAppl> results)

binaryInstanceRetrieval

public void binaryInstanceRetrieval(aterm.ATermAppl c,
                                    java.util.List<aterm.ATermAppl> candidates,
                                    java.util.Collection<aterm.ATermAppl> results)

printClassTree

public void printClassTree()
Print the class hierarchy on the standard output.


printClassTree

public void printClassTree(java.io.PrintWriter out)

doExplanation

public boolean doExplanation()

setDoExplanation

public void setDoExplanation(boolean doExplanation)
Parameters:
doExplanation - The doExplanation to set.

getExplanation

public java.lang.String getExplanation()

setDoDependencyAxioms

public void setDoDependencyAxioms(boolean doDepAxioms)
Deprecated. Use setDoExplanation instead


getDoDependencyAxioms

public boolean getDoDependencyAxioms()
Deprecated. Use getExplanation instead


getExplanationSet

public java.util.Set<aterm.ATermAppl> getExplanationSet()

setRBox

public void setRBox(RBox rbox)
Parameters:
rbox - The rbox to set.

setTBox

public void setTBox(TBox tbox)
Parameters:
tbox - The tbox to set.

setTimeout

public void setTimeout(long timeout)
Set a timeout for the main timer. Used to stop an automated test after a reasonable amount of time has passed.

Parameters:
timeout -

getRole

public Role getRole(aterm.ATerm term)
Parameters:
term -
Returns:

getTaxonomy

public Taxonomy<aterm.ATermAppl> getTaxonomy()
Get the classification results.


getTaxonomyBuilder

public TaxonomyBuilder getTaxonomyBuilder()

setTaxonomyBuilderProgressMonitor

public void setTaxonomyBuilderProgressMonitor(ProgressMonitor progressMonitor)

getRoleTaxonomy

public Taxonomy<aterm.ATermAppl> getRoleTaxonomy(boolean objectTaxonomy)

getRoleTaxonomy

public Taxonomy<aterm.ATermAppl> getRoleTaxonomy(aterm.ATermAppl r)

getSizeEstimate

public SizeEstimate getSizeEstimate()

addRule

public boolean addRule(Rule rule)
Add a rule to the KB.


getRules

public java.util.Set<Rule> getRules()
Return all the asserted rules.


getNormalizedRules

public java.util.Map<Rule,Rule> getNormalizedRules()
Return the asserted rules with their normalized form. A normalized rule is a rule where any class expression occurring in the rules is in normalized form.

Returns:
set of rules where

ensureIncConsistency

public void ensureIncConsistency(boolean aboxDeletion)

getDependencyIndex

public DependencyIndex getDependencyIndex()
Get the dependency index for syntactic assertions in this kb

Returns:

getSyntacticAssertions

public java.util.Set<aterm.ATermAppl> getSyntacticAssertions()
Get syntactic assertions in the kb

Returns:

getABoxAssertions

public java.util.Set<aterm.ATermAppl> getABoxAssertions(KnowledgeBase.AssertionType assertionType)

getAboxMembershipAssertions

public java.util.Set<aterm.ATermAppl> getAboxMembershipAssertions()
Deprecated. Use getABoxAssertions(org.mindswap.pellet.KnowledgeBase.AssertionType) instead


getAboxObjectRoleAssertions

public java.util.Set<aterm.ATermAppl> getAboxObjectRoleAssertions()
Deprecated. Use getABoxAssertions(org.mindswap.pellet.KnowledgeBase.AssertionType) instead


getAboxDataRoleAssertions

public java.util.Set<aterm.ATermAppl> getAboxDataRoleAssertions()
Deprecated. Use getABoxAssertions(org.mindswap.pellet.KnowledgeBase.AssertionType) instead


getDeletedAssertions

public java.util.Set<aterm.ATermAppl> getDeletedAssertions()
Returns:
the deletedAssertions

isExplainOnlyInconsistency

public boolean isExplainOnlyInconsistency()
Returns current value of explainOnlyInconsistency option.

Returns:
current value of explainOnlyInconsistency option
See Also:
setExplainOnlyInconsistency(boolean)

setExplainOnlyInconsistency

public void setExplainOnlyInconsistency(boolean explainOnlyInconsistency)
Controls what kind of explanations can be generated using this KB. With this option enabled explanations for inconsistent ontologies will be returned. But if the ontology is consistent, it will not be possible to retrieve explanations for inferences about instances. This option is disabled by default. It should be turned on if explanations are only needed for inconsistencies but not other inferences. Turning this option on improves the performance of consistency checking for consistent ontologies.

Parameters:
explainOnlyInconsistency - new value for explainOnlyInconsistency option


Copyright © 2004 Evren Sirin. All Rights Reserved.