owltools
Class InferenceBuilder

java.lang.Object
  extended by owltools.InferenceBuilder

public class InferenceBuilder
extends Object

This class build inferred axioms of an ontology.

Author:
Shahid Manzoor

Nested Class Summary
static class InferenceBuilder.FactoryDetails
           
 
Field Summary
protected static org.apache.log4j.Logger logger
           
static String REASONER_ELK
           
static String REASONER_HERMIT
           
static String REASONER_JCEL
           
static String REASONER_PELLET
           
 
Constructor Summary
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)
           
 
Method Summary
 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.
 void dispose()
          Dispose the internal reasoner
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 InferenceBuilder.FactoryDetails getFactory(String reasonerName)
           
 OWLGraphWrapper getOWLGraphWrapper()
           
 org.semanticweb.owlapi.reasoner.OWLReasoner getReasoner(org.semanticweb.owlapi.model.OWLOntology ontology)
           
 List<org.semanticweb.owlapi.model.OWLAxiom> getRedundantAxioms()
           
 List<String> performConsistencyChecks()
           
 void setOWLGraphWrapper(OWLGraphWrapper g)
           
 void setReasoner(org.semanticweb.owlapi.reasoner.OWLReasoner reasoner)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final org.apache.log4j.Logger logger

REASONER_PELLET

public static final String REASONER_PELLET
See Also:
Constant Field Values

REASONER_HERMIT

public static final String REASONER_HERMIT
See Also:
Constant Field Values

REASONER_JCEL

public static final String REASONER_JCEL
See Also:
Constant Field Values

REASONER_ELK

public static final String REASONER_ELK
See Also:
Constant Field Values
Constructor Detail

InferenceBuilder

public InferenceBuilder(OWLGraphWrapper graph)

InferenceBuilder

public InferenceBuilder(OWLGraphWrapper graph,
                        String reasonerName)

InferenceBuilder

public InferenceBuilder(OWLGraphWrapper graph,
                        String reasonerName,
                        boolean enforceEL)

InferenceBuilder

public InferenceBuilder(OWLGraphWrapper graph,
                        org.semanticweb.owlapi.reasoner.OWLReasonerFactory factory,
                        boolean enforceEL)
Method Detail

getFactory

public static InferenceBuilder.FactoryDetails getFactory(String reasonerName)

enforceEL

public static OWLGraphWrapper enforceEL(OWLGraphWrapper graph)

enforceEL

public static OWLGraphWrapper enforceEL(OWLGraphWrapper graph,
                                        org.semanticweb.owlapi.model.IRI elOntologyIRI)
Create an ontology with EL as description logic profile. This is achieved by removing the non-compatible axioms. WARNING: Due to the data type restrictions of EL, all deprecation annotations are removed in this process.

Parameters:
graph -
elOntologyIRI -
Returns:
ontology limited to EL

getOWLGraphWrapper

public OWLGraphWrapper getOWLGraphWrapper()

setOWLGraphWrapper

public void setOWLGraphWrapper(OWLGraphWrapper g)

setReasoner

public void setReasoner(org.semanticweb.owlapi.reasoner.OWLReasoner reasoner)

getReasoner

public org.semanticweb.owlapi.reasoner.OWLReasoner getReasoner(org.semanticweb.owlapi.model.OWLOntology ontology)

getRedundantAxioms

public List<org.semanticweb.owlapi.model.OWLAxiom> getRedundantAxioms()

getEquivalentNamedClassPairs

public List<org.semanticweb.owlapi.model.OWLEquivalentClassesAxiom> getEquivalentNamedClassPairs()

buildInferences

public List<org.semanticweb.owlapi.model.OWLAxiom> buildInferences()

buildInferences

public 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. this is because applications - particularly obof-centered ones - ignore equivalence axioms by default side effects: sets redundantAxioms (@see #getRedundantAxioms())

Parameters:
alwaysAssertSuperClasses -
Returns:
inferred axioms

performConsistencyChecks

public List<String> performConsistencyChecks()

getExplaination

public Set<Set<org.semanticweb.owlapi.model.OWLAxiom>> getExplaination(String c1,
                                                                       String c2,
                                                                       OWLQuantifiedProperty.Quantifier quantifier)

dispose

public void dispose()
Dispose the internal reasoner



Copyright © 2010-2012. All Rights Reserved.