Appendix G. Reference information

G.1. JavaDoc
G.2. OGSA-DAI context
G.3. Persistence and update policies
G.3.1. Persistence and update policies - resources
G.3.2. Persistence and update policies - resource manager
G.3.3. Persistence and update policies - activity manager
G.3.4. Persistence and update policies - common components configuration manager
G.4. Core API class list
G.5. Data resources class list
G.6. Persistence APIs
G.7. Base 64 encoding
G.8. Type conversions
G.9. OGSA-DAI core types
G.10. Type mappings
G.10.1. Type mappings - ObtainFromDataSource
G.10.2. Type mappings - DeliverToDataSink
G.10.3. Type mappings - client toolkit requests and data sinks
G.10.4. Type mappings - client toolkit request status and data sources
G.10.5. Type mappings - data sources
G.10.6. Type mappings - data sink
G.10.7. Type mappings - requests
G.10.8. Type mappings - request status

G.1. JavaDoc

In OGSA-DAI binary distributions JavaDoc is available in OGSA-DAI/doc/javadoc.

G.2. OGSA-DAI context

The OGSA-DAI server makes use of a single context object to which any class on the server has access. This is class:

uk.org.ogsadai.context.OGSADAIContext

and classes can get a reference to the context by doing:

OGSADAIContext context = OGSADAIContext.getInstance();

The OGSA-DAI context provides a key-object store which can use any object as keys or values.

The OGSA-DAI context must contain the following entries at a minimum. uk.org.ogsadai.context.OGSADAIConstants provides constants containing the keys for these entries (and OGSADAIContext provides getter methods to provide access to many of these directly).

  • Persistence manager - the persistence manager is used to handle OGSA-DAI server configuration and persistence of resources.
    • ID - uk.org.ogsadai.PERSISTENCE_MANAGER
    • Type - class that implements interface uk.org.ogsadai.persistence.PersistenceManager.
  • The resource manager manages the OGSA-DAI resources currently available in an OGSA-DAI server which are exposed by OGSA-DAI presentation layers.
    • ID - uk.org.ogsadai.RESOURCE_MANAGER
    • Type - class that implements interface uk.org.ogsadai.resource.ResourceManager.
  • The activity manager manages the OGSA-DAI activities currently available in an OGSA-DAI server.
    • ID - uk.org.ogsadai.ACTIVITY_MANAGER
    • Type - class that implements interface uk.org.ogsadai.activity.ActivityManager.
  • The common components configuration manager manages the configuration of generic or common components used in an OGSA-DAI server.
    • ID - uk.org.ogsadai.COMMON_COMPONENTS_CONFIGURATION_MANAGER
    • Type - class that implements interface uk.org.ogsadai.config.CommonComponentsConfigurationManager.
    • [Note]Note
      OGSA-DAI has no components that use common components configuration. However, any application-specific components developed by third-party developers may make use of this.
  • Request factory. Converts requests in a presentation layer-specific format into requests in the format expected by the OGSA-DAI activity framework and engine.
    • ID - uk.org.ogsadai.REQUEST_FACTORY
    • Type - class that implements interface uk.org.ogsadai.activity.request.RequestFactory.

In addition the following may also be recorded in the OGSA-DAI context. Again uk.org.ogsadai.context.OGSADAIConstants provides constants containing the keys for these entries.

  • OGSA-DAI core version e.g. 3.0.
    • ID - uk.org.ogsadai.CORE_VERSION.
    • Type - java.lang.String.
  • OGSA-DAI presentation layer version e.g. Axis 1.4.
    • ID - uk.org.ogsadai.PRESENTATION_VERSION.
    • Type - java.lang.String.
  • Configuration directory - a directory holding OGSA-DAI configuration files. Whether this is needed depends upon the persistence managers, resource authorizers and login providers in use.
    • ID - uk.org.ogsadai.CONFIG_DIR.
    • Type - java.io.File.
  • XML Schema directory - a directory holding OGSA-DAI XML Schema and WSDL. Whether this is needed depends upon the presentation layer in use.
    • ID - uk.org.ogsadai.SCHEMA_DIR.
    • Type - java.io.File.
  • Usage monitoring URL - a URL to which OGSA-DAI usage monitoring information is forwarded. Whether this is present depends upon whether the OGSA-DAI administrator has enabled usage monitoring.
    • ID - uk.org.ogsadai.USAGE_MONITOR_URL.
    • Type - java.lang.String.
  • Workflow authorizer that authorizes OGSA-DAI sub-workflows created during the execution of a workflow. Whether this is present depends upon whether the OGSA-DAI administrator has provided an application-specific workflow authorizer or not.
    • ID - uk.org.ogsadai.WORKFLOW_AUTHORIZER
    • Type - class that implements interface uk.org.ogsadai.authorization.WorkflowAuthorizer.

