uk.org.ogsadai.client.toolkit.activity.sql
Class RemoveDuplicatesWebRowSet

java.lang.Object
  |
  +--uk.org.ogsadai.client.toolkit.activity.RequestComponent
        |
        +--uk.org.ogsadai.client.toolkit.activity.Activity
              |
              +--uk.org.ogsadai.client.toolkit.activity.sql.RemoveDuplicatesWebRowSet

public class RemoveDuplicatesWebRowSet
extends Activity

This activity is usually linked to the outupt of a SQLBag activity and aims at removing any duplicate rows existing in the WebRowSet document. therefore, both the input and the output are WebRowSet documents.

Author:
OGSA-DAI Project Team

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
          Copyright statement
private  int mResultSetType
          Type of ResultSets generated using this class
 
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.Activity
 
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent
 
Constructor Summary
RemoveDuplicatesWebRowSet()
          Consructs an activity whose input will normally be the output of a SQLQueryAND activity.
 
Method Summary
protected  java.lang.String generateXML()
          Generates the XML representing the activity.
 ActivityOutput getOutput()
          Gets the activity's only output.
 java.lang.String getOutString()
          get the output as a string
 java.sql.ResultSet getResultSet()
          Get the WebRowSet XML output from this activity and convert it into a ResultSet of type specified by getResultSetType.
 void setInput(ActivityOutput input)
          Sets the input of this activity
 
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

mResultSetType

private int mResultSetType
Type of ResultSets generated using this class

Constructor Detail

RemoveDuplicatesWebRowSet

public RemoveDuplicatesWebRowSet()
Consructs an activity whose input will normally be the output of a SQLQueryAND activity.

Method Detail

setInput

public void setInput(ActivityOutput input)
Sets the input of this activity

Parameters:
input - the activty input

getOutput

public ActivityOutput getOutput()
Gets the activity's only output.

Returns:
the activity output.

getOutString

public java.lang.String getOutString()
                              throws NoActivityOutputException
get the output as a string

Returns:
the output string
Throws:
NoActivityOutputException

getResultSet

public java.sql.ResultSet getResultSet()
                                throws NoActivityOutputException,
                                       DataFormatException
Get the WebRowSet XML output from this activity and convert it into a ResultSet of type specified by getResultSetType.

Returns:
ResultSet containing query result.
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 ResultSet.

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