org.intamap
Class InterpolateService

java.lang.Object
  extended by org.intamap.InterpolateService

public class InterpolateService
extends Object

Provides an interface to the INTAMAP interpolation service.

Author:
Richard Jones

Field Summary
protected  String serviceURL
           
 
Constructor Summary
InterpolateService()
          Creates a new instance of the interpolation service interface using the INTAMAP server located at intamap.aston.ac.uk.
InterpolateService(String serviceURL)
          Creates a new instance of the interpolation service interface with the given URL.
 
Method Summary
protected  net.opengis.wps.x100.ExecuteDocument generateRequestDocument(InterpolateRequest request)
          Generates an XML document to send to the service.
protected  InterpolateResponse parseResponseDocument(net.opengis.wps.x100.ExecuteResponseDocument responseDocument)
          Parses the XML document returned by the service.
 InterpolateResponse sendRequest(InterpolateRequest request)
          Sends an interpolate request to the service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serviceURL

protected String serviceURL
Constructor Detail

InterpolateService

public InterpolateService()
Creates a new instance of the interpolation service interface using the INTAMAP server located at intamap.aston.ac.uk.


InterpolateService

public InterpolateService(String serviceURL)
Creates a new instance of the interpolation service interface with the given URL. The URL must point to a valid OGC 1.0.0 WPS offering the INTAMAP Interpolate process.

Parameters:
serviceURL - the URL to the interpolation service
Method Detail

generateRequestDocument

protected net.opengis.wps.x100.ExecuteDocument generateRequestDocument(InterpolateRequest request)
Generates an XML document to send to the service. This document will be used by sendRequest(InterpolateRequest).
Extending classes should override this method if they wish to send a non-standard request document to the interpolate service.

Parameters:
request - the request to generate the XML document from
Returns:
an XML document to send to the service

parseResponseDocument

protected InterpolateResponse parseResponseDocument(net.opengis.wps.x100.ExecuteResponseDocument responseDocument)
Parses the XML document returned by the service. Called by sendRequest(InterpolateRequest).
Extending classes should override this method if they are using a a version of the interpolate service that returns a non-standard response.

Parameters:
responseDocument - the XML document returned by the service
Returns:
the response parsed from the XML document

sendRequest

public InterpolateResponse sendRequest(InterpolateRequest request)
                                throws InterpolateException,
                                       IOException
Sends an interpolate request to the service.

Parameters:
request - the request to send
Returns:
the interpolate result
Throws:
InterpolateException - if an exception is thrown by the service during interpolation
IOException - if a problem occurs with the connection to the service