uk.org.ogsadai.client.toolkit.activity.relational
Class DatabaseSchemaToXML

java.lang.Object
  |
  +--uk.org.ogsadai.client.toolkit.activity.RequestComponent
        |
        +--uk.org.ogsadai.client.toolkit.activity.Activity
              |
              +--uk.org.ogsadai.client.toolkit.activity.relational.DatabaseSchemaToXML

public class DatabaseSchemaToXML
extends Activity

This activity converts database schema (produced by the extract database schema activity for example) into an XML format.

This activity has one input - the activity providing the database schema meta data - and one output - the XML format.

Author:
The OGSA-DAI Project Team

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
          Copyright statement
 
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.Activity
 
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent
 
Constructor Summary
DatabaseSchemaToXML(ActivityOutput input)
          Constructor.
 
Method Summary
protected  java.lang.String generateXML()
          Generates the XML representing the activity.
 DatabaseSchemaMetaData getAsDatabaseSchemaMetaData()
          Gets the sum of the values written to the input stream.
 ActivityOutput getOutput()
          Gets the activity's only output - the database schema metadata in an XML format.
 void setInput(ActivityOutput input)
          Sets the input of this activity to be the output from another activity that will provide the database schema data.
 
Methods inherited from class uk.org.ogsadai.client.toolkit.activity.Activity
addInput, addOutput, addOutputs, getDataResourceID, getInputParameters, getOutputParameters, getOutputs, replaceSpecialCharacters, setDataResourceID, setInput
 
Methods inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent
getDataService, getName, getSession, setDataService, setSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
Copyright statement

See Also:
Constant Field Values
Constructor Detail

DatabaseSchemaToXML

public DatabaseSchemaToXML(ActivityOutput input)
Constructor.

Parameters:
input - Output from another activity that provides the database schema data.
Throws:
java.lang.IllegalArgumentException - If input is null.
Method Detail

getAsDatabaseSchemaMetaData

public DatabaseSchemaMetaData getAsDatabaseSchemaMetaData()
                                                   throws NoActivityOutputException,
                                                          DataFormatException
Gets the sum of the values written to the input stream.

Returns:
sum of values written to input stream.
Throws:
NoActivityOutputException - if there is no output data or the data has not yet been processed to this output or the activity that generates this output has not yet been executed.
DataFormatException - if the output from the activity cannot be parsed into an XML document format.

setInput

public final void setInput(ActivityOutput input)
Sets the input of this activity to be the output from another activity that will provide the database schema data.

Parameters:
input - Output from another activity.
Throws:
java.lang.IllegalArgumentException - If input is null.

getOutput

public ActivityOutput getOutput()
Gets the activity's only output - the database schema metadata in an XML format.

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