org.semanticweb.HermiT.model
Class DLOntology

java.lang.Object
  extended by org.semanticweb.HermiT.model.DLOntology
All Implemented Interfaces:
Serializable

public class DLOntology
extends Object
implements Serializable

Represents a DL ontology as a set of rules.

See Also:
Serialized Form

Nested Class Summary
static class DLOntology.AtomicConceptComparator
           
static class DLOntology.AtomicRoleComparator
           
static class DLOntology.IndividualComparator
           
 
Field Summary
protected static String CRLF
           
protected  Set<AtomicConcept> m_allAtomicConcepts
           
protected  Set<AtomicRole> m_allAtomicDataRoles
           
protected  Set<AtomicRole> m_allAtomicObjectRoles
           
protected  Set<Role> m_allComplexObjectRoles
           
protected  Set<DescriptionGraph> m_allDescriptionGraphs
           
protected  Set<Individual> m_allIndividuals
           
protected  Set<DatatypeRestriction> m_allUnknownDatatypeRestrictions
           
protected  Map<AtomicRole,Map<Individual,Set<Constant>>> m_dataPropertyAssertions
           
protected  Set<String> m_definedDatatypeIRIs
           
protected  Set<DLClause> m_dlClauses
           
protected  boolean m_hasAtMostRestrictions
           
protected  boolean m_hasDatatypes
           
protected  boolean m_hasInverseRoles
           
protected  boolean m_hasNominals
           
protected  boolean m_isHorn
           
protected  Set<Atom> m_negativeFacts
           
protected  int m_numberOfExternalConcepts
           
protected  String m_ontologyIRI
           
protected  Set<Atom> m_positiveFacts
           
 
Constructor Summary
DLOntology(String ontologyIRI, Set<DLClause> dlClauses, Set<Atom> positiveFacts, Set<Atom> negativeFacts, Set<AtomicConcept> atomicConcepts, Set<AtomicRole> atomicObjectRoles, Set<Role> allComplexObjectRoles, Set<AtomicRole> atomicDataRoles, Set<DatatypeRestriction> allUnknownDatatypeRestrictions, Set<String> definedDatatypeIRIs, Set<Individual> individuals, boolean hasInverseRoles, boolean hasAtMostRestrictions, boolean hasNominals, boolean hasDatatypes)
           
 
Method Summary
protected  boolean addAtomicRoles(DLClause dlClause, Set<AtomicRole> roles)
           
protected  void addDLPredicate(DLPredicate dlPredicate)
           
protected  Set<AtomicRole> computeGraphAtomicRoles()
           
 boolean containsAtomicConcept(AtomicConcept concept)
           
protected  boolean containsAtomicRoles(DLClause dlClause, Set<AtomicRole> roles)
           
 boolean containsDataRole(AtomicRole role)
           
 boolean containsIndividual(Individual individual)
           
 boolean containsObjectRole(AtomicRole role)
           
 Set<AtomicConcept> getAllAtomicConcepts()
           
 Set<AtomicRole> getAllAtomicDataRoles()
           
 Set<AtomicRole> getAllAtomicObjectRoles()
           
 Set<Role> getAllComplexObjectRoles()
           
 Set<DescriptionGraph> getAllDescriptionGraphs()
           
 Set<Individual> getAllIndividuals()
           
 Set<DatatypeRestriction> getAllUnknownDatatypeRestrictions()
           
protected  Set<AtomicConcept> getBodyOnlyAtomicConcepts()
           
 Map<AtomicRole,Map<Individual,Set<Constant>>> getDataPropertyAssertions()
           
 Set<String> getDefinedDatatypeIRIs()
           
 Set<DLClause> getDLClauses()
           
 Set<Atom> getNegativeFacts()
           
 int getNumberOfExternalConcepts()
           
 String getOntologyIRI()
           
 Set<Atom> getPositiveFacts()
           
 String getStatistics()
           
protected  String getStatistics(Integer numDeterministicClauses, Integer numNondeterministicClauses, Integer numDisjunctions)
           
 boolean hasAtMostRestrictions()
           
 boolean hasDatatypes()
           
 boolean hasInverseRoles()
           
 boolean hasNominals()
           
 boolean hasUnknownDatatypeRestrictions()
           
 boolean isComplexObjectRole(Role role)
           
 boolean isHorn()
           
static DLOntology load(File file)
           