The OGSA-DAI context is also the place to record any information that any OGSA-DAI component may require. It is particularly useful to store application-specific components needed by application-specific data resources and activities. For example the login provider which OGSA-DAI relational and XMLDB resources are configured to use by default (ID uk.org.ogsadai.LOGIN_PROVIDER) is placed in the context.

G.3. Persistence and update policies

G.3.1. Persistence and update policies - resources

Whether resources are persisted is partly a factor of the implementation of a resource state DAO currently being used and also as to the resource is sticky and transient.

A sticky resource is one that cannot be persisted as it contains state that is non-serializable by a persistence layer. This is intended for future use when looking at using multiple JVMs in conjunction with OGSA-DAI servers. It is intended that the server would decide whether a resource is sticky or not based upon its state and resource properties.

A transient resource is one that is not persisted because the resource creator does not wish it to be so.

The default sticky and transient settings of OGSA-DAI resources are as follows. The resource APIs allow these to be changed however, via method calls, but those doing this should bear in mind the restrictions also imposed by the resource state DAO currently being used to persist and restore resources.

ResourceStickyTransient
DRERtruefalse
Sessionfalsefalse
Data resourcefalsefalse
Data sourcetruetrue
Data sinktruetrue
Requesttruetrue

Table G.1. Sticky and transient defaults for OGSA-DAI resources


G.3.2. Persistence and update policies - resource manager

These comments apply to the default OGSA-DAI resource manager (uk.org.ogsadai.resource.SimpleResourceManager) and file-based resource state DAO (uk.org.ogsadai.persistence.file.resource.SimpleFileResourceStateDAO).

  • The state of any resource not known to a resource manager is loaded from a configuration file via the resource state DAO. The resource state DAO can only load the state for
    • DRERs
    • Data resources
    • Sessions
    • The resource state DAO does not support persistence of data sources, data sinks or requests.
  • Once loaded the resource is cached by the resource manager and the resource state DAO is not consulted for that resource again (unless the resource is deleted).
  • All changes to resource made in-code are persisted via the resource state DAO.
  • Any resource deleted from the resource manager will also have its configuration file deleted if there is one via the resource state DAO.
  • Any resource added to the resource manager is also persisted in a configuration file via the resource state DAO if:
    • The resource state DAO can persist resources of that type. For the default resource state DAO this is only applicable for DRERs, sessions and data resources.
    • The resource is not sticky and not transient.
  • The resource state DAO only supports the persistence and restoration of resource properties that are strings.
  • The resource state DAO only supports the persistence and restoration of session state that are strings.
  • Resource templates are loaded from configuration files via the resource state DAO every time they are requested from a resource manager.
  • Deletion or insertion of resource templates is not supported by the default resource manager or by the default resource state DAO.

G.3.3. Persistence and update policies - activity manager

These comments apply to the default OGSA-DAI activity manager (uk.org.ogsadai.activity.SimpleActivityManager) and file-based activity specification DAO (uk.org.ogsadai.persistence.file.activity.SimpleFileActivitySpecDAO).

  • Any activity specification not known to the activity manager is loaded via the activity specification DAO from a configuration file
  • Once loaded the activity specification is cached by the activity manager and the activity specification DAO is not consulted for that activity again (unless the activity is deleted).
  • All changes to activity specifications made in-code are persisted via the activity specification DAO.
  • Any activity specification deleted from the activity manager is also deleted from the configuration file via the activity specification DAO.
  • Any activity specification added to the activity manager is also added to the configuration file via the activity specification DAO.

