de.unima.alcomox.ontology
Class AlcomoOntology

java.lang.Object
  extended by de.unima.alcomox.ontology.AlcomoOntology
Direct Known Subclasses:
LocalOntology, MergedOntology

public abstract class AlcomoOntology
extends java.lang.Object

This abstract class represents an ontology used in the alcomo system. It can be seen


Field Summary
protected  java.util.HashMap<java.lang.String,Entity> entities
           
protected  ExtractionProblem extractionProblem
           
protected  org.semanticweb.owlapi.model.OWLDataFactory factory
           
protected  java.util.ArrayList<java.lang.String> indexedConceptEntityUris
           
protected  java.util.ArrayList<java.lang.String> indexedPropertyEntityUris
           
protected  AlcomoLogger log
           
protected  org.semanticweb.owlapi.model.OWLOntologyManager manager
           
 org.semanticweb.owlapi.model.OWLClass NOTHING
           
protected  org.semanticweb.owlapi.model.OWLOntology ontology
           
protected  org.semanticweb.owlapi.reasoner.OWLReasoner reasoner
           
 org.semanticweb.owlapi.model.OWLClass THING
           
 
Constructor Summary
AlcomoOntology()
           
AlcomoOntology(org.semanticweb.owlapi.model.OWLOntology owlOntology, org.semanticweb.owlapi.model.OWLOntologyManager owlManager)
           
 
Method Summary
 void freeReasoner()
           
 java.util.Set<org.semanticweb.owlapi.model.OWLAxiom> getAxioms()
           
 java.util.Set<org.semanticweb.owlapi.model.OWLClass> getClasses()
          Returns alls classes in this ontology.
 ExtractionProblem getExtractionProblem()
           
 java.util.Set<org.semanticweb.owlapi.model.OWLClass> getRealDirectSuperClassesOfClass(org.semanticweb.owlapi.model.OWLClass c)
          Returns the set of all classes that direct are superclasses of the specified class The class itself is excluded.
 java.util.Set<org.semanticweb.owlapi.model.OWLClass> getSubClassesOfClass(org.semanticweb.owlapi.model.OWLClass c)
          Returns the set of all classes that are subclasses of the specified class as well as the class itself.
 java.util.Set<org.semanticweb.owlapi.model.OWLClass> getUnsatisfiableClasses()
          Returns all unsatisfiable classes in this ontology.
 void initReasoner()
           
 void initReasonerWithoutClassification()
           
 boolean isDisjointClassWithClass(org.semanticweb.owlapi.model.OWLClass c1, org.semanticweb.owlapi.model.OWLClass c2)
          Checks wether two classes are disjoint.
 boolean isSubClassOfClass(org.semanticweb.owlapi.model.OWLClass c1, org.semanticweb.owlapi.model.OWLClass c2)
          Checks wether first class is subclass of second class.
 boolean isUnsatisfiable(org.semanticweb.owlapi.model.OWLClass c)
          Checks the unsatisfiability of a class.
 void setExtractionProblem(ExtractionProblem extractionProblem)
           
protected  void setFactory()
           
 java.lang.String toShortString()
          Returns a short string representation of this ontology.
 java.lang.String toString()
          Returns a string representation of this ontology.
 void write(java.lang.String filepath)
          Writes the ontology into a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

THING

public org.semanticweb.owlapi.model.OWLClass THING

NOTHING

public org.semanticweb.owlapi.model.OWLClass NOTHING

extractionProblem

protected ExtractionProblem extractionProblem

ontology

protected org.semanticweb.owlapi.model.OWLOntology ontology

manager

protected org.semanticweb.owlapi.model.OWLOntologyManager manager

factory

protected org.semanticweb.owlapi.model.OWLDataFactory factory

entities

protected java.util.HashMap<java.lang.String,Entity> entities

indexedConceptEntityUris

protected java.util.ArrayList<java.lang.String> indexedConceptEntityUris