static DLOntology load(InputStream inputStream)
           
 void save(File file)
           
 void save(OutputStream outputStream)
           
 String toString()
           
 String toString(Prefixes prefixes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CRLF

protected static final String CRLF

m_ontologyIRI

protected final String m_ontologyIRI

m_dlClauses

protected final Set<DLClause> m_dlClauses

m_positiveFacts

protected final Set<Atom> m_positiveFacts

m_negativeFacts

protected final Set<Atom> m_negativeFacts

m_hasInverseRoles

protected final boolean m_hasInverseRoles

m_hasAtMostRestrictions

protected final boolean m_hasAtMostRestrictions

m_hasNominals

protected final boolean m_hasNominals

m_hasDatatypes

protected final boolean m_hasDatatypes

m_isHorn

protected final boolean m_isHorn

m_allAtomicConcepts

protected final Set<AtomicConcept> m_allAtomicConcepts

m_numberOfExternalConcepts

protected final int m_numberOfExternalConcepts

m_allAtomicObjectRoles

protected final Set<AtomicRole> m_allAtomicObjectRoles

m_allComplexObjectRoles

protected final Set<Role> m_allComplexObjectRoles

m_allAtomicDataRoles

protected final Set<AtomicRole> m_allAtomicDataRoles

m_allUnknownDatatypeRestrictions

protected final Set<DatatypeRestriction> m_allUnknownDatatypeRestrictions

m_definedDatatypeIRIs

protected final Set<String> m_definedDatatypeIRIs

m_allIndividuals

protected final Set<Individual> m_allIndividuals

m_allDescriptionGraphs

protected final Set<DescriptionGraph> m_allDescriptionGraphs

m_dataPropertyAssertions

protected final Map<AtomicRole,Map<Individual,Set<Constant>>> m_dataPropertyAssertions
Constructor Detail

DLOntology

public DLOntology(String ontologyIRI,
                  Set<DLClause> dlClauses,
                  Set<Atom> positiveFacts,
                  Set<Atom> negativeFacts,
                  Set<AtomicConcept> atomicConcepts,
                  Set<AtomicRole> atomicObjectRoles,
                  Set<Role> allComplexObjectRoles,
                  Set<AtomicRole> atomicDataRoles,
                  Set<DatatypeRestriction> allUnknownDatatypeRestrictions,
                  Set<String> definedDatatypeIRIs,
                  Set<Individual> individuals,
                  boolean hasInverseRoles,
                  boolean hasAtMostRestrictions,
                  boolean hasNominals,
                  boolean hasDatatypes)
Method Detail

addDLPredicate

protected void addDLPredicate(DLPredicate dlPredicate)

getOntologyIRI

public String getOntologyIRI()

getAllAtomicConcepts

public Set<AtomicConcept> getAllAtomicConcepts()

containsAtomicConcept

public boolean containsAtomicConcept(AtomicConcept concept)

getNumberOfExternalConcepts

public int getNumberOfExternalConcepts()

getAllAtomicObjectRoles

public Set<AtomicRole> getAllAtomicObjectRoles()

containsObjectRole

public boolean containsObjectRole(AtomicRole role)

getAllComplexObjectRoles

public Set<Role> getAllComplexObjectRoles()

isComplexObjectRole

public boolean isComplexObjectRole(Role role)

getAllAtomicDataRoles

public Set<AtomicRole> getAllAtomicDataRoles()

containsDataRole

public boolean containsDataRole(AtomicRole role)

getAllUnknownDatatypeRestrictions

public Set<DatatypeRestriction> getAllUnknownDatatypeRestrictions()

getAllIndividuals

public Set<Individual> getAllIndividuals()

containsIndividual

public boolean containsIndividual(Individual individual)

getAllDescriptionGraphs

public Set<DescriptionGraph> getAllDescriptionGraphs()

getDLClauses

public Set<DLClause> getDLClauses()

getPositiveFacts

public Set<Atom> getPositiveFacts()

getDataPropertyAssertions

public Map<AtomicRole,Map<Individual,Set<Constant>>> getDataPropertyAssertions()

getNegativeFacts

public Set<Atom> getNegativeFacts()

hasInverseRoles

public boolean hasInverseRoles()

hasAtMostRestrictions

public boolean hasAtMostRestrictions()

hasNominals

public boolean hasNominals()

hasDatatypes

public boolean hasDatatypes()

hasUnknownDatatypeRestrictions

public boolean hasUnknownDatatypeRestrictions()

isHorn

public boolean isHorn()

getDefinedDatatypeIRIs

public Set<String> getDefinedDatatypeIRIs()

getBodyOnlyAtomicConcepts

protected Set<AtomicConcept> getBodyOnlyAtomicConcepts()

computeGraphAtomicRoles

protected Set<AtomicRole> computeGraphAtomicRoles()

containsAtomicRoles

protected boolean containsAtomicRoles(DLClause dlClause,
                                      Set<AtomicRole> roles)

addAtomicRoles

protected boolean addAtomicRoles(DLClause dlClause,
                                 Set<AtomicRole> roles)

toString

public String toString(Prefixes prefixes)

getStatistics

public String getStatistics()

getStatistics

protected String getStatistics(Integer numDeterministicClauses,
                               Integer numNondeterministicClauses,
                               Integer numDisjunctions)

toString

public String toString()
Overrides:
toString in class Object

save

public void save(File file)
          throws IOException
Throws:
IOException

save

public void save(OutputStream outputStream)
          throws IOException
Throws:
IOException

load

public static DLOntology load(InputStream inputStream)
                       throws IOException
Throws:
IOException

load

public static DLOntology load(File file)
                       throws IOException
Throws:
IOException


Copyright © 2012. All Rights Reserved.