net.agmodel.metDriver
Class ClimDBApacheSOAP

java.lang.Object
  extended bynet.agmodel.metDriver.ClimDBApacheSOAP
All Implemented Interfaces:
DBAccessMechanism, MetAccessMechanism

public class ClimDBApacheSOAP
extends Object
implements MetAccessMechanism

Title:

Description:

Copyright: Copyright (c) 2002

Company:

Version:
1.0
Author:
unascribed

Field Summary
static Map climDBVar2MetBroker
           
static String objectURI
           
static URL rpcrouter
           
static TimeZone tz
           
 
Constructor Summary
ClimDBApacheSOAP(MetSourceForDrivers metSource, Properties properties)
           
 
Method Summary
 Vector[] call(Vector params, String methodName)
           
 void checkForDatabaseUpdates()
          connect to database and check the metadata
 boolean connectForData(String username, String password)
          Called before data is retrieved from the AccessMechanism
 boolean connectForMetaData(String username, String password)
          Called before metadata is retrieved from the AccessMechanism
 void disconnectFromData()
          Called after data is retrieved from the AccessMechanism using connectForData.
 void disconnectFromMetaData()
          Called after meta data is retrieved from the AccessMechanism using connectForMetaData.
 TimeZone getDatabaseTimeZone()
           
 Vector[] getVariablebySiteStationTime(String regionID, String stationID, Interval ofInterest, String variable)
           
 void queryForStation(MetRequest request, String stationID, StationDataSetImpl result)
          Retrieve the relevant data from a single station.
 void stationsForRegion(String regionID)
           
 void updateRegionList()
          Update the list of regions (if any) held by the MetSource
 void updateStationList(String fromName)
          Update the list of stations held by the MetSource
 Set variablesForStation(String regionID, String stationID)
           
 Period variableTimeRange(String regionID, String stationID, String variableID)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tz

public static final TimeZone tz

rpcrouter

public static URL rpcrouter

climDBVar2MetBroker

public static final Map climDBVar2MetBroker

objectURI

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

ClimDBApacheSOAP

public ClimDBApacheSOAP(MetSourceForDrivers metSource,
                        Properties properties)
Method Detail

queryForStation

public void queryForStation(MetRequest request,
                            String stationID,
                            StationDataSetImpl result)
                     throws ConnectionException
Description copied from interface: MetAccessMechanism
Retrieve the relevant data from a single station.

Specified by:
queryForStation in interface MetAccessMechanism
Parameters:
request - describes what data is required
stationID - identifies which station from the met data source to query
result - the skeletal query result (created by MetSourceImpl) for the driver fill in with data hostID is the native identifier for the station on the host database system.
If the request is a StationMetRequest, then the hostID will also be embedded in the request but should be ignored by this method. If there is no data at all for the station, this method should return the skeletal query result untouched. If there is no data for a particular element, then no corresponding sequence should be inserted into the StationDataSetImpl.
Throws:
ConnectionException

getDatabaseTimeZone

public TimeZone getDatabaseTimeZone()
Specified by:
getDatabaseTimeZone in interface MetAccessMechanism

updateRegionList

public void updateRegionList()
                      throws GeneralException
Description copied from interface: MetAccessMechanism
Update the list of regions (if any) held by the MetSource

Specified by:
updateRegionList in interface MetAccessMechanism
Throws:
GeneralException

updateStationList

public void updateStationList(String fromName)
                       throws GeneralException
Description copied from interface: MetAccessMechanism
Update the list of stations held by the MetSource

Specified by:
updateStationList in interface MetAccessMechanism
Parameters:
fromName - start the update from this station (the driver may ignore this value and update all stations) The fromStation parameter is intended to help with large databases where, particularly during driver development, the updating process may fail midway through. It avoids the need to start again from the beginning. Drivers are welcome to entirely ignore this parameter. A null parameter value indicates that updating should start from the beginning.
Throws:
GeneralException

stationsForRegion

public void stationsForRegion(String regionID)

variablesForStation

public Set variablesForStation(String regionID,
                               String stationID)

variableTimeRange

public Period variableTimeRange(String regionID,
                                String stationID,
                                String variableID)
                         throws ParseException
Throws:
ParseException

connectForData

public boolean connectForData(String username,
                              String password)
                       throws ConnectionException
Description copied from interface: DBAccessMechanism
Called before data is retrieved from the AccessMechanism

Specified by:
connectForData in interface DBAccessMechanism
Parameters:
username - a valid username for the database if it requires it, or null otherwise.
password - the corresponding password (not encrypted) if required, or null otherwise.
Returns:
true if the connection was established, false otherwise
Throws:
ConnectionException - if a connection could not be established

disconnectFromData

public void disconnectFromData()
                        throws ConnectionException
Description copied from interface: DBAccessMechanism
Called after data is retrieved from the AccessMechanism using connectForData.

Specified by:
disconnectFromData in interface DBAccessMechanism
Throws:
ConnectionException - if a connection could not be disconnected

connectForMetaData

public boolean connectForMetaData(String username,
                                  String password)
                           throws ConnectionException
Description copied from interface: DBAccessMechanism
Called before metadata is retrieved from the AccessMechanism

Specified by:
connectForMetaData in interface DBAccessMechanism
Parameters:
username - a valid username for the database if it requires it, or null otherwise.
password - the corresponding password (not encrypted) if required, or null otherwise.
Returns:
true if the connection was established, false otherwise
Throws:
ConnectionException - if a connection could not be established

disconnectFromMetaData

public void disconnectFromMetaData()
                            throws ConnectionException
Description copied from interface: DBAccessMechanism
Called after meta data is retrieved from the AccessMechanism using connectForMetaData.

Specified by:
disconnectFromMetaData in interface DBAccessMechanism
Throws:
ConnectionException - if a connection could not be disconnected

checkForDatabaseUpdates

public void checkForDatabaseUpdates()
Description copied from interface: DBAccessMechanism
connect to database and check the metadata

Specified by:
checkForDatabaseUpdates in interface DBAccessMechanism

getVariablebySiteStationTime

public Vector[] getVariablebySiteStationTime(String regionID,
                                             String stationID,
                                             Interval ofInterest,
                                             String variable)

call

public Vector[] call(Vector params,
                     String methodName)


Copyright (C) NARC 2001 All Rights Reserved.