public abstract class AbstractModuleExtractor extends Object implements ModuleExtractor
Title:
Description:
Copyright: Copyright (c) 2007
Company: Clark & Parsia, LLC.
| Modifier and Type | Field and Description |
|---|---|
protected EnumSet<org.mindswap.pellet.KnowledgeBase.ChangeType> |
changes
The types of changes that are pending in additions and deletions
|
protected Map<org.semanticweb.owlapi.model.OWLEntity,Set<org.semanticweb.owlapi.model.OWLAxiom>> |
entityAxioms
Map to find axioms that references an axiom
|
static Logger |
log |
protected Map<org.semanticweb.owlapi.model.OWLEntity,Set<org.semanticweb.owlapi.model.OWLEntity>> |
modules |
| Modifier | Constructor and Description |
|---|---|
|
AbstractModuleExtractor() |
protected |
AbstractModuleExtractor(AbstractModuleExtractor extractor) |
|
AbstractModuleExtractor(com.clarkparsia.owlapi.modularity.locality.LocalityClass localityClass) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAxiom(org.semanticweb.owlapi.model.OWLAxiom axiom)
Adds an axiom to the extractor.
|
Set<org.semanticweb.owlapi.model.OWLEntity> |
applyChanges(org.mindswap.pellet.taxonomy.Taxonomy<org.semanticweb.owlapi.model.OWLClass> taxonomy)
Update the modules with the changes that have been put into the queue so
far.
|
boolean |
canUpdate()
Returns if the extracted modules can be updated.
|
void |
deleteAxiom(org.semanticweb.owlapi.model.OWLAxiom axiom)
Deletes an axiom from the extractor.
|
void |
extractModules()
Extract modules from scratch
|
protected abstract void |
extractModuleSignatures(Set<? extends org.semanticweb.owlapi.model.OWLEntity> entities,
org.mindswap.pellet.utils.progress.ProgressMonitor monitor) |
Set<org.semanticweb.owlapi.model.OWLAxiom> |
getAxioms()
Returns all the axioms loaded in the extractor.
|
Set<org.semanticweb.owlapi.model.OWLAxiom> |
getAxioms(org.semanticweb.owlapi.model.OWLEntity entity)
Return the axioms which references this entity
|
Set<org.semanticweb.owlapi.model.OWLEntity> |
getEntities()
Returns all the entities referenced in loaded axioms.
|
protected Set<org.semanticweb.owlapi.model.OWLAxiom> |
getModuleAxioms(Set<org.semanticweb.owlapi.model.OWLEntity> signature) |
Set<org.semanticweb.owlapi.model.OWLEntity> |
getModuleEntities(org.semanticweb.owlapi.model.OWLEntity entity) |
org.semanticweb.owlapi.model.OWLOntology |
getModuleFromSignature(Set<org.semanticweb.owlapi.model.OWLEntity> signature)
Returns a new ontology that contains the axioms that are in the module
for given set of entities
|
org.mindswap.pellet.utils.Timers |
getTimers()
Returns the timers used by this extractor to collect statistics about
performance.
|
boolean |
isABoxChanged()
Checks whether there are unapplied changes to the ABox
|
boolean |
isChanged()
Checks if axioms have been added/removed and modules need to be updated
|
boolean |
isClassificationNeeded(com.clarkparsia.pellet.expressivity.Expressivity expressivity)
Checks if the changes that has not yet been updated require re-classification
|
protected boolean |
isLocal(org.semanticweb.owlapi.model.OWLAxiom axiom,
Set<org.semanticweb.owlapi.model.OWLEntity> signature) |
boolean |
isRBoxChanged()
Checks whether there are unapplied changes to the RBox
|
boolean |
isTBoxChanged()
Checks whether there are unapplied changes to the TBox
|
void |
load(ZipInputStream inputStream)
Restores the previously saved state of the ModuleExtractor from a stream.
|
void |
resetModules() |
void |
save(ZipOutputStream outputStream)
Save the current state of the ModuleExtractor.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcopy, extractModulepublic static final Logger log
protected final EnumSet<org.mindswap.pellet.KnowledgeBase.ChangeType> changes
protected final Map<org.semanticweb.owlapi.model.OWLEntity,Set<org.semanticweb.owlapi.model.OWLAxiom>> entityAxioms
public AbstractModuleExtractor()
public AbstractModuleExtractor(com.clarkparsia.owlapi.modularity.locality.LocalityClass localityClass)
protected AbstractModuleExtractor(AbstractModuleExtractor extractor)
public void addAxiom(org.semanticweb.owlapi.model.OWLAxiom axiom)
ModuleExtractoraddAxiom in interface ModuleExtractorpublic boolean canUpdate()
canUpdate in interface ModuleExtractorpublic void deleteAxiom(org.semanticweb.owlapi.model.OWLAxiom axiom)
ModuleExtractordeleteAxiom in interface ModuleExtractorpublic void extractModules()
extractModules in interface ModuleExtractorprotected abstract void extractModuleSignatures(Set<? extends org.semanticweb.owlapi.model.OWLEntity> entities, org.mindswap.pellet.utils.progress.ProgressMonitor monitor)
public Set<org.semanticweb.owlapi.model.OWLAxiom> getAxioms(org.semanticweb.owlapi.model.OWLEntity entity)
getAxioms in interface ModuleExtractorentity - public Set<org.semanticweb.owlapi.model.OWLEntity> getModuleEntities(org.semanticweb.owlapi.model.OWLEntity entity)
getModuleEntities in interface ModuleExtractorprotected Set<org.semanticweb.owlapi.model.OWLAxiom> getModuleAxioms(Set<org.semanticweb.owlapi.model.OWLEntity> signature)
public org.semanticweb.owlapi.model.OWLOntology getModuleFromSignature(Set<org.semanticweb.owlapi.model.OWLEntity> signature)
getModuleFromSignature in interface ModuleExtractorsignature - org.semanticweb.owlapi.model.OWLExceptionpublic boolean isChanged()
isChanged in interface ModuleExtractortrue if axioms have been added/removedprotected boolean isLocal(org.semanticweb.owlapi.model.OWLAxiom axiom,
Set<org.semanticweb.owlapi.model.OWLEntity> signature)
public Set<org.semanticweb.owlapi.model.OWLEntity> applyChanges(org.mindswap.pellet.taxonomy.Taxonomy<org.semanticweb.owlapi.model.OWLClass> taxonomy) throws UnsupportedOperationException
ModuleExtractorapplyChanges in interface ModuleExtractorUnsupportedOperationException - if modules cannot be updated as reported by
ModuleExtractor.canUpdate() functionpublic org.mindswap.pellet.utils.Timers getTimers()
ModuleExtractorgetTimers in interface ModuleExtractorpublic Set<org.semanticweb.owlapi.model.OWLAxiom> getAxioms()
ModuleExtractorgetAxioms in interface ModuleExtractorpublic Set<org.semanticweb.owlapi.model.OWLEntity> getEntities()
ModuleExtractorgetEntities in interface ModuleExtractorpublic void resetModules()
public boolean isClassificationNeeded(com.clarkparsia.pellet.expressivity.Expressivity expressivity)
ModuleExtractorisClassificationNeeded in interface ModuleExtractorpublic boolean isTBoxChanged()
public boolean isRBoxChanged()
public boolean isABoxChanged()
public void save(ZipOutputStream outputStream) throws IOException, IllegalStateException
ModuleExtractorsave in interface ModuleExtractoroutputStream - the zip output stream where the data should be storedIOException - if an I/O error occurs during the savingIllegalStateException - if there are outstanding changes that have not yet been applied to the modules (e.g., via updateModules())public void load(ZipInputStream inputStream) throws IOException, IllegalArgumentException
ModuleExtractorload in interface ModuleExtractorinputStream - the zip input stream from which the data should be readIOException - if an I/O error occurs during the readIllegalArgumentException - if the next zip file entry in the stream was not saved by a compatible
ModuleExtractorCopyright © 2019. All rights reserved.