net.agmodel.genericBroker
Class DataSourceDetail

java.lang.Object
  extended bynet.agmodel.genericBroker.DataSourceDetail
All Implemented Interfaces:
Comparable, Serializable
Direct Known Subclasses:
MetSourceDetail

public class DataSourceDetail
extends Object
implements Serializable, Comparable

Holds a general description of a database containing spatially-oriented agricultural information.
Used by GenericBrokerRMI to pass database metadata to client applications, so Serializable.
Includes the concept of default display region, which is a small "sample" of the data set suitable as a starting point for a graphical display (eg, show Mt Fuji or Tokyo Bay as a starting point for a database covering the whole of Japan).
Descendant classes describe particular kinds of databases (eg weather, maps, soils).

Version:
1.0
Author:
Matthew Laurenson
See Also:
Serialized Form

Constructor Summary
DataSourceDetail(String ID, String sourceName, GeographicalArea coverage, int loginRequirements)
          Creates a data source description with default display region the same as coverage
DataSourceDetail(String ID, String sourceName, GeographicalArea coverage, int loginRequirements, GeographicalArea defaultDisplayRegion)
          Create a description of this database
 
Method Summary
 int compareTo(Object o)
           
 GeographicalArea getDefaultDisplayRegion()
          A (small) sample area to display when the database is selected, particularly important if the database covers a wide area.
 GeographicalArea getGeographicalArea()
          The portion of the globe that the database covers
 String getID()
          Returns a unique ID which programs can use to identify the database.
 int getLoginRequirements()
          Indicate the usercode and password detail that need to be supplied by users of the database Use the constants included with this interface.
 String getName()
          The name of the database, suitable for presentation to the user.
 String toString()
          The default to String is the name of the data source
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataSourceDetail

public DataSourceDetail(String ID,
                        String sourceName,
                        GeographicalArea coverage,
                        int loginRequirements,
                        GeographicalArea defaultDisplayRegion)
Create a description of this database

Parameters:
ID - the identifier assigned by the broker to this database and used internally by applications.
sourceName - the name of this database in the user's preferred language
coverage - the area of the world that this database covers
loginRequirements - whether this database requires that the user log in (see constants in GenericBrokerRMI)
defaultDisplayRegion - an (interesting) sample display region for this database.

DataSourceDetail

public DataSourceDetail(String ID,
                        String sourceName,
                        GeographicalArea coverage,
                        int loginRequirements)
Creates a data source description with default display region the same as coverage

Parameters:
ID - the identifier assigned by the broker to this database and used internally by applications.
sourceName - the name of this database in the user's preferred language
coverage - the area of the world that this database covers
loginRequirements - whether this database requires that the user log in (see constants in GenericBrokerRMI)
Method Detail

getID

public String getID()
Returns a unique ID which programs can use to identify the database.

Returns:
the ID that MetBroker uses for the database

getName

public String getName()
The name of the database, suitable for presentation to the user.

Returns:
the name of the database

getGeographicalArea

public GeographicalArea getGeographicalArea()
The portion of the globe that the database covers

Returns:
a GeographicalArea which encompasses the locations of all the stations in the database.

getDefaultDisplayRegion

public GeographicalArea getDefaultDisplayRegion()
A (small) sample area to display when the database is selected, particularly important if the database covers a wide area.

Returns:
a GeographicalArea which can be used rather than the area bounds.

getLoginRequirements

public int getLoginRequirements()
Indicate the usercode and password detail that need to be supplied by users of the database Use the constants included with this interface.


toString

public String toString()
The default to String is the name of the data source


compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable


Copyright (C) NARC 2001 All Rights Reserved.