uk.org.ogsadai.client.toolkit.activity.xmldb
Class XMLCreateResourceFromActivityOutput

java.lang.Object
  |
  +--uk.org.ogsadai.client.toolkit.activity.RequestComponent
        |
        +--uk.org.ogsadai.client.toolkit.activity.Activity
              |
              +--uk.org.ogsadai.client.toolkit.activity.xmldb.XMLCreateResourceFromActivityOutput

public class XMLCreateResourceFromActivityOutput
extends Activity

This activity creates a new resource within an XML database collection from the output of another activity.

It has no input and one output. The format of the output is OGSA-DAI specific XML. For example: <createdResource name="someNewResource"/>

Author:
The OGSA-DAI Project Team

Constructor Summary
XMLCreateResourceFromActivityOutput()
          Constructs a request to create a new resource.
XMLCreateResourceFromActivityOutput(java.lang.String resourceName)
          Constructs a request to create a new resource.
 
Method Summary
protected  java.lang.String generateXML()
          Generates the XML representing the activity.
 ActivityOutput getOutput()
          Gets the activity's only output.
 java.lang.String getResourceName()
          Gets the name of the added resource.
 void setInput(ActivityOutput input)
          Sets the name of the output that will provide the specified input to this activity.
 void setParentCollectionName(java.lang.String parentCollectionName)
          Set the parent collection name.
 void setResourceName(java.lang.String resourceName)
          Set the resource name.
 
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

XMLCreateResourceFromActivityOutput

public XMLCreateResourceFromActivityOutput()
Constructs a request to create a new resource.


XMLCreateResourceFromActivityOutput

public XMLCreateResourceFromActivityOutput(java.lang.String resourceName)
Constructs a request to create a new resource.

Parameters:
resourceName -
Method Detail

setResourceName

public void setResourceName(java.lang.String resourceName)
Set the resource name.

Parameters:
resourceName -

setParentCollectionName

public void setParentCollectionName(java.lang.String parentCollectionName)
Set the parent collection name.

Parameters:
parentCollectionName -

getOutput

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

Returns:
the activity output.

getResourceName

public java.lang.String getResourceName()
                                 throws ActivityOutputException,
                                        DataFormatException
Gets the name of the added resource.

Returns:
String containing the resource name.
Throws:
DataFormatException - If the output data is not in the expected format.
ActivityOutputException - If there is no output data.

setInput

public void setInput(ActivityOutput input)
Sets the name of the output that will provide the specified input to this activity.

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

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
See Also:
Activity.generateXML()