Package org.obolibrary.robot
Class MireotOperation
- java.lang.Object
-
- org.obolibrary.robot.MireotOperation
-
public class MireotOperation extends Object
Implements several variations on MIREOT, as first described in "MIREOT: The minimum information to reference an external ontology term" (link).- Author:
- James A. Overton
-
-
Constructor Summary
Constructors Constructor Description MireotOperation()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static org.semanticweb.owlapi.model.OWLOntology
getAncestors(org.semanticweb.owlapi.model.OWLOntology inputOntology, Set<org.semanticweb.owlapi.model.IRI> upperIRIs, Set<org.semanticweb.owlapi.model.IRI> lowerIRIs, Set<org.semanticweb.owlapi.model.OWLAnnotationProperty> annotationProperties)
Given an ontology, a set of upper-level IRIs, a set of lower-level IRIs, and a set of annotation properties, return a new ontology with just the named ancestors of those terms, their subclass relations, and the selected annotations.static org.semanticweb.owlapi.model.OWLOntology
getAncestors(org.semanticweb.owlapi.model.OWLOntology inputOntology, Set<org.semanticweb.owlapi.model.IRI> upperIRIs, Set<org.semanticweb.owlapi.model.IRI> lowerIRIs, Set<org.semanticweb.owlapi.model.OWLAnnotationProperty> annotationProperties, boolean annotateSource, Map<org.semanticweb.owlapi.model.IRI,org.semanticweb.owlapi.model.IRI> sourceMap)
Deprecated.replaced bygetAncestors(OWLOntology, Set, Set, Set)
static org.semanticweb.owlapi.model.OWLOntology
getAncestors(org.semanticweb.owlapi.model.OWLOntology inputOntology, Set<org.semanticweb.owlapi.model.IRI> upperIRIs, Set<org.semanticweb.owlapi.model.IRI> lowerIRIs, Set<org.semanticweb.owlapi.model.OWLAnnotationProperty> annotationProperties, Map<String,String> options, Map<org.semanticweb.owlapi.model.IRI,org.semanticweb.owlapi.model.IRI> inputSourceMap)
Given an input ontology, a set of upper IRIs, a set of lower IRIs, a set of annotation properties (or null for all), and a map of extract options, get the ancestors of the lower IRIs up to the upper IRIs.static Set<org.semanticweb.owlapi.model.OWLAnnotationProperty>
getDefaultAnnotationProperties()
Get a set of default annotation properties.static org.semanticweb.owlapi.model.OWLOntology
getDescendants(org.semanticweb.owlapi.model.OWLOntology inputOntology, Set<org.semanticweb.owlapi.model.IRI> upperIRIs, Set<org.semanticweb.owlapi.model.OWLAnnotationProperty> annotationProperties)
Given an ontology, a set of upper-level IRIs, and a set of annotation properties, return a new ontology with just those terms and their named descendants, their subclass relations, and the selected annotations.static org.semanticweb.owlapi.model.OWLOntology
getDescendants(org.semanticweb.owlapi.model.OWLOntology inputOntology, Set<org.semanticweb.owlapi.model.IRI> upperIRIs, Set<org.semanticweb.owlapi.model.OWLAnnotationProperty> annotationProperties, boolean annotateSource, Map<org.semanticweb.owlapi.model.IRI,org.semanticweb.owlapi.model.IRI> sourceMap)
Deprecated.replaced bygetDescendants(OWLOntology, Set, Set, Map, Map)
static org.semanticweb.owlapi.model.OWLOntology
getDescendants(org.semanticweb.owlapi.model.OWLOntology inputOntology, Set<org.semanticweb.owlapi.model.IRI> upperIRIs, Set<org.semanticweb.owlapi.model.OWLAnnotationProperty> annotationProperties, Map<String,String> options, Map<org.semanticweb.owlapi.model.IRI,org.semanticweb.owlapi.model.IRI> inputSourceMap)
Given an ontology, a set of upper-level IRIs, and a set of annotation properties, return a new ontology with just those terms and their named descendants, their subclass relations, and the selected annotations.
-
-
-
Method Detail
-
getDefaultAnnotationProperties
public static Set<org.semanticweb.owlapi.model.OWLAnnotationProperty> getDefaultAnnotationProperties()
Get a set of default annotation properties. Currenly includes only RDFS label.- Returns:
- a set of annotation properties
-
getAncestors
public static org.semanticweb.owlapi.model.OWLOntology getAncestors(org.semanticweb.owlapi.model.OWLOntology inputOntology, Set<org.semanticweb.owlapi.model.IRI> upperIRIs, Set<org.semanticweb.owlapi.model.IRI> lowerIRIs, Set<org.semanticweb.owlapi.model.OWLAnnotationProperty> annotationProperties) throws org.semanticweb.owlapi.model.OWLOntologyCreationException
Given an ontology, a set of upper-level IRIs, a set of lower-level IRIs, and a set of annotation properties, return a new ontology with just the named ancestors of those terms, their subclass relations, and the selected annotations. The input ontology is not changed.- Parameters:
inputOntology
- the ontology to extract fromupperIRIs
- ancestors will be copied up to and including these termslowerIRIs
- copy these terms and their superclassesannotationProperties
- the annotation properties to copy; if null, all will be copied- Returns:
- a new ontology with the target terms and their named ancestors
- Throws:
org.semanticweb.owlapi.model.OWLOntologyCreationException
- on problems creating new ontology
-
getAncestors
public static org.semanticweb.owlapi.model.OWLOntology getAncestors(org.semanticweb.owlapi.model.OWLOntology inputOntology, Set<org.semanticweb.owlapi.model.IRI> upperIRIs, Set<org.semanticweb.owlapi.model.IRI> lowerIRIs, Set<org.semanticweb.owlapi.model.OWLAnnotationProperty> annotationProperties, Map<String,String> options, Map<org.semanticweb.owlapi.model.IRI,org.semanticweb.owlapi.model.IRI> inputSourceMap) throws org.semanticweb.owlapi.model.OWLOntologyCreationException
Given an input ontology, a set of upper IRIs, a set of lower IRIs, a set of annotation properties (or null for all), and a map of extract options, get the ancestors of the lower IRIs up to the upper IRIs. Include the specified annotation properties.- Parameters:
inputOntology
- OWLOntology to extract fromupperIRIs
- top level IRIslowerIRIs
- bottom level IRIsannotationProperties
- annotation properties to copy, or null for alloptions
- map of extract options or nullinputSourceMap
- map of source IRIs to targets- Returns:
- extracted module
- Throws:
org.semanticweb.owlapi.model.OWLOntologyCreationException
- on problems creating the new ontology
-
getAncestors
@Deprecated public static org.semanticweb.owlapi.model.OWLOntology getAncestors(org.semanticweb.owlapi.model.OWLOntology inputOntology, Set<org.semanticweb.owlapi.model.IRI> upperIRIs, Set<org.semanticweb.owlapi.model.IRI> lowerIRIs, Set<org.semanticweb.owlapi.model.OWLAnnotationProperty> annotationProperties, boolean annotateSource, Map<org.semanticweb.owlapi.model.IRI,org.semanticweb.owlapi.model.IRI> sourceMap) throws org.semanticweb.owlapi.model.OWLOntologyCreationException
Deprecated.replaced bygetAncestors(OWLOntology, Set, Set, Set)
Given an ontology, a set of upper-level IRIs, a set of lower-level IRIs, a set of annotation properties, and a boolean indiciating if rdfs:isDefinedBy should be added to copied classes, return a new ontology with just the named ancestors of those terms, their subclass relations, and the selected annotations. The input ontology is not changed.- Parameters:
inputOntology
- the ontology to extract fromupperIRIs
- ancestors will be copied up to and including these termslowerIRIs
- copy these terms and their superclassesannotationProperties
- the annotation properties to copy; if null, all will be copiedannotateSource
- if true, annotate copied classes with rdfs:isDefinedBysourceMap
- map of term IRI to source IRI- Returns:
- a new ontology with the target terms and their named ancestors
- Throws:
org.semanticweb.owlapi.model.OWLOntologyCreationException
- on problems creating new ontology
-
getDescendants
public static org.semanticweb.owlapi.model.OWLOntology getDescendants(org.semanticweb.owlapi.model.OWLOntology inputOntology, Set<org.semanticweb.owlapi.model.IRI> upperIRIs, Set<org.semanticweb.owlapi.model.OWLAnnotationProperty> annotationProperties) throws org.semanticweb.owlapi.model.OWLOntologyCreationException
Given an ontology, a set of upper-level IRIs, and a set of annotation properties, return a new ontology with just those terms and their named descendants, their subclass relations, and the selected annotations. The input ontology is not changed.- Parameters:
inputOntology
- the ontology to extract fromupperIRIs
- these terms and their descendants will be copiedannotationProperties
- the annotation properties to copy; if null, all will be copied- Returns:
- a new ontology with the target terms and their named ancestors
- Throws:
org.semanticweb.owlapi.model.OWLOntologyCreationException
- on problems creating new ontology
-
getDescendants
public static org.semanticweb.owlapi.model.OWLOntology getDescendants(org.semanticweb.owlapi.model.OWLOntology inputOntology, Set<org.semanticweb.owlapi.model.IRI> upperIRIs, Set<org.semanticweb.owlapi.model.OWLAnnotationProperty> annotationProperties, Map<String,String> options, Map<org.semanticweb.owlapi.model.IRI,org.semanticweb.owlapi.model.IRI> inputSourceMap) throws org.semanticweb.owlapi.model.OWLOntologyCreationException
Given an ontology, a set of upper-level IRIs, and a set of annotation properties, return a new ontology with just those terms and their named descendants, their subclass relations, and the selected annotations. The input ontology is not changed.- Parameters:
inputOntology
- the ontology to extract fromupperIRIs
- these terms and their descendants will be copiedannotationProperties
- the annotation properties to copy; if null, all will be copiedoptions
- map of optionsinputSourceMap
- map of source IRIs (or null)- Returns:
- a new ontology with the target terms and their named ancestors
- Throws:
org.semanticweb.owlapi.model.OWLOntologyCreationException
- on problems creating new ontology
-
getDescendants
@Deprecated public static org.semanticweb.owlapi.model.OWLOntology getDescendants(org.semanticweb.owlapi.model.OWLOntology inputOntology, Set<org.semanticweb.owlapi.model.IRI> upperIRIs, Set<org.semanticweb.owlapi.model.OWLAnnotationProperty> annotationProperties, boolean annotateSource, Map<org.semanticweb.owlapi.model.IRI,org.semanticweb.owlapi.model.IRI> sourceMap) throws org.semanticweb.owlapi.model.OWLOntologyCreationException
Deprecated.replaced bygetDescendants(OWLOntology, Set, Set, Map, Map)
Given an ontology, a set of upper-level IRIs, and a set of annotation properties, return a new ontology with just those terms and their named descendants, their subclass relations, and the selected annotations. The input ontology is not changed.- Parameters:
inputOntology
- the ontology to extract fromupperIRIs
- these terms and their descendants will be copiedannotationProperties
- the annotation properties to copy; if null, all will be copiedannotateSource
- if true, annotate copied classes with rdfs:isDefinedBysourceMap
- map of term IRI to source IRI- Returns:
- a new ontology with the target terms and their named ancestors
- Throws:
org.semanticweb.owlapi.model.OWLOntologyCreationException
- on problems creating new ontology
-
-