org.eaglei.model
Interface EIOntModel


public interface EIOntModel

Provides access to the eagle-i ontology model, a.k.a the data model. Note that this interface is currently intended for use by server-side components only.


Nested Class Summary
static interface EIOntModel.Visitor
          Interface passed into a call to traverseDataModel.
 
Method Summary
 java.lang.String generateStackTrace(java.util.Deque<java.lang.String> stack)
          Produces a default display string from the semantic relationship stack generated by data model traversal.
 EIClass getClass(EIURI classId)
          Returns an EIClass for the given URI.
 java.util.List<java.util.Set<java.lang.String>> getClassAnnotations(java.util.List<EIURI> classURIs)
          Gets the set of class group annotation values for a given list of classes.
 java.lang.String getClassDefinition(EIURI uri)
           
 java.util.List<java.lang.String> getClassDefinitions(java.util.List<EIURI> classURIs)
          Gets property annotations for a given class.
 java.util.List<EIEquivalentClass> getEquivalentClasses(EIURI classId)
           
 java.util.List<java.lang.String> getLabels(EIURI uri)
          Retrieves all unique labels for the specified resource using the the following priority order http://eagle-i.org/ont/app/1.0/preferredLabel http://purl.obolibrary.org/obo/IAO_0000111 (IAO preferred term) rdfs:label http://purl.obolibrary.org/obo/IAO_0000118 (IAO alternate term)
 java.util.List<EIClass> getNonResourceBaseClasses()
           
 java.lang.String getPreferredLabel(EIURI uri)
          Retrieves the preferred label for the specified resource.
 java.util.List<EIProperty> getProperties(EIURI classId)
           
 java.lang.String getPropertyDefinition(EIURI uri)
           
 java.util.List<java.lang.String> getPropertyDefinitions(java.util.List<EIURI> propertyURIs)
           
 java.util.List<EIClass> getSubClasses(EIURI classId)
           
 EIClass getSuperClass(EIClass childClass)
           
 java.util.List<EIClass> getSuperClasses(EIURI classId)
           
 java.util.List<EIClass> getTopLevelClasses()
           
 java.lang.String getVersion()
          Gets the version of the eagle-i ontology.
 boolean isModelClassURI(java.lang.String uri)
          Determines if the given URI is recognized as being an eagle-i data model URI.
 void traverseDataModel(java.util.List<EIOntModel.Visitor> visitors)
          Walks the entire eagle-i data model by starting with the set of "root resource" (top-level resource) classes and traversing through object property relationships and subclass relationships until every class and property in the data model has been visited.
 

Method Detail

traverseDataModel

void traverseDataModel(java.util.List<EIOntModel.Visitor> visitors)
Walks the entire eagle-i data model by starting with the set of "root resource" (top-level resource) classes and traversing through object property relationships and subclass relationships until every class and property in the data model has been visited. Each of the Visitor implementations provided will be called as data model classes and properties are visited.

Parameters:
visitors - List of Visitor implementations

generateStackTrace

java.lang.String generateStackTrace(java.util.Deque<java.lang.String> stack)
Produces a default display string from the semantic relationship stack generated by data model traversal.

Parameters:
stack - Artifact produced by calling traverseDataModel with a Visitor implementation.
Returns:
a default display string

getVersion

java.lang.String getVersion()
Gets the version of the eagle-i ontology.

Returns:
version string

isModelClassURI

boolean isModelClassURI(java.lang.String uri)
Determines if the given URI is recognized as being an eagle-i data model URI. The eagle-i data model is defined as being the resource classses (the "top-level" classes), the non-resource classes, and the subtypes of all of the resource and non-resource classes. Non-resource classes are those classes which are related to a resource class via object property, but are not a subclass of a resource class. A non-resource class related to a resource class may in turn have a relation to another non-resource class bringing that class into the data model. Note that the backing eagle-i ontology files may define superclasses of resource and non-resource classes. These are NOT considered part of the data model from the EIClass api perspective.

Parameters:
uri -
Returns:
true if the uri is a data model class uri, otherwise false.

getTopLevelClasses

java.util.List<EIClass> getTopLevelClasses()

getNonResourceBaseClasses

java.util.List<EIClass> getNonResourceBaseClasses()

getClass

EIClass getClass(EIURI classId)
Returns an EIClass for the given URI. This method should only be called with uri's that are known to be part of the data model. If a given URI is not definitively known to part of the data model, isModelClassURI() should be used to verify the uri string.

Parameters:
classId -
Returns:
EIClass, undefined if uri is not a valid member of the data model as defined by isModelClassURI()

getSuperClass

EIClass getSuperClass(EIClass childClass)

getSuperClasses

java.util.List<EIClass> getSuperClasses(EIURI classId)

getSubClasses

java.util.List<EIClass> getSubClasses(EIURI classId)

getProperties

java.util.List<EIProperty> getProperties(EIURI classId)

getEquivalentClasses

java.util.List<EIEquivalentClass> getEquivalentClasses(EIURI classId)

getClassAnnotations

java.util.List<java.util.Set<java.lang.String>> getClassAnnotations(java.util.List<EIURI> classURIs)
Gets the set of class group annotation values for a given list of classes.

Parameters:
classURI -
Returns:

getClassDefinitions

java.util.List<java.lang.String> getClassDefinitions(java.util.List<EIURI> classURIs)
Gets property annotations for a given class. Returns a map of property EIURI to map of annotation predicate to value.

Parameters:
classURI -
Returns:

getClassDefinition

java.lang.String getClassDefinition(EIURI uri)

getPropertyDefinitions

java.util.List<java.lang.String> getPropertyDefinitions(java.util.List<EIURI> propertyURIs)

getPropertyDefinition

java.lang.String getPropertyDefinition(EIURI uri)

getPreferredLabel

java.lang.String getPreferredLabel(EIURI uri)
Retrieves the preferred label for the specified resource. Computes the preferred label using the following priority order of properties (if multiple values for any property are specified, an arbitrary value is returned): If a value does not exist for any of the above properties, a preferred label is computed from the local name portion of the URI.

Parameters:
uri - URI of the resource. Cannot be null.
Returns:
Preferred label or null if the specified URI does not have a corresponding resource in the ontology.

getLabels

java.util.List<java.lang.String> getLabels(EIURI uri)
Retrieves all unique labels for the specified resource using the the following priority order

Parameters:
uri - URI of the resource. Cannot be null.
Returns:
Ordered list of labels. Will be empty if the specified URI does not have a corresponding resource in the ontology.


Copyright © 2009-2010 Eagle-I. All Rights Reserved.