org.semanticweb.HermiT
Class Reasoner
java.lang.Object
org.semanticweb.HermiT.Reasoner
- All Implemented Interfaces:
- java.io.Serializable
public class Reasoner
- extends java.lang.Object
- implements java.io.Serializable
Answers queries about the logical implications of a particular knowledge base.
A Reasoner is associated with a single knowledge base, which is "loaded" when
the reasoner is constructed. By default a full classification of all atomic
terms in the knowledge base is also performed at this time (which can take
quite a while for large or complex ontologies), but this behavior can be
disabled as a part of the Reasoner configuration.
Internal details of the loading and reasoning algorithms can be configured
in the Reasoner constructor and do not change over the lifetime of the
Reasoner object---internal data structures and caches are optimized for a
particular configuration. By default, HermiT will use the set of options
which provide optimal performance.
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Reasoner
public Reasoner(java.lang.String ontologyURI)
throws org.semanticweb.HermiT.Clausifier.LoadingException,
org.semanticweb.owl.model.OWLException
- Throws:
org.semanticweb.HermiT.Clausifier.LoadingException
org.semanticweb.owl.model.OWLException
Reasoner
public Reasoner(java.net.URI ontologyURI)
throws org.semanticweb.HermiT.Clausifier.LoadingException,
org.semanticweb.owl.model.OWLException
- Throws:
org.semanticweb.HermiT.Clausifier.LoadingException
org.semanticweb.owl.model.OWLException
Reasoner
public Reasoner(java.net.URI ontologyURI,
Reasoner.Configuration config)
throws org.semanticweb.HermiT.Clausifier.LoadingException,
org.semanticweb.owl.model.OWLException
- Throws:
org.semanticweb.HermiT.Clausifier.LoadingException
org.semanticweb.owl.model.OWLException
Reasoner
public Reasoner(org.semanticweb.owl.model.OWLOntology ontology,
Reasoner.Configuration config)
throws org.semanticweb.owl.model.OWLException
- Throws:
org.semanticweb.owl.model.OWLException
Reasoner
public Reasoner(org.semanticweb.owl.model.OWLOntology ontology,
Reasoner.Configuration config,
java.util.Set<org.semanticweb.HermiT.model.DescriptionGraph> graphs)
throws org.semanticweb.owl.model.OWLException
- Throws:
org.semanticweb.owl.model.OWLException
getDLOntology
public org.semanticweb.HermiT.model.DLOntology getDLOntology()
isConsistent
public boolean isConsistent()
isClassNameDefined
public boolean isClassNameDefined(java.lang.String classUri)
- Return `true` iff `classUri` occured in the loaded knowledge base.
isClassSatisfiable
public boolean isClassSatisfiable(java.lang.String classUri)
- Check whether `classUri` is satisfiable.
Note that classes which were not defined in the input ontology
are satisfiable if and only if the ontology as a whole is
consistent.
isClassSatisfiable
public boolean isClassSatisfiable(org.semanticweb.owl.model.OWLDescription desc)
seedSubsumptionCache
public void seedSubsumptionCache()
isSubsumptionCacheSeeded
public boolean isSubsumptionCacheSeeded()
cacheRealization
public void cacheRealization()
isRealizationCached
public boolean isRealizationCached()
isClassSubsumedBy
public boolean isClassSubsumedBy(java.lang.String childName,
java.lang.String parentName)
isSubsumedBy
public boolean isSubsumedBy(org.semanticweb.owl.model.OWLDescription child,
org.semanticweb.owl.model.OWLDescription parent)
getSubsumptionHierarchy
public org.semanticweb.HermiT.hierarchy.SubsumptionHierarchy getSubsumptionHierarchy()
getPropertyHierarchyPosition
public HierarchyPosition<java.lang.String> getPropertyHierarchyPosition(java.lang.String propertyName)
getPosition
public HierarchyPosition<org.semanticweb.owl.model.OWLObjectProperty> getPosition(org.semanticweb.owl.model.OWLObjectProperty p)
getPosition
public HierarchyPosition<org.semanticweb.owl.model.OWLDataProperty> getPosition(org.semanticweb.owl.model.OWLDataProperty p)
numConceptNames
public int numConceptNames()
getClassTaxonomy
public java.util.Map<java.lang.String,HierarchyPosition<java.lang.String>> getClassTaxonomy()
getClassTaxonomyPosition
public HierarchyPosition<java.lang.String> getClassTaxonomyPosition(java.lang.String className)
getPosition
public HierarchyPosition<org.semanticweb.owl.model.OWLClass> getPosition(org.semanticweb.owl.model.OWLDescription description)
getMemberships
public HierarchyPosition<java.lang.String> getMemberships(java.lang.String individual)
getMemberships
public HierarchyPosition<org.semanticweb.owl.model.OWLClass> getMemberships(org.semanticweb.owl.model.OWLIndividual i)
getDirectMembers
public java.util.Set<java.lang.String> getDirectMembers(java.lang.String className)
getMembers
public java.util.Set<java.lang.String> getMembers(java.lang.String className)
getMembers
public java.util.Set<org.semanticweb.owl.model.OWLIndividual> getMembers(org.semanticweb.owl.model.OWLDescription description)
getDirectMembers
public java.util.Set<org.semanticweb.owl.model.OWLIndividual> getDirectMembers(org.semanticweb.owl.model.OWLDescription description)
printSortedAncestorLists
public void printSortedAncestorLists(java.io.PrintWriter output)
printSortedAncestorLists
public static void printSortedAncestorLists(java.io.PrintWriter output,
java.util.Map<java.lang.String,HierarchyPosition<java.lang.String>> taxonomy)
outputClauses
public void outputClauses(java.io.PrintWriter output,
Namespaces namespaces)
getNamespaces
public Namespaces getNamespaces()
save
public void save(java.io.File file)
throws java.io.IOException
- Throws:
java.io.IOException
save
public void save(java.io.OutputStream outputStream)
throws java.io.IOException
- Throws:
java.io.IOException
load
public static Reasoner load(java.io.InputStream inputStream)
throws java.io.IOException
- Throws:
java.io.IOException
load
public static Reasoner load(java.io.File file)
throws java.io.IOException
- Throws:
java.io.IOException