uk.org.ogsadai.client.toolkit.activity.transform
Class StringTokenizerActivity
java.lang.Object
|
+--uk.org.ogsadai.client.toolkit.activity.RequestComponent
|
+--uk.org.ogsadai.client.toolkit.activity.Activity
|
+--uk.org.ogsadai.client.toolkit.activity.transform.StringTokenizerActivity
- public class StringTokenizerActivity
- extends Activity
This activity separates string blocks it receives into smaller blocks based upon a set of delimiters.
This activity has one input - the data to be tokenized - and one output - the tokenized data.
- Author:
- The OGSA-DAI Project Team
Field Summary |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
private java.lang.String |
mDelimiters
The delimiters to break up each block into sub-blocks |
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.Activity |
|
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent |
|
Method Summary |
protected java.lang.String |
generateXML()
Generates the XML representing the activity. |
ActivityOutput |
getOutput()
Gets the activity's only output - the tokenized data. |
void |
setDelimiters(java.lang.String delimiters)
Sets the delimiters to use when breaking up the string. |
void |
setInput(ActivityOutput input)
Sets the input of this activity to be the output from another activity that will provide the data to be tokenized. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COPYRIGHT_NOTICE
private static final java.lang.String COPYRIGHT_NOTICE
-
Copyright statement
- See Also:
- Constant Field Values
mDelimiters
private java.lang.String mDelimiters
-
The delimiters to break up each block into sub-blocks
StringTokenizerActivity
public StringTokenizerActivity()
-
Constructs an activity to tokenize the input.
StringTokenizerActivity
public StringTokenizerActivity(java.lang.String delimiters)
-
Constructs an activity to tokenize the input using the specified delimiters.
setInput
should be called to set the activity that provides input to this activity.
- Parameters:
delimiters
- The delimiters used to separate tokens
- Throws:
java.lang.IllegalArgumentException
- If delimiters
is null
.
StringTokenizerActivity
public StringTokenizerActivity(java.lang.String delimiters,
ActivityOutput input)
-
Constructs an activity to tokenize the input using the specified delimiters.
- Parameters:
delimiters
- The delimiters used to separate tokens
input
- Output from another activity that will provide input to this activity.
- Throws:
java.lang.IllegalArgumentException
- If input
or delimiters
are. null
.
getOutput
public ActivityOutput getOutput()
-
Gets the activity's only output - the tokenized data.
-
- Returns:
- the activity output
setInput
public final void setInput(ActivityOutput input)
-
Sets the input of this activity to be the output from another activity that will provide the data to be tokenized.
-
- Parameters:
input
- Output from another activity.
- Throws:
java.lang.IllegalArgumentException
- If input
is null
.
setDelimiters
public final void setDelimiters(java.lang.String delimiters)
-
Sets the delimiters to use when breaking up the string.
-
- Parameters:
delimiters
- The delimiters used to separate tokens
- Throws:
java.lang.IllegalArgumentException
- If delimiters
is null
.
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