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

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

public class XUpdate
extends Activity

This activity updates a resource/collection according to an XUpdate expression.

It has no input and one output. The format of the output is OGSA-DAI specific XML. For example: <modifiedNodes> 2 </modifiedNodes>

Author:
The OGSA-DAI Project Team

Constructor Summary
XUpdate()
          Constructs a request to update a resource/collection using XUpdate.
XUpdate(java.lang.String expression)
          Constructs a request to update a resource/collection using XUpdate.
 
Method Summary
protected  java.lang.String generateXML()
          Generates the XML representing the activity.
 int getModifiedNodes()
          Get the number of nodes modified by the update.
 ActivityOutput getOutput()
          Gets the activity's only output.
 void setExpression(java.lang.String expression)
          Set the XUpdate expression.
 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

XUpdate

public XUpdate()
Constructs a request to update a resource/collection using XUpdate.


XUpdate

public XUpdate(java.lang.String expression)
Constructs a request to update a resource/collection using XUpdate.

Parameters:
expression -
Method Detail

setExpression

public void setExpression(java.lang.String expression)
Set the XUpdate expression.

Parameters:
expression -

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 -

getModifiedNodes

public int getModifiedNodes()
                     throws ActivityOutputException,
                            DataFormatException
Get the number of nodes modified by the update.

Returns:
number of modified nodes.
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