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.Set<java.lang.String> getClassAnnotations(EIURI classURI)
          Gets the set of class group annotation values for a single EIClass.
 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<EIClass> getClassesInGroup(java.lang.String groupId)
          Return the list of EIClasses with the given class group annotation.
 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()
          Deprecated. Use getClassesInGroup(EIOntConstants.CG_NON_RESOURCE_ROOT)
 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.Set<EIURI> getResourceProviderProperties()
          Gets the set of property URIs annotated as a resource provider relationship.
 EIURI getResourceProviderProperty(EIURI classURI)
          Gets the resource provider property for a given class URI.
 java.util.Map<EIURI,EIURI> getResourceProviderPropertyMap()
          Gets a map of eagle-i primary resources to one of their properties which is annotated as the resource provider relationship.
 java.util.List<EIClass> getSubClasses(EIURI classId)
           
 EIClass getSuperClass(EIClass childClass)
           
 java.util.List<EIClass> getSuperClasses(EIURI classId)
          The first member of the list is the direct superclass of the given class.
 java.util.List<EIClass> getTopLevelClasses()
          Deprecated. Use getClassesInGroup(EIOntConstants.CG_RESOURCE_ROOT)
 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.
 boolean isSubClass(EIURI ancestorURI, EIURI descendentURI)
           
 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()
Deprecated. Use getClassesInGroup(EIOntConstants.CG_RESOURCE_ROOT)


getNonResourceBaseClasses

java.util.List<EIClass> getNonResourceBaseClasses()
Deprecated. Use getClassesInGroup(EIOntConstants.CG_NON_RESOURCE_ROOT)


getClassesInGroup

java.util.List<EIClass> getClassesInGroup(java.lang.String groupId)
Return the list of EIClasses with the given class group annotation. Any classes in the ontology with the annotation that are not a part of the eagle-i data model will not be included.

Parameters:
groupId - value of the InGroup annotation
Returns:
List

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)
The first member of the list is the direct superclass of the given class. The last member of the list will be the root type in the class heirarchy. If this class is a root class, then the list will be empty

Parameters:
classId -
Returns:
list of superclasses

getSubClasses

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

isSubClass

boolean isSubClass(EIURI ancestorURI,
                   EIURI descendentURI)

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:
classURIs - List
Returns:
List> One set of annotations for each classURI

getClassAnnotations

java.util.Set<java.lang.String> getClassAnnotations(EIURI classURI)
Gets the set of class group annotation values for a single EIClass.

Parameters:
classURI -
Returns:
Set Annotations for classURI

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.

getResourceProviderProperties

java.util.Set<EIURI> getResourceProviderProperties()
Gets the set of property URIs annotated as a resource provider relationship.


getResourceProviderProperty

EIURI getResourceProviderProperty(EIURI classURI)
Gets the resource provider property for a given class URI. Will return null if class does not have a resource provider property.


getResourceProviderPropertyMap

java.util.Map<EIURI,EIURI> getResourceProviderPropertyMap()
Gets a map of eagle-i primary resources to one of their properties which is annotated as the resource provider relationship.



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