net.agmodel.metDriver
Class FilePerStationPerYear2
java.lang.Object
net.agmodel.dbUtility.InternetHost
net.agmodel.dbUtility.JDBC
net.agmodel.dbUtility.JDBCPostgres
net.agmodel.metDriver.FilePerStationPerYear2
- All Implemented Interfaces:
- AccessMechanism, DBAccessMechanism, MetAccessMechanism
- Direct Known Subclasses:
- OregonIPPC
- public abstract class FilePerStationPerYear2
- extends JDBCPostgres
- implements MetAccessMechanism
getDataHost
public String getDataHost()
getDataPort
public int getDataPort()
getRegionID
public String getRegionID()
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 requiredstationID - identifies which station from the met data source to queryresult - 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
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
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- Overrides:
connectForData in class JDBC
- Throws:
ConnectionException
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- Overrides:
disconnectFromData in class JDBC
- Throws:
ConnectionException
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
Copyright (C) NARC 2001 All Rights Reserved.