net.agmodel.metsoap
Class MetRequest

java.lang.Object
  |
  +--net.agmodel.metsoap.MetRequest
Direct Known Subclasses:
StationMetRequest

public abstract class MetRequest
extends Object

An abstract request for a set of meteorological data over a particular time period
Concrete descendants specify where the data is to come from.
Conforms to the JavaBean pattern to ensure easy SOAP serialization
Copyright (c)2002 National Agricultural Research Center


Constructor Summary
MetRequest()
           
 
Method Summary
 TimeInterval getInterval()
           
 String getLanguage()
           
 float getMissingValueIndicator()
           
 int[] getRequestedElements()
           
 int getResolution()
           
 boolean isSummarisingAllowed()
           
 void setInterval(TimeInterval aTimeInterval)
          Specifies the interval for which data is required
 void setLanguage(String aLanguage)
          Specifies the preferred national language to be used for any text in the result.
Examples of such text include the names of meteorological elements and weather station names
Use the ISO639 standard 2-letter language codes eg from this list.
At present MetBroker supports en - English
ja - Japanese
ko - Korean
no - Norwegian
th - Thai
zh - Chinese
to varying degrees.
 void setMissingValueIndicator(float indicator)
          Set the value that MetBroker will use to indicate missing values.
 void setRequestedElements(int[] metElements)
          Specifies the meteorological elements to retrieve.
 void setResolution(int aResolution)
          Specify the data resolution required
Valid values are:
0 - subhourly
1 - hourly
2 - daily
3 - monthly
These values correspond to the ordinal values of the MetResolution constants in MetBroker.
Note that the actual resolution returned in the subhourly case depends on the database in question.
 void setSummarisingAllowed(boolean yesOrNo)
          Controls whether MetBroker can summarise shorter resolution data to fulfill your request.
MetBroker can automatically summarise, for example, hourly data into daily values if you request daily data and only hourly is available from a station.
This switch lets you control whether MetBroker carries out such summaries.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetRequest

public MetRequest()
Method Detail

setInterval

public void setInterval(TimeInterval aTimeInterval)
Specifies the interval for which data is required
Parameters:
aTimeInterval - the period of time, which must have both start and end specified

getInterval

public TimeInterval getInterval()

setResolution

public void setResolution(int aResolution)
Specify the data resolution required
Valid values are:
0 - subhourly
1 - hourly
2 - daily
3 - monthly
These values correspond to the ordinal values of the MetResolution constants in MetBroker.
Note that the actual resolution returned in the subhourly case depends on the database in question.
Parameters:
aResolution - a code representing the required data resolution

getResolution

public int getResolution()

setSummarisingAllowed

public void setSummarisingAllowed(boolean yesOrNo)
Controls whether MetBroker can summarise shorter resolution data to fulfill your request.
MetBroker can automatically summarise, for example, hourly data into daily values if you request daily data and only hourly is available from a station.
This switch lets you control whether MetBroker carries out such summaries.
Parameters:
yesOrNo - whether or not to allow summarizing

isSummarisingAllowed

public boolean isSummarisingAllowed()

setRequestedElements

public void setRequestedElements(int[] metElements)
Specifies the meteorological elements to retrieve. Each element is represented by an integer code as follows: 0 - air temperature (C)
1 - rain (mm)
2 - wind (speed in m/s, direction in degrees from north)
3 - radiation (hourly and sub-hourly in Watts per m2, daily and monthly in MJ)
4 - humidity (as % or wet and dry bulb temps)
5 - soil temperatures at one or more depths (C)
6 - water temperature in rice paddies (C)
7 - leaf wetness (% of period surface is wet)
8 - bright sunlight (hours)
In the current MetSOAP implementation, elements are returned in the result object in the same order that they are requested.
Parameters:
metElements - an array of the above codes

getRequestedElements

public int[] getRequestedElements()

setLanguage

public void setLanguage(String aLanguage)
Specifies the preferred national language to be used for any text in the result.
Examples of such text include the names of meteorological elements and weather station names
Use the ISO639 standard 2-letter language codes eg from this list.
At present MetBroker supports en - English
ja - Japanese
ko - Korean
no - Norwegian
th - Thai
zh - Chinese
to varying degrees.
Parameters:
the - preferred language

getLanguage

public String getLanguage()

setMissingValueIndicator

public void setMissingValueIndicator(float indicator)
Set the value that MetBroker will use to indicate missing values. The default value is Float.NaN, but this value causes problems in the SOAP Toolkit among others Float.Min_Value or Float.Max_Value are good alternatives.
Parameters:
indicator -  

getMissingValueIndicator

public float getMissingValueIndicator()