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

java.lang.Object
  extended byuk.org.ogsadai.client.toolkit.activity.RequestComponent
      extended byuk.org.ogsadai.client.toolkit.activity.Activity
          extended byuk.org.ogsadai.client.toolkit.activity.xmldb.XMLListResources

public class XMLListResources
extends Activity

This activity lists the resources within an XML database collection as exposed by an XMLDB data service resource.

It has no input and one output - the list of resources. The format of the output is OGSA-DAI specific XML. For example:

<resourceNames count="3">
<name> someResourceName </name>
<name> someOtherName </name>
<name> andAnotherName </name>
</resourceNames>

Author:
The OGSA-DAI Project Team

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
          Copyright statement
private  java.lang.String mCollectionName
          Collection name
 
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.Activity
 
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent
 
Constructor Summary
XMLListResources()
          Constructs a request to list resources of some collection.
 
Method Summary
protected  java.lang.String generateXML()
          Generates the XML representing the activity.
 ActivityOutput getOutput()
          Gets the activity's only output - the list of names.
 java.lang.String[] getResourceNames()
          Gets the list of resource names.
 void setCollectionName(java.lang.String collectionName)
          Set the collection 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

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
Copyright statement

See Also:
Constant Field Values

mCollectionName

private java.lang.String mCollectionName
Collection name

Constructor Detail

XMLListResources

public XMLListResources()
Constructs a request to list resources of some collection. The resources of the base collection will be listed.

Method Detail

setCollectionName

public void setCollectionName(java.lang.String collectionName)
Set the collection name. The resources of this collection will be listed. If this is set to null then the resources of the base collection will be listed.

Parameters:
collectionName - The name of the collection or null.

getResourceNames

public java.lang.String[] getResourceNames()
                                    throws NoActivityOutputException,
                                           DataFormatException
Gets the list of resource names.

Returns:
0 or more resource names.
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 a list of names.

getOutput

public ActivityOutput getOutput()
Gets the activity's only output - the list of names.

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