Package openllet.core
Class KnowledgeBaseImplFullSync
- java.lang.Object
-
- openllet.core.KnowledgeBaseImpl
-
- openllet.core.KnowledgeBaseImplFullSync
-
- All Implemented Interfaces:
Base,Boxes,ClassesBase,InstancesBase,MessageBase,PropertiesBase,KnowledgeBase,openllet.shared.tools.Logging
public class KnowledgeBaseImplFullSync extends KnowledgeBaseImpl
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class openllet.core.KnowledgeBaseImpl
KnowledgeBaseImpl.AssertionType
-
Nested classes/interfaces inherited from interface openllet.core.KnowledgeBase
KnowledgeBase.ChangeType
-
-
Field Summary
-
Fields inherited from class openllet.core.KnowledgeBaseImpl
_logger, _timers
-
Fields inherited from interface openllet.core.knowledge.MessageBase
_isNotAnClass, _isNotAnIndividual, _isNotAnKnowClass, _isNotAnKnowDataProperty, _isNotAnKnowIndividual, _isNotAnKnowObjectProperty, _isNotAnKnowProperty, _isNotAnProperty, _isNotAnPropertyNorAClass, _isNotAValidClassExpression, _isNotAValidClassExpressionOrDataRange
-
-
Constructor Summary
Constructors Constructor Description KnowledgeBaseImplFullSync()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddAllDifferent(openllet.aterm.ATermList list)booleanaddAnnotation(openllet.aterm.ATermAppl s, openllet.aterm.ATermAppl p, openllet.aterm.ATermAppl o)booleanaddAnnotationProperty(openllet.aterm.ATerm p)voidaddAntisymmetricProperty(openllet.aterm.ATermAppl p)Deprecated.voidaddAsymmetricProperty(openllet.aterm.ATermAppl p)voidaddClass(openllet.aterm.ATermAppl c)voidaddComplementClass(openllet.aterm.ATermAppl c1, openllet.aterm.ATermAppl c2)voidaddDatatype(openllet.aterm.ATermAppl p)booleanaddDatatypeDefinition(openllet.aterm.ATermAppl name, openllet.aterm.ATermAppl datarange)Adds a new datatype defined to be equivalent to the given data range expression.booleanaddDatatypeProperty(openllet.aterm.ATerm p)Add a new object property.voidaddDifferent(openllet.aterm.ATermAppl i1, openllet.aterm.ATermAppl i2)voidaddDisjointClass(openllet.aterm.ATermAppl c1, openllet.aterm.ATermAppl c2)voidaddDisjointClasses(java.util.List<openllet.aterm.ATermAppl> classes)voidaddDisjointClasses(openllet.aterm.ATermList classes)voidaddDisjointProperties(openllet.aterm.ATermList properties)voidaddDisjointProperty(openllet.aterm.ATermAppl p1, openllet.aterm.ATermAppl p2)voidaddDisjointProperty(openllet.aterm.ATermAppl p1, openllet.aterm.ATermAppl p2, DependencySet ds)voidaddDomain(openllet.aterm.ATerm p, openllet.aterm.ATermAppl c)voidaddDomain(openllet.aterm.ATerm p, openllet.aterm.ATermAppl c, java.util.Set<openllet.aterm.ATermAppl> explain)For internal use when domain axioms come from TBox absorptionvoidaddEquivalentClass(openllet.aterm.ATermAppl c1, openllet.aterm.ATermAppl c2)voidaddEquivalentProperty(openllet.aterm.ATermAppl p1, openllet.aterm.ATermAppl p2)voidaddFunctionalProperty(openllet.aterm.ATermAppl p)IndividualaddIndividual(openllet.aterm.ATermAppl i)voidaddInverseFunctionalProperty(openllet.aterm.ATerm p)voidaddInverseProperty(openllet.aterm.ATermAppl p1, openllet.aterm.ATermAppl p2)voidaddIrreflexiveProperty(openllet.aterm.ATermAppl p)voidaddKey(openllet.aterm.ATermAppl c, java.util.Set<openllet.aterm.ATermAppl> properties)booleanaddNegatedPropertyValue(openllet.aterm.ATermAppl p, openllet.aterm.ATermAppl s, openllet.aterm.ATermAppl o)booleanaddObjectProperty(openllet.aterm.ATerm p)Add a new object property.voidaddObjectPropertyValue(openllet.aterm.ATermAppl p, openllet.aterm.ATermAppl s, openllet.aterm.ATermAppl o)Deprecated.voidaddOntologyProperty(openllet.aterm.ATermAppl p)Deprecated.voidaddProperty(openllet.aterm.ATermAppl p)booleanaddPropertyValue(openllet.aterm.ATermAppl p, openllet.aterm.ATermAppl s, openllet.aterm.ATermAppl o)voidaddRange(openllet.aterm.ATerm p, openllet.aterm.ATermAppl c)voidaddRange(openllet.aterm.ATerm p, openllet.aterm.ATermAppl c, java.util.Set<openllet.aterm.ATermAppl> explain)For internal use when range axioms come from TBox absorptionvoidaddReflexiveProperty(openllet.aterm.ATermAppl p)booleanaddRule(Rule rule)Add a rule to the KB.voidaddSame(openllet.aterm.ATermAppl i1, openllet.aterm.ATermAppl i2)voidaddSubClass(openllet.aterm.ATermAppl sub, openllet.aterm.ATermAppl sup)voidaddSubProperty(openllet.aterm.ATerm sub, openllet.aterm.ATermAppl sup)voidaddSymmetricProperty(openllet.aterm.ATermAppl p)voidaddTransitiveProperty(openllet.aterm.ATermAppl p)voidaddType(openllet.aterm.ATermAppl i, openllet.aterm.ATermAppl c)voidaddType(openllet.aterm.ATermAppl i, openllet.aterm.ATermAppl c, DependencySet ds)CompletionStrategychooseStrategy(ABox abox, Expressivity expressivity)Choose a completion strategy based on the expressivity of the KB.voidclassify()voidclear()voidclearABox()KnowledgeBasecopy(boolean emptyABox)Create a copy of this KB.voidensureConsistency()ABoxgetABox()java.util.Set<openllet.aterm.ATermAppl>getAllEquivalentClasses(openllet.aterm.ATermAppl c)Returns all the classes that are equivalent to class c, including c itself.java.util.Set<openllet.aterm.ATermAppl>getAllEquivalentProperties(openllet.aterm.ATermAppl prop)java.util.Set<openllet.aterm.ATermAppl>getAllSames(openllet.aterm.ATermAppl name)java.util.Set<java.util.Set<openllet.aterm.ATermAppl>>getAllSubProperties(openllet.aterm.ATermAppl prop)java.util.Set<java.util.Set<openllet.aterm.ATermAppl>>getAllSuperProperties(openllet.aterm.ATermAppl prop)java.util.Set<openllet.aterm.ATermAppl>getAllUnsatisfiableClasses()Returns all unsatisfiable classes in the KB including the BOTTOM concept.java.util.Set<openllet.aterm.ATermAppl>getAnnotationProperties()java.util.Set<openllet.aterm.ATermAppl>getAnnotations(openllet.aterm.ATermAppl s, openllet.aterm.ATermAppl p)java.util.Set<openllet.aterm.ATermAppl>getAnnotationSubjects()java.util.Set<openllet.aterm.ATermAppl>getAsymmetricProperties()TaxonomyBuildergetBuilder()java.util.Set<openllet.aterm.ATermAppl>getComplements(openllet.aterm.ATermAppl c)java.util.Set<openllet.aterm.ATermAppl>getDataProperties()java.util.List<openllet.aterm.ATermAppl>getDataPropertyValues(openllet.aterm.ATermAppl r, openllet.aterm.ATermAppl lang, openllet.aterm.ATermAppl datatype)Return all literal values for a given dataproperty that belongs to the specified datatype.java.util.Set<openllet.aterm.ATermAppl>getDeletedAssertions()DependencyIndexgetDependencyIndex()java.util.Set<openllet.aterm.ATermAppl>getDifferents(openllet.aterm.ATermAppl name)java.util.Set<java.util.Set<openllet.aterm.ATermAppl>>getDisjointClasses(openllet.aterm.ATermAppl c, boolean direct)java.util.Set<java.util.Set<openllet.aterm.ATermAppl>>getDisjointProperties(openllet.aterm.ATermAppl p)java.util.Set<openllet.aterm.ATermAppl>getDomains(openllet.aterm.ATermAppl name)The results of this function is not guaranteed to be complete.java.util.Set<openllet.aterm.ATermAppl>getEquivalentClasses(openllet.aterm.ATermAppl c)Returns all the classes that are equivalent to class c, excluding c itself.java.util.Set<openllet.aterm.ATermAppl>getEquivalentProperties(openllet.aterm.ATermAppl prop)Return all the properties that are equivalent to p.ExpressivitygetExpressivity()ExpressivityCheckergetExpressivityChecker()java.util.Set<openllet.aterm.ATermAppl>getFunctionalProperties()java.util.Set<openllet.aterm.ATermAppl>getIndividuals()intgetIndividualsCount()java.util.Set<openllet.aterm.ATermAppl>getIndividualsWithAnnotation(openllet.aterm.ATermAppl p, openllet.aterm.ATermAppl o)java.util.List<openllet.aterm.ATermAppl>getIndividualsWithProperty(openllet.aterm.ATermAppl r, openllet.aterm.ATermAppl x)List all subjects with a given property and property value.java.util.Set<openllet.aterm.ATermAppl>getInstances(openllet.aterm.ATermAppl c)Returns all the instances of concept c.java.util.Set<openllet.aterm.ATermAppl>getInstances(openllet.aterm.ATermAppl c, boolean direct)Returns the instances of class c.java.util.Set<openllet.aterm.ATermAppl>getInverseFunctionalProperties()java.util.Set<openllet.aterm.ATermAppl>getInverses(openllet.aterm.ATerm name)java.util.Set<openllet.aterm.ATermAppl>getIrreflexiveProperties()java.util.Map<Rule,Rule>getNormalizedRules()Return the asserted rules with their normalized form.java.util.Set<openllet.aterm.ATermAppl>getObjectProperties()java.util.List<openllet.aterm.ATermAppl>getObjectPropertyValues(openllet.aterm.ATermAppl r, openllet.aterm.ATermAppl x)java.util.Set<openllet.aterm.ATermAppl>getProperties()java.util.List<openllet.aterm.ATermAppl>getProperties(openllet.aterm.ATermAppl s, openllet.aterm.ATermAppl o)PropertyTypegetPropertyType(openllet.aterm.ATerm r)java.util.Map<openllet.aterm.ATermAppl,java.util.List<openllet.aterm.ATermAppl>>getPropertyValues(openllet.aterm.ATermAppl pred)java.util.List<openllet.aterm.ATermAppl>getPropertyValues(openllet.aterm.ATermAppl r, openllet.aterm.ATermAppl x)Return all property values for a given property and subject value.java.util.Set<openllet.aterm.ATermAppl>getRanges(openllet.aterm.ATerm name)The results of this function is not guaranteed to be complete.RBoxgetRBox()java.util.Set<openllet.aterm.ATermAppl>getReflexiveProperties()Taxonomy<openllet.aterm.ATermAppl>getRoleTaxonomy(boolean objectTaxonomy)java.util.Set<Rule>getRules()Return all the asserted rules.java.util.Set<openllet.aterm.ATermAppl>getSames(openllet.aterm.ATermAppl name)SizeEstimategetSizeEstimate()java.util.Set<java.util.Set<openllet.aterm.ATermAppl>>getSubClasses(openllet.aterm.ATermAppl c, boolean direct)Returns the (named) subclasses of class c.java.util.Set<java.util.Set<openllet.aterm.ATermAppl>>getSubProperties(openllet.aterm.ATermAppl prop, boolean direct)Return the sub properties of p.java.util.Set<java.util.Set<openllet.aterm.ATermAppl>>getSuperClasses(openllet.aterm.ATermAppl cParam, boolean direct)Returns the (named) superclasses of class c.java.util.Set<java.util.Set<openllet.aterm.ATermAppl>>getSuperProperties(openllet.aterm.ATermAppl prop, boolean direct)Return the super properties of p.java.util.Set<openllet.aterm.ATermAppl>getSymmetricProperties()java.util.Set<openllet.aterm.ATermAppl>getSyntacticAssertions()Taxonomy<openllet.aterm.ATermAppl>getTaxonomy()Get the classification results.TaxonomyBuildergetTaxonomyBuilder()TBoxgetTBox()TimersgetTimers()java.util.Map<openllet.aterm.ATermAppl,java.util.Set<openllet.aterm.ATermAppl>>getToldDisjoints()Taxonomy<openllet.aterm.ATermAppl>getToldTaxonomy()java.util.Set<openllet.aterm.ATermAppl>getTransitiveProperties()java.util.Set<java.util.Set<openllet.aterm.ATermAppl>>getTypes(openllet.aterm.ATermAppl ind, boolean direct)Returns the (named) classes individual belongs to.java.util.Set<openllet.aterm.ATermAppl>getUnsatisfiableClasses()Returns all unsatisfiable classes in the KB excluding the BOTTOM concept.booleanhasDomain(openllet.aterm.ATermAppl p, openllet.aterm.ATermAppl c)booleanhasInstance(openllet.aterm.ATerm c)BoolhasKnownPropertyValue(openllet.aterm.ATermAppl s, openllet.aterm.ATermAppl p, openllet.aterm.ATermAppl o)Answers the hasPropertyValue question without doing any satisfiability check.booleanhasPropertyValue(openllet.aterm.ATermAppl s, openllet.aterm.ATermAppl p, openllet.aterm.ATermAppl o)booleanhasRange(openllet.aterm.ATermAppl p, openllet.aterm.ATermAppl c)java.util.stream.Stream<openllet.aterm.ATermAppl>individuals()booleanisAnnotation(openllet.aterm.ATermAppl s, openllet.aterm.ATermAppl p, openllet.aterm.ATermAppl o)booleanisAnnotationProperty(openllet.aterm.ATerm p)booleanisAsymmetricProperty(openllet.aterm.ATermAppl p)booleanisChanged(KnowledgeBase.ChangeType change)booleanisClass(openllet.aterm.ATerm c)booleanisClassified()Returns true if the classification check has been done and nothing in the KB has changed after that.booleanisComplement(openllet.aterm.ATermAppl c1, openllet.aterm.ATermAppl c2)booleanisConsistencyDone()Returns true if the consistency check has been done and nothing in the KB has changed after that.booleanisConsistent()booleanisDatatype(openllet.aterm.ATermAppl c)booleanisDatatypeProperty(openllet.aterm.ATerm p)booleanisDifferentFrom(openllet.aterm.ATermAppl t1, openllet.aterm.ATermAppl t2)booleanisDisjoint(openllet.aterm.ATermAppl c1, openllet.aterm.ATermAppl c2)booleanisDisjointClass(openllet.aterm.ATermAppl c1, openllet.aterm.ATermAppl c2)booleanisDisjointProperty(openllet.aterm.ATermAppl r1, openllet.aterm.ATermAppl r2)booleanisEquivalentClass(openllet.aterm.ATermAppl c1, openllet.aterm.ATermAppl c2)booleanisEquivalentProperty(openllet.aterm.ATermAppl p1, openllet.aterm.ATermAppl p2)booleanisFunctionalProperty(openllet.aterm.ATermAppl p)booleanisInverse(openllet.aterm.ATermAppl r1, openllet.aterm.ATermAppl r2)booleanisInverseFunctionalProperty(openllet.aterm.ATermAppl p)booleanisIrreflexiveProperty(openllet.aterm.ATermAppl p)BoolisKnownType(openllet.aterm.ATermAppl x, openllet.aterm.ATermAppl c)Answers the isType question without doing any satisfiability check.booleanisObjectProperty(openllet.aterm.ATerm p)booleanisRealized()booleanisReflexiveProperty(openllet.aterm.ATermAppl p)booleanisSameAs(openllet.aterm.ATermAppl t1, openllet.aterm.ATermAppl t2)booleanisSatisfiable(openllet.aterm.ATermAppl c)booleanisSubClassOf(openllet.aterm.ATermAppl c1, openllet.aterm.ATermAppl c2)booleanisSubPropertyOf(openllet.aterm.ATermAppl sub, openllet.aterm.ATermAppl sup)booleanisTransitiveProperty(openllet.aterm.ATermAppl r)booleanisType(openllet.aterm.ATermAppl x, openllet.aterm.ATermAppl c)java.util.stream.Stream<openllet.aterm.ATermAppl>objectPropertyValues(openllet.aterm.ATermAppl r, openllet.aterm.ATermAppl x)voidprepare()voidprintClassTree()Print the class hierarchy on the standard output.voidrealize()booleanremoveAxiom(openllet.aterm.ATermAppl axiom)Removes (if possible) the given TBox axiom from the KB and returntrueif removal was successful.booleanremoveDomain(openllet.aterm.ATerm p, openllet.aterm.ATermAppl c)Removes (if possible) the given property domain axiom from the KB and returntrueif removal was successful.booleanremovePropertyValue(openllet.aterm.ATermAppl p, openllet.aterm.ATermAppl i1, openllet.aterm.ATermAppl i2)booleanremoveRange(openllet.aterm.ATerm p, openllet.aterm.ATermAppl c)Removes (if possible) the given property range axiom from the KB and returntrueif removal was successful.booleanremoveType(openllet.aterm.ATermAppl ind, openllet.aterm.ATermAppl c)java.util.Set<openllet.aterm.ATermAppl>retrieve(openllet.aterm.ATermAppl d, java.util.Collection<openllet.aterm.ATermAppl> individuals)java.util.List<openllet.aterm.ATermAppl>retrieveIndividualsWithProperty(openllet.aterm.ATermAppl r)voidsetTaxonomyBuilderProgressMonitor(ProgressMonitor progressMonitor)-
Methods inherited from class openllet.core.KnowledgeBaseImpl
chooseStrategy, currentIndividuals, ensureIncConsistency, getABoxAssertions, getAnnotations, getBuilderProgressMonitor, getChanges, getDatatypeVisitor, getDisjointProperties, getDisjoints, getDoDependencyAxioms, getExpChecker, getFullyDefinedVisitor, getInfo, getInstances, getKnowledgeBase, getLogger, getOptTaxonomyBuilder, isABoxChanged, isChanged, isExplainOnlyInconsistency, isRBoxChanged, isTBoxChanged, printClassTree, setBuilderProgressMonitor, setChanges, setDoDependencyAxioms, setExpChecker, setExplainOnlyInconsistency, setOptTaxonomyBuilder, setTimeout, updateExpressivity
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface openllet.core.knowledge.Base
allClasses, doExplanation, getAllClasses, getClasses, getExplanation, getExplanationSet, getProperty, getRole, isABoxProperty, isIndividual, isProperty, setDoExplanation
-
Methods inherited from interface openllet.core.knowledge.Boxes
getDatatypeReasoner
-
Methods inherited from interface openllet.core.knowledge.InstancesBase
binaryInstanceRetrieval, getPrimitiveTypes, linearInstanceRetrieval, partitionInstanceRetrieval, tracingBasedInstanceRetrieval
-
Methods inherited from interface openllet.core.KnowledgeBase
copy, getDisjointClasses, getSubClasses, getSuperClasses, getTypes
-
Methods inherited from interface openllet.core.knowledge.PropertiesBase
getAntisymmetricProperties, getDataPropertyValues, getDataPropertyValues, getIndividualsWithDataProperty, getIndividualsWithObjectProperty, getInverse, getObjectPropertyValuesSet, getRoleTaxonomy, getSubAnnotationProperties, getSubProperties, getSuperProperties, isAntisymmetricProperty, isSymmetricProperty
-
-
-
-
Method Detail
-
copy
public KnowledgeBase copy(boolean emptyABox)
Description copied from class:KnowledgeBaseImplCreate a copy of this KB. Depending on the value ofemptyABoxeither a completely new copy of ABox will be created or the new KB will have an empty ABox. IfemptyABoxparameter 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.- Specified by:
copyin interfaceKnowledgeBase- Overrides:
copyin classKnowledgeBaseImpl- Parameters:
emptyABox- IftrueABox is not copied to the new KB- Returns:
- A copy of this KB
-
getBuilder
public TaxonomyBuilder getBuilder()
- Specified by:
getBuilderin interfaceBase- Overrides:
getBuilderin classKnowledgeBaseImpl
-
getExpressivity
public Expressivity getExpressivity()
- Specified by:
getExpressivityin interfaceKnowledgeBase- Overrides:
getExpressivityin classKnowledgeBaseImpl
-
getExpressivityChecker
public ExpressivityChecker getExpressivityChecker()
- Specified by:
getExpressivityCheckerin interfaceKnowledgeBase- Overrides:
getExpressivityCheckerin classKnowledgeBaseImpl
-
clear
public void clear()
- Specified by:
clearin interfaceKnowledgeBase- Overrides:
clearin classKnowledgeBaseImpl
-
clearABox
public void clearABox()
- Specified by:
clearABoxin interfaceKnowledgeBase- Overrides:
clearABoxin classKnowledgeBaseImpl
-
addClass
public void addClass(openllet.aterm.ATermAppl c)
- Specified by:
addClassin interfaceKnowledgeBase- Overrides:
addClassin classKnowledgeBaseImpl
-
addSubClass
public void addSubClass(openllet.aterm.ATermAppl sub, openllet.aterm.ATermAppl sup)- Specified by:
addSubClassin interfaceKnowledgeBase- Overrides:
addSubClassin classKnowledgeBaseImpl
-
addEquivalentClass
public void addEquivalentClass(openllet.aterm.ATermAppl c1, openllet.aterm.ATermAppl c2)- Specified by:
addEquivalentClassin interfaceKnowledgeBase- Overrides:
addEquivalentClassin classKnowledgeBaseImpl
-
addKey
public void addKey(openllet.aterm.ATermAppl c, java.util.Set<openllet.aterm.ATermAppl> properties)- Specified by:
addKeyin interfaceKnowledgeBase- Overrides:
addKeyin classKnowledgeBaseImpl
-
addDisjointClasses
public void addDisjointClasses(openllet.aterm.ATermList classes)
- Specified by:
addDisjointClassesin interfaceKnowledgeBase- Overrides:
addDisjointClassesin classKnowledgeBaseImpl
-
addDisjointClasses
public void addDisjointClasses(java.util.List<openllet.aterm.ATermAppl> classes)
- Specified by:
addDisjointClassesin interfaceKnowledgeBase- Overrides:
addDisjointClassesin classKnowledgeBaseImpl
-
addDisjointClass
public void addDisjointClass(openllet.aterm.ATermAppl c1, openllet.aterm.ATermAppl c2)- Specified by:
addDisjointClassin interfaceKnowledgeBase- Overrides:
addDisjointClassin classKnowledgeBaseImpl
-
addComplementClass
public void addComplementClass(openllet.aterm.ATermAppl c1, openllet.aterm.ATermAppl c2)- Specified by:
addComplementClassin interfaceKnowledgeBase- Overrides:
addComplementClassin classKnowledgeBaseImpl
-
addIndividual
public Individual addIndividual(openllet.aterm.ATermAppl i)
- Specified by:
addIndividualin interfaceKnowledgeBase- Overrides:
addIndividualin classKnowledgeBaseImpl
-
addType
public void addType(openllet.aterm.ATermAppl i, openllet.aterm.ATermAppl c)- Specified by:
addTypein interfaceKnowledgeBase- Overrides:
addTypein classKnowledgeBaseImpl
-
addType
public void addType(openllet.aterm.ATermAppl i, openllet.aterm.ATermAppl c, DependencySet ds)- Specified by:
addTypein interfaceKnowledgeBase- Overrides:
addTypein classKnowledgeBaseImpl
-
addSame
public void addSame(openllet.aterm.ATermAppl i1, openllet.aterm.ATermAppl i2)- Specified by:
addSamein interfaceKnowledgeBase- Overrides:
addSamein classKnowledgeBaseImpl
-
addAllDifferent
public void addAllDifferent(openllet.aterm.ATermList list)
- Specified by:
addAllDifferentin interfaceKnowledgeBase- Overrides:
addAllDifferentin classKnowledgeBaseImpl
-
addDifferent
public void addDifferent(openllet.aterm.ATermAppl i1, openllet.aterm.ATermAppl i2)- Specified by:
addDifferentin interfaceKnowledgeBase- Overrides:
addDifferentin classKnowledgeBaseImpl
-
addObjectPropertyValue
@Deprecated public void addObjectPropertyValue(openllet.aterm.ATermAppl p, openllet.aterm.ATermAppl s, openllet.aterm.ATermAppl o)Deprecated.- Overrides:
addObjectPropertyValuein classKnowledgeBaseImpl
-
addPropertyValue
public boolean addPropertyValue(openllet.aterm.ATermAppl p, openllet.aterm.ATermAppl s, openllet.aterm.ATermAppl o)- Specified by:
addPropertyValuein interfaceKnowledgeBase- Overrides:
addPropertyValuein classKnowledgeBaseImpl
-
addNegatedPropertyValue
public boolean addNegatedPropertyValue(openllet.aterm.ATermAppl p, openllet.aterm.ATermAppl s, openllet.aterm.ATermAppl o)- Specified by:
addNegatedPropertyValuein interfaceKnowledgeBase- Overrides:
addNegatedPropertyValuein classKnowledgeBaseImpl
-
addProperty
public void addProperty(openllet.aterm.ATermAppl p)
- Specified by:
addPropertyin interfaceKnowledgeBase- Overrides:
addPropertyin classKnowledgeBaseImpl
-
addObjectProperty
public boolean addObjectProperty(openllet.aterm.ATerm p)
Description copied from class:KnowledgeBaseImplAdd a new object property. If property was earlier defined to be a datatype property then this function will simply return without changing the KB.- Specified by:
addObjectPropertyin interfaceKnowledgeBase- Overrides:
addObjectPropertyin classKnowledgeBaseImpl- Parameters:
p- Name of the property- Returns:
- True if property is added, false if not
-
addDatatypeProperty
public boolean addDatatypeProperty(openllet.aterm.ATerm p)
Description copied from class:KnowledgeBaseImplAdd a new object property. If property was earlier defined to be a datatype property then this function will simply return without changing the KB.- Specified by:
addDatatypePropertyin interfaceKnowledgeBase- Overrides:
addDatatypePropertyin classKnowledgeBaseImpl- Returns:
- True if property is added, false if not
-
addOntologyProperty
@Deprecated public void addOntologyProperty(openllet.aterm.ATermAppl p)
Deprecated.- Overrides:
addOntologyPropertyin classKnowledgeBaseImpl
-
addAnnotationProperty
public boolean addAnnotationProperty(openllet.aterm.ATerm p)
- Specified by:
addAnnotationPropertyin interfaceKnowledgeBase- Overrides:
addAnnotationPropertyin classKnowledgeBaseImpl
-
addAnnotation
public boolean addAnnotation(openllet.aterm.ATermAppl s, openllet.aterm.ATermAppl p, openllet.aterm.ATermAppl o)- Specified by:
addAnnotationin interfaceKnowledgeBase- Overrides:
addAnnotationin classKnowledgeBaseImpl
-
getAnnotations
public java.util.Set<openllet.aterm.ATermAppl> getAnnotations(openllet.aterm.ATermAppl s, openllet.aterm.ATermAppl p)
-
getIndividualsWithAnnotation
public java.util.Set<openllet.aterm.ATermAppl> getIndividualsWithAnnotation(openllet.aterm.ATermAppl p, openllet.aterm.ATermAppl o)
-
isAnnotation
public boolean isAnnotation(openllet.aterm.ATermAppl s, openllet.aterm.ATermAppl p, openllet.aterm.ATermAppl o)- Specified by:
isAnnotationin interfaceKnowledgeBase- Overrides:
isAnnotationin classKnowledgeBaseImpl
-
addSubProperty
public void addSubProperty(openllet.aterm.ATerm sub, openllet.aterm.ATermAppl sup)
-
addEquivalentProperty
public void addEquivalentProperty(openllet.aterm.ATermAppl p1, openllet.aterm.ATermAppl p2)
-
addDisjointProperties
public void addDisjointProperties(openllet.aterm.ATermList properties)
-
addDisjointProperty
public void addDisjointProperty(openllet.aterm.ATermAppl p1, openllet.aterm.ATermAppl p2)
-
addDisjointProperty
public void addDisjointProperty(openllet.aterm.ATermAppl p1, openllet.aterm.ATermAppl p2, DependencySet ds)
-
addInverseProperty
public void addInverseProperty(openllet.aterm.ATermAppl p1, openllet.aterm.ATermAppl p2)
-
addTransitiveProperty
public void addTransitiveProperty(openllet.aterm.ATermAppl p)
-
addSymmetricProperty
public void addSymmetricProperty(openllet.aterm.ATermAppl p)
-
addAntisymmetricProperty
@Deprecated public void addAntisymmetricProperty(openllet.aterm.ATermAppl p)
Deprecated.
-
addAsymmetricProperty
public void addAsymmetricProperty(openllet.aterm.ATermAppl p)
-
prepare
public void prepare()
- Specified by:
preparein interfaceBase- Overrides:
preparein classKnowledgeBaseImpl
-
getTimers
public Timers getTimers()
- Specified by:
getTimersin interfaceBoxes- Overrides:
getTimersin classKnowledgeBaseImpl
-
getSizeEstimate
public SizeEstimate getSizeEstimate()
- Specified by:
getSizeEstimatein interfaceKnowledgeBase- Overrides:
getSizeEstimatein classKnowledgeBaseImpl
-
getABox
public ABox getABox()
- Specified by:
getABoxin interfaceBoxes- Overrides:
getABoxin classKnowledgeBaseImpl
-
getTBox
public TBox getTBox()
- Specified by:
getTBoxin interfaceBoxes- Overrides:
getTBoxin classKnowledgeBaseImpl
-
getRBox
public RBox getRBox()
- Specified by:
getRBoxin interfaceBoxes- Overrides:
getRBoxin classKnowledgeBaseImpl
-
getIndividualsCount
public int getIndividualsCount()
- Specified by:
getIndividualsCountin interfaceKnowledgeBase- Overrides:
getIndividualsCountin classKnowledgeBaseImpl- Returns:
- the total number of individuals in kb.
-
getIndividuals
public java.util.Set<openllet.aterm.ATermAppl> getIndividuals()
- Specified by:
getIndividualsin interfaceBase- Overrides:
getIndividualsin classKnowledgeBaseImpl- Returns:
- the set of all _individuals. Returned set is unmodifiable!
-
individuals
public java.util.stream.Stream<openllet.aterm.ATermAppl> individuals()
- Specified by:
individualsin interfaceKnowledgeBase- Overrides:
individualsin classKnowledgeBaseImpl- Returns:
- all individuals.
-
classify
public void classify()
- Specified by:
classifyin interfaceBase- Overrides:
classifyin classKnowledgeBaseImpl
-
realize
public void realize()
- Specified by:
realizein interfaceBase- Overrides:
realizein classKnowledgeBaseImpl
-
isClassified
public boolean isClassified()
Description copied from class:KnowledgeBaseImplReturns true if the classification check has been done and nothing in the KB has changed after that.- Specified by:
isClassifiedin interfaceBase- Overrides:
isClassifiedin classKnowledgeBaseImpl- Returns:
- true if the classification check has been done and nothing in the KB has changed after that.
-
isConsistent
public boolean isConsistent()
- Specified by:
isConsistentin interfaceKnowledgeBase- Overrides:
isConsistentin classKnowledgeBaseImpl
-
ensureConsistency
public void ensureConsistency()
- Specified by:
ensureConsistencyin interfaceBase- Overrides:
ensureConsistencyin classKnowledgeBaseImpl
-
isConsistencyDone
public boolean isConsistencyDone()
Description copied from class:KnowledgeBaseImplReturns true if the consistency check has been done and nothing in the KB has changed after that.- Specified by:
isConsistencyDonein interfaceKnowledgeBase- Overrides:
isConsistencyDonein classKnowledgeBaseImpl- Returns:
- true if the consistency check has been done and nothing in the KB has changed after that.
-
getTaxonomy
public Taxonomy<openllet.aterm.ATermAppl> getTaxonomy()
Description copied from class:KnowledgeBaseImplGet the classification results.- Specified by:
getTaxonomyin interfaceKnowledgeBase- Overrides:
getTaxonomyin classKnowledgeBaseImpl- Returns:
- the classification results.
-
isDatatypeProperty
public boolean isDatatypeProperty(openllet.aterm.ATerm p)
-
getDependencyIndex
public DependencyIndex getDependencyIndex()
- Specified by:
getDependencyIndexin interfaceKnowledgeBase- Overrides:
getDependencyIndexin classKnowledgeBaseImpl- Returns:
- the dependency index for syntactic assertions in this kb
-
getSyntacticAssertions
public java.util.Set<openllet.aterm.ATermAppl> getSyntacticAssertions()
- Specified by:
getSyntacticAssertionsin interfaceKnowledgeBase- Overrides:
getSyntacticAssertionsin classKnowledgeBaseImpl- Returns:
- syntactic assertions in the kb
-
getDeletedAssertions
public java.util.Set<openllet.aterm.ATermAppl> getDeletedAssertions()
- Specified by:
getDeletedAssertionsin interfaceKnowledgeBase- Overrides:
getDeletedAssertionsin classKnowledgeBaseImpl- Returns:
- the deletedAssertions
-
chooseStrategy
public CompletionStrategy chooseStrategy(ABox abox, Expressivity expressivity)
Description copied from class:KnowledgeBaseImplChoose a completion strategy based on the expressivity of the KB. The _abox given is not necessarily the ABox that belongs to this KB but can be a derivative.- Specified by:
chooseStrategyin interfaceKnowledgeBase- Overrides:
chooseStrategyin classKnowledgeBaseImpl- Returns:
- the completion strategy choosen
-
isRealized
public boolean isRealized()
- Specified by:
isRealizedin interfaceBase- Overrides:
isRealizedin classKnowledgeBaseImpl
-
isSatisfiable
public boolean isSatisfiable(openllet.aterm.ATermAppl c)
- Specified by:
isSatisfiablein interfaceBase- Overrides:
isSatisfiablein classKnowledgeBaseImpl
-
getUnsatisfiableClasses
public java.util.Set<openllet.aterm.ATermAppl> getUnsatisfiableClasses()
Description copied from class:KnowledgeBaseImplReturns 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.- Specified by:
getUnsatisfiableClassesin interfaceKnowledgeBase- Overrides:
getUnsatisfiableClassesin classKnowledgeBaseImpl- Returns:
- all unsatisfiable classes in the KB excluding the BOTTOM concept
-
getAllUnsatisfiableClasses
public java.util.Set<openllet.aterm.ATermAppl> getAllUnsatisfiableClasses()
Description copied from class:KnowledgeBaseImplReturns 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.- Specified by:
getAllUnsatisfiableClassesin interfaceKnowledgeBase- Overrides:
getAllUnsatisfiableClassesin classKnowledgeBaseImpl- Returns:
- all unsatisfiable classes in the KB including the BOTTOM concept
-
isDisjointClass
public boolean isDisjointClass(openllet.aterm.ATermAppl c1, openllet.aterm.ATermAppl c2)
-
getNormalizedRules
public java.util.Map<Rule,Rule> getNormalizedRules()
Description copied from class:KnowledgeBaseImplReturn 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.- Specified by:
getNormalizedRulesin interfaceKnowledgeBase- Overrides:
getNormalizedRulesin classKnowledgeBaseImpl- Returns:
- set of rules where
-
getRules
public java.util.Set<Rule> getRules()
Description copied from class:KnowledgeBaseImplReturn all the asserted rules.- Specified by:
getRulesin interfaceKnowledgeBase- Overrides:
getRulesin classKnowledgeBaseImpl- Returns:
- all the asserted rules.
-
isComplement
public boolean isComplement(openllet.aterm.ATermAppl c1, openllet.aterm.ATermAppl c2)
-
getProperties
public java.util.Set<openllet.aterm.ATermAppl> getProperties()
- Returns:
- the set of all properties.
-
getObjectProperties
public java.util.Set<openllet.aterm.ATermAppl> getObjectProperties()
- Returns:
- the set of all object properties.
-
getDataProperties
public java.util.Set<openllet.aterm.ATermAppl> getDataProperties()
- Returns:
- the set of all object properties.
-
getAllSuperProperties
public java.util.Set<java.util.Set<openllet.aterm.ATermAppl>> getAllSuperProperties(openllet.aterm.ATermAppl prop)
-
getSubProperties
public java.util.Set<java.util.Set<openllet.aterm.ATermAppl>> getSubProperties(openllet.aterm.ATermAppl prop, boolean direct)Description copied from interface:PropertiesBaseReturn the sub properties of p. Depending on the second parameter the result will include either all subproperties or only the direct subproperties.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.
-
getSuperProperties
public java.util.Set<java.util.Set<openllet.aterm.ATermAppl>> getSuperProperties(openllet.aterm.ATermAppl prop, boolean direct)Description copied from interface:PropertiesBaseReturn the super properties of p. Depending on the second parameter the result will include either all super properties or only the direct super properties.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<openllet.aterm.ATermAppl>> getAllSubProperties(openllet.aterm.ATermAppl prop)
-
getEquivalentProperties
public java.util.Set<openllet.aterm.ATermAppl> getEquivalentProperties(openllet.aterm.ATermAppl prop)
Description copied from interface:PropertiesBaseReturn all the properties that are equivalent to p.- Returns:
- A set of ATermAppl objects.
-
getFunctionalProperties
public java.util.Set<openllet.aterm.ATermAppl> getFunctionalProperties()
-
getInverseFunctionalProperties
public java.util.Set<openllet.aterm.ATermAppl> getInverseFunctionalProperties()
-
getTransitiveProperties
public java.util.Set<openllet.aterm.ATermAppl> getTransitiveProperties()
-
getSymmetricProperties
public java.util.Set<openllet.aterm.ATermAppl> getSymmetricProperties()
-
getAsymmetricProperties
public java.util.Set<openllet.aterm.ATermAppl> getAsymmetricProperties()
-
getInverses
public java.util.Set<openllet.aterm.ATermAppl> getInverses(openllet.aterm.ATerm name)
- Returns:
- the named inverse property and all its equivalent properties.
-
isObjectProperty
public boolean isObjectProperty(openllet.aterm.ATerm p)
-
getPropertyValues
public java.util.Map<openllet.aterm.ATermAppl,java.util.List<openllet.aterm.ATermAppl>> getPropertyValues(openllet.aterm.ATermAppl pred)
-
getProperties
public java.util.List<openllet.aterm.ATermAppl> getProperties(openllet.aterm.ATermAppl s, openllet.aterm.ATermAppl o)- Parameters:
s- subjecto- object- Returns:
- all properties asserted between a subject and object.
-
getPropertyType
public PropertyType getPropertyType(openllet.aterm.ATerm r)
-
getReflexiveProperties
public java.util.Set<openllet.aterm.ATermAppl> getReflexiveProperties()
-
getIrreflexiveProperties
public java.util.Set<openllet.aterm.ATermAppl> getIrreflexiveProperties()
-
hasKnownPropertyValue
public Bool hasKnownPropertyValue(openllet.aterm.ATermAppl s, openllet.aterm.ATermAppl p, openllet.aterm.ATermAppl o)
Description copied from interface:KnowledgeBaseAnswers the hasPropertyValue question without doing any satisfiability check. It might returnBoolean.TRUE,Boolean.FALSE, ornull(unknown). If the null value is returnedhasPropertyValuefunction needs to be called to get the answer.- Specified by:
hasKnownPropertyValuein interfaceKnowledgeBase- Overrides:
hasKnownPropertyValuein classKnowledgeBaseImpl- Parameters:
s- Subjectp- Predicateo- Object (nullcan be used as wildcard)- Returns:
- true if the hasPropertyValue question without doing any satisfiability check.
-
hasPropertyValue
public boolean hasPropertyValue(openllet.aterm.ATermAppl s, openllet.aterm.ATermAppl p, openllet.aterm.ATermAppl o)- Specified by:
hasPropertyValuein interfaceKnowledgeBase- Overrides:
hasPropertyValuein classKnowledgeBaseImpl
-
getPropertyValues
public java.util.List<openllet.aterm.ATermAppl> getPropertyValues(openllet.aterm.ATermAppl r, openllet.aterm.ATermAppl x)Description copied from interface:PropertiesBaseReturn all property values for a given property and subject value.- Returns:
- List of ATermAppl objects.
-
getAnnotationProperties
public java.util.Set<openllet.aterm.ATermAppl> getAnnotationProperties()
-
getDomains
public java.util.Set<openllet.aterm.ATermAppl> getDomains(openllet.aterm.ATermAppl name)
Description copied from interface:PropertiesBaseThe results of this function is not guaranteed to be complete. UsePropertiesBase.hasDomain(ATermAppl, ATermAppl)to get complete answers.- Returns:
- the domain restrictions on the property.
-
getRanges
public java.util.Set<openllet.aterm.ATermAppl> getRanges(openllet.aterm.ATerm name)
Description copied from interface:PropertiesBaseThe results of this function is not guaranteed to be complete. UseClassesBase.hasRange(ATermAppl, ATermAppl)to get complete answers.- Returns:
- the domain restrictions on the property.
-
isAnnotationProperty
public boolean isAnnotationProperty(openllet.aterm.ATerm p)
-
getAnnotationSubjects
public java.util.Set<openllet.aterm.ATermAppl> getAnnotationSubjects()
- Returns:
- the set of key values of the annotations map
-
getRoleTaxonomy
public Taxonomy<openllet.aterm.ATermAppl> getRoleTaxonomy(boolean objectTaxonomy)
-
getToldTaxonomy
public Taxonomy<openllet.aterm.ATermAppl> getToldTaxonomy()
- Specified by:
getToldTaxonomyin interfaceKnowledgeBase- Overrides:
getToldTaxonomyin classKnowledgeBaseImpl
-
getTaxonomyBuilder
public TaxonomyBuilder getTaxonomyBuilder()
-
getToldDisjoints
public java.util.Map<openllet.aterm.ATermAppl,java.util.Set<openllet.aterm.ATermAppl>> getToldDisjoints()
- Specified by:
getToldDisjointsin interfaceKnowledgeBase- Overrides:
getToldDisjointsin classKnowledgeBaseImpl
-
getTypes
public java.util.Set<java.util.Set<openllet.aterm.ATermAppl>> getTypes(openllet.aterm.ATermAppl ind, boolean direct)Description copied from interface:InstancesBaseReturns 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 namedirect- 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.
-
isType
public boolean isType(openllet.aterm.ATermAppl x, openllet.aterm.ATermAppl c)
-
isKnownType
public Bool isKnownType(openllet.aterm.ATermAppl x, openllet.aterm.ATermAppl c)
Description copied from interface:ClassesBaseAnswers the isType question without doing any satisfiability check. It might returnBool.TRUE,Bool.FALSE, orBool.UNKNOWN. IfBool.UNKNOWNis returnedisTypefunction needs to be called to get the answer.- Returns:
- true if the term x is of the know type c (class)
-
getSubClasses
public java.util.Set<java.util.Set<openllet.aterm.ATermAppl>> getSubClasses(openllet.aterm.ATermAppl c, boolean direct)Description copied from interface:ClassesBaseReturns 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- d is subclass of c
- there is no other class x different from c and d such that x is subclass of c and d is subclass of x
*** This function will first classify the whole ontology ***
- Parameters:
c- class whose subclasses are returneddirect- 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.
-
isClass
public boolean isClass(openllet.aterm.ATerm c)
-
isSubClassOf
public boolean isSubClassOf(openllet.aterm.ATermAppl c1, openllet.aterm.ATermAppl c2)- Returns:
- true if class subCls is subclass of class supCls.
-
retrieve
public java.util.Set<openllet.aterm.ATermAppl> retrieve(openllet.aterm.ATermAppl d, java.util.Collection<openllet.aterm.ATermAppl> individuals)- Returns:
- all the individuals that belong to the given class which is not necessarily a named class.
-
retrieveIndividualsWithProperty
public java.util.List<openllet.aterm.ATermAppl> retrieveIndividualsWithProperty(openllet.aterm.ATermAppl r)
- Returns:
- individuals which possibly have a property value for the given property.
-
getInstances
public java.util.Set<openllet.aterm.ATermAppl> getInstances(openllet.aterm.ATermAppl c)
Description copied from interface:InstancesBaseReturns 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
-
hasInstance
public boolean hasInstance(openllet.aterm.ATerm c)
- Specified by:
hasInstancein interfaceKnowledgeBase- Overrides:
hasInstancein classKnowledgeBaseImpl- Parameters:
c- is a classes- Returns:
- true if there is at least one named individual that belongs to the given class
-
getInstances
public java.util.Set<openllet.aterm.ATermAppl> getInstances(openllet.aterm.ATermAppl c, boolean direct)Description copied from interface:InstancesBaseReturns the instances of class c. Depending on the second parameter the resulting list will include all or only the direct getInstances(). 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 getInstances() are returneddirect- if true return only the direct getInstances(), otherwise return all the getInstances()- Returns:
- A set of ATerm objects
-
getAllSames
public java.util.Set<openllet.aterm.ATermAppl> getAllSames(openllet.aterm.ATermAppl name)
- Returns:
- all the indviduals asserted to be equal to the given individual inluding the individual itself.
-
getIndividualsWithProperty
public java.util.List<openllet.aterm.ATermAppl> getIndividualsWithProperty(openllet.aterm.ATermAppl r, openllet.aterm.ATermAppl x)Description copied from interface:PropertiesBaseList all subjects with a given property and property value.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.
-
addDomain
public void addDomain(openllet.aterm.ATerm p, openllet.aterm.ATermAppl c)- Specified by:
addDomainin interfaceKnowledgeBase- Overrides:
addDomainin classKnowledgeBaseImpl
-
addDomain
public void addDomain(openllet.aterm.ATerm p, openllet.aterm.ATermAppl c, java.util.Set<openllet.aterm.ATermAppl> explain)Description copied from class:KnowledgeBaseImplFor internal use when domain axioms come from TBox absorption- Specified by:
addDomainin interfaceKnowledgeBase- Overrides:
addDomainin classKnowledgeBaseImpl
-
addRange
public void addRange(openllet.aterm.ATerm p, openllet.aterm.ATermAppl c)- Specified by:
addRangein interfaceKnowledgeBase- Overrides:
addRangein classKnowledgeBaseImpl
-
addRange
public void addRange(openllet.aterm.ATerm p, openllet.aterm.ATermAppl c, java.util.Set<openllet.aterm.ATermAppl> explain)Description copied from class:KnowledgeBaseImplFor internal use when range axioms come from TBox absorption- Specified by:
addRangein interfaceKnowledgeBase- Overrides:
addRangein classKnowledgeBaseImpl
-
addFunctionalProperty
public void addFunctionalProperty(openllet.aterm.ATermAppl p)
-
addInverseFunctionalProperty
public void addInverseFunctionalProperty(openllet.aterm.ATerm p)
-
addReflexiveProperty
public void addReflexiveProperty(openllet.aterm.ATermAppl p)
-
addIrreflexiveProperty
public void addIrreflexiveProperty(openllet.aterm.ATermAppl p)
-
addDatatype
public void addDatatype(openllet.aterm.ATermAppl p)
- Specified by:
addDatatypein interfaceKnowledgeBase- Overrides:
addDatatypein classKnowledgeBaseImpl
-
addDatatypeDefinition
public boolean addDatatypeDefinition(openllet.aterm.ATermAppl name, openllet.aterm.ATermAppl datarange)Description copied from class:KnowledgeBaseImplAdds a new datatype defined to be equivalent to the given data range expression.- Specified by:
addDatatypeDefinitionin interfaceKnowledgeBase- Overrides:
addDatatypeDefinitionin classKnowledgeBaseImpl- Parameters:
name- name of the datatypedatarange- a data range expression- Returns:
- true if the add success
-
addRule
public boolean addRule(Rule rule)
Description copied from class:KnowledgeBaseImplAdd a rule to the KB.- Specified by:
addRulein interfaceKnowledgeBase- Overrides:
addRulein classKnowledgeBaseImpl- Returns:
- true if the add success
-
removeType
public boolean removeType(openllet.aterm.ATermAppl ind, openllet.aterm.ATermAppl c)- Specified by:
removeTypein interfaceKnowledgeBase- Overrides:
removeTypein classKnowledgeBaseImpl
-
removeDomain
public boolean removeDomain(openllet.aterm.ATerm p, openllet.aterm.ATermAppl c)Description copied from class:KnowledgeBaseImplRemoves (if possible) the given property domain axiom from the KB and returntrueif removal was successful. See alsoKnowledgeBaseImpl.addDomain(ATerm, ATermAppl).- Specified by:
removeDomainin interfaceKnowledgeBase- Overrides:
removeDomainin classKnowledgeBaseImpl- Parameters:
p- Property in domain axiomc- Class in domain axiom- Returns:
trueif axiom is removed,falseif removal failed
-
removeRange
public boolean removeRange(openllet.aterm.ATerm p, openllet.aterm.ATermAppl c)Description copied from class:KnowledgeBaseImplRemoves (if possible) the given property range axiom from the KB and returntrueif removal was successful. See alsoKnowledgeBaseImpl.addRange(ATerm, ATermAppl).- Specified by:
removeRangein interfaceKnowledgeBase- Overrides:
removeRangein classKnowledgeBaseImpl- Parameters:
p- Property in range axiomc- Class or datatype in range axiom- Returns:
trueif axiom is removed,falseif removal failed
-
removePropertyValue
public boolean removePropertyValue(openllet.aterm.ATermAppl p, openllet.aterm.ATermAppl i1, openllet.aterm.ATermAppl i2)- Specified by:
removePropertyValuein interfaceKnowledgeBase- Overrides:
removePropertyValuein classKnowledgeBaseImpl
-
removeAxiom
public boolean removeAxiom(openllet.aterm.ATermAppl axiom)
Description copied from class:KnowledgeBaseImplRemoves (if possible) the given TBox axiom from the KB and returntrueif removal was successful.- Specified by:
removeAxiomin interfaceKnowledgeBase- Overrides:
removeAxiomin classKnowledgeBaseImpl- Parameters:
axiom- TBox axiom to remove- Returns:
trueif axiom is removed,falseif removal failed
-
setTaxonomyBuilderProgressMonitor
public void setTaxonomyBuilderProgressMonitor(ProgressMonitor progressMonitor)
- Specified by:
setTaxonomyBuilderProgressMonitorin interfaceKnowledgeBase- Overrides:
setTaxonomyBuilderProgressMonitorin classKnowledgeBaseImpl
-
getEquivalentClasses
public java.util.Set<openllet.aterm.ATermAppl> getEquivalentClasses(openllet.aterm.ATermAppl c)
Description copied from interface:ClassesBaseReturns 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<openllet.aterm.ATermAppl> getAllEquivalentClasses(openllet.aterm.ATermAppl c)
Description copied from interface:ClassesBaseReturns 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<openllet.aterm.ATermAppl>> getSuperClasses(openllet.aterm.ATermAppl cParam, boolean direct)Description copied from interface:BaseReturns 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- d is superclass of c
- there is no other class x such that x is superclass of c and d is superclass of x
*** This function will first classify the whole ontology ***
- Parameters:
cParam- 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.
-
getDisjointClasses
public java.util.Set<java.util.Set<openllet.aterm.ATermAppl>> getDisjointClasses(openllet.aterm.ATermAppl c, boolean direct)
-
getComplements
public java.util.Set<openllet.aterm.ATermAppl> getComplements(openllet.aterm.ATermAppl c)
- Specified by:
getComplementsin interfaceKnowledgeBase- Overrides:
getComplementsin classKnowledgeBaseImpl
-
getSames
public java.util.Set<openllet.aterm.ATermAppl> getSames(openllet.aterm.ATermAppl name)
- Specified by:
getSamesin interfaceKnowledgeBase- Overrides:
getSamesin classKnowledgeBaseImpl- Returns:
- all the individuals asserted to be equal to the given individual but not the the individual itself.
-
getDifferents
public java.util.Set<openllet.aterm.ATermAppl> getDifferents(openllet.aterm.ATermAppl name)
- Specified by:
getDifferentsin interfaceKnowledgeBase- Overrides:
getDifferentsin classKnowledgeBaseImpl
-
getDataPropertyValues
public java.util.List<openllet.aterm.ATermAppl> getDataPropertyValues(openllet.aterm.ATermAppl r, openllet.aterm.ATermAppl lang, openllet.aterm.ATermAppl datatype)Description copied from interface:PropertiesBaseReturn all literal values for a given dataproperty that belongs to the specified datatype.- Returns:
- List of ATermAppl objects representing literals.
-
getObjectPropertyValues
public java.util.List<openllet.aterm.ATermAppl> getObjectPropertyValues(openllet.aterm.ATermAppl r, openllet.aterm.ATermAppl x)
-
objectPropertyValues
public java.util.stream.Stream<openllet.aterm.ATermAppl> objectPropertyValues(openllet.aterm.ATermAppl r, openllet.aterm.ATermAppl x)
-
getAllEquivalentProperties
public java.util.Set<openllet.aterm.ATermAppl> getAllEquivalentProperties(openllet.aterm.ATermAppl prop)
-
getDisjointProperties
public java.util.Set<java.util.Set<openllet.aterm.ATermAppl>> getDisjointProperties(openllet.aterm.ATermAppl p)
- Specified by:
getDisjointPropertiesin interfaceKnowledgeBase- Overrides:
getDisjointPropertiesin classKnowledgeBaseImpl
-
isDatatype
public boolean isDatatype(openllet.aterm.ATermAppl c)
-
isAsymmetricProperty
public boolean isAsymmetricProperty(openllet.aterm.ATermAppl p)
-
isReflexiveProperty
public boolean isReflexiveProperty(openllet.aterm.ATermAppl p)
-
isDisjoint
public boolean isDisjoint(openllet.aterm.ATermAppl c1, openllet.aterm.ATermAppl c2)
-
hasDomain
public boolean hasDomain(openllet.aterm.ATermAppl p, openllet.aterm.ATermAppl c)
-
isEquivalentProperty
public boolean isEquivalentProperty(openllet.aterm.ATermAppl p1, openllet.aterm.ATermAppl p2)
-
isDifferentFrom
public boolean isDifferentFrom(openllet.aterm.ATermAppl t1, openllet.aterm.ATermAppl t2)- Specified by:
isDifferentFromin interfaceKnowledgeBase- Overrides:
isDifferentFromin classKnowledgeBaseImpl
-
isDisjointProperty
public boolean isDisjointProperty(openllet.aterm.ATermAppl r1, openllet.aterm.ATermAppl r2)
-
hasRange
public boolean hasRange(openllet.aterm.ATermAppl p, openllet.aterm.ATermAppl c)
-
isFunctionalProperty
public boolean isFunctionalProperty(openllet.aterm.ATermAppl p)
-
isSubPropertyOf
public boolean isSubPropertyOf(openllet.aterm.ATermAppl sub, openllet.aterm.ATermAppl sup)
-
isInverse
public boolean isInverse(openllet.aterm.ATermAppl r1, openllet.aterm.ATermAppl r2)
-
isEquivalentClass
public boolean isEquivalentClass(openllet.aterm.ATermAppl c1, openllet.aterm.ATermAppl c2)- Returns:
- true if class c1 is equivalent to class c2.
-
isTransitiveProperty
public boolean isTransitiveProperty(openllet.aterm.ATermAppl r)
-
isIrreflexiveProperty
public boolean isIrreflexiveProperty(openllet.aterm.ATermAppl p)
-
isInverseFunctionalProperty
public boolean isInverseFunctionalProperty(openllet.aterm.ATermAppl p)
-
isSameAs
public boolean isSameAs(openllet.aterm.ATermAppl t1, openllet.aterm.ATermAppl t2)- Specified by:
isSameAsin interfaceKnowledgeBase- Overrides:
isSameAsin classKnowledgeBaseImpl
-
printClassTree
public void printClassTree()
Description copied from interface:ClassesBasePrint the class hierarchy on the standard output.
-
isChanged
public boolean isChanged(KnowledgeBase.ChangeType change)
- Specified by:
isChangedin interfaceKnowledgeBase- Overrides:
isChangedin classKnowledgeBaseImpl
-
-