uk.ac.manchester.cs.owl.modularity
Class SyntacticLocalityModuleExtractor

java.lang.Object
  extended by uk.ac.manchester.cs.owl.modularity.SyntacticLocalityModuleExtractor
All Implemented Interfaces:
OntologySegmenter

public class SyntacticLocalityModuleExtractor
extends java.lang.Object
implements OntologySegmenter

Implementation of module extraction based on syntactic locality.


Constructor Summary
SyntacticLocalityModuleExtractor(OWLOntologyManager man, OWLOntology ont, ModuleType moduleType)
          Creates a new module extractor for a given ontology, its manager, and a specified type of locality.
 
Method Summary
 java.util.Set<OWLAxiom> extract(java.util.Set<OWLEntity> sig)
          Extracts a module from the associated ontology for a given signature and the associated module type, and returns the module as a set of axioms.
 OWLOntology extractAsOntology(java.util.Set<OWLEntity> signature, java.net.URI uri)
          Extracts a module from the associated ontology for a given signature and the associated module type, and returns the module as an ontology.
 ModuleType getModuleType()
          Returns the module type for this extractor.
 void setModuleType(ModuleType moduleType)
          Changes the module type for this extractor without deleting the stored referenced entities.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SyntacticLocalityModuleExtractor

public SyntacticLocalityModuleExtractor(OWLOntologyManager man,
                                        OWLOntology ont,
                                        ModuleType moduleType)
Creates a new module extractor for a given ontology, its manager, and a specified type of locality.

Parameters:
man - the manager for the associated ontology
ont - the associated ontology
moduleType - the type of module this extractor will construct
Method Detail

setModuleType

public void setModuleType(ModuleType moduleType)
Changes the module type for this extractor without deleting the stored referenced entities.

Parameters:
moduleType - the new type of module

getModuleType

public ModuleType getModuleType()
Returns the module type for this extractor.

Returns:
module type for this extractor

extract

public java.util.Set<OWLAxiom> extract(java.util.Set<OWLEntity> sig)
Extracts a module from the associated ontology for a given signature and the associated module type, and returns the module as a set of axioms.

Specified by:
extract in interface OntologySegmenter
Parameters:
sig - the seed signature (set of entities) for the module
Returns:
the module

extractAsOntology

public OWLOntology extractAsOntology(java.util.Set<OWLEntity> signature,
                                     java.net.URI uri)
                              throws OWLOntologyCreationException,
                                     OWLOntologyChangeException
Extracts a module from the associated ontology for a given signature and the associated module type, and returns the module as an ontology.

Specified by:
extractAsOntology in interface OntologySegmenter
Parameters:
signature - the seed signature (set of entities) for the module
uri - the URI for the module
Returns:
the module, having the specified URI
Throws:
OWLOntologyChangeException - if adding axioms to the module fails
OWLOntologyCreationException - if the module cannot be created