org.semanticweb.owlapi.util
Class ImportsStructureObjectSorter<O>

java.lang.Object
  extended by org.semanticweb.owlapi.util.ImportsStructureObjectSorter<O>
Direct Known Subclasses:
ImportsStructureEntitySorter

public class ImportsStructureObjectSorter<O>
extends java.lang.Object

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 30-May-2008

Sorts objects into sets based on where they appear in the imports closure of an ontology. Consider ontology B that imports ontology A. A map will be generated that maps each ontology, A, B, to a set of objects that are associated with the ontology. If an object is associated with ontology A and associated with ontology B then it will only appear in the set of objects that are associated with ontology A since A appears higher up the imports closure. An example of the use of this class is to obtain a map of ontologies to sets of entities where each set of entities contains entities that are first mentioned in the ontology that maps to them.

See Also:
ImportsStructureEntitySorter

Nested Class Summary
static interface ImportsStructureObjectSorter.ObjectSelector<O>
           
 
Constructor Summary
ImportsStructureObjectSorter(OWLOntology ontology, OWLOntologyManager manager, ImportsStructureObjectSorter.ObjectSelector<O> objectSelector)
          Creates a sorter for the specified ontology, whose imports closure is obtained with the specified manager, and for each ontology whose objects are selected using the specified object selector.
 
Method Summary
 java.util.Map<OWLOntology,java.util.Set<O>> getObjects()
          Gets a map that maps ontologies to sets of associated objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImportsStructureObjectSorter

public ImportsStructureObjectSorter(OWLOntology ontology,
                                    OWLOntologyManager manager,
                                    ImportsStructureObjectSorter.ObjectSelector<O> objectSelector)
Creates a sorter for the specified ontology, whose imports closure is obtained with the specified manager, and for each ontology whose objects are selected using the specified object selector.

Parameters:
ontology - The ontology
manager - The manager that will be used to obtain the imports closure
objectSelector - The selector that will be used to select objects that are associated with each ontology.
Method Detail

getObjects

public java.util.Map<OWLOntology,java.util.Set<O>> getObjects()
Gets a map that maps ontologies to sets of associated objects. The ontologies will be the ontologies that are contained in the imports closure of the original specified ontology.

Returns:
The map.