Class LocalityModuleExtractor
java.lang.Object
org.semanticweb.owlapi.modularity.locality.LocalityModuleExtractor
- All Implemented Interfaces:
ModuleExtractor
- Direct Known Subclasses:
SemanticLocalityModuleExtractor
,SyntacticLocalityModuleExtractor
Abstract class for convenience implementation of locality-based
ModuleExtractor
s. Offers
protected methods for the improved algorithm for module extraction.- Author:
- Marc Robin Nolte
-
Method Summary
Modifier and TypeMethodDescriptionReturn the axioms all modules of this ModuleExtractor are computed against, including global axioms and tautologies.boolean
containsAxiom
(OWLAxiom axiom) Returns whether the axiom base of this ModuleExtractor contains the givenOWLAxiom
.Extracts a module with respect to the given signature against the subset of the axiom base this ModuleExtractor's axiom base that matches the givenPredicate
, if any.Returns the locality class used by this LocalityModuleExtractor.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.semanticweb.owlapi.modularity.ModuleExtractor
everyModuleContains, extract, extract, extractAsOntology, globals, noModuleContains, tautologies
-
Method Details
-
axiomBase
Description copied from interface:ModuleExtractor
Return the axioms all modules of this ModuleExtractor are computed against, including global axioms and tautologies.- Specified by:
axiomBase
in interfaceModuleExtractor
- Returns:
- The axioms as specified above
-
containsAxiom
Description copied from interface:ModuleExtractor
Returns whether the axiom base of this ModuleExtractor contains the givenOWLAxiom
.- Specified by:
containsAxiom
in interfaceModuleExtractor
- Parameters:
axiom
- The axiom to test- Returns:
- A boolean value as specified above
-
extract
public final Stream<OWLAxiom> extract(Stream<OWLEntity> signature, Optional<Predicate<OWLAxiom>> axiomFilter) Description copied from interface:ModuleExtractor
Extracts a module with respect to the given signature against the subset of the axiom base this ModuleExtractor's axiom base that matches the givenPredicate
, if any.- Specified by:
extract
in interfaceModuleExtractor
- Parameters:
signature
- The signature the module should be extracted against.axiomFilter
- AnOptional
Predicate
that filters a subset of the axiom base to extract the module against. Note that ignoring some axiom may lead to other axioms not be contained in the module either. For example, consider the Ontology O:= {A⊑B, B⊑C, C⊑D} and the signature {A}.SyntacticLocalityEvaluator
withLocalityClass.BOTTOM
returns O as a whole, but when ignoring the axiom B⊑C it only returns {A⊑B}.- Returns:
- The axioms of the module with respect to the given signature
-
getLocalityClass
Returns the locality class used by this LocalityModuleExtractor.- Returns:
- The locality class used by this LocalityModuleExtractor
-