G.3.4. Persistence and update policies - common components configuration manager

These comments apply to the default OGSA-DAI common components configuration manager (uk.org.ogsadai.config.SimpleCommonComponentsConfigurationManager) and file-based common components configuration DAO (uk.org.ogsadai.persistence.config.config.SimpleFileCommonComponentsConfigurationDAO).

  • The common components configuration is loaded from a configuration file via the common components configuration DAO every time it is accessed by a call to the manager.
  • All changes to common components configuration made in-code (whether configuration properties are added, removed or changed) are persisted in a configuration file via the common components configuration DAO.

G.4. Core API class list

* - each starred interface has an implementation class with name SimpleX where X is the interface name.

OGSA-DAI global context classes and interfaces.

Source release location: src/core/context-api

uk.org.ogsadai.context.OGSADAIContext
uk.org.ogsadai.context.OGSADAIContextInitializer
uk.org.ogsadai.context.OGSADAIConstants            

OGSA-DAI resource interfaces.

Source release location: src/core/resource-api

uk.org.ogsadai.resource.Resource 
uk.org.ogsadai.resource.drer.DRER *              
uk.org.ogsadai.resource.session.SessionResource *
uk.org.ogsadai.resource.request.RequestResource *
uk.org.ogsadai.resource.datasource.DataSourceResource *
uk.org.ogsadai.resource.datasink.DataSinkResource *
uk.org.ogsadai.resource.dataresource.DataResource          

OGSA-DAI manager interfaces:

Source release location: src/core/resource-api

uk.org.ogsadai.resource.ResourceManager *

Source release location: src/core/activityframework-api 

uk.org.ogsadai.activity.ActivityManager *

Source release location: src/core/config-api 

uk.org.ogsadai.config.CommonComponentsConfigurationManager *

OGSA-DAI state and configuration interfaces. These represent the contract between OGSA-DAI persistence components and the OGSA-DAI core components.

Source release location: src/core/persistence-api

uk.org.ogsadai.persistence.Persistable

Source release location: src/core/activityframework-api

uk.org.ogsadai.activity.ActivitySpec *

Source release location: src/core/resource-api 

uk.org.ogsadai.resource.ResourceState
uk.org.ogsadai.resource.ResourceLifetime *
uk.org.ogsadai.resource.SupportedActivities *
uk.org.ogsadai.resource.ResourcePropertySet *
uk.org.ogsadai.resource.ResourceProperty *
uk.org.ogsadai.resource.ResourcePropertyValue *
uk.org.ogsadai.resource.PersistedResourceProperty *
uk.org.ogsadai.resource.OnDemandResourceProperty *
uk.org.ogsadai.resource.OnDemandResourcePropertyCallback
uk.org.ogsadai.resource.dataresource.DataResourceState *
uk.org.ogsadai.resource.datasink.DataSinkResourceState *
uk.org.ogsadai.resource.datasource.DataSourceResourceState *
uk.org.ogsadai.resource.drer.DRERState *
uk.org.ogsadai.resource.drer.EngineState *
uk.org.ogsadai.resource.request.RequestResourceState *
uk.org.ogsadai.resource.session.SessionResourceState *

Source release location: src/core/config-api 

uk.org.ogsadai.config.CommonComponentsConfiguration *
uk.org.ogsadai.config.KeyValueProperties *

Event model

Source release location: src/core/activityframework-api

uk.org.ogsadai.activity.event.ActivityEvent
uk.org.ogsadai.activity.event.ActivityEventDispatcher
uk.org.ogsadai.activity.event.ActivityEventListener

Source release location: src/core/config-api
uk.org.ogsadai.config.event.ConfigurationEvent
uk.org.ogsadai.config.event.ConfigurationEventDispatcher
uk.org.ogsadai.config.event.ConfigurationEventListener
uk.org.ogsadai.config.event.KeyValueEvent
uk.org.ogsadai.config.event.KeyValueEventDispatcher
uk.org.ogsadai.config.event.KeyValueEventListener

Source release location: src/core/resource-api

