Class 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)
      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)
      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.
    • Constructor Detail

      • MireotOperation

        public MireotOperation()
    • 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 from
        upperIRIs - ancestors will be copied up to and including these terms
        lowerIRIs - copy these terms and their superclasses
        annotationProperties - 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 from
        upperIRIs - top level IRIs
        lowerIRIs - bottom level IRIs
        annotationProperties - annotation properties to copy, or null for all
        options - map of extract options or null
        inputSourceMap - 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
        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 from
        upperIRIs - ancestors will be copied up to and including these terms
        lowerIRIs - copy these terms and their superclasses
        annotationProperties - the annotation properties to copy; if null, all will be copied
        annotateSource - if true, annotate copied classes with rdfs:isDefinedBy
        sourceMap - 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 from
        upperIRIs - these terms and their descendants will be copied
        annotationProperties - 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 from
        upperIRIs - these terms and their descendants will be copied
        annotationProperties - the annotation properties to copy; if null, all will be copied
        options - map of options
        inputSourceMap - 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
        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 from
        upperIRIs - these terms and their descendants will be copied
        annotationProperties - the annotation properties to copy; if null, all will be copied
        annotateSource - if true, annotate copied classes with rdfs:isDefinedBy
        sourceMap - 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