com.clarkparsia.modularity
Class AbstractModuleExtractor

java.lang.Object
  extended by com.clarkparsia.modularity.AbstractModuleExtractor
All Implemented Interfaces:
ModuleExtractor
Direct Known Subclasses:
AxiomBasedModuleExtractor

public abstract class AbstractModuleExtractor
extends java.lang.Object
implements ModuleExtractor

Title:

Description:

Copyright: Copyright (c) 2007

Company: Clark & Parsia, LLC.

Author:
Evren Sirin

Field Summary
static java.util.logging.Logger log
           
 
Constructor Summary
AbstractModuleExtractor()
           
AbstractModuleExtractor(com.clarkparsia.modularity.locality.LocalityEvaluator localityEvaluator)
           
 
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.
 MultiValueMap<org.semanticweb.owl.model.OWLEntity,org.semanticweb.owl.model.OWLEntity> extractModules()
          Extract modules 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
 void resetModules()
           
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.clarkparsia.modularity.ModuleExtractor
extractModule
 

Field Detail

log

public static final java.util.logging.Logger log
Constructor Detail

AbstractModuleExtractor

public AbstractModuleExtractor()

AbstractModuleExtractor

public AbstractModuleExtractor(com.clarkparsia.modularity.locality.LocalityEvaluator localityEvaluator)
Method Detail

addAxiom

public void addAxiom(org.semanticweb.owl.model.OWLAxiom axiom)
Description copied from interface: ModuleExtractor
Adds an axiom to the extractor.

Specified by:
addAxiom in interface ModuleExtractor

canUpdate

public boolean canUpdate()
Returns if the extracted modules can be updated. We can update the modules if we have computed modules and no non-local axiom has been added or deleted.

Specified by:
canUpdate in interface ModuleExtractor
Returns:

deleteAxiom

public void deleteAxiom(org.semanticweb.owl.model.OWLAxiom axiom)
Description copied from interface: ModuleExtractor
Deletes an axiom from the extractor.

Specified by:
deleteAxiom in interface ModuleExtractor

extractModules

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

Specified by:
extractModules in interface ModuleExtractor
Returns:

getAxioms

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

Specified by:
getAxioms in interface ModuleExtractor
Parameters:
entity -
Returns:

getModule

public org.semanticweb.owl.model.OWLOntology getModule(org.semanticweb.owl.model.OWLEntity entity)
Specified by:
getModule in interface ModuleExtractor

getModuleFromSignature

public 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

Specified by:
getModuleFromSignature in interface ModuleExtractor
Parameters:
signature -
Returns:
Throws:
org.semanticweb.owl.model.OWLException

isChanged

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

Specified by:
isChanged in interface ModuleExtractor
Returns:
true if axioms have been added/removed

addOntologies

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

Specified by:
addOntologies in interface ModuleExtractor

addOntology

public void addOntology(org.semanticweb.owl.model.OWLOntology ontology)
Description copied from interface: ModuleExtractor
Adds all the axioms of an ontology to the extractor.

Specified by:
addOntology in interface ModuleExtractor

updateModules

public 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.

Specified by:
updateModules in interface ModuleExtractor
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

getTimers

public Timers getTimers()
Description copied from interface: ModuleExtractor
Returns the timers used by this extractor to collect statistics about performance.

Specified by:
getTimers in interface ModuleExtractor
Returns:

getAxioms

public java.util.Set<org.semanticweb.owl.model.OWLAxiom> getAxioms()
Description copied from interface: ModuleExtractor
Returns all the axioms loaded in the extractor.

Specified by:
getAxioms in interface ModuleExtractor
Returns:
an unmodifiable set of axioms

getEntities

public java.util.Set<org.semanticweb.owl.model.OWLEntity> getEntities()
Description copied from interface: ModuleExtractor
Returns all the entities referenced in loaded axioms.

Specified by:
getEntities in interface ModuleExtractor
Returns:
an unmodifiable set of entities

resetModules

public void resetModules()


Copyright © 2004 Evren Sirin. All Rights Reserved.