org.eaglei.model.jena
Class JenaEIOntModel

java.lang.Object
  extended by org.eaglei.model.jena.JenaEIOntModel
All Implemented Interfaces:
org.eaglei.model.EIOntModel

public class JenaEIOntModel
extends java.lang.Object
implements org.eaglei.model.EIOntModel

Exposes the eagle-i ontology using GWT friendly model classes.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eaglei.model.EIOntModel
org.eaglei.model.EIOntModel.Visitor
 
Field Summary
protected static org.apache.commons.logging.Log logger
           
 
Constructor Summary
protected JenaEIOntModel(com.hp.hpl.jena.ontology.OntModel jenaOntModel)
           
 
Method Summary
 java.lang.String generateStackTrace(java.util.Deque<java.lang.String> stack)
           
 org.eaglei.model.EIClass getClass(org.eaglei.model.EIURI uri)
          Retrieves the classes in the specified group.
protected  org.eaglei.model.EIClass getClass(java.lang.String uri)
           
 java.util.Set<java.lang.String> getClassAnnotations(org.eaglei.model.EIURI classURI)
           
 java.util.List<java.util.Set<java.lang.String>> getClassAnnotations(java.util.List<org.eaglei.model.EIURI> classURIs)
           
 java.lang.String getClassDefinition(org.eaglei.model.EIURI classURI)
           
 java.util.List<java.lang.String> getClassDefinitions(java.util.List<org.eaglei.model.EIURI> classURIs)
           
 java.util.List<org.eaglei.model.EIClass> getClassesInGroup(java.lang.String groupId)
           
 java.util.List<org.eaglei.model.EIEquivalentClass> getEquivalentClasses(org.eaglei.model.EIURI classId)
           
 java.util.List<java.lang.String> getLabels(org.eaglei.model.EIURI uri)
           
static void getLiteralsForProperty(com.hp.hpl.jena.rdf.model.Resource r, com.hp.hpl.jena.rdf.model.Property p, java.util.List<java.lang.String> values, java.util.List<java.lang.String> valuesLower)
           
 java.util.List<org.eaglei.model.EIClass> getNonResourceBaseClasses()
           
 com.hp.hpl.jena.ontology.OntModel getOntModel()
          Retrieves the underlying Jena OntModel.
 java.lang.String getPreferredLabel(org.eaglei.model.EIURI uri)
           
 java.util.List<com.hp.hpl.jena.rdf.model.Property> getPrefLabelProperties()
           
 java.util.List<org.eaglei.model.EIProperty> getProperties(org.eaglei.model.EIURI classId)
           
 java.util.List<org.eaglei.model.EIProperty> getProperties(org.eaglei.model.EIURI classId, java.lang.String groupURI)
          Retrieves the properties with the inPropertyGroup annotation set to the given value.
 java.lang.String getPropertyDefinition(org.eaglei.model.EIURI propertyURI)
           
 java.util.List<java.lang.String> getPropertyDefinitions(java.util.List<org.eaglei.model.EIURI> propertyURIs)
           
 java.util.Set<org.eaglei.model.EIURI> getResourceProviderProperties()
           
 org.eaglei.model.EIURI getResourceProviderProperty(org.eaglei.model.EIURI classURI)
           
 java.util.Map<org.eaglei.model.EIURI,org.eaglei.model.EIURI> getResourceProviderPropertyMap()
           
 java.util.List<org.eaglei.model.EIClass> getSubClasses(org.eaglei.model.EIURI classId)
           
 org.eaglei.model.EIClass getSuperClass(org.eaglei.model.EIClass eiClass)
           
 java.util.List<org.eaglei.model.EIClass> getSuperClasses(org.eaglei.model.EIURI classId)
           
 java.util.List<org.eaglei.model.EIClass> getTopLevelClasses()
           
 java.util.List<org.eaglei.model.EIEntity> getTypeEntities(org.eaglei.model.EIURI classId)
           
 java.lang.String getVersion()
           
 boolean isModelClassURI(java.lang.String uri)
           
 boolean isSubClass(org.eaglei.model.EIURI ancestorURI, org.eaglei.model.EIURI descendentURI)
           
 boolean isSubClass(java.lang.String ancestorURI, java.lang.String descendentURI)
           
 void traverseDataModel(java.util.List<org.eaglei.model.EIOntModel.Visitor> visitors)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final org.apache.commons.logging.Log logger
Constructor Detail

JenaEIOntModel

protected JenaEIOntModel(com.hp.hpl.jena.ontology.OntModel jenaOntModel)
Method Detail

getVersion

public java.lang.String getVersion()
Specified by:
getVersion in interface org.eaglei.model.EIOntModel

getOntModel

public com.hp.hpl.jena.ontology.OntModel getOntModel()
Retrieves the underlying Jena OntModel.

Returns:
The underlying eagle-i OntModel.

getResourceProviderProperties

public java.util.Set<org.eaglei.model.EIURI> getResourceProviderProperties()
Specified by:
getResourceProviderProperties in interface org.eaglei.model.EIOntModel

getResourceProviderProperty

public org.eaglei.model.EIURI getResourceProviderProperty(org.eaglei.model.EIURI classURI)
Specified by:
getResourceProviderProperty in interface org.eaglei.model.EIOntModel

getResourceProviderPropertyMap

public java.util.Map<org.eaglei.model.EIURI,org.eaglei.model.EIURI> getResourceProviderPropertyMap()
Specified by:
getResourceProviderPropertyMap in interface org.eaglei.model.EIOntModel

getClassesInGroup

