uk.org.ogsadai.client.toolkit.activity.sql
Class SQLCreateDatabase

java.lang.Object
  |
  +--uk.org.ogsadai.client.toolkit.activity.RequestComponent
        |
        +--uk.org.ogsadai.client.toolkit.activity.Activity
              |
              +--uk.org.ogsadai.client.toolkit.activity.sql.SQLCreateDatabase

public class SQLCreateDatabase
extends Activity

This activity creates a new relational database. This activity has no inputs and one output. The output is the number of databases created.

Author:
The OGSA-DAI Project Team

Constructor Summary
SQLCreateDatabase(java.lang.String databaseName)
          Constructs an SQL create database activity.
 
Method Summary
protected  java.lang.String generateXML()
          Generates the XML representing the activity.
 int getCount()
          Gets the number of databases created by activity.
 java.lang.String getDatabaseName()
          Gets the name of the database.
 ActivityOutput getOutput()
          Gets the activity's only output.
 
Methods inherited from class uk.org.ogsadai.client.toolkit.activity.Activity
addInput, addOutput, addOutputs, getDataResourceID, getDataServiceStub, getInputParameters, getOutputParameters, getOutputs, replaceSpecialCharacters, setDataResourceID, setDataServiceStub, setInput
 
Methods inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent
getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLCreateDatabase

public SQLCreateDatabase(java.lang.String databaseName)
Constructs an SQL create database activity.

Parameters:
databaseName - name of database to create
Method Detail

getDatabaseName

public java.lang.String getDatabaseName()
Gets the name of the database.

Returns:
Database name.

getCount

public int getCount()
             throws ActivityOutputException,
                    DataFormatException
Gets the number of databases created by activity. The value should be 1.

Returns:
the number of the databases created
Throws:
DataFormatException - If the output data is not in the expected format.
ActivityOutputException - If there is no output data.

getOutput

public ActivityOutput getOutput()
Gets the activity's only output.

Returns:
the activity output.

generateXML

protected java.lang.String generateXML()
Description copied from class: RequestComponent
Generates the XML representing the activity. This XML can then be inserted into a perform document that is sent to a data service.

Specified by:
generateXML in class Activity
Returns:
the XML for the activity