Generated: Sun Oct 7 15:19:11 BST 2007

org.embl.ebi.SoaplabServer.gowlab
Class RunPlugInBaseImpl

java.lang.Object
  extended by org.embl.ebi.SoaplabServer.gowlab.RunPlugInBaseImpl
All Implemented Interfaces:
RunPlugIn
Direct Known Subclasses:
RunPlugInDefaultImpl

public abstract class RunPlugInBaseImpl
extends java.lang.Object
implements RunPlugIn

An abstract implementation of RunPlugIn interface, serving as a "utility" class for those wishing to extend it by a real implementation.

Version:
$Id: RunPlugInBaseImpl.java,v 1.1.1.1 2005/06/15 09:00:19 marsenger Exp $
Author:
Martin Senger

Field Summary
 
Fields inherited from interface org.embl.ebi.SoaplabServer.gowlab.RunPlugIn
DEBUG, METHOD_GET, METHOD_POST, PREFERRED_METHOD, RESULT_NAMES, SERVICE_NAME, XSLT_DIR, XSLT_FILE
 
Constructor Summary
RunPlugInBaseImpl()
           
 
Method Summary
abstract  void fetch(HTTPClient.HTTPConnection con, HTTPClient.URI supplierURI, HTTPClient.NVPair[] formData, HTTPClient.NVPair[] files)
          Must be implemented by sub-classes.
static HTTPClient.NVPair[] query2data(java.lang.String query)
          A utility converting a query string (xxx=yyy&kkk=lll) into form-elements data.
static java.lang.String removeHtml(java.lang.String input)
          A utility removing HTML tags from 'input'.
 void setEventManager(org.embl.ebi.analysis.EventManager newValue)
          Set an Event Manager where this instance will report about the fetching.
 void setProperties(java.util.Properties newValue)
          Set additional properties that can be useful during fetching data.
 void setResultManager(org.embl.ebi.analysis.ResultManager newValue)
          Set a Result Manager where this instance will store fetched data, and where it will report about a success or failure.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RunPlugInBaseImpl

public RunPlugInBaseImpl()
Method Detail

fetch

public abstract void fetch(HTTPClient.HTTPConnection con,
                           HTTPClient.URI supplierURI,
                           HTTPClient.NVPair[] formData,
                           HTTPClient.NVPair[] files)
Must be implemented by sub-classes.

Specified by:
fetch in interface RunPlugIn
Parameters:
con - is an open connection to a site where to go
formData - are named values representing input data to be sent (usually they correspond to data sent from an HTML form if the page is accessed manually). Parameter may be null.

Sometimes it is expected to send a query string instead of name/value pairs of data. This is simulated by using 'formData' with only one element, whose 'name' part is null. The 'value' part is used as a query string.

files - represents files to be uploaded (together with the 'formData' they consitute full input data set). The data will be sent using multipart/form-data encoding. Each pair represents one file - the name refers to the 'name' attribute to be used in the header of the part, and the value is the actual filename (the file will be read and it's contents put in the body of that part). Parameter may be null.

setResultManager

public void setResultManager(org.embl.ebi.analysis.ResultManager newValue)
Description copied from interface: RunPlugIn
Set a Result Manager where this instance will store fetched data, and where it will report about a success or failure.

Specified by:
setResultManager in interface RunPlugIn
Parameters:
newValue - to be set

setEventManager

public void setEventManager(org.embl.ebi.analysis.EventManager newValue)
Description copied from interface: RunPlugIn
Set an Event Manager where this instance will report about the fetching.

Specified by:
setEventManager in interface RunPlugIn
Parameters:
newValue - to be set

setProperties

public void setProperties(java.util.Properties newValue)
Description copied from interface: RunPlugIn
Set additional properties that can be useful during fetching data. Some of the recognized property names are defined elswhere in this interface.

Specified by:
setProperties in interface RunPlugIn
Parameters:
newValue - poperties to be set

removeHtml

public static java.lang.String removeHtml(java.lang.String input)
A utility removing HTML tags from 'input'.


query2data

public static HTTPClient.NVPair[] query2data(java.lang.String query)
A utility converting a query string (xxx=yyy&kkk=lll) into form-elements data.


Generated: Sun Oct 7 15:19:11 BST 2007

Submit a bug or feature
Generated: Sun Oct 7 15:19:11 BST 2007