public java.util.List<org.eaglei.model.EIClass> getClassesInGroup(java.lang.String groupId)
Specified by:
getClassesInGroup in interface org.eaglei.model.EIOntModel

getTypeEntities

public java.util.List<org.eaglei.model.EIEntity> getTypeEntities(org.eaglei.model.EIURI classId)

isModelClassURI

public boolean isModelClassURI(java.lang.String uri)
Specified by:
isModelClassURI in interface org.eaglei.model.EIOntModel

getTopLevelClasses

public java.util.List<org.eaglei.model.EIClass> getTopLevelClasses()
Specified by:
getTopLevelClasses in interface org.eaglei.model.EIOntModel

getNonResourceBaseClasses

public java.util.List<org.eaglei.model.EIClass> getNonResourceBaseClasses()
Specified by:
getNonResourceBaseClasses in interface org.eaglei.model.EIOntModel

getClass

public org.eaglei.model.EIClass getClass(org.eaglei.model.EIURI uri)
Retrieves the classes in the specified group. See EagleIOntUtils.getClassesInGroup().

Specified by:
getClass in interface org.eaglei.model.EIOntModel
Parameters:
groupURI - URI of the group.
Returns:
Alpha sorted (by label) list of classes in the group.

getClass

protected org.eaglei.model.EIClass getClass(java.lang.String uri)

getSuperClasses

public java.util.List<org.eaglei.model.EIClass> getSuperClasses(org.eaglei.model.EIURI classId)
Specified by:
getSuperClasses in interface org.eaglei.model.EIOntModel

getSuperClass

public org.eaglei.model.EIClass getSuperClass(org.eaglei.model.EIClass eiClass)
Specified by:
getSuperClass in interface org.eaglei.model.EIOntModel

isSubClass

public boolean isSubClass(org.eaglei.model.EIURI ancestorURI,
                          org.eaglei.model.EIURI descendentURI)
Specified by:
isSubClass in interface org.eaglei.model.EIOntModel

isSubClass

public boolean isSubClass(java.lang.String ancestorURI,
                          java.lang.String descendentURI)

getSubClasses

public java.util.List<org.eaglei.model.EIClass> getSubClasses(org.eaglei.model.EIURI classId)
Specified by:
getSubClasses in interface org.eaglei.model.EIOntModel

getEquivalentClasses

public java.util.List<org.eaglei.model.EIEquivalentClass> getEquivalentClasses(org.eaglei.model.EIURI classId)
Specified by:
getEquivalentClasses in interface org.eaglei.model.EIOntModel

getProperties

public java.util.List<org.eaglei.model.EIProperty> getProperties(org.eaglei.model.EIURI classId)
Specified by:
getProperties in interface org.eaglei.model.EIOntModel

getProperties

public java.util.List<org.eaglei.model.EIProperty> getProperties(org.eaglei.model.EIURI classId,
                                                                 java.lang.String groupURI)
Retrieves the properties with the inPropertyGroup annotation set to the given value. Or all non-annotation properties if groupURI is null.

Parameters:
classId - ID of class.
groupURI - URI of property group value to filter on. May be null.
Returns:
List of EIProperties that represent the properties.

getClassDefinitions

public java.util.List<java.lang.String> getClassDefinitions(java.util.List<org.eaglei.model.EIURI> classURIs)
Specified by:
getClassDefinitions in interface org.eaglei.model.EIOntModel

getClassDefinition

public java.lang.String getClassDefinition(org.eaglei.model.EIURI classURI)
Specified by:
getClassDefinition in interface org.eaglei.model.EIOntModel

getClassAnnotations

public java.util.List<java.util.Set<java.lang.String>> getClassAnnotations(java.util.List<org.eaglei.model.EIURI> classURIs)
Specified by:
getClassAnnotations in interface org.eaglei.model.EIOntModel

getClassAnnotations

public java.util.Set<java.lang.String> getClassAnnotations(org.eaglei.model.EIURI classURI)
Specified by:
getClassAnnotations in interface org.eaglei.model.EIOntModel

getPreferredLabel

public java.lang.String getPreferredLabel(org.eaglei.model.EIURI uri)
Specified by:
getPreferredLabel in interface org.eaglei.model.EIOntModel

getPrefLabelProperties

public java.util.List<com.hp.hpl.jena.rdf.model.Property> getPrefLabelProperties()

getLabels

public java.util.List<java.lang.String> getLabels(org.eaglei.model.EIURI uri)
Specified by:
getLabels in interface org.eaglei.model.EIOntModel

getLiteralsForProperty

public static void getLiteralsForProperty(com.hp.hpl.jena.rdf.model.Resource r,
                                          com.hp.hpl.jena.rdf.model.Property p,
                                          java.util.List<java.lang.String> values,
                                          java.util.List<java.lang.String> valuesLower)

getPropertyDefinitions

public java.util.List<java.lang.String> getPropertyDefinitions(java.util.List<org.eaglei.model.EIURI> propertyURIs)
Specified by:
getPropertyDefinitions in interface org.eaglei.model.EIOntModel

getPropertyDefinition

public java.lang.String getPropertyDefinition(org.eaglei.model.EIURI propertyURI)
Specified by:
getPropertyDefinition in interface org.eaglei.model.EIOntModel

traverseDataModel

public void traverseDataModel(java.util.List<org.eaglei.model.EIOntModel.Visitor> visitors)
Specified by:
traverseDataModel in interface org.eaglei.model.EIOntModel

generateStackTrace

public java.lang.String generateStackTrace(java.util.Deque<java.lang.String> stack)
Specified by:
generateStackTrace in interface org.eaglei.model.EIOntModel


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