net.agmodel.demdata
Class DEMBrokerHTTP

java.lang.Object
  |
  +--net.agmodel.genericBroker.ServiceHTTP
        |
        +--net.agmodel.genericBroker.ServerHTTP
              |
              +--net.agmodel.genericBroker.GenericBrokerHTTP
                    |
                    +--net.agmodel.demdata.DEMBrokerHTTP

public class DEMBrokerHTTP
extends GenericBrokerHTTP

Provides firewall friendly wrapper for DEMBroker

Description: Uses HTTP communication with a wrapper servlet

Copyright: Copyright (c) NARO 2002

Company:


Field Summary
static int GETELEVATION
           
static int GETREGION
           
static String HTTPHOSTPARAM
           
static String HTTPPORTPARAM
           
 
Fields inherited from class net.agmodel.genericBroker.GenericBrokerHTTP
ALREADYLOGGEDIN, GETSOURCEDETAIL, LISTSOURCES, LISTSOURCESINREGION, LOGIN, LOGINWITHEMAIL, LOGINWITHPASSWORD, LOGOUTALLSOURCES, LOGOUTOFSOURCE
 
Fields inherited from class net.agmodel.genericBroker.ServerHTTP
CONNECT, CONNECTUSER, DISCONNECT
 
Fields inherited from class net.agmodel.genericBroker.ServiceHTTP
HOSTPARAMEXTENSION, PORTPARAMEXTENSION, servlet
 
Constructor Summary
DEMBrokerHTTP(String host)
           
DEMBrokerHTTP(String host, int port)
           
 
Method Summary
 DEMSourceDetail getDEMSourceDetail(String sessionID, String dataSourceID)
          Gets details about a single data source.
 double getElevation(String sessionID, DEMPointRequest request)
           
 GridLayer getRegion(String sessionID, DEMSpatialRequest request)
          Gets DEM data to fulfil the request.
protected  String getServletPath()
           
 DEMSourceDetail[] listDEMSourceDetails(String sessionID)
          Get the details for all the data sources in the broker.
 DEMSourceDetail[] listDEMSourceDetails(String sessionID, GeographicalArea ofInterest)
          Get the details of the data sources in the broker that coincide with the area specified.
 
Methods inherited from class net.agmodel.genericBroker.GenericBrokerHTTP
alreadyLoggedIn, getSourceDetail, listSourceDetails, listSourceDetails, loginToDataSource, loginToDataSource, loginToDataSource, logOutOfAllSources, logOutOfSource, supplyData
 
Methods inherited from class net.agmodel.genericBroker.ServerHTTP
disconnect, getConnection, getConnection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GETREGION

public static final int GETREGION
See Also:
Constant Field Values

GETELEVATION

public static final int GETELEVATION
See Also:
Constant Field Values

HTTPHOSTPARAM

public static final String HTTPHOSTPARAM
See Also:
Constant Field Values

HTTPPORTPARAM

public static final String HTTPPORTPARAM
See Also:
Constant Field Values
Constructor Detail

DEMBrokerHTTP

public DEMBrokerHTTP(String host,
                     int port)
              throws GeneralException

DEMBrokerHTTP

public DEMBrokerHTTP(String host)
              throws GeneralException
Method Detail

getServletPath

protected String getServletPath()
Specified by:
getServletPath in class ServiceHTTP

listDEMSourceDetails

public DEMSourceDetail[] listDEMSourceDetails(String sessionID)
                                       throws GeneralException
Get the details for all the data sources in the broker.

Parameters:
sessionID - the ID returned by getConnection
Returns:
a list of sources. Returns an array of 0 length if the broker doesn't have any sources (not much use as a broker!)
GeneralException

listDEMSourceDetails

public DEMSourceDetail[] listDEMSourceDetails(String sessionID,
                                              GeographicalArea ofInterest)
                                       throws GeneralException
Get the details of the data sources in the broker that coincide with the area specified.

Parameters:
sessionID - the ID returned by getConnection
ofInterest - the area from which data is required
Returns:
a list of sources whose GeographicalAreas overlap with the area of Interest. Returns an array of 0 length if no such sources exist.
GeneralException

getDEMSourceDetail

public DEMSourceDetail getDEMSourceDetail(String sessionID,
                                          String dataSourceID)
                                   throws GeneralException
Gets details about a single data source.

Parameters:
sessionID - the ID returned by getConnection
Returns:
the database details
Throws:
IllegalArgumentException - if the data source ID is not known
GeneralException

getRegion

public GridLayer getRegion(String sessionID,
                           DEMSpatialRequest request)
                    throws GeneralException
Gets DEM data to fulfil the request. If the requested resolution is finer than the data available, only the available resolution will be returned.
eg If you request 10m resolution and 50m is the finest available, then 50m resolution data will be returned in the result. If the requested resolution is coarser than the available data, the DEM nearest in resolution (but finer) will be used, and the data will be sampled to the requested resolution (ie the nearest source data point to each result data point will be used). The data is not interpolated in any way.

Parameters:
request -
Returns:
Throws:
RemoteException
GeneralException

getElevation

public double getElevation(String sessionID,
                           DEMPointRequest request)
                    throws GeneralException
GeneralException