|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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
This activity updates a resource/collection exposed by an XMLDB data service resource using an XUpdate expression.
It has no input and one output - the update count in XML. The format of the output is OGSA-DAI specific XML. For example:
<modifiedNodes> 2 </modifiedNodes>
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
private java.lang.String |
mCollectionName
Name of collection to update |
private java.lang.String |
mExpression
XUpdate expression |
private java.lang.String |
mResourceName
Name of resource to update |
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.Activity |
|
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent |
|
Constructor Summary | |
XUpdate()
Constructs an XUpdate request. |
|
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()
Gets the number of updated nodes. |
ActivityOutput |
getOutput()
Gets the activity's only output - the XUpdate result. |
void |
setCollectionName(java.lang.String collectionName)
Set the collection name. |
void |
setExpression(java.lang.String expression)
Set the XUpdate expression. |
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, 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 |
private static final java.lang.String COPYRIGHT_NOTICE
private java.lang.String mExpression
private java.lang.String mResourceName
private java.lang.String mCollectionName
Constructor Detail |
public XUpdate()
setExpression
All resources in the base collection and its sub-collections
will be updated.
public XUpdate(java.lang.String expression)
expression
- XUpdate update expression.
java.lang.IllegalArgumentException
- If expression
is null
Method Detail |
public void setExpression(java.lang.String expression)
expression
- XUpdate update expression.
java.lang.IllegalArgumentException
- If expression
is null
public void setResourceName(java.lang.String resourceName)
null
then the update
will be executed on all the resources in the selected
collection.
resourceName
- The name of the resource or null
.public void setCollectionName(java.lang.String collectionName)
null
then the update
will be executed within the base collection.
collectionName
- The name of the collection or null
.public ActivityOutput getOutput()
public int getModifiedNodes() throws NoActivityOutputException, DataFormatException
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 a
count.protected java.lang.String generateXML()
RequestComponent
generateXML
in class Activity
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |