Hyrax - Example BES Modules: Difference between revisions

From OPeNDAP Documentation
⧼opendap2-jumptonavigation⧽
(New page: We have provided you with two example BES modules. These modules are the Hello World module and the CSV data handler module. Both of these modules are available from the SVN source code r...)
 
(No difference)

Revision as of 07:02, 7 November 2007

We have provided you with two example BES modules. These modules are the Hello World module and the CSV data handler module.

Both of these modules are available from the SVN source code repository and are not included in the source tar ball or the binary distributions. To get them you will need to 'check out' the bes source code. @TODO

Hello World

The Hello World module, the SayModule class, adds a new command to the BES, the SayCommand. From the command line client you would execute the following request:

say <something> to <someone>;

For example:

say hello to world;

It also adds the SayRequestHandler class, which handles help and version requests, the SayResponseHandler class, which handles building AND populating the informational response, and the SayReporter, which reports on what is being said to who in a log file configured in the BES configuration file.

CSV Data Handler Module

The CSV Data Handler Module handles requests for data in the CSV format (comma separated). Here is an example file:

"Station<String>","latitude<Float32>","longitude<Float32>","temperature_K<Float32>","Notes<String>"
"CMWM",-34.7,23.7,264.3,
"BWWJ",-34.2,21.5,262.1,"Foo"
"CWQK",-32.7,22.3,268.4,
"CRLM",-33.8,22.1,270.2,"Blah"
"FOOB",-32.9,23.4,269.69,"FOOBAR"

The types of data allowed are:

  • String
  • Byte
  • Int16
  • Int32
  • Float32
  • Float64

The CSV Data Handler Module class CSVModule adds a request handler (CSVRequestHandler) to handle populating DAP2 response objects (DAS, DDS, DataDDS) as well as the standard response for help and version. The Module also tells the BES that it can handle THREDDS catalog requests.