uk.org.ogsadai.resource.event.ResourceEvent
uk.org.ogsadai.resource.event.ResourceEventDispatcher
uk.org.ogsadai.resource.event.ResourceEventListener
uk.org.ogsadai.resource.event.ResourceManagerEvent
uk.org.ogsadai.resource.event.ResourceManagerEventDispatcher
uk.org.ogsadai.resource.event.ResourceManagerEventListener
uk.org.ogsadai.resource.event.ResourcePropertyEvent
uk.org.ogsadai.resource.event.ResourcePropertyEventDispatcher 
uk.org.ogsadai.resource.event.ResourcePropertyEventListener

Source release location: src/core/event-api

uk.org.ogsadai.event.UpdateEvent
uk.org.ogsadai.event.UpdateEventDispatcher
uk.org.ogsadai.event.UpdateEventListener
uk.org.ogsadai.event.UpdateID

G.5. Data resources class list

OGSA-DAI data resource state interfaces.

Source release location: src/core/resource

uk.org.ogsadai.resource.dataresource.jdbc.JDBCDataResourceState
uk.org.ogsadai.resource.dataresource.xmldb.XMLDBDataResourceState
uk.org.ogsadai.resource.dataresource.file.FileDataResourceState
uk.org.ogsadai.resource.dataresource.group.ResourceGroupDataResourceState

Each of these has an implementation class with name SimpleX where X is the interface name.

OGSA-DAI data resource classes

Source release location: src/core/resource

uk.org.ogsadai.resource.dataresource.jdbc.JDBCDataResource
uk.org.ogsadai.resource.dataresource.xmldb.XMLDBDataResource
uk.org.ogsadai.resource.dataresource.file.FileDataResource
uk.org.ogsadai.resource.dataresource.group.ResourceGroupDataResource

The OGSA-DAI core, persistence and configuration components do not treat these specially. They are developed using the data resource extensibility point.

G.6. Persistence APIs

The following classes make up the OGSA-DAI persistence APIs.

Source release location: src/core/persistence-api

uk.org.ogsadai.persistence.PersistenceManager
uk.org.ogsadai.persistence.DAO
uk.org.ogsadai.persistence.resource.ResourceStateDAO *
uk.org.ogsadai.persistence.activity.ActivitySpecDAO *
uk.org.ogsadai.persistence.config.CommonComponentsConfigurationDAO *
uk.org.ogsadai.persistence.Persistable
uk.org.ogsadai.persistence.event.AccessStateDispatcher // Unused
uk.org.ogsadai.persistence.event.AccessStateListener // Unused
uk.org.ogsadai.persistence.event.UpdatePolicyController

* - each starred interface has an implementation class with name SimpleFile where X is the interface name. These are in the uk.org.ogsadai.persistence.file package and its sub-packages.

There is also uk.org.ogsadai.persistence.file.ContextFilePersistenceManager which takes its configuration directory via a property in uk.org.ogsadai.context.OGSADAIContext rather than via a method.

* - each starred interface has an implementation class with name DummyFile where X is the interface name. These are in the uk.org.ogsadai.persistence.dummy package and its sub-packages.

OGSA-DAI managers are each given a DAO of the associated type to manage configuration and persistence. By default they are given a dummy DAO. Server-specific configuration files ensure that they are given file-based DAOs.

G.7. Base 64 encoding

OGSA-DAI's uk.org.ogsadai.common.Base64 encoding class requires a third-party implementation of base 64 encoding.

By default this is org.apache.axis.encoding.Base64.

Application developers can override this value by using the Base64.registerBase64Class(String className) method to provide the name of a class that implements base 64. This class must support the following methods:

byte[] decode(String data)
String encode(byte[] data)
String encode(byte[] data, int offset, int length)

G.8. Type conversions

[Note]Note
Place-holder for possible future content. A list of standard targets for database type conversion e.g. integers always map to 32 bit

G.9. OGSA-DAI core types

These are OGSA-DAI's core types as exposed to the presentation layers. These are just standard Java classes apart from the list start/end markers (uk.org.ogsadai.activity.io.ControlBlock.LIST_BEGIN and LIST_END).

