com.clarkparsia.modularity
Interface ModuleExtractor

All Known Implementing Classes:
AbstractModuleExtractor, AxiomBasedModuleExtractor

public interface ModuleExtractor

Title:

Description:

Copyright: Copyright (c) 2008

Company: Clark & Parsia, LLC.

Author:
Evren Sirin

Method Summary
 void addAxiom(org.semanticweb.owl.model.OWLAxiom axiom)
          Adds an axiom to the extractor.
 void addOntologies(java.util.Set<org.semanticweb.owl.model.OWLOntology> ontologies)
          Adds all the axioms from a set of ontologies to the extractor.
 void addOntology(org.semanticweb.owl.model.OWLOntology ontology)
          Adds all the axioms of an ontology to the extractor.
 boolean canUpdate()
          Returns if the extracted modules can be updated.
 void deleteAxiom(org.semanticweb.owl.model.OWLAxiom axiom)
          Deletes an axiom from the extractor.
 java.util.Set<org.semanticweb.owl.model.OWLAxiom> extractModule(java.util.Set<? extends org.semanticweb.owl.model.OWLEntity> signature)
          Extract the module for a given set of entities.
 MultiValueMap<org.semanticweb.owl.model.OWLEntity,org.semanticweb.owl.model.OWLEntity> extractModules()
          Extract modules for all classes from scratch
 java.util.Set<org.semanticweb.owl.model.OWLAxiom> getAxioms()
          Returns all the axioms loaded in the extractor.
 java.util.Set<org.semanticweb.owl.model.OWLAxiom> getAxioms(org.semanticweb.owl.model.OWLEntity entity)
          Return the axioms which references this entity
 java.util.Set<org.semanticweb.owl.model.OWLEntity> getEntities()
          Returns all the entities referenced in loaded axioms.
 org.semanticweb.owl.model.OWLOntology getModule(org.semanticweb.owl.model.OWLEntity entity)
           
 org.semanticweb.owl.model.OWLOntology getModuleFromSignature(java.util.Set<org.semanticweb.owl.model.OWLEntity> signature)
          Returns a new ontology that contains the axioms that are in the module for given set of entities
 Timers getTimers()
          Returns the timers used by this extractor to collect statistics about performance.
 boolean isChanged()
          Checks if axioms have been added/removed and modules need to be updated
 java.util.Set<org.semanticweb.owl.model.OWLEntity> updateModules(Taxonomy<org.semanticweb.owl.model.OWLClass> taxonomy, boolean add)
          Update the modules with the changes that have been put into the queue so far.
 

Method Detail

addAxiom

void addAxiom(org.semanticweb.owl.model.OWLAxiom axiom)
Adds an axiom to the extractor.

Parameters:
axiom -

addOntologies

void addOntologies(java.util.Set<org.semanticweb.owl.model.OWLOntology> ontologies)
Adds all the axioms from a set of ontologies to the extractor.

Parameters:
ontology -

addOntology

void addOntology(org.semanticweb.owl.model.OWLOntology ontology)
Adds all the axioms of an ontology to the extractor.

Parameters:
ontology -

canUpdate

boolean canUpdate()
Returns if the extracted modules can be updated. Returns false if the initial module extraction has not been performed yet.

Returns:

deleteAxiom

void deleteAxiom(org.semanticweb.owl.model.OWLAxiom axiom)
Deletes an axiom from the extractor.

Parameters:
axiom -

extractModules

MultiValueMap<org.semanticweb.owl.model.OWLEntity,org.semanticweb.owl.model.OWLEntity> extractModules()
Extract modules for all classes from scratch

Returns:

getAxioms

java.util.Set<org.semanticweb.owl.model.OWLAxiom> getAxioms()
Returns all the axioms loaded in the extractor.

Returns:
an unmodifiable set of axioms

getAxioms

java.util.Set<org.semanticweb.owl.model.OWLAxiom> getAxioms(org.semanticweb.owl.model.OWLEntity entity)
Return the axioms which references this entity

Parameters:
entity -
Returns:

getEntities

java.util.Set<org.semanticweb.owl.model.OWLEntity> getEntities()
Returns all the entities referenced in loaded axioms.

Returns:
an unmodifiable set of entities

getModule

org.semanticweb.owl.model.OWLOntology getModule(org.semanticweb.owl.model.OWLEntity entity)

getModuleFromSignature

org.semanticweb.owl.model.OWLOntology getModuleFromSignature(java.util.Set<org.semanticweb.owl.model.OWLEntity> signature)
Returns a new ontology that contains the axioms that are in the module for given set of entities

Parameters:
signature -
Returns:
Throws:
org.semanticweb.owl.model.OWLException

getTimers

Timers getTimers()
Returns the timers used by this extractor to collect statistics about performance.

Returns:

isChanged

boolean isChanged()
Checks if axioms have been added/removed and modules need to be updated

Returns:
true if axioms have been added/removed

updateModules

java.util.Set<org.semanticweb.owl.model.OWLEntity> updateModules(Taxonomy<org.semanticweb.owl.model.OWLClass> taxonomy,
                                                                 boolean add)
                                                                 throws java.lang.UnsupportedOperationException
Update the modules with the changes that have been put into the queue so far.

Parameters:
add - If true apply only addition changes, otherwise apply deletions
Returns:
The set of entities whose modules are affected by the changes
Throws:
java.lang.UnsupportedOperationException - if modules cannot be updated as reported by canUpdate() function

extractModule

java.util.Set<org.semanticweb.owl.model.OWLAxiom> extractModule(java.util.Set<? extends org.semanticweb.owl.model.OWLEntity> signature)
Extract the module for a given set of entities.

Parameters:
signature - set of entities
Returns:
module for the given signature


Copyright © 2004 Evren Sirin. All Rights Reserved.