public class SyntacticLocalityModuleExtractor extends Object implements OntologySegmenter
Constructor and Description |
---|
SyntacticLocalityModuleExtractor(OWLOntologyManager man,
IRI ontIRI,
Set<OWLAxiom> axs,
ModuleType moduleType)
Creates a new module extractor for a subset of a given ontology, its manager, and a specified
type of locality.
|
SyntacticLocalityModuleExtractor(OWLOntologyManager man,
IRI ontIRI,
Set<OWLAxiom> axs,
ModuleType moduleType,
boolean excludeAssertions) |
SyntacticLocalityModuleExtractor(OWLOntologyManager man,
OWLOntologyLoaderConfiguration config,
IRI ontIRI,
Set<OWLAxiom> axs,
ModuleType moduleType,
boolean excludeAssertions) |
SyntacticLocalityModuleExtractor(OWLOntologyManager man,
OWLOntology ont,
ModuleType moduleType)
Creates a new module extractor for a given ontology, its manager, and a specified type of
locality.
|
SyntacticLocalityModuleExtractor(OWLOntologyManager man,
OWLOntology ont,
Set<OWLAxiom> axs,
ModuleType moduleType)
Deprecated.
use the constructor that takes an IRI rather than an ontology as second argument.
The second argument is used only in logging assertions and can be null.
|
Modifier and Type | Method and Description |
---|---|
Set<OWLAxiom> |
extract(Set<OWLEntity> signature)
Returns a set of axioms that is a segment of the ontology associated with this segmenter.
|
Set<OWLAxiom> |
extract(Set<OWLEntity> signature,
int superClassLevel,
int subClassLevel,
OWLReasoner reasoner)
Returns a set of axioms that is a segment of the ontology associated with this segmenter.
|
Set<OWLAxiom> |
extract(Set<OWLEntity> sig,
int superClassLevel,
int subClassLevel,
OWLReasoner reasoner,
boolean verbose)
Extracts a module from the associated ontology for a given signature and the associated
module type, and returns the module as a set of axioms.
|
OWLOntology |
extractAsOntology(Set<OWLEntity> signature,
IRI iri)
Returns an ontology that is a segment of the ontology associated with this segmenter.
|
OWLOntology |
extractAsOntology(Set<OWLEntity> signature,
IRI iri,
int superClassLevel,
int subClassLevel,
OWLReasoner reasoner)
Returns an ontology that is a segment of the ontology associated with this segmenter.
|
ModuleType |
getModuleType()
Returns the module type for this extractor.
|
void |
setModuleType(ModuleType moduleType)
Changes the module type for this extractor without deleting the stored referenced entities.
|
@Deprecated public SyntacticLocalityModuleExtractor(@Nonnull OWLOntologyManager man, OWLOntology ont, @Nonnull Set<OWLAxiom> axs, @Nonnull ModuleType moduleType)
man
- the manager for the associated ontologyont
- the associated ontologyaxs
- the subset of the ontology as a set of axiomsmoduleType
- the type of module this extractor will constructpublic SyntacticLocalityModuleExtractor(@Nonnull OWLOntologyManager man, IRI ontIRI, @Nonnull Set<OWLAxiom> axs, @Nonnull ModuleType moduleType)
man
- the manager for the associated ontologyontIRI
- the associated ontology IRI. Only for debugging purposes.axs
- the subset of the ontology as a set of axiomsmoduleType
- the type of module this extractor will constructpublic SyntacticLocalityModuleExtractor(@Nonnull OWLOntologyManager man, IRI ontIRI, @Nonnull Set<OWLAxiom> axs, @Nonnull ModuleType moduleType, boolean excludeAssertions)
man
- managerontIRI
- ontology IRIaxs
- axiomsmoduleType
- module typeexcludeAssertions
- exclude assertionspublic SyntacticLocalityModuleExtractor(@Nonnull OWLOntologyManager man, OWLOntologyLoaderConfiguration config, IRI ontIRI, @Nonnull Set<OWLAxiom> axs, @Nonnull ModuleType moduleType, boolean excludeAssertions)
man
- managerconfig
- config object to access configurationontIRI
- ontology IRIaxs
- axiomsmoduleType
- module typeexcludeAssertions
- exclude assertionspublic SyntacticLocalityModuleExtractor(@Nonnull OWLOntologyManager man, @Nonnull OWLOntology ont, @Nonnull ModuleType moduleType)
man
- the manager for the associated ontologyont
- the associated ontologymoduleType
- the type of module this extractor will constructpublic void setModuleType(@Nonnull ModuleType moduleType)
moduleType
- the new type of module@Nonnull public ModuleType getModuleType()
public Set<OWLAxiom> extract(Set<OWLEntity> signature)
OntologySegmenter
extract
in interface OntologySegmenter
signature
- the seed signaturepublic Set<OWLAxiom> extract(Set<OWLEntity> signature, int superClassLevel, int subClassLevel, OWLReasoner reasoner)
OntologySegmenter
extract
in interface OntologySegmenter
signature
- the seed signaturesuperClassLevel
- determines whether superclasses are added to the signature before
segment extraction, see below for admissible valuessubClassLevel
- determines whether subclasses are added to the signature before segment
extraction, see below for admissible valuesreasoner
- the reasoner to determine super-/subclasses@Nonnull public Set<OWLAxiom> extract(@Nonnull Set<OWLEntity> sig, int superClassLevel, int subClassLevel, OWLReasoner reasoner, boolean verbose)
sig
- the seed signature (set of entities) for the modulesuperClassLevel
- determines whether superclasses are added to the signature before
segment extraction, see below for admissible valuessubClassLevel
- determines whether subclasses are added to the signature before segment
extractionreasoner
- the reasoner to determine super-/subclasses. This can be an arbitrary
reasoner, including a ToldClassHierarchyReasoner. It must have loaded the ontology.
Can be null if superClassLevel and subClassLevel are 0.verbose
- true if verbose output is requiredpublic OWLOntology extractAsOntology(Set<OWLEntity> signature, IRI iri) throws OWLOntologyCreationException
OntologySegmenter
extractAsOntology
in interface OntologySegmenter
signature
- the seed signature (set of entities) for the moduleiri
- the URI for the moduleOWLOntologyCreationException
- if the module cannot be createdpublic OWLOntology extractAsOntology(Set<OWLEntity> signature, IRI iri, int superClassLevel, int subClassLevel, OWLReasoner reasoner) throws OWLOntologyCreationException
OntologySegmenter
extractAsOntology
in interface OntologySegmenter
signature
- the seed signatureiri
- the URI for the modulesuperClassLevel
- determines whether superclasses are added to the signature before
segment extraction, see below for admissible valuessubClassLevel
- determines whether subclasses are added to the signature before segment
extraction, see below for admissible valuesreasoner
- the reasoner to determine super-/subclassesOWLOntologyCreationException
- if the module cannot be created Meaning of the value of
superClassLevel, subClassLevel:Copyright © 2020 The University of Manchester. All rights reserved.