java.lang.String   
char[]
byte[]
java.lang.Boolean
java.lang.Float
java.lang.Integer
java.lang.Long
java.lang.Double 
java.lang.Date 
java.lang.Calendar
uk.org.ogsadai.activity.io.ControlBlock.LIST_BEGIN
uk.org.ogsadai.activity.io.ControlBlock.LIST_END

G.10. Type mappings

G.10.1. Type mappings - ObtainFromDataSource

uk.org.ogsadai.activity.delivery.ObtainFromDataSourceActivity converts from uk.org.ogsadai.data types to core types.

uk.org.ogsadai.data value Core type  
StringData.getString()    String      
CharData.getChars()       char[]                 
BinaryData.getBytes()     byte[]      
BooleanData.getBoolean()  Boolean
FloatData.getFloat()      Float
IntegerData.getInteger()  Integer
LongData.getLong()        Long
DoubleData.getDouble()    Double
Date.getDate()            Date
ListBegin                 LIST_BEGIN
ListEnd                   LIST_END

G.10.2. Type mappings - DeliverToDataSink

uk.org.ogsadai.activity.delivery.DeliverToDataSinkActivity converts from core types to uk.org.ogsadai.data types.

Core type  uk.org.ogsadai.data
String     StringData
char[]     CharData
byte[]     BinaryData
Boolean    BooleanData
Float      FloatData
Integer    IntegerData
Long       LongData
Double     DoubleData
Date       DateData(Date)
LIST_BEGIN ListBegin
LIST_END   ListEnd

G.10.3. Type mappings - client toolkit requests and data sinks

uk.org.ogsadai.client.toolkit.presentation.gt.GTRequestBuilder converts uk.org.ogsadai.data types to uk.org.ogsadai.service.gt.types.DataType beans.

uk.org.ogsadai.data class DataType bean
StringData                DataType.setString(String.toString())
CharData                  DataType.setCharArray(String(CharData.getChars()))
BinaryData                DataType.setBinary(BinaryData.getBytes())
BooleanData               DataType.set_boolean(BooleanData.getBoolean())
FloatData                 DataType.set_float(FloatData.getFloat())
IntegerData               DataType.set_int(IntegerData.getInteger())
LongData                  DataType.set_long(LongData.getLong())
DoubleData                DataType.set_double(DoubleData.getDouble())
DateData                  DataType.setDate(DateData.getCalendar())
ListBegin                 DataType.setListBegin(ListBeginType bean)
ListEnd                   DataType.setListEnd(ListEndType bean)

GTRequestBuilder is used by

uk.org.ogsadai.client.toolkit.presentation.gt.GTDataRequestExecutionResource
uk.org.ogsadai.client.toolkit.presentation.gt.GTDataSink

G.10.4. Type mappings - client toolkit request status and data sources

uk.org.ogsadai.client.toolkit.presentation.gt.GTRequestStatusBuilder.getDataValue(DataType) converts uk.org.ogsadai.service.gt.types.DataType beans to uk.org.ogsadai.data types.

uk.org.ogsadai.data class       DataType bean
StringData(String)              DataType.getString()
CharArray(String.toCharArray()) DataType.getCharArray()
BinaryData(byte[])              DataType.getBinary()
BooleanData(boolean)            DataType.get_boolean()
FloatData(float)                DataType.get_float()
IntegerData(integer)            DataType.get_int()
LongData(long)                  DataType.get_long()
DoubleData(double)              DataType.get_double()
DateData(Calendar.getTime())    DateType.getDate();
ListBegin if DataType.getListBegin() != null
ListEnd   if DataType.getListEnd() != null

GTRequestBuilder.getDataValue(DataType) is used by

uk.org.ogsadai.client.toolkit.presentation.gt.GTDataSource

uk.org.ogsadai.client.toolkit.presentation.gt.GTRequestStatusBuilder.processActivityResults(ResultType) converts uk.org.ogsadai.service.gt.types.DataType beans to uk.org.ogsadai.data types.

