|
|||||||||||
| 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.XMLBulkLoad
This activity bulk loads a set of documents into a collection. The data may either be included in the perform document or it can be loaded from another activity's output stream.
It has one (optional) input and one output. The format of the output is
OGSA-DAI specific XML. For example:
<resultCount> 2 </resultCount>
| Constructor Summary | |
XMLBulkLoad()
Constructs a request to bulk load data into a collection. |
|
XMLBulkLoad(ActivityOutput input)
Constructs a request to bulk load data into a collection. |
|
| Method Summary | |
protected java.lang.String |
generateXML()
Generates the XML representing the activity. |
ActivityOutput |
getOutput()
Gets the activity's only output. |
int |
getResultCount()
Get the number of documents imported by the bulk load operation. |
void |
setCollectionName(java.lang.String collectionName)
Set the collection name. |
void |
setCollectionName(java.lang.String collectionName,
boolean createIfNotExists)
Set the collection name and specify whether the collection should be created if it does not exist. |
void |
setInput(ActivityOutput input)
Set the bulk load input stream. |
void |
setInputData(org.w3c.dom.Document document)
Sets the input data for the bulk load. |
void |
setInputData(org.xmldb.api.base.ResourceSet resources)
Sets the input data for the bulk load as a resource set. |
void |
setInputData(java.lang.String content)
Sets the input data for the bulk load. |
| 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 |
public XMLBulkLoad()
public XMLBulkLoad(ActivityOutput input)
input - The input data for this activity| Method Detail |
public void setInput(ActivityOutput input)
input -
public void setInputData(org.xmldb.api.base.ResourceSet resources)
throws CommonSystemException
resources - A org.xmldb.api.base.ResourceSet object
CommonSystemException - if the resourceSet data cannot be written to a String
public void setInputData(java.lang.String content)
throws CommonUserException
resourceSet element containing:resource elements.
<resourceSet>
<resource>
<entry id="1" xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/littleblackbook" src:key="1">
<name>Ally Antonioletti</name>
<address>826 Hume Crescent, Southampton</address>
<phone>01670061244</phone>
</entry>
</resource>
<resource>
<entry id="10" xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/littleblackbook" src:key="10">
<name>Martin Laws</name>
<address>224 Palansuriya Lane, Winchester</address>
<phone>06686142062</phone>
</entry>
</resource>
</resourceSet>
content - A string containing the data for bulk load.
CommonUserException
public void setInputData(org.w3c.dom.Document document)
throws CommonSystemException
document - An org.w3c.dom.Document containing the input data
CommonSystemException - if the document could not be converted into a string.public void setCollectionName(java.lang.String collectionName)
collectionName -
public void setCollectionName(java.lang.String collectionName,
boolean createIfNotExists)
littleblackbook/address/newCollection - the new collection
newCollection can only be created if the parent collections littleblackbook
and address exist.
collectionName - createIfNotExists - If true the collection will be created in the data
resource if it does not exist. Default is false.
public int getResultCount()
throws ActivityOutputException,
DataFormatException
DataFormatException - If the output data is not in the expected format.
ActivityOutputException - If there is no output data.public ActivityOutput getOutput()
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 | ||||||||||