indexedPropertyEntityUris

protected java.util.ArrayList<java.lang.String> indexedPropertyEntityUris

log

protected AlcomoLogger log

reasoner

protected org.semanticweb.owlapi.reasoner.OWLReasoner reasoner
Constructor Detail

AlcomoOntology

public AlcomoOntology(org.semanticweb.owlapi.model.OWLOntology owlOntology,
                      org.semanticweb.owlapi.model.OWLOntologyManager owlManager)
               throws AlcomoException
Throws:
AlcomoException

AlcomoOntology

public AlcomoOntology()
Method Detail

setFactory

protected void setFactory()

toString

public java.lang.String toString()
Returns a string representation of this ontology. Contains URI of ontology and some information e.g. number of classes and so on.

Overrides:
toString in class java.lang.Object
Returns:
String representation of this ontology.

toShortString

public java.lang.String toShortString()
Returns a short string representation of this ontology.

Returns:
String representation of this ontology.

getAxioms

public java.util.Set<org.semanticweb.owlapi.model.OWLAxiom> getAxioms()

initReasoner

public void initReasoner()
                  throws OntologyException
Throws:
OntologyException

initReasonerWithoutClassification

public void initReasonerWithoutClassification()
                                       throws OntologyException
Throws:
OntologyException

freeReasoner

public void freeReasoner()

getExtractionProblem

public ExtractionProblem getExtractionProblem()

setExtractionProblem

public void setExtractionProblem(ExtractionProblem extractionProblem)

isSubClassOfClass

public boolean isSubClassOfClass(org.semanticweb.owlapi.model.OWLClass c1,
                                 org.semanticweb.owlapi.model.OWLClass c2)
Checks wether first class is subclass of second class. Equivalent classes arse also in subclass relation.

Parameters:
c1 - First class.
c2 - Second class.
Returns:

getSubClassesOfClass

public java.util.Set<org.semanticweb.owlapi.model.OWLClass> getSubClassesOfClass(org.semanticweb.owlapi.model.OWLClass c)
Returns the set of all classes that are subclasses of the specified class as well as the class itself. The class nothing is not included in the result.

Parameters:
c - A class.
Returns:
The set of subclasses.

getRealDirectSuperClassesOfClass

public java.util.Set<org.semanticweb.owlapi.model.OWLClass> getRealDirectSuperClassesOfClass(org.semanticweb.owlapi.model.OWLClass c)
Returns the set of all classes that direct are superclasses of the specified class The class itself is excluded. The class top is not included in the result.

Parameters:
c - A class.
Returns:
The set of real superclasses.

isDisjointClassWithClass

public boolean isDisjointClassWithClass(org.semanticweb.owlapi.model.OWLClass c1,
                                        org.semanticweb.owlapi.model.OWLClass c2)
Checks wether two classes are disjoint.

Parameters:
c1 - A class.
c2 - Another class.
Returns:
True if both classes are disjoint, false otherwise.

getUnsatisfiableClasses

public java.util.Set<org.semanticweb.owlapi.model.OWLClass> getUnsatisfiableClasses()
Returns all unsatisfiable classes in this ontology.

Returns:
The set of all unsatisfiable classes (except NOTHING).

getClasses

public java.util.Set<org.semanticweb.owlapi.model.OWLClass> getClasses()
Returns alls classes in this ontology.

Returns:
The set of all classes (except THING and NOTHING).

isUnsatisfiable

public boolean isUnsatisfiable(org.semanticweb.owlapi.model.OWLClass c)
Checks the unsatisfiability of a class.

Parameters:
c - The class that has to be checked for unsatisfiability.
Returns:
True if c is unsatisfiable, false otherwise.

write

public void write(java.lang.String filepath)
           throws AlcomoException
Writes the ontology into a file.

Parameters:
filepath - Destination path
Throws:
OntologyException - Thrwon if file could not be written.
AlcomoException