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

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

public class XMLListCollections
extends Activity

This activity lists the collections within an XML database collection.

It has no input and one output. The format of the output is OGSA-DAI specific XML. For example: <collectionNames count="3">
<name> someCollectionName </name>
<name> someOtherName </name>
<name> andAnotherName </name>
</collectionNames>

Author:
The OGSA-DAI Project Team

Constructor Summary
XMLListCollections()
          Constructs a request to list collections of some collection.
 
Method Summary
protected  java.lang.String generateXML()
          Generates the XML representing the activity.
 java.lang.String[] getCollectionNames()
          Gets the list of collection names.
 ActivityOutput getOutput()
          Gets the activity's only output.
 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, 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

XMLListCollections

public XMLListCollections()
Constructs a request to list collections of some collection.

Method Detail

setCollectionName

public void setCollectionName(java.lang.String collectionName)
Set the collection name. The sub-collections of this collection will be listed. If this is set to null then the sub-collections of the base collection for the data service will be listed.

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

getCollectionNames

public java.lang.String[] getCollectionNames()
                                      throws ActivityOutputException,
                                             DataFormatException
Gets the list of collection names.

Returns:
String[] containing 0 or more collection names.
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
See Also:
Activity.generateXML()