Class DefaultSpeciesSubsetter
- All Implemented Interfaces:
ISpeciesSubsetStrategy
This strategy is the same as the one implemented by OWLTools’ SpeciesSubsetterUtil class.
Basically, we assert THE_ROOT(s) in_taxon some THE_TAXON, and
exclude from the subset all classes that are unsatisfiable because of that
assertion.
This may cause some classes to be excluded because they are linked to an
unsatisfiable class, even though the link between the two classes does not
convey that one cannot exist in a given taxon if the other does not. For
example, if C1 shares_ancestor_with some C2 and C2 is
unsatisfiable in the considered taxon, then C1 will be unsatisfiable as well,
even though it may very well be valid in that taxon. To avoid this, we
forcibly remove a handful of “cross-taxon” relationships from the ontology
before proceeding.
-
Field Summary
Fields inherited from interface org.incenp.obofoundry.uberon.util.ISpeciesSubsetStrategy
IN_TAXON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSet<org.semanticweb.owlapi.model.OWLClass>getSubset(org.semanticweb.owlapi.model.OWLOntology ontology, org.semanticweb.owlapi.reasoner.OWLReasoner reasoner, Collection<org.semanticweb.owlapi.model.IRI> roots, org.semanticweb.owlapi.model.IRI taxon) Creates a taxon-specific subset of the given ontology.
-
Constructor Details
-
DefaultSpeciesSubsetter
public DefaultSpeciesSubsetter()
-
-
Method Details
-
getSubset
public Set<org.semanticweb.owlapi.model.OWLClass> getSubset(org.semanticweb.owlapi.model.OWLOntology ontology, org.semanticweb.owlapi.reasoner.OWLReasoner reasoner, Collection<org.semanticweb.owlapi.model.IRI> roots, org.semanticweb.owlapi.model.IRI taxon) Description copied from interface:ISpeciesSubsetStrategyCreates a taxon-specific subset of the given ontology.- Specified by:
getSubsetin interfaceISpeciesSubsetStrategy- Parameters:
ontology- The ontology to create a subset of.reasoner- The reasoner to use.roots- The root classes from which to create the subset; only those classes and their descendants will be considered to create the subset, all ancestors will be ignored; ifnull, defaults toowl:Thing.taxon- The ID of the taxon to create the subset for.- Returns:
- The set of classes that belong to the subset.
-