uk.org.ogsadai.data class       DataType bean
StringData(String)              DataType.getString()
CharArray(char[])               DataType.getCharArray().toCharArray()
BinaryData(byte[])              DataType.getBinary()
BooleanData(boolean)            DataType.get_boolean()
FloatData(float)                DataType.get_float()
IntegerData(integer)            DataType.get_int()
LongData(long)                  DataType.get_long()
DoubleData(double)              DataType.get_double()
DateData(Date)                  DateType.getDate().getTime();
ListBegin if DataType.getListBegin() != null
ListEnd   if DataType.getListEnd() != null

GTRequestBuilder.processActivityResults(ResultType) is used by

uk.org.ogsadai.client.toolkit.presentation.gt.GTDataRequestExecutionResource

G.10.5. Type mappings - data sources

uk.org.ogsadai.service.gt.GTUtils.getDataValue(Object) converts OGSA-DAI core types to uk.org.ogsadai.service.gt.types.DataType beans.

Core Type   DataType bean
String      DataType.setString(String)
char[]      DataType.setCharArray(new String(char[]))
byte[]      DataType.setBinary(byte[])
Boolean     DataType.set_boolean(Boolean)
Float       DataType.set_float(Float)
Integer     DataType.set_int(Integer)
Long        DataType.set_long(Long)
Double      DataType.set_double(Double)
Date        DataType.setDate(Calendar.getInstance().setTime(Date))
LIST_BEGIN  DataType.setListBegin(ListBeginType bean)
LIST_END    DataType.setListEnd(ListEndType bean)

GTUtils.getDataValue(Object) is used by

uk.org.ogsadai.service.gt.datasource.GTDataSourceProvider.

G.10.6. Type mappings - data sink

uk.org.ogsadai.service.gt.GTUtils.getDataObject(DataType) converts uk.org.ogsadai.service.gt.types.DataType beans to OGSA-DAI core types.

Core Type  DataType bean
String     DataType.getString()
char[]     DataType.getCharArray().toCharArray()
byte[]     DataType.getBinary()
Boolean    DataType.get_boolean()
Float      DataType.get_float()
Integer    DataType.get_int()
Long       DataType.get_long()
Double     DataType.get_double()
Date       DataType.getDate().getTime() (returns Date)
LIST_BEGIN ControlBlock.LIST_BEGIN if DataType.getListBegin() != null
LIST_END   ControlBlock.LIST_END if DataType.getListEnd() != null

GTUtils.getDataObject(DataType) is used by

uk.org.ogsadai.service.gt.datasink.GTDataSinkProvider.

G.10.7. Type mappings - requests

uk.org.ogsadai.service.gt.execution.workflow.InputHandler.handleLiteralInputs() converts uk.org.ogsadai.service.gt.types.DataType beans to OGSA-DAI core types.

Conversions are as for Section G.10.6, “Type mappings - data sink” above except that OGSA-DAI core type objects are wrapped into uk.org.ogsadai.activity.pipeline.Literal objects.

InputHandler.handleLiteralInputs() is used by

uk.org.ogsadai.service.gt.datasink.GTDataRequestExecutionResourceProvider

G.10.8. Type mappings - request status

uk.org.ogsadai.service.gt.request.BeanDataValueVisitor uk.org.ogsadai.data classes to uk.org.ogsadai.service.gt.types.DataType beans.

uk.org.ogsadai.data.* DataType bean
StringData            DataType.setString(String.toString())
CharData              DataType.setCharArray(String(CharData.getChars()))
BinaryData            DataType.setBinary(BinaryData.getBytes())
BooleanData           DataType.set_boolean(BooleanData.getBoolean())
FloatData             DataType.set_float(FloatData.getFloat())
IntegerData           DataType.set_int(IntegerData.getInteger())
LongData              DataType.set_long(LongData.getLong())
DoubleData            DataType.set_double(DoubleData.getDouble())
DateData              DataType.setDate(DateData.getCalendar())
ListBegin             DataType.setListBegin(ListBeginType bean)
ListEnd               DataType.setListEnd(ListEndType bean)
NoMoreData            Do nothing.
DataError             Do nothing.

BeanDataValueVisitor is used by

uk.org.ogsadai.service.gt.datasource.GTDataRequestExecutionProvider.