|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.fzi.kadmos.api.impl.OWLOntologyDictionary
public class OWLOntologyDictionary
Singleton class to hold all locally loaded OWLOntology instances and map
OWLEntity instances to identifiers. WeakReferences are used to allow easy
garbage collection if ontologies or entities are removed.
| Method Summary | |
|---|---|
void |
clear()
Clears all data in the OWLOntologyDictionary. |
OWLOntology |
get(URI source)
Returns the OWLOntology corresponding to the given URI. |
OWLEntity |
getEntity(Integer id)
getEntity. |
Integer |
getID(OWLEntity entity)
getID. |
static OWLOntologyDictionary |
getInstance()
Threadsafe method to get the single instance of this class. |
void |
put(OWLOntology ontology)
Adds the given OWLOntology to the mapping using its default
document URI. |
void |
remove(OWLOntology ontology)
Removes the given OWLOntology and all contained OWLEntity instances
from this OWLOntologyDictionary. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static OWLOntologyDictionary getInstance()
public void put(OWLOntology ontology)
OWLOntology to the mapping using its default
document URI. Generates a mapping of all contained OWLEntity
instances to their IDs.
If OWLEntity instances are added or removed this mapping will not be
updated. It is recommended to reintroduce the OWLOntology to the
OWLOntologyDictionary.
TODO Can this be automatised by using the OWLAPI ChangeListener?
public OWLOntology get(URI source)
OWLOntology corresponding to the given URI.
URI
or null if nothing could be found.public OWLEntity getEntity(Integer id)
getEntity.
OWLEntity or null if nothing could be
found.
public Integer getID(OWLEntity entity)
throws IllegalArgumentException
getID.
IllegalArgumentException - Is thrown if the OWLEntity could not be found or is
null.public void remove(OWLOntology ontology)
OWLOntology and all contained OWLEntity instances
from this OWLOntologyDictionary.
ontology - OWLOntology to remove.public void clear()
OWLOntologyDictionary.
This can make serialised Alignments unrecoverable.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||