OPeNDAP Hyrax Back End Server (BES)  Updated for version 3.8.3
dap_usage Namespace Reference

Functions

string get_user_supplied_docs (string name, string cgi)
 
string get_user_supplied_docs (string name, string cgi)
 Look in the CGI directory (given by cgi) for a per-cgi HTML* file. More...
 
void html_header (ostream &strm)
 
void html_header (ostream &strm)
 
void write_usage_response (ostream &strm, DDS &dds, DAS &das, const string &dataset_name="", const string &server_name="", bool httpheader=true) throw (Error)
 
void write_usage_response (ostream &strm, DDS &dds, DAS &das, const string &dataset_name, const string &server_name, bool httpheader) throw (Error)
 Build an HTML page that summarizes the information held int eh DDS/DAS. More...
 

Function Documentation

string dap_usage::get_user_supplied_docs ( string  name,
string  cgi 
)
string dap_usage::get_user_supplied_docs ( string  name,
string  cgi 
)

Look in the CGI directory (given by cgi) for a per-cgi HTML* file.

Also look for a dataset-specific HTML* document. Catenate the documents and return them in a single String variable.

Similarly, to locate the dataset-specific HTML* file it catenates `.html' to name, where name is the name of the dataset. If the filename part of name is of the form [A-Za-z]+[0-9]*.* then this function also looks for a file whose name is [A-Za-z]+.html For example, if name is .../data/fnoc1.nc this function first looks for .../data/fnoc1.nc.html. However, if that does not exist it will look for .../data/fnoc.html. This allows one `per-dataset' file to be used for a collection of files with the same root name.

Note
An HTML* file contains HTML without the html, head or body tags (my own notation).

Look for the user supplied CGI- and dataset-specific HTML* documents.

Returns
A String which contains these two documents catenated. Documents that don't exist are treated as `empty'.

Definition at line 494 of file usage.cc.

Referenced by write_usage_response().

void dap_usage::html_header ( ostream &  strm)
void dap_usage::html_header ( ostream &  strm)

Definition at line 407 of file usage.cc.

References DAP_PROTOCOL_VERSION, and PACKAGE_VERSION.

Referenced by write_usage_response().

void dap_usage::write_usage_response ( ostream &  strm,
DDS &  dds,
DAS &  das,
const string &  dataset_name = "",
const string &  server_name = "",
bool  httpheader = true 
)
throw (Error
)
void dap_usage::write_usage_response ( ostream &  strm,
DDS &  dds,
DAS &  das,
const string &  dataset_name,
const string &  server_name,
bool  httpheader 
)
throw (Error
)

Build an HTML page that summarizes the information held int eh DDS/DAS.

This also uses the dataset and server name to lookup extra information that the data provider has made available (using libdap's mime_util.cc:get_user_supplied_docs().

Note
This function is faithful to the original server3 'info' response in all ways except that it does not handle the 'override' document feature of that server. This feature was never used outside of testing, to the best of our knowledge.
Todo:
Update this to use the DDX.
Parameters
strmWrite the HTML to this stream
ddsThe DDS
dasTHe DAS
dataset_nameUse this name to find dataset-specific info added by the provider.
server_nameUse this name to find server-specific info.

Definition at line 436 of file usage.cc.

References get_user_supplied_docs(), and html_header().

Referenced by BESUsageTransmit::send_basic_usage().

Here is the call graph for this function: