|
|||||||||||
| 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.indexedfiles.ReadFile
This activity reads the contents of an indexed file.
Files can either be plain text (in which case the start line
and number of lines to be read can be specified) or binary (the
default, in which case the start byte and number of bytes to be
read can be specified).
The file is assumed to be relative to the OGSA-DAI service.
The output from the activity can be base64 encoded, if required.
The getOutput() method can be used to obtain the
data output from the activity. This data output specifies the
location of the data that is not stored in the index.
| Constructor Summary | |
ReadFile()
Create an instance of this activity. |
|
ReadFile(ActivityOutput input)
Create an instance of this activity. |
|
ReadFile(java.lang.String filename)
Create an instance of this activity and set name of file to be read. |
|
| Method Summary | |
protected java.lang.String |
generateXML()
Generates the XML representing the activity. |
java.lang.String |
getFilename()
Get name of file to be read. |
long |
getLength()
Return number of bytes or lines to be read. |
long |
getOffset()
Return index of first byte/line to be read. |
ActivityOutput |
getOutput()
Get this activity's only output |
boolean |
isBase64encoded()
|
boolean |
isBinary()
Get flag indicating if file is a binary file. |
void |
setBase64encode(boolean base64encode)
Set whether output should be base64 encoded. |
void |
setBinary(boolean isBinary)
Set flag indicating if file is a binary file. |
void |
setFilename(java.lang.String filename)
Set name of file to be read. |
void |
setInput(ActivityOutput input)
Set activity which provides input to this activity. |
void |
setLength(long length)
Set number of bytes or lines to be read. |
void |
setOffset(long offset)
Set index of first byte/line to be read. |
| 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 ReadFile()
public ReadFile(java.lang.String filename)
filename - - relative path from data service to file.public ReadFile(ActivityOutput input)
input - - activity input stream providing data to this activity.| Method Detail |
public void setFilename(java.lang.String filename)
filename - - relative path from data service to file.public java.lang.String getFilename()
public void setBinary(boolean isBinary)
isBinary - public boolean isBinary()
public void setLength(long length)
length - - number of bytes or lines.
java.lang.IllegalArgumentException - if < -1.public long getLength()
public void setOffset(long offset)
offset - public long getOffset()
public boolean isBase64encoded()
true if the output will be base64 encodedpublic void setBase64encode(boolean base64encode)
base64encode - public void setInput(ActivityOutput input)
input -
java.lang.IllegalArgumentException - if
input is null.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 | ||||||||||