de.unima.alcomox.ontology
Class LocalOntology
java.lang.Object
de.unima.alcomox.ontology.AlcomoOntology
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.
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. |
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 |
xxx
public static int xxx
rangeIds
public static java.util.HashSet<java.lang.String> rangeIds
loadedOntCounter
public static long loadedOntCounter
myOntId
protected int myOntId
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.
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()