public class InferenceBuilder extends Object
Modifier and Type | Class and Description |
---|---|
static class |
InferenceBuilder.ConsistencyReport |
static interface |
InferenceBuilder.OWLClassFilter
Filter for relevant OWLClasses during the inference Building process.
|
static class |
InferenceBuilder.PotentialRedundant |
Modifier and Type | Field and Description |
---|---|
protected static org.apache.log4j.Logger |
logger |
static String |
REASONER_ELK |
static String |
REASONER_HERMIT |
static String |
REASONER_JCEL |
static String |
REASONER_JFACT |
static String |
REASONER_MORE |
static String |
REASONER_MORE_HERMIT |
static String |
REASONER_MORE_JFACT |
Constructor and Description |
---|
InferenceBuilder(OWLGraphWrapper graph) |
InferenceBuilder(OWLGraphWrapper graph,
org.semanticweb.owlapi.reasoner.OWLReasonerFactory factory,
boolean enforceEL) |
InferenceBuilder(OWLGraphWrapper graph,
String reasonerName) |
InferenceBuilder(OWLGraphWrapper graph,
String reasonerName,
boolean enforceEL) |
Modifier and Type | Method and Description |
---|---|
void |
addFilter(InferenceBuilder.OWLClassFilter filter) |
List<org.semanticweb.owlapi.model.OWLAxiom> |
buildInferences() |
List<org.semanticweb.owlapi.model.OWLAxiom> |
buildInferences(boolean alwaysAssertSuperClasses)
if alwaysAssertSuperClasses then ensure
that superclasses are always asserted for every equivalence
axiom, except in the case where a more specific superclass is already
in the set of inferences.
|
List<InferenceBuilder.PotentialRedundant> |
checkPotentialRedundantSubClassAxioms()
Check all classes for potential redundant subClass axioms of type:
|
List<InferenceBuilder.PotentialRedundant> |
checkPotentialRedundantSubClassAxioms(Collection<? extends org.semanticweb.owlapi.model.OWLAxiom> inferredAxioms)
Check the list of axioms for potential redundant subClass axioms of type:
|
void |
clearFilters() |
void |
dispose()
Dispose the internal reasoner
|
protected boolean |
doInferencesForClass(org.semanticweb.owlapi.model.OWLClass cls,
org.semanticweb.owlapi.model.OWLOntology ont)
Only create inferences for an
OWLClass , if this method returns true. |
static OWLGraphWrapper |
enforceEL(OWLGraphWrapper graph) |
static OWLGraphWrapper |
enforceEL(OWLGraphWrapper graph,
org.semanticweb.owlapi.model.IRI elOntologyIRI)
Create an ontology with EL as description logic profile.
|
List<org.semanticweb.owlapi.model.OWLEquivalentClassesAxiom> |
getEquivalentNamedClassPairs() |
Set<Set<org.semanticweb.owlapi.model.OWLAxiom>> |
getExplaination(String c1,
String c2,
OWLQuantifiedProperty.Quantifier quantifier) |
static org.semanticweb.owlapi.reasoner.OWLReasonerFactory |
getFactory(String reasonerName) |
OWLGraphWrapper |
getOWLGraphWrapper() |
org.semanticweb.owlapi.reasoner.OWLReasoner |
getReasoner(org.semanticweb.owlapi.model.OWLOntology ontology) |
Collection<org.semanticweb.owlapi.model.OWLAxiom> |
getRedundantAxioms() |
protected Set<org.semanticweb.owlapi.model.OWLAxiom> |
getRedundantAxioms(org.semanticweb.owlapi.model.OWLOntology ontology,
org.semanticweb.owlapi.reasoner.OWLReasoner reasoner,
org.semanticweb.owlapi.model.OWLDataFactory dataFactory)
Search for redundant axioms.
|
protected boolean |
hasAssertedSubClassAxiom(org.semanticweb.owlapi.model.OWLClass subClass,
org.semanticweb.owlapi.model.OWLClassExpression superClass,
org.semanticweb.owlapi.model.OWLOntology ontology)
Check the ontology for an existing subClassOf axiom with the given sub- and superclass.
|
protected boolean |
isDebug() |
protected void |
logDebug(String msg) |
protected void |
logInfo(String msg) |
InferenceBuilder.ConsistencyReport |
performConsistencyChecks() |
void |
removeFilter(InferenceBuilder.OWLClassFilter filter) |
void |
setOWLGraphWrapper(OWLGraphWrapper g) |
void |
setReasoner(org.semanticweb.owlapi.reasoner.OWLReasoner reasoner) |
protected static void |
updateRedundant(org.semanticweb.owlapi.model.OWLClass cls,
org.semanticweb.owlapi.model.OWLOntology ontology,
Set<org.semanticweb.owlapi.model.OWLAxiom> redundantAxioms,
org.semanticweb.owlapi.reasoner.OWLReasoner reasoner,
org.semanticweb.owlapi.model.OWLDataFactory dataFactory)
Update the set of redundant axioms for the given
OWLClass cls. |
protected static final org.apache.log4j.Logger logger
public static final String REASONER_HERMIT
public static final String REASONER_JCEL
public static final String REASONER_ELK
public static final String REASONER_JFACT
public static final String REASONER_MORE
public static final String REASONER_MORE_HERMIT
public static final String REASONER_MORE_JFACT
public InferenceBuilder(OWLGraphWrapper graph)
public InferenceBuilder(OWLGraphWrapper graph, String reasonerName)
public InferenceBuilder(OWLGraphWrapper graph, String reasonerName, boolean enforceEL)
public InferenceBuilder(OWLGraphWrapper graph, org.semanticweb.owlapi.reasoner.OWLReasonerFactory factory, boolean enforceEL)
public static org.semanticweb.owlapi.reasoner.OWLReasonerFactory getFactory(String reasonerName)
public static OWLGraphWrapper enforceEL(OWLGraphWrapper graph)
public static OWLGraphWrapper enforceEL(OWLGraphWrapper graph, org.semanticweb.owlapi.model.IRI elOntologyIRI)
graph
- elOntologyIRI
- public void addFilter(InferenceBuilder.OWLClassFilter filter)
public void removeFilter(InferenceBuilder.OWLClassFilter filter)
public void clearFilters()
public OWLGraphWrapper getOWLGraphWrapper()
public void setOWLGraphWrapper(OWLGraphWrapper g)
public void setReasoner(org.semanticweb.owlapi.reasoner.OWLReasoner reasoner)
public org.semanticweb.owlapi.reasoner.OWLReasoner getReasoner(org.semanticweb.owlapi.model.OWLOntology ontology)
public Collection<org.semanticweb.owlapi.model.OWLAxiom> getRedundantAxioms()
public List<org.semanticweb.owlapi.model.OWLEquivalentClassesAxiom> getEquivalentNamedClassPairs()
public List<org.semanticweb.owlapi.model.OWLAxiom> buildInferences()
public List<org.semanticweb.owlapi.model.OWLAxiom> buildInferences(boolean alwaysAssertSuperClasses)
alwaysAssertSuperClasses
- protected boolean doInferencesForClass(org.semanticweb.owlapi.model.OWLClass cls, org.semanticweb.owlapi.model.OWLOntology ont)
OWLClass
, if this method returns true.cls
- ont
- protected boolean hasAssertedSubClassAxiom(org.semanticweb.owlapi.model.OWLClass subClass, org.semanticweb.owlapi.model.OWLClassExpression superClass, org.semanticweb.owlapi.model.OWLOntology ontology)
OWLOntology.containsAxiomIgnoreAnnotations(OWLAxiom)
In the current OWL-API, this seems to be very very slow.subClass
- superClass
- ontology
- protected Set<org.semanticweb.owlapi.model.OWLAxiom> getRedundantAxioms(org.semanticweb.owlapi.model.OWLOntology ontology, org.semanticweb.owlapi.reasoner.OWLReasoner reasoner, org.semanticweb.owlapi.model.OWLDataFactory dataFactory)
ontology
- reasoner
- dataFactory
- protected static void updateRedundant(org.semanticweb.owlapi.model.OWLClass cls, org.semanticweb.owlapi.model.OWLOntology ontology, Set<org.semanticweb.owlapi.model.OWLAxiom> redundantAxioms, org.semanticweb.owlapi.reasoner.OWLReasoner reasoner, org.semanticweb.owlapi.model.OWLDataFactory dataFactory)
OWLClass
cls.cls
- ontology
- redundantAxioms
- reasoner
- dataFactory
- public InferenceBuilder.ConsistencyReport performConsistencyChecks()
public List<InferenceBuilder.PotentialRedundant> checkPotentialRedundantSubClassAxioms(Collection<? extends org.semanticweb.owlapi.model.OWLAxiom> inferredAxioms)
A SubClassOf R some B and A SubClassOf B
inferredAxioms
- public List<InferenceBuilder.PotentialRedundant> checkPotentialRedundantSubClassAxioms()
A SubClassOf R some B and A SubClassOf B
public Set<Set<org.semanticweb.owlapi.model.OWLAxiom>> getExplaination(String c1, String c2, OWLQuantifiedProperty.Quantifier quantifier)
public void dispose()
protected void logInfo(String msg)
protected boolean isDebug()
protected void logDebug(String msg)
Copyright © 2010–2015. All rights reserved.