de.unima.alcomox.ontology
Class LocalOntology

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

public class LocalOntology
extends AlcomoOntology

This class represents a local possibly extended ontology. Two of these extandable ontologies are used for the pairwise efficient but incomplete reasoning.


Field Summary
static long loadedOntCounter
           
protected  int myOntId
           
static java.util.HashSet<java.lang.String> rangeIds
           
static int xxx
           
 
Fields inherited from class de.unima.alcomox.ontology.AlcomoOntology
extractionProblem, factory, log, manager, NOTHING, ontology, reasoner, THING
 
Constructor Summary
LocalOntology(java.lang.String filepathOrUrl)
          Constructs an ontology, thats a kind of wrapper for an owl ontology, by reading a file specified by a filepath or url.
 
Method Summary
 Entity getEntityByUri(java.lang.String entityUri)
          Resolves the uri reference and returns the entity that the uri refers to.
 int getNextExtId()
           
 Entity getRandomEntity()
           
 Entity getRandomEntity(boolean isConcept)
           
 java.util.Set<java.lang.String> getReferencedClassUris()
           
 void init(ExtractionProblem extractionProblem)
          Inits this extandable ontology and binds it to the extraction problem.
 boolean isUnsatisfiable(org.semanticweb.owlapi.model.OWLClass c)
          Checks the unsatisfiability of a class.
 
Methods inherited from class de.unima.alcomox.ontology.AlcomoOntology
freeReasoner, getAxioms, getClasses, getExtractionProblem, getRealDirectSuperClassesOfClass, getSubClassesOfClass, getUnsatisfiableClasses, initReasoner, initReasonerWithoutClassification, isDisjointClassWithClass, isSubClassOfClass, setExtractionProblem, setFactory, toShortString, toString, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

xxx

public static int xxx

rangeIds

public static java.util.HashSet<java.lang.String> rangeIds

loadedOntCounter

public static long loadedOntCounter

myOntId

protected int myOntId
Constructor Detail

LocalOntology

public LocalOntology(java.lang.String filepathOrUrl)
              throws AlcomoException
Constructs an ontology, thats a kind of wrapper for an owl ontology, by reading a file specified by a filepath or url.

Parameters:
filepathOrUrl - The string representation of the filepath or URL.
Throws:
AlcomoException - Thrown if filepath or url do not refer or the file is somehow corrupted /not valid.
Method Detail

getEntityByUri

public Entity getEntityByUri(java.lang.String entityUri)
                      throws OntologyException
Resolves the uri reference and returns the entity that the uri refers to.

Parameters:
entityUri - The uri of the entity as string.
Returns:
Entity refered to by entityUri
Throws:
OntologyException - Thrown if entityUri does not refer to some named entity in the ontology.

init

public void init(ExtractionProblem extractionProblem)
          throws OntologyException
Inits this extandable ontology and binds it to the extraction problem. Initalising an extandable ontology results in extending the ontology and building up some indices. Finally the extended ontology is classified.

Parameters:
extractionProblem -
Throws:
OntologyException
AlcomoException

getRandomEntity

public Entity getRandomEntity()

getRandomEntity

public Entity getRandomEntity(boolean isConcept)

getReferencedClassUris

public java.util.Set<java.lang.String> getReferencedClassUris()

isUnsatisfiable

public boolean isUnsatisfiable(org.semanticweb.owlapi.model.OWLClass c)
Description copied from class: AlcomoOntology
Checks the unsatisfiability of a class.

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

getNextExtId

public int getNextExtId()