Activity Configuration Document
Activity configuration involves specifying information about the activities that a service supports and a client can execute. The activity configuration dictates the activities that can be specified within a client's perform document or Client Toolkit request. Configuration is achieved using an activity configuration document.
An activity configuration document includes information on the following:
- The location of the base perform document XML-Schema. The types in this schema are extended by the activity XML-Schema types.
- The activities that OGSA-DAI services configured with this document support, including:
- Names of the activities
- XML-Schema which define the activities
- Java classes implementing the activities
and in some cases:
- Configuration properties for the activities
- References to external configuration files for individual activities
Example
<?xml version="1.0" encoding="UTF-8"?>
<activityConfiguration xmlns="https://ogsadai.org.uk/namespaces/2005/10/config">
<documentation>
This is an example activity configuration document.
</documentation>
<basePerformDocumentSchema
location="http://localhost:8080/wsrf/schema/ogsadai/xsd/perform.xsd"/>
<activityMap
schemaBase="http://localhost:8080/wsrf/schema/ogsadai/xsd/activities/"
configBase="http://localhost:8080/wsrf/config/">
<activity name="sqlQueryStatement"
implementation="uk.org.ogsadai.activity.sql.SQLQueryStatementActivity"
schema="sql_query_statement.xsd"/>
<activity name="specialDelivery"
implementation="some.package.SpecialDeliveryActivity"
schema="deliver_results.xsd">
<property key="url" value="ftp://anon:"/>
<property key="maxBytes" value="10000"/>
</activity>
<activity name="proteinToGeneTransformation"
implementation="some.package.ProteinToGeneTransformation"
schema="protein_to_gene.xsd"
config="proteinToGene.xml"/>
</activityMap>
</activityConfiguration>
Specification
Root element activityConfiguration contains:
- Element documentation (zero or more) - human-readable description of the activity configuration file.
- Element basePerformDocumentSchema (required) - defines the location of the base XML-Schema for perform documents.
- Attribute location - URL to the base XML-Schema for perform documents. This schema is extended by the XML-Schema for each individual activity.
- Element activityMap (zero or more) - describes the activities that can be executed by an OGSA-DAI service configured using this document.
- Attribute schemaBase (optional) - URL for the base directory containing the XML-Schemas for the individual activities within the activity map. This allows relative paths to be specified for the schemas of individual activities.
- Attribute configBase (optional) - URL for the base directory containing XML configuration files for the individual activities within the activity map. This allows relative paths to be specified for the individual configuation files of individual activities. Note that this attribute is only used when one or more of the activities within the activity map make use of individual configuration files. In the above example, the proteinToGene activity makes use of an individual configuration file.
- Element activity (one or more) - describes an activity that can be executed using an OGSA-DAI service configured with this document.
- Attribute name - the name of the activity. This is used as the activity element name within perform documents.
- Attribute implementation - the Java class which provides the implementation of the activity. This class must be contained on the service classpath.
- Attribute schema - location of the XML- Schema that should be used to validate any occurences of this activity encountered in a perform document. If the schemaBase attribute described above has been used then the location can be specified using a relative path, otherwise an absolute URL should be used.
- Attribute config (optional) - location of an XML configuration file used to specify additional configuration information for the activity. This attribute is only required for activities that make use of individual configuration files, such as the proteinToGene activity in the above example. If the configBase attribute described above has been used then the location can be specified using a relative path, otherwise an absolute URL should be used.
- Attribute property (0 or more) - properties to be used by the activity. These are in the form of key-value pairs for activity implementations that take simple, non-structured configurations. An example is shown in the specialDelivery activity above. Using properties is an alternative to the use of the config option above.
XML Schema
OGSA-DAI/schema/ogsadai/xsd/activity_config.xsd