owltools.graph
Class OWLGraphWrapper

java.lang.Object
  extended by owltools.graph.OWLGraphWrapper

public class OWLGraphWrapper
extends Object

Wraps one or more OWLOntology objects providing convenient OBO-like operations

Capabilities

Data model

An instance of an OWLGraphWrapper wraps one or more OWLOntology objects. One of these is designated the sourceOntology, the others are designated support ontologies (see getSourceOntology() and getSupportOntologySet()). The source ontology may import the support ontologies, but this is optional. Most OWLGraphWrapper methods operate over the union of the source ontology and support ontologies. This is particularly useful for working with OBO Library ontologies, where axioms connecting ontologies may be available as separate ontologies.

Graph operations

See owltools.graph

Fetching objects

This wrapper provides convenience methods for fetching objects by OBO-Style IDs, IRIs or by labels. Note that unlike the get* calls on OWLDataFactory objects, these only return an object if it has been declared in either the source ontology or a support ontology. See for example

OBO Metadata

OBO-style identifiers

This class accepts the use of OBO-Format style identifiers in some contexts, e.g. GO:0008150 See methods such as

Textual metadata

Documentation to follow....

Author:
cjm
See Also:
OWLGraphUtil

Nested Class Summary
 class OWLGraphWrapper.Config
          Configuration options.
static interface OWLGraphWrapper.ISynonym
           
static class OWLGraphWrapper.Synonym
           
 
Field Summary
static String DEFAULT_IRI_PREFIX
           
 Map<org.semanticweb.owlapi.model.OWLObject,Set<OWLGraphEdge>> inferredEdgeBySource
           
 
Constructor Summary
OWLGraphWrapper(org.semanticweb.owlapi.model.OWLOntology ontology)
          Create a new wrapper for an OWLOntology
OWLGraphWrapper(org.semanticweb.owlapi.model.OWLOntology ontology, boolean isMergeImportClosure)
          Deprecated.  
OWLGraphWrapper(String iri)
          creates a new OWLOntology as the source ontology
 
Method Summary
 OWLShuntGraph addAncestorsToShuntGraph(org.semanticweb.owlapi.model.OWLObject x, OWLShuntGraph g)
          Add a set of edges, as ancestors to x in OWLShuntGraph g.
 OWLShuntGraph addDirectDescendentsToShuntGraph(org.semanticweb.owlapi.model.OWLObject x, OWLShuntGraph g)
          Add a set of edges, as descendents to x in OWLShuntGraph g.
 void addImport(org.semanticweb.owlapi.model.OWLOntology extOnt)
          adds an imports declaration between the source ontology and extOnt
 void addImportsFromSupportOntologies()
           
 void addQueryOntology(org.semanticweb.owlapi.model.OWLOntology extOnt)
          Deprecated. 
 void addSupportOntologiesFromImportsClosure()
          Each ontology in the import closure of the source ontology is added to the list of support ontologies
 void addSupportOntologiesFromImportsClosure(boolean doForAllSupportOntologies)
          Each ontology in the import closure of the source ontology (and the import closure of each existing support ontology, if doForAllSupportOntologies is true) is added to the list of support ontologies
 void addSupportOntology(org.semanticweb.owlapi.model.OWLOntology o)
           
 void cacheEdges()
          caches full outgoing and incoming edges in general you should not need to call this directly; used internally by this class.
 OWLGraphEdge combineEdgePair(org.semanticweb.owlapi.model.OWLObject s, OWLGraphEdge ne, OWLGraphEdge extEdge, int nextDist)
          Composes two graph edges into a new edge, using axioms in the ontology to determine the correct composition For example, Edge(x,SUBCLASS_OF,y) * Edge(y,SUBCLASS_OF,z) yields Edge(x,SUBCLASS_OF,z) Note that property chains of length>2 are currently ignored
 org.semanticweb.owlapi.model.OWLObject edgeToTargetExpression(OWLGraphEdge e)
          pack/translate an edge (either asserted or a graph closure edge) into an OWL class expression according to the OWLGraph to OWLOntology translation rules.
 Set<org.semanticweb.owlapi.model.OWLOntology> getAllOntologies()
          in general application code need not call this - it is mostly used internally
 Set<org.semanticweb.owlapi.model.OWLObject> getAllOWLObjects()
          fetches all classes, individuals and object properties in all ontologies
 Set<String> getAllUsedSubsets()
          fetches all subset names that are used
 List<String> getAltIds(org.semanticweb.owlapi.model.OWLObject c)
          It returns the values of the alt_id tag
 Set<org.semanticweb.owlapi.model.OWLObject> getAncestors(org.semanticweb.owlapi.model.OWLObject x)
          returns all ancestors of an object.
 Set<org.semanticweb.owlapi.model.OWLObject> getAncestors(org.semanticweb.owlapi.model.OWLObject x, Set<org.semanticweb.owlapi.model.OWLPropertyExpression> overProps)
          returns all ancestors that can be reached over subclass or the specified set of relations
 Set<org.semanticweb.owlapi.model.OWLObject> getAncestorsReflexive(org.semanticweb.owlapi.model.OWLObject x)
           
 Set<org.semanticweb.owlapi.model.OWLObject> getAncestorsReflexive(org.semanticweb.owlapi.model.OWLObject x, Set<org.semanticweb.owlapi.model.OWLPropertyExpression> overProps)
           
 org.semanticweb.owlapi.model.OWLAnnotationProperty getAnnotationProperty(String tag)
          It translates a oboformat tag into an OWL annotation property
 String getAnnotationValue(org.semanticweb.owlapi.model.OWLObject c, org.semanticweb.owlapi.model.OWLAnnotationProperty lap)
          fetches the value of a single-valued annotation property for an OWLObject TODO: provide a flag that determines behavior in the case of >1 value
 List<String> getAnnotationValues(org.semanticweb.owlapi.model.OWLObject c, org.semanticweb.owlapi.model.OWLAnnotationProperty lap)
          gets the values of all annotation assertions to an OWLObject for a particular annotation property
 boolean getBuiltin(org.semanticweb.owlapi.model.OWLObject c)
          Deprecated. 
 String getComment(org.semanticweb.owlapi.model.OWLObject c)
          gets the value of rdfs:comment for an OWLObject
 Set<OWLGraphEdge> getCompleteEdgesBetween(org.semanticweb.owlapi.model.OWLObject s, org.semanticweb.owlapi.model.OWLObject t)
           
 Set<OWLGraphEdge> getCompleteOutgoingEdgesClosure(org.semanticweb.owlapi.model.OWLObject s)
          See getIncomingEdgesClosure(OWLObject s, boolean isComplete)
 OWLGraphWrapper.Config getConfig()
           
 List<String> getConsider(org.semanticweb.owlapi.model.OWLObject c)
          It returns the values of the consider tag.
 String getCreatedBy(org.semanticweb.owlapi.model.OWLObject c)
          It returns the value of the created_by tag
 org.semanticweb.owlapi.model.OWLDataFactory getDataFactory()
           
 String getDef(org.semanticweb.owlapi.model.OWLObject c)
          Gets the textual definition of an OWLObject assumes zero or one def It returns the definition text (encoded as def in obo format and IAO_0000115 annotation property in OWL format) of a class
 List<String> getDefXref(org.semanticweb.owlapi.model.OWLObject c)
          Get the definition xrefs (IAO_0000115)
 Set<org.semanticweb.owlapi.model.OWLObject> getDescendants(org.semanticweb.owlapi.model.OWLObject x)
          gets all descendants d of x, where d is reachable by any path.
 Set<org.semanticweb.owlapi.model.OWLObject> getDescendantsReflexive(org.semanticweb.owlapi.model.OWLObject x)
          gets all reflexive descendants d of x, where d is reachable by any path.
 String getDomain(org.semanticweb.owlapi.model.OWLObjectProperty prop)
          It returns the value of the domain tag
 String getEdgeLabel(OWLGraphEdge e)
          Get the human readable label for an edge.
 Set<OWLGraphEdge> getEdgesBetween(org.semanticweb.owlapi.model.OWLObject s, org.semanticweb.owlapi.model.OWLObject t)
           
 String getIdentifier(org.semanticweb.owlapi.model.IRI iriId)
          gets the OBO-style ID of the specified object.
 String getIdentifier(org.semanticweb.owlapi.model.OWLObject owlObject)
          gets the OBO-style ID of the specified object.
 Set<OWLGraphEdge> getIncomingEdges(org.semanticweb.owlapi.model.OWLObject t)
           
 Set<OWLGraphEdge> getIncomingEdgesClosure(org.semanticweb.owlapi.model.OWLObject t)
          gets all inferred edges coming in to the target edge for every s, if t is reachable from s, then include the inferred edge between s and t.
 Set<OWLGraphEdge> getIncomingEdgesClosure(org.semanticweb.owlapi.model.OWLObject t, boolean isComplete)
          As getIncomingEdgesClosure(OWLObject t), but allows the option of including 'complete' edge list.
 Set<org.semanticweb.owlapi.model.OWLObject> getIndividualDescendants(org.semanticweb.owlapi.model.OWLObject x)
          return all individuals i where x is reachable from i
 Set<OWLGraphEdge> getInstanceChainsFromClosure(org.semanticweb.owlapi.model.OWLClass c)
          Finds all edges between an instance i and he given class c.
 Set<org.semanticweb.owlapi.model.OWLIndividual> getInstancesFromClosure(org.semanticweb.owlapi.model.OWLClass c)
          Find all edges of the form [i INST c] in the graph closure.
 org.semanticweb.owlapi.model.IRI getIRIByIdentifier(String id)
           
 org.semanticweb.owlapi.model.IRI getIRIByLabel(String label)
          fetches an OWL IRI by rdfs:label
 org.semanticweb.owlapi.model.IRI getIRIByLabel(String label, boolean isEnforceUnivocal)
          fetches an OWL IRI by rdfs:label, optionally testing for uniqueness TODO: index labels.
 boolean getIsAnonymous(org.semanticweb.owlapi.model.OWLObject c)
          Deprecated. 
 boolean getIsAntiSymmetric(org.semanticweb.owlapi.model.OWLObject c)
          It returns the value of the is_anti_symmetric tag or IAO_0000427 annotation
 Map<String,String> getIsaPartofClosureMap(org.semanticweb.owlapi.model.OWLObject c)
          Return a overlaps with getIsaPartofLabelClosure and stuff in GafSolrDocumentLoader.
 List<String> getIsaPartofIDClosure(org.semanticweb.owlapi.model.OWLObject c)
          Return a overlaps with getIsaPartofLabelClosure and stuff in GafSolrDocumentLoader.
 List<String> getIsaPartofLabelClosure(org.semanticweb.owlapi.model.OWLObject c)
          Return a overlaps with getIsaPartofIDClosure and stuff in GafSolrDocumentLoader.
 boolean getIsCyclic(org.semanticweb.owlapi.model.OWLObject c)
          It returns the value of the is_cyclic tag
 boolean getIsFunctional(org.semanticweb.owlapi.model.OWLObjectProperty c)
          true if c is functional in the source ontology
 boolean getIsInverseFunctional(org.semanticweb.owlapi.model.OWLObjectProperty c)
           
 boolean getIsMetaTag(org.semanticweb.owlapi.model.OWLObject c)
          It returns the value of the is_metadata_tag tag.
 boolean getIsObsolete(org.semanticweb.owlapi.model.OWLObject c)
          It returns the value of the is-obsolete tag.
 String getIsObsoleteBinaryString(org.semanticweb.owlapi.model.OWLObject c)
          It returns the value of the is-obsolete tag.
 boolean getIsReflexive(org.semanticweb.owlapi.model.OWLObjectProperty c)
           
 boolean getIsSymmetric(org.semanticweb.owlapi.model.OWLObjectProperty c)
           
 boolean getIsTransitive(org.semanticweb.owlapi.model.OWLObjectProperty c)
          true if c is transitive in the source ontology
 String getLabel(org.semanticweb.owlapi.model.OWLObject c)
          fetches the rdfs:label for an OWLObject assumes zero or one rdfs:label
 String getLabelOrDisplayId(org.semanticweb.owlapi.model.OWLObject c)
           
 org.semanticweb.owlapi.model.OWLOntologyManager getManager()
           
 Set<org.semanticweb.owlapi.model.OWLObject> getNamedAncestors(org.semanticweb.owlapi.model.OWLObject x)
          Gets all ancestors that are OWLNamedObjects i.e.
 Set<org.semanticweb.owlapi.model.OWLObject> getNamedAncestorsReflexive(org.semanticweb.owlapi.model.OWLObject x)
           
 String getNamespace(org.semanticweb.owlapi.model.OWLObject c)
          It returns the value of the OBO-namespace tag Example: if the OWLObject is the GO class GO:0008150, this would return "biological_process"
 List<OWLGraphWrapper.ISynonym> getOBOSynonyms(org.semanticweb.owlapi.model.OWLObject c)
          It returns list of synonyms as encoded by OBO2OWL.
 List<String> getOBOSynonymStrings(org.semanticweb.owlapi.model.OWLObject c)
          It returns String Listof synonyms.
 org.semanticweb.owlapi.model.OWLOntology getOntology()
          Deprecated. 
 String getOntologyId()
          gets the OBO-style ID of the source ontology IRI.
 Set<OWLGraphEdge> getOutgoingEdges(org.semanticweb.owlapi.model.OWLObject cls)
          retrieves direct edges from a source to the direct **named** target e.g.
 Set<OWLGraphEdge> getOutgoingEdges(org.semanticweb.owlapi.model.OWLObject obj, boolean isClosure, boolean isReflexive)
           
 Set<OWLGraphEdge> getOutgoingEdgesClosure(org.semanticweb.owlapi.model.OWLObject s)
          Retrieves the graph closure originating from source.
 Set<OWLGraphEdge> getOutgoingEdgesClosure(org.semanticweb.owlapi.model.OWLObject s, boolean isComplete)
          See getIncomingEdgesClosure(OWLObject s, boolean isComplete)
 Set<OWLGraphEdge> getOutgoingEdgesClosureReflexive(org.semanticweb.owlapi.model.OWLObject s)
          as getOutgoingEdgesClosure(s), but also includes an identity edge
 org.semanticweb.owlapi.model.OWLAnnotationProperty getOWLAnnotationProperty(org.semanticweb.owlapi.model.IRI iri)
           
 org.semanticweb.owlapi.model.OWLClass getOWLClass(org.semanticweb.owlapi.model.IRI iri)
          Returns an OWLClass given an IRI the class must be declared in either the source ontology, or in a support ontology, otherwise null is returned
 org.semanticweb.owlapi.model.OWLClass getOWLClass(org.semanticweb.owlapi.model.OWLObject x)
           
 org.semanticweb.owlapi.model.OWLClass getOWLClass(String s)
          Returns an OWLClass given an IRI string the class must be declared in either the source ontology, or in a support ontology, otherwise null is returned
 org.semanticweb.owlapi.model.OWLClass getOWLClassByIdentifier(String id)
          Given an OBO-style ID, return the corresponding OWLClass, if it is declared - otherwise null
 Set<org.semanticweb.owlapi.model.OWLClass> getOWLClassesInSubset(String subset)
          given a subset name, find all OWLClasses assigned to that subset
 Set<OWLGraphEdge> getOWLGraphEdgeSubsumers(OWLGraphEdge e)
          generalizes over quantified properties
 Set<OWLGraphEdge> getOWLGraphEdgeSubsumers(OWLGraphEdge e, int i)
           
 org.semanticweb.owlapi.model.OWLNamedIndividual getOWLIndividual(org.semanticweb.owlapi.model.IRI iri)
          Returns an OWLNamedIndividual with this IRI if it has been declared in the source or support ontologies.
 org.semanticweb.owlapi.model.OWLNamedIndividual getOWLIndividual(String s)
           
 org.semanticweb.owlapi.model.OWLNamedIndividual getOWLIndividualByIdentifier(String id)
          Given an OBO-style ID, return the corresponding OWLNamedIndividual, if it is declared - otherwise null
 org.semanticweb.owlapi.model.OWLObject getOWLObject(org.semanticweb.owlapi.model.IRI s)
          Returns the OWLObject with this IRI Must have been declared in one of the ontologies Currently OWLObject must be one of OWLClass, OWLObjectProperty or OWLNamedIndividual If the ontology employs punning and there different entities with the same IRI, then the order of precedence is OWLClass then OWLObjectProperty then OWLNamedIndividual
 org.semanticweb.owlapi.model.OWLObject getOWLObject(String s)
          Returns the OWLObject with this IRI (where IRI is specified as a string - e.g http://purl.obolibrary.org/obo/GO_0008150)
 org.semanticweb.owlapi.model.OWLObject getOWLObjectByIdentifier(String id)
          Given an OBO-style ID, return the corresponding OWLObject, if it is declared - otherwise null
 org.semanticweb.owlapi.model.OWLObject getOWLObjectByLabel(String label)
          fetches an OWL Object by rdfs:label if there is >1 match, return the first one encountered
 org.semanticweb.owlapi.model.OWLObjectProperty getOWLObjectProperty(org.semanticweb.owlapi.model.IRI iri)
           
 org.semanticweb.owlapi.model.OWLObjectProperty getOWLObjectProperty(String iri)
          Returns the OWLObjectProperty with this IRI Must have been declared in one of the ontologies
 org.semanticweb.owlapi.model.OWLObjectProperty getOWLObjectPropertyByIdentifier(String id)
          Given an OBO-style ID, return the corresponding OWLObjectProperty, if it is declared - otherwise null
 Set<org.semanticweb.owlapi.model.OWLObject> getOWLObjectsInSubset(String subset)
          given a subset name, find all OWLObjects (typically OWLClasses) assigned to that subset
 Set<OWLGraphEdge> getPrimitiveIncomingEdges(org.semanticweb.owlapi.model.OWLObject t)
           
 Set<OWLGraphEdge> getPrimitiveOutgoingEdges(org.semanticweb.owlapi.model.OWLObject s)
          primitive edges connect any combination of named objects and expressions e.g.
 Profiler getProfiler()
           
 String getRange(org.semanticweb.owlapi.model.OWLObjectProperty prop)
          It returns the value of the range tag
 org.semanticweb.owlapi.reasoner.OWLReasoner getReasoner()
           
 List<String> getReplacedBy(org.semanticweb.owlapi.model.OWLObject c)
          It returns the values of the replaced_by tag or IAO_0100001 annotation.
 OWLShuntGraph getSegmentShuntGraph(org.semanticweb.owlapi.model.OWLObject x)
          Gets all ancestors and direct descendents (distance == 1) that are OWLNamedObjects.
 String getSegmentShuntGraphJSON(org.semanticweb.owlapi.model.OWLObject x)
          Return a JSONized version of the output of getSegmentShuntGraph
 org.semanticweb.owlapi.model.OWLOntology getSourceOntology()
          Every OWLGraphWrapper objects wraps zero or one source ontologies.
 String[] getSubClassesNames(org.semanticweb.owlapi.model.OWLClass cls)
          Deprecated. 
 List<String> getSubsets(org.semanticweb.owlapi.model.OWLObject c)
          It returns the value of the subset tag.
 Set<org.semanticweb.owlapi.model.OWLObject> getSubsumersFromClosure(org.semanticweb.owlapi.model.OWLObject s)
          find the set of classes or class expressions subsuming source, using the graph closure.
 Set<org.semanticweb.owlapi.model.OWLObjectPropertyExpression> getSuperPropertiesOf(org.semanticweb.owlapi.model.OWLObjectPropertyExpression p)
          returns parent properties of p in all ontologies
 Set<org.semanticweb.owlapi.model.OWLObjectPropertyExpression> getSuperPropertyClosureOf(org.semanticweb.owlapi.model.OWLObjectPropertyExpression p)
           
 Set<org.semanticweb.owlapi.model.OWLObjectPropertyExpression> getSuperPropertyReflexiveClosureOf(org.semanticweb.owlapi.model.OWLObjectPropertyExpression p)
           
 Set<org.semanticweb.owlapi.model.OWLOntology> getSupportOntologySet()
          all operations are over a set of ontologies - the source ontology plus any number of supporting ontologies.
 String[] getSynonymStrings(org.semanticweb.owlapi.model.OWLObject c)
          Deprecated. 
 List<String> getXref(org.semanticweb.owlapi.model.OWLObject c)
          get the values of of the obo xref tag
 boolean isExcludeEdge(OWLGraphEdge edge)
           
 boolean isObsolete(org.semanticweb.owlapi.model.OWLObject c)
          tests if an OWLObject has been declared obsolete in the source ontology
 void mergeImportClosure()
          note: may move to mooncat
 void mergeImportClosure(boolean isRemovedImportsDeclarations)
           
 void mergeOntology(org.semanticweb.owlapi.model.OWLOntology extOnt)
          Adds all axioms from extOnt into source ontology
 void mergeOntology(org.semanticweb.owlapi.model.OWLOntology extOnt, boolean isRemoveFromSupportList)
           
 void mergeSupportOntology(String ontologyIRI)
           
 void mergeSupportOntology(String ontologyIRI, boolean isRemoveFromSupportList)
           
 Set<org.semanticweb.owlapi.model.OWLObject> queryDescendants(org.semanticweb.owlapi.model.OWLClassExpression t)
          Performs a closed-world query using a DL expression as a set of boolean database-style constraints.
 Set<org.semanticweb.owlapi.model.OWLObject> queryDescendants(org.semanticweb.owlapi.model.OWLClassExpression t, boolean isInstances, boolean isClasses)
           
 Set<org.semanticweb.owlapi.model.OWLObject> queryDescendants(OWLGraphEdge e)
          Treats an edge as a path and performs a query.
 void remakeOntologiesFromImportsClosure()
           
 void remakeOntologiesFromImportsClosure(org.semanticweb.owlapi.model.IRI ontologyIRI)
           
 void removeSupportOntology(org.semanticweb.owlapi.model.OWLOntology o)
           
 void setConfig(OWLGraphWrapper.Config config)
           
 void setOntology(org.semanticweb.owlapi.model.OWLOntology ontology)
          Deprecated. 
 void setProfiler(Profiler profiler)
           
 void setReasoner(org.semanticweb.owlapi.reasoner.OWLReasoner reasoner)
           
 void setSourceOntology(org.semanticweb.owlapi.model.OWLOntology sourceOntology)
           
 void setSupportOntologySet(Set<org.semanticweb.owlapi.model.OWLOntology> supportOntologySet)
           
 void useImportClosureForQueries()
          Deprecated. 
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_IRI_PREFIX

public static final String DEFAULT_IRI_PREFIX
See Also:
Constant Field Values

inferredEdgeBySource

public Map<org.semanticweb.owlapi.model.OWLObject,Set<OWLGraphEdge>> inferredEdgeBySource
Constructor Detail

OWLGraphWrapper

public OWLGraphWrapper(org.semanticweb.owlapi.model.OWLOntology ontology)
                throws org.semanticweb.owlapi.model.UnknownOWLOntologyException,
                       org.semanticweb.owlapi.model.OWLOntologyCreationException
Create a new wrapper for an OWLOntology

Parameters:
ontology -
Throws:
org.semanticweb.owlapi.model.OWLOntologyCreationException
org.semanticweb.owlapi.model.UnknownOWLOntologyException

OWLGraphWrapper

@Deprecated
public OWLGraphWrapper(org.semanticweb.owlapi.model.OWLOntology ontology,
                                  boolean isMergeImportClosure)
                throws org.semanticweb.owlapi.model.UnknownOWLOntologyException,
                       org.semanticweb.owlapi.model.OWLOntologyCreationException
Deprecated. 

Create a new wrapper for an OWLOntology

Parameters:
ontology -
isMergeImportClosure -
Throws:
org.semanticweb.owlapi.model.UnknownOWLOntologyException
org.semanticweb.owlapi.model.OWLOntologyCreationException

OWLGraphWrapper

public OWLGraphWrapper(String iri)
                throws org.semanticweb.owlapi.model.OWLOntologyCreationException
creates a new OWLOntology as the source ontology

Parameters:
iri -
Throws:
org.semanticweb.owlapi.model.OWLOntologyCreationException
Method Detail

addImport

public void addImport(org.semanticweb.owlapi.model.OWLOntology extOnt)
adds an imports declaration between the source ontology and extOnt

Parameters:
extOnt -

useImportClosureForQueries

@Deprecated
public void useImportClosureForQueries()
                                throws org.semanticweb.owlapi.model.UnknownOWLOntologyException,
                                       org.semanticweb.owlapi.model.OWLOntologyCreationException
Deprecated. 

if called, copies all axioms from import closure into query ontology.

Throws:
org.semanticweb.owlapi.model.UnknownOWLOntologyException
org.semanticweb.owlapi.model.OWLOntologyCreationException

addQueryOntology

@Deprecated
public void addQueryOntology(org.semanticweb.owlapi.model.OWLOntology extOnt)
                      throws org.semanticweb.owlapi.model.OWLOntologyCreationException
Deprecated. 

Throws:
org.semanticweb.owlapi.model.OWLOntologyCreationException

mergeOntology

public void mergeOntology(org.semanticweb.owlapi.model.OWLOntology extOnt)
                   throws org.semanticweb.owlapi.model.OWLOntologyCreationException
Adds all axioms from extOnt into source ontology

Parameters:
extOnt -
Throws:
org.semanticweb.owlapi.model.OWLOntologyCreationException

mergeOntology

public void mergeOntology(org.semanticweb.owlapi.model.OWLOntology extOnt,
                          boolean isRemoveFromSupportList)
                   throws org.semanticweb.owlapi.model.OWLOntologyCreationException
Throws:
org.semanticweb.owlapi.model.OWLOntologyCreationException

mergeSupportOntology

public void mergeSupportOntology(String ontologyIRI,
                                 boolean isRemoveFromSupportList)
                          throws org.semanticweb.owlapi.model.OWLOntologyCreationException
Throws:
org.semanticweb.owlapi.model.OWLOntologyCreationException

mergeSupportOntology

public void mergeSupportOntology(String ontologyIRI)
                          throws org.semanticweb.owlapi.model.OWLOntologyCreationException
Throws:
org.semanticweb.owlapi.model.OWLOntologyCreationException

getOntology

@Deprecated
public org.semanticweb.owlapi.model.OWLOntology getOntology()
Deprecated. 


setOntology

@Deprecated
public void setOntology(org.semanticweb.owlapi.model.OWLOntology ontology)
Deprecated. 


getSourceOntology

public org.semanticweb.owlapi.model.OWLOntology getSourceOntology()
Every OWLGraphWrapper objects wraps zero or one source ontologies.

Returns:
ontology

setSourceOntology

public void setSourceOntology(org.semanticweb.owlapi.model.OWLOntology sourceOntology)

getProfiler

public Profiler getProfiler()

setProfiler

public void setProfiler(Profiler profiler)

getReasoner

public org.semanticweb.owlapi.reasoner.OWLReasoner getReasoner()

setReasoner

public void setReasoner(org.semanticweb.owlapi.reasoner.OWLReasoner reasoner)
Parameters:
reasoner -

getSupportOntologySet

public Set<org.semanticweb.owlapi.model.OWLOntology> getSupportOntologySet()
all operations are over a set of ontologies - the source ontology plus any number of supporting ontologies. The supporting ontologies may be drawn from the imports closure of the source ontology, although this need not be the case.

Returns:
set of support ontologies

setSupportOntologySet

public void setSupportOntologySet(Set<org.semanticweb.owlapi.model.OWLOntology> supportOntologySet)

addSupportOntology

public void addSupportOntology(org.semanticweb.owlapi.model.OWLOntology o)

removeSupportOntology

public void removeSupportOntology(org.semanticweb.owlapi.model.OWLOntology o)

addSupportOntologiesFromImportsClosure

public void addSupportOntologiesFromImportsClosure()
Each ontology in the import closure of the source ontology is added to the list of support ontologies


addSupportOntologiesFromImportsClosure

public void addSupportOntologiesFromImportsClosure(boolean doForAllSupportOntologies)
Each ontology in the import closure of the source ontology (and the import closure of each existing support ontology, if doForAllSupportOntologies is true) is added to the list of support ontologies

Parameters:
doForAllSupportOntologies -

addImportsFromSupportOntologies

public void addImportsFromSupportOntologies()

remakeOntologiesFromImportsClosure

public void remakeOntologiesFromImportsClosure()
                                        throws org.semanticweb.owlapi.model.OWLOntologyCreationException
Throws:
org.semanticweb.owlapi.model.OWLOntologyCreationException

remakeOntologiesFromImportsClosure

public void remakeOntologiesFromImportsClosure(org.semanticweb.owlapi.model.IRI ontologyIRI)
                                        throws org.semanticweb.owlapi.model.OWLOntologyCreationException
Throws:
org.semanticweb.owlapi.model.OWLOntologyCreationException

mergeImportClosure

public void mergeImportClosure()
                        throws org.semanticweb.owlapi.model.OWLOntologyCreationException
note: may move to mooncat

Throws:
org.semanticweb.owlapi.model.OWLOntologyCreationException

mergeImportClosure

public void mergeImportClosure(boolean isRemovedImportsDeclarations)
                        throws org.semanticweb.owlapi.model.OWLOntologyCreationException
Throws:
org.semanticweb.owlapi.model.OWLOntologyCreationException

getAllOntologies

public Set<org.semanticweb.owlapi.model.OWLOntology> getAllOntologies()
in general application code need not call this - it is mostly used internally

Returns:
union of source ontology plus all supporting ontologies

getDataFactory

public org.semanticweb.owlapi.model.OWLDataFactory getDataFactory()

getManager

public org.semanticweb.owlapi.model.OWLOntologyManager getManager()

getConfig

public OWLGraphWrapper.Config getConfig()

setConfig

public void setConfig(OWLGraphWrapper.Config config)

getOutgoingEdges

public Set<OWLGraphEdge> getOutgoingEdges(org.semanticweb.owlapi.model.OWLObject cls)
retrieves direct edges from a source to the direct **named** target e.g. if (A SubClassOf B) then outgoing(A) = { } e.g. if (A SubClassOf R some B) then outgoing(A) = { } e.g. if (A SubClassOf R some (R2 some B)) then outgoing(A) = { }

Parameters:
cls - source
Returns:
all edges that originate from source to nearest named object target

getOutgoingEdges

public Set<OWLGraphEdge> getOutgoingEdges(org.semanticweb.owlapi.model.OWLObject obj,
                                          boolean isClosure,
                                          boolean isReflexive)

getPrimitiveOutgoingEdges

public Set<OWLGraphEdge> getPrimitiveOutgoingEdges(org.semanticweb.owlapi.model.OWLObject s)
primitive edges connect any combination of named objects and expressions e.g. (A SubClassOf R some B) => ,

Parameters:
s - source
Returns:
set of OWLGraphEdge

isExcludeEdge

public boolean isExcludeEdge(OWLGraphEdge edge)

cacheEdges

public void cacheEdges()
caches full outgoing and incoming edges in general you should not need to call this directly; used internally by this class.


getIncomingEdges

public Set<OWLGraphEdge> getIncomingEdges(org.semanticweb.owlapi.model.OWLObject t)
Parameters:
t -
Returns:
all edges that have t as a direct target

getPrimitiveIncomingEdges

public Set<OWLGraphEdge> getPrimitiveIncomingEdges(org.semanticweb.owlapi.model.OWLObject t)

edgeToTargetExpression

public org.semanticweb.owlapi.model.OWLObject edgeToTargetExpression(OWLGraphEdge e)
pack/translate an edge (either asserted or a graph closure edge) into an OWL class expression according to the OWLGraph to OWLOntology translation rules. (this is the reverse translation of the one from an OWLOntology to an OWLGraph) e.g. after calling for the graph closure of an OWLClass a, we may get back an edge . after feeding this edge into this method we obtain the expression part_of some (adjacent_to some (has_part some b))

Parameters:
e - edge
Returns:
class expression equivalent to edge

getOutgoingEdgesClosure

public Set<OWLGraphEdge> getOutgoingEdgesClosure(org.semanticweb.owlapi.model.OWLObject s)
Retrieves the graph closure originating from source. E.g. if A SubClassOf R some B & B SubClassOf S some C, then closure(A) = { , . Composition rules are used to compact the list of connecting edge labels (e.g. transitivity). The resulting edges can be translated into class expressions using method edgeToTargetExpression(e). E.g. in the above the expression would be R some (S some C)

Parameters:
s - source
Returns:
closure of edges originating from source

getOutgoingEdgesClosureReflexive

public Set<OWLGraphEdge> getOutgoingEdgesClosureReflexive(org.semanticweb.owlapi.model.OWLObject s)
as getOutgoingEdgesClosure(s), but also includes an identity edge

Parameters:
s -
Returns:
set of OWLGraphEdge

getSubsumersFromClosure

public Set<org.semanticweb.owlapi.model.OWLObject> getSubsumersFromClosure(org.semanticweb.owlapi.model.OWLObject s)
find the set of classes or class expressions subsuming source, using the graph closure. this is just the composition of getOutgoingEdgesClosure and edgeToTargetExpression -- the latter method "packs" a chain of edges into a class expression only "linear" expressions are found, corresponding to a path in the graph. e.g. [sub,part_of-some,develops_from-some] ==> part_of some (develops_from some t) if the edge consists entirely of subclass links, the the subsumers will be all named classes.

Parameters:
s - source
Returns:
set of OWLObject

getOutgoingEdgesClosure

public Set<OWLGraphEdge> getOutgoingEdgesClosure(org.semanticweb.owlapi.model.OWLObject s,
                                                 boolean isComplete)
See getIncomingEdgesClosure(OWLObject s, boolean isComplete)

Parameters:
s -
isComplete -
Returns:
set of edges

getCompleteOutgoingEdgesClosure

public Set<OWLGraphEdge> getCompleteOutgoingEdgesClosure(org.semanticweb.owlapi.model.OWLObject s)
See getIncomingEdgesClosure(OWLObject s, boolean isComplete)

Parameters:
s -
Returns:
set of edges, never null

queryDescendants

public Set<org.semanticweb.owlapi.model.OWLObject> queryDescendants(OWLGraphEdge e)
Treats an edge as a path and performs a query. E.g will be treated as the class expression R SOME (S SOME y)

Parameters:
e -
Returns:
set of OWLObject, never null

queryDescendants

public Set<org.semanticweb.owlapi.model.OWLObject> queryDescendants(org.semanticweb.owlapi.model.OWLClassExpression t)
Performs a closed-world query using a DL expression as a set of boolean database-style constraints. No attempt is made to optimize the query. The engine is incomplete and currently ontology implements queries for constructs that use AND, OR, SOME

Parameters:
t - classExpression
Returns:
set of descendants

queryDescendants

public Set<org.semanticweb.owlapi.model.OWLObject> queryDescendants(org.semanticweb.owlapi.model.OWLClassExpression t,
                                                                    boolean isInstances,
                                                                    boolean isClasses)

getEdgesBetween

public Set<OWLGraphEdge> getEdgesBetween(org.semanticweb.owlapi.model.OWLObject s,
                                         org.semanticweb.owlapi.model.OWLObject t)
Parameters:
s - source
t - target
Returns:
all edges connecting source and target in the graph closure

getCompleteEdgesBetween

public Set<OWLGraphEdge> getCompleteEdgesBetween(org.semanticweb.owlapi.model.OWLObject s,
                                                 org.semanticweb.owlapi.model.OWLObject t)

getAncestors

public Set<org.semanticweb.owlapi.model.OWLObject> getAncestors(org.semanticweb.owlapi.model.OWLObject x)
returns all ancestors of an object. Here, ancestors is defined as any named object that can be reached from x over some path of asserted edges. relations are ignored.

Parameters:
x - source
Returns:
all reachable target nodes, regardless of edges

getAncestors

public Set<org.semanticweb.owlapi.model.OWLObject> getAncestors(org.semanticweb.owlapi.model.OWLObject x,
                                                                Set<org.semanticweb.owlapi.model.OWLPropertyExpression> overProps)
returns all ancestors that can be reached over subclass or the specified set of relations

Parameters:
x - the sourceObject
overProps -
Returns:
set of ancestors

getAncestorsReflexive

public Set<org.semanticweb.owlapi.model.OWLObject> getAncestorsReflexive(org.semanticweb.owlapi.model.OWLObject x)

getAncestorsReflexive

public Set<org.semanticweb.owlapi.model.OWLObject> getAncestorsReflexive(org.semanticweb.owlapi.model.OWLObject x,
                                                                         Set<org.semanticweb.owlapi.model.OWLPropertyExpression> overProps)

getNamedAncestors

public Set<org.semanticweb.owlapi.model.OWLObject> getNamedAncestors(org.semanticweb.owlapi.model.OWLObject x)
Gets all ancestors that are OWLNamedObjects i.e. excludes anonymous class expressions

Parameters:
x -
Returns:
set of named ancestors

getNamedAncestorsReflexive

public Set<org.semanticweb.owlapi.model.OWLObject> getNamedAncestorsReflexive(org.semanticweb.owlapi.model.OWLObject x)

getEdgeLabel

public String getEdgeLabel(OWLGraphEdge e)
Get the human readable label for an edge. Intended for use for things like the GO.

Parameters:
e -
Returns:
either the human readable edge label or null if none could be found

addAncestorsToShuntGraph

public OWLShuntGraph addAncestorsToShuntGraph(org.semanticweb.owlapi.model.OWLObject x,
                                              OWLShuntGraph g)
Add a set of edges, as ancestors to x in OWLShuntGraph g. This is reflexive.

Parameters:
s -
x -
g -
Returns:
the modified OWLShuntGraph

addDirectDescendentsToShuntGraph

public OWLShuntGraph addDirectDescendentsToShuntGraph(org.semanticweb.owlapi.model.OWLObject x,
                                                      OWLShuntGraph g)
Add a set of edges, as descendents to x in OWLShuntGraph g. This is reflexive.

Parameters:
s -
x -
g -
Returns:
the modified OWLShuntGraph

getSegmentShuntGraph

public OWLShuntGraph getSegmentShuntGraph(org.semanticweb.owlapi.model.OWLObject x)
Gets all ancestors and direct descendents (distance == 1) that are OWLNamedObjects. i.e. excludes anonymous class expressions TODO: we're current just doing distance == 1 up; we'll want to have a more full graph in the future TODO: a work in progress

Parameters:
x -
Returns:
set of named ancestors and direct descendents

getSegmentShuntGraphJSON

public String getSegmentShuntGraphJSON(org.semanticweb.owlapi.model.OWLObject x)
Return a JSONized version of the output of getSegmentShuntGraph

Parameters:
x -
Returns:
String representing part of the OWL graph

getDescendants

public Set<org.semanticweb.owlapi.model.OWLObject> getDescendants(org.semanticweb.owlapi.model.OWLObject x)
gets all descendants d of x, where d is reachable by any path. Excludes self

Parameters:
x -
Returns:
descendant objects
See Also:
getAncestors(org.semanticweb.owlapi.model.OWLObject), owltools.graph

getDescendantsReflexive

public Set<org.semanticweb.owlapi.model.OWLObject> getDescendantsReflexive(org.semanticweb.owlapi.model.OWLObject x)
gets all reflexive descendants d of x, where d is reachable by any path. Includes self

Parameters:
x -
Returns:
descendant objects plus x
See Also:
getAncestors(org.semanticweb.owlapi.model.OWLObject), owltools.graph

getIndividualDescendants

public Set<org.semanticweb.owlapi.model.OWLObject> getIndividualDescendants(org.semanticweb.owlapi.model.OWLObject x)
return all individuals i where x is reachable from i

Parameters:
x -
Returns:
set of individual OWLObjects

getIncomingEdgesClosure

public Set<OWLGraphEdge> getIncomingEdgesClosure(org.semanticweb.owlapi.model.OWLObject t,
                                                 boolean isComplete)
As getIncomingEdgesClosure(OWLObject t), but allows the option of including 'complete' edge list. A complete edge list also includes redundant subsuming paths. E.g if there is a path and R' and S' are super-properties of R and S, then there will also be a path The default is false, i.e. if the more specific path exists, only it will be returned

Parameters:
t -
isComplete -
Returns:
set of edges

getIncomingEdgesClosure

public Set<OWLGraphEdge> getIncomingEdgesClosure(org.semanticweb.owlapi.model.OWLObject t)
gets all inferred edges coming in to the target edge for every s, if t is reachable from s, then include the inferred edge between s and t.

Parameters:
t - target
Returns:
all edges connecting all descendants of target to target
See Also:
getOutgoingEdgesClosure(org.semanticweb.owlapi.model.OWLObject)

combineEdgePair

public OWLGraphEdge combineEdgePair(org.semanticweb.owlapi.model.OWLObject s,
                                    OWLGraphEdge ne,
                                    OWLGraphEdge extEdge,
                                    int nextDist)
Composes two graph edges into a new edge, using axioms in the ontology to determine the correct composition For example, Edge(x,SUBCLASS_OF,y) * Edge(y,SUBCLASS_OF,z) yields Edge(x,SUBCLASS_OF,z) Note that property chains of length>2 are currently ignored

Parameters:
s - - source node
ne - - edge 1
extEdge - - edge 2
nextDist - - new distance
Returns:
edge

getInstancesFromClosure

public Set<org.semanticweb.owlapi.model.OWLIndividual> getInstancesFromClosure(org.semanticweb.owlapi.model.OWLClass c)
Find all edges of the form [i INST c] in the graph closure. (this includes both direct assertions, plus assertions to objects that link to c via a chain of SubClassOf assertions) the semantics are the same as inferred ClassAssertion axioms

Parameters:
c - owlClass
Returns:
all individuals classified here via basic graph traversal

getInstanceChainsFromClosure

public Set<OWLGraphEdge> getInstanceChainsFromClosure(org.semanticweb.owlapi.model.OWLClass c)
Finds all edges between an instance i and he given class c. this includes inferred class assertions, as well as chains such as i has_part j, j inst_of k, k part_of some c

Parameters:
c - owlClass
Returns:
all edges in closure between an instance and owlClass

getAllOWLObjects

public Set<org.semanticweb.owlapi.model.OWLObject> getAllOWLObjects()
fetches all classes, individuals and object properties in all ontologies

Returns:
all named objects

getLabel

public String getLabel(org.semanticweb.owlapi.model.OWLObject c)
fetches the rdfs:label for an OWLObject assumes zero or one rdfs:label

Parameters:
c -
Returns:
label

getLabelOrDisplayId

public String getLabelOrDisplayId(org.semanticweb.owlapi.model.OWLObject c)

isObsolete

public boolean isObsolete(org.semanticweb.owlapi.model.OWLObject c)
tests if an OWLObject has been declared obsolete in the source ontology

Parameters:
c -
Returns:
boolean

getComment

public String getComment(org.semanticweb.owlapi.model.OWLObject c)
gets the value of rdfs:comment for an OWLObject

Parameters:
c -
Returns:
comment of null

getAnnotationValue

public String getAnnotationValue(org.semanticweb.owlapi.model.OWLObject c,
                                 org.semanticweb.owlapi.model.OWLAnnotationProperty lap)
fetches the value of a single-valued annotation property for an OWLObject TODO: provide a flag that determines behavior in the case of >1 value

Parameters:
c -
lap -
Returns:
value

getAnnotationValues

public List<String> getAnnotationValues(org.semanticweb.owlapi.model.OWLObject c,
                                        org.semanticweb.owlapi.model.OWLAnnotationProperty lap)
gets the values of all annotation assertions to an OWLObject for a particular annotation property

Parameters:
c -
lap -
Returns:
list of values or null

getDef

public String getDef(org.semanticweb.owlapi.model.OWLObject c)
Gets the textual definition of an OWLObject assumes zero or one def It returns the definition text (encoded as def in obo format and IAO_0000115 annotation property in OWL format) of a class

Parameters:
c -
Returns:
definition

getIsMetaTag

public boolean getIsMetaTag(org.semanticweb.owlapi.model.OWLObject c)
It returns the value of the is_metadata_tag tag.

Parameters:
c - could OWLClass or OWLObjectProperty
Returns:
boolean

getSubsets

public List<String> getSubsets(org.semanticweb.owlapi.model.OWLObject c)
It returns the value of the subset tag.

Parameters:
c - could OWLClass or OWLObjectProperty
Returns:
values

getAllUsedSubsets

public Set<String> getAllUsedSubsets()
fetches all subset names that are used

Returns:
all subsets used in source ontology

getOWLObjectsInSubset

public Set<org.semanticweb.owlapi.model.OWLObject> getOWLObjectsInSubset(String subset)
given a subset name, find all OWLObjects (typically OWLClasses) assigned to that subset

Parameters:
subset -
Returns:
set of OWLObject

getOWLClassesInSubset

public Set<org.semanticweb.owlapi.model.OWLClass> getOWLClassesInSubset(String subset)
given a subset name, find all OWLClasses assigned to that subset

Parameters:
subset -
Returns:
set of OWLClass

getDomain

public String getDomain(org.semanticweb.owlapi.model.OWLObjectProperty prop)
It returns the value of the domain tag

Parameters:
prop -
Returns:
domain string or null

getRange

public String getRange(org.semanticweb.owlapi.model.OWLObjectProperty prop)
It returns the value of the range tag

Parameters:
prop -
Returns:
range or null

getReplacedBy

public List<String> getReplacedBy(org.semanticweb.owlapi.model.OWLObject c)
It returns the values of the replaced_by tag or IAO_0100001 annotation.

Parameters:
c - could OWLClass or OWLObjectProperty
Returns:
list of values

getConsider

public List<String> getConsider(org.semanticweb.owlapi.model.OWLObject c)
It returns the values of the consider tag.

Parameters:
c - could OWLClass or OWLObjectProperty
Returns:
list of values

getIsObsolete

public boolean getIsObsolete(org.semanticweb.owlapi.model.OWLObject c)
It returns the value of the is-obsolete tag.

Parameters:
c - could OWLClass or OWLObjectProperty
Returns:
boolean

getIsObsoleteBinaryString

public String getIsObsoleteBinaryString(org.semanticweb.owlapi.model.OWLObject c)
It returns the value of the is-obsolete tag.

Parameters:
c - could OWLClass or OWLObjectProperty
Returns:
String

getAltIds

public List<String> getAltIds(org.semanticweb.owlapi.model.OWLObject c)
It returns the values of the alt_id tag

Parameters:
c -
Returns:
list of identifiers

getBuiltin

@Deprecated
public boolean getBuiltin(org.semanticweb.owlapi.model.OWLObject c)
Deprecated. 

It returns the value of the builtin tag

Parameters:
c -
Returns:
boolean

getIsAnonymous

@Deprecated
public boolean getIsAnonymous(org.semanticweb.owlapi.model.OWLObject c)
Deprecated. 

It returns the value of the is_anonymous tag

Parameters:
c -
Returns:
boolean

getAnnotationProperty

public org.semanticweb.owlapi.model.OWLAnnotationProperty getAnnotationProperty(String tag)
It translates a oboformat tag into an OWL annotation property

Parameters:
tag -
Returns:
OWLAnnotationProperty

getNamespace

public String getNamespace(org.semanticweb.owlapi.model.OWLObject c)
It returns the value of the OBO-namespace tag Example: if the OWLObject is the GO class GO:0008150, this would return "biological_process"

Parameters:
c -
Returns:
namespace

getCreatedBy

public String getCreatedBy(org.semanticweb.owlapi.model.OWLObject c)
It returns the value of the created_by tag

Parameters:
c -
Returns:
value or null

getIsAntiSymmetric

public boolean getIsAntiSymmetric(org.semanticweb.owlapi.model.OWLObject c)
It returns the value of the is_anti_symmetric tag or IAO_0000427 annotation

Parameters:
c -
Returns:
boolean

getIsCyclic

public boolean getIsCyclic(org.semanticweb.owlapi.model.OWLObject c)
It returns the value of the is_cyclic tag

Parameters:
c -
Returns:
boolean

getIsTransitive

public boolean getIsTransitive(org.semanticweb.owlapi.model.OWLObjectProperty c)
true if c is transitive in the source ontology

Parameters:
c -
Returns:
boolean

getIsFunctional

public boolean getIsFunctional(org.semanticweb.owlapi.model.OWLObjectProperty c)
true if c is functional in the source ontology

Parameters:
c -
Returns:
boolean

getIsInverseFunctional

public boolean getIsInverseFunctional(org.semanticweb.owlapi.model.OWLObjectProperty c)

getIsReflexive

public boolean getIsReflexive(org.semanticweb.owlapi.model.OWLObjectProperty c)

getIsSymmetric

public boolean getIsSymmetric(org.semanticweb.owlapi.model.OWLObjectProperty c)

getSuperPropertiesOf

public Set<org.semanticweb.owlapi.model.OWLObjectPropertyExpression> getSuperPropertiesOf(org.semanticweb.owlapi.model.OWLObjectPropertyExpression p)
returns parent properties of p in all ontologies

Parameters:
p -
Returns:
set of properties

getSuperPropertyClosureOf

public Set<org.semanticweb.owlapi.model.OWLObjectPropertyExpression> getSuperPropertyClosureOf(org.semanticweb.owlapi.model.OWLObjectPropertyExpression p)

getSuperPropertyReflexiveClosureOf

public Set<org.semanticweb.owlapi.model.OWLObjectPropertyExpression> getSuperPropertyReflexiveClosureOf(org.semanticweb.owlapi.model.OWLObjectPropertyExpression p)

getOWLGraphEdgeSubsumers

public Set<OWLGraphEdge> getOWLGraphEdgeSubsumers(OWLGraphEdge e)
generalizes over quantified properties

Parameters:
e -
Returns:
set of edges

getOWLGraphEdgeSubsumers

public Set<OWLGraphEdge> getOWLGraphEdgeSubsumers(OWLGraphEdge e,
                                                  int i)

getXref

public List<String> getXref(org.semanticweb.owlapi.model.OWLObject c)
get the values of of the obo xref tag

Parameters:
c -
Returns:
It returns null if no xref annotation is found.

getDefXref

public List<String> getDefXref(org.semanticweb.owlapi.model.OWLObject c)
Get the definition xrefs (IAO_0000115)

Parameters:
c -
Returns:
list of definition xrefs

getIsaPartofClosureMap

public Map<String,String> getIsaPartofClosureMap(org.semanticweb.owlapi.model.OWLObject c)
Return a overlaps with getIsaPartofLabelClosure and stuff in GafSolrDocumentLoader. Intended for GOlr loading.

Parameters:
c -
Returns:
list of is_partof_closure ids

getIsaPartofIDClosure

public List<String> getIsaPartofIDClosure(org.semanticweb.owlapi.model.OWLObject c)
Return a overlaps with getIsaPartofLabelClosure and stuff in GafSolrDocumentLoader. Intended for GOlr loading.

Parameters:
c -
Returns:
list of is_partof_closure ids

getIsaPartofLabelClosure

public List<String> getIsaPartofLabelClosure(org.semanticweb.owlapi.model.OWLObject c)
Return a overlaps with getIsaPartofIDClosure and stuff in GafSolrDocumentLoader. Intended for GOlr loading.

Parameters:
c -
Returns:
list of is_partof_closure labels

getSubClassesNames

@Deprecated
public String[] getSubClassesNames(org.semanticweb.owlapi.model.OWLClass cls)
Deprecated. 

Return the names of the asserted subClasses of the cls (Class) passed in the argument

Parameters:
cls -
Returns:
array of of strings

getSynonymStrings

@Deprecated
public String[] getSynonymStrings(org.semanticweb.owlapi.model.OWLObject c)
Deprecated. 

It returns array of synonyms (is encoded as synonym in obo format and IAO_0000118 annotation property in OWL format) of a class

Parameters:
c -
Returns:
array of strings or null

getOBOSynonyms

public List<OWLGraphWrapper.ISynonym> getOBOSynonyms(org.semanticweb.owlapi.model.OWLObject c)
It returns list of synonyms as encoded by OBO2OWL.

Parameters:
c -
Returns:
list of synonyms or null

getOBOSynonymStrings

public List<String> getOBOSynonymStrings(org.semanticweb.owlapi.model.OWLObject c)
It returns String Listof synonyms.

Parameters:
c -
Returns:
string list of synonyms

getOntologyId

public String getOntologyId()
gets the OBO-style ID of the source ontology IRI. E.g. "go"

Returns:
id of source ontology

getIdentifier

public String getIdentifier(org.semanticweb.owlapi.model.OWLObject owlObject)
gets the OBO-style ID of the specified object. E.g. "GO:0008150"

Parameters:
owlObject -
Returns:
OBO-style identifier, using obo2owl mapping

getIdentifier

public String getIdentifier(org.semanticweb.owlapi.model.IRI iriId)
gets the OBO-style ID of the specified object. E.g. "GO:0008150"

Parameters:
iriId -
Returns:
OBO-style identifier, using obo2owl mapping

getIRIByIdentifier

public org.semanticweb.owlapi.model.IRI getIRIByIdentifier(String id)

getOWLObjectByIdentifier

public org.semanticweb.owlapi.model.OWLObject getOWLObjectByIdentifier(String id)
Given an OBO-style ID, return the corresponding OWLObject, if it is declared - otherwise null

Parameters:
id - - e.g. GO:0008150
Returns:
object with id or null

getOWLObjectPropertyByIdentifier

public org.semanticweb.owlapi.model.OWLObjectProperty getOWLObjectPropertyByIdentifier(String id)
Given an OBO-style ID, return the corresponding OWLObjectProperty, if it is declared - otherwise null

Parameters:
id - - e.g. GO:0008150
Returns:
OWLObjectProperty with id or null

getOWLIndividualByIdentifier

public org.semanticweb.owlapi.model.OWLNamedIndividual getOWLIndividualByIdentifier(String id)
Given an OBO-style ID, return the corresponding OWLNamedIndividual, if it is declared - otherwise null

Parameters:
id - - e.g. GO:0008150
Returns:
OWLNamedIndividual with id or null

getOWLClassByIdentifier

public org.semanticweb.owlapi.model.OWLClass getOWLClassByIdentifier(String id)
Given an OBO-style ID, return the corresponding OWLClass, if it is declared - otherwise null

Parameters:
id - - e.g. GO:0008150
Returns:
OWLClass with id or null

getOWLObjectByLabel

public org.semanticweb.owlapi.model.OWLObject getOWLObjectByLabel(String label)
fetches an OWL Object by rdfs:label if there is >1 match, return the first one encountered

Parameters:
label -
Returns:
object or null

getIRIByLabel

public org.semanticweb.owlapi.model.IRI getIRIByLabel(String label)
fetches an OWL IRI by rdfs:label

Parameters:
label -
Returns:
IRI or null

getIRIByLabel

public org.semanticweb.owlapi.model.IRI getIRIByLabel(String label,
                                                      boolean isEnforceUnivocal)
                                               throws SharedLabelException
fetches an OWL IRI by rdfs:label, optionally testing for uniqueness TODO: index labels. This currently scans all labels in the ontology, which is expensive

Parameters:
label -
isEnforceUnivocal -
Returns:
IRI or null
Throws:
SharedLabelException - if >1 IRI shares input label

getOWLClass

public org.semanticweb.owlapi.model.OWLClass getOWLClass(String s)
Returns an OWLClass given an IRI string the class must be declared in either the source ontology, or in a support ontology, otherwise null is returned

Parameters:
s - IRI string
Returns:
OWLClass

getOWLClass

public org.semanticweb.owlapi.model.OWLClass getOWLClass(org.semanticweb.owlapi.model.IRI iri)
Returns an OWLClass given an IRI the class must be declared in either the source ontology, or in a support ontology, otherwise null is returned

Parameters:
iri -
Returns:
OWLClass

getOWLClass

public org.semanticweb.owlapi.model.OWLClass getOWLClass(org.semanticweb.owlapi.model.OWLObject x)
Parameters:
x -
Returns:
OWLClass

getOWLIndividual

public org.semanticweb.owlapi.model.OWLNamedIndividual getOWLIndividual(org.semanticweb.owlapi.model.IRI iri)
Returns an OWLNamedIndividual with this IRI if it has been declared in the source or support ontologies. Returns null otherwise.

Parameters:
iri -
Returns:
OWLNamedIndividual

getOWLIndividual

public org.semanticweb.owlapi.model.OWLNamedIndividual getOWLIndividual(String s)
Parameters:
s -
Returns:
OWLNamedIndividual
See Also:
getOWLIndividual(IRI)

getOWLObjectProperty

public org.semanticweb.owlapi.model.OWLObjectProperty getOWLObjectProperty(String iri)
Returns the OWLObjectProperty with this IRI Must have been declared in one of the ontologies

Parameters:
iri -
Returns:
OWLObjectProperty

getOWLObjectProperty

public org.semanticweb.owlapi.model.OWLObjectProperty getOWLObjectProperty(org.semanticweb.owlapi.model.IRI iri)

getOWLAnnotationProperty

public org.semanticweb.owlapi.model.OWLAnnotationProperty getOWLAnnotationProperty(org.semanticweb.owlapi.model.IRI iri)

getOWLObject

public org.semanticweb.owlapi.model.OWLObject getOWLObject(String s)
Returns the OWLObject with this IRI (where IRI is specified as a string - e.g http://purl.obolibrary.org/obo/GO_0008150)

Parameters:
s - IRI string
Returns:
OWLObject
See Also:
getOWLObject(IRI iri)

getOWLObject

public org.semanticweb.owlapi.model.OWLObject getOWLObject(org.semanticweb.owlapi.model.IRI s)
Returns the OWLObject with this IRI Must have been declared in one of the ontologies Currently OWLObject must be one of OWLClass, OWLObjectProperty or OWLNamedIndividual If the ontology employs punning and there different entities with the same IRI, then the order of precedence is OWLClass then OWLObjectProperty then OWLNamedIndividual

Parameters:
s - entity IRI
Returns:
OWLObject


Copyright © 2010-2012. All Rights Reserved.