Class LocalityModuleExtractor

java.lang.Object
org.semanticweb.owlapi.modularity.locality.LocalityModuleExtractor
All Implemented Interfaces:
ModuleExtractor
Direct Known Subclasses:
SemanticLocalityModuleExtractor, SyntacticLocalityModuleExtractor

public abstract class LocalityModuleExtractor extends Object implements ModuleExtractor
Abstract class for convenience implementation of locality-based ModuleExtractors. Offers protected methods for the improved algorithm for module extraction.
Author:
Marc Robin Nolte
  • Method Details

    • axiomBase

      @Nonnull public Stream<OWLAxiom> 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 interface ModuleExtractor
      Returns:
      The axioms as specified above
    • containsAxiom

      public boolean containsAxiom(OWLAxiom axiom)
      Description copied from interface: ModuleExtractor
      Returns whether the axiom base of this ModuleExtractor contains the given OWLAxiom.
      Specified by:
      containsAxiom in interface ModuleExtractor
      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 given Predicate, if any.
      Specified by:
      extract in interface ModuleExtractor
      Parameters:
      signature - The signature the module should be extracted against.
      axiomFilter - An Optional 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 with LocalityClass.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

      @Nonnull public LocalityClass getLocalityClass()
      Returns the locality class used by this LocalityModuleExtractor.
      Returns:
      The locality class used by this LocalityModuleExtractor