libdap::DODSFilter Class Reference

Common functions for DODS server filter programs. More...

`#include <DODSFilter.h>`

## Public Types

enum | Response { Unknown_Response , DAS_Response , DDS_Response , DataDDS_Response , DDX_Response , DataDDX_Response , BLOB_Response , Version_Response }

## Public Member Functions

virtual void | dataset_constraint (DDS &dds, ConstraintEvaluator &eval, FILE *out, bool ce_eval=true) const
virtual void | dataset_constraint (DDS &dds, ConstraintEvaluator &eval, ostream &out, bool ce_eval=true) const
virtual void | dataset_constraint_ddx (DDS &dds, ConstraintEvaluator &eval, ostream &out, const string &boundary, const string &start, bool ce_eval=true) const
| DODSFilter ()
| DODSFilter (int argc, char *argv[]) throw (Error)
| DODSFilter constructor.
virtual void | establish_timeout (FILE *stream) const
virtual void | establish_timeout (ostream &stream) const
virtual void | functional_constraint (BaseType &var, DDS &dds, ConstraintEvaluator &eval, FILE *out) const
virtual void | functional_constraint (BaseType &var, DDS &dds, ConstraintEvaluator &eval, ostream &out) const
virtual string | get_action () const
virtual string | get_cache_dir () const
| Get the cache directory.
virtual string | get_ce () const
| Get the constraint expression.
virtual string | get_cgi_version () const
virtual time_t | get_das_last_modified_time (const string &anc_location="") const
virtual time_t | get_data_last_modified_time (const string &anc_location="") const
virtual time_t | get_dataset_last_modified_time () const
virtual string | get_dataset_name () const
| Get the dataset name.
virtual string | get_dataset_version () const
| Get the version information for the dataset.
virtual time_t | get_dds_last_modified_time (const string &anc_location="") const
virtual time_t | get_request_if_modified_since () const
virtual Response | get_response () const
int | get_timeout () const
virtual string | get_URL () const
virtual bool | is_conditional () const
| Is this request conditional?
virtual void | print_usage () const
| Print usage information for a filter program.
virtual void | send_das (DAS &das, const string &anc_location="", bool with_mime_headers=true) const
virtual void | send_das (FILE *out, DAS &das, const string &anc_location="", bool with_mime_headers=true) const
| Transmit a DAS.
virtual void | send_das (ostream &out, DAS &das, const string &anc_location="", bool with_mime_headers=true) const
| Transmit a DAS.
virtual void | send_data (DDS &dds, ConstraintEvaluator &eval, FILE *data_stream, const string &anc_location="", bool with_mime_headers=true) const
| Transmit data.
virtual void | send_data (DDS &dds, ConstraintEvaluator &eval, ostream &data_stream, const string &anc_location="", bool with_mime_headers=true) const
| Transmit data.
virtual void | send_data_ddx (DDS &dds, ConstraintEvaluator &eval, ostream &data_stream, const string &start, const string &boundary, const string &anc_location="", bool with_mime_headers=true) const
| Transmit data.
virtual void | send_dds (DDS &dds, ConstraintEvaluator &eval, bool constrained=false, const string &anc_location="", bool with_mime_headers=true) const
virtual void | send_dds (FILE *out, DDS &dds, ConstraintEvaluator &eval, bool constrained=false, const string &anc_location="", bool with_mime_headers=true) const
| Transmit a DDS.
virtual void | send_dds (ostream &out, DDS &dds, ConstraintEvaluator &eval, bool constrained=false, const string &anc_location="", bool with_mime_headers=true) const
| Transmit a DDS.
virtual void | send_ddx (DDS &dds, ConstraintEvaluator &eval, FILE *out, bool with_mime_headers=true) const
virtual void | send_ddx (DDS &dds, ConstraintEvaluator &eval, ostream &out, bool with_mime_headers=true) const
virtual void | send_version_info () const
| Send version information back to the client program.
virtual void | set_ce (string _ce)
virtual void | set_cgi_version (string version)
virtual void | set_dataset_name (const string _dataset)
virtual void | set_response (const string &r)
void | set_timeout (int timeout=0)
virtual void | set_URL (const string &url)

## Protected Member Functions

void | initialize ()
void | initialize (int argc, char *argv[])
virtual int | process_options (int argc, char *argv[])

## Protected Attributes

string | d_action
time_t | d_anc_das_lmt
time_t | d_anc_dds_lmt
string | d_anc_dir
string | d_anc_file
bool | d_bad_options
string | d_cache_dir
string | d_cgi_ver
bool | d_comp
bool | d_conditional_request
string | d_dap2ce
string | d_dataset
time_t | d_if_modified_since
string | d_program_name
Response | d_response
int | d_timeout
string | d_url

## Detailed Description

Common functions for DODS server filter programs.

When a DODS server receives a request from a DODS client, the server CGI script dispatches the request to one of several `‘filter’' programs. Each filter is responsible for returning a different aspect of the dataset information: one is for data, one is for the dataset DDS, one is for the dataset DAS, and a fourth is for a usage message describing the server itself. Some installations may have additional optional filters.

The filter program receives a data request from the dispatch script. It receives its operating parameters from the command line, like any UNIX command, and it returns its output to standard output, which the httpd server packages up into a reply to the client.

This class contains some common functions for the filter programs used to make up the DODS data servers. The filter programs do not have to be called by a CGI program, but that is the normal mechanism by which they are invoked.

Todo:

  Add a test to make sure that the required arguments are given.

  We need to rethink the ancillary file/directory stuff. I don't think it's ever been used...

Author
  jhrg 8/26/97

Definition at line 77 of file DODSFilter.h.

## Member Enumeration Documentation

## Response

enum libdap::DODSFilter::Response

Types of responses DODSFilter know about.

Definition at line 80 of file DODSFilter.h.

## Constructor & Destructor Documentation

## DODSFilter() [1/2]

libdap::DODSFilter::DODSFilter | ( |  | ) |

inline

Make an empty instance. Use the set_*() methods to load with needed values. You must call at least set_dataset_name() or be requesting version information.

Todo:
  Add methods to provide a way to set all of the parameters this class contains. They can currently only be set using the argc/argv command line parameters.

Definition at line 127 of file DODSFilter.h.

## DODSFilter() [2/2]

libdap::DODSFilter::DODSFilter | ( | int | argc,
|  | char * | argv[]
| ) |  |
throw | ( | Error
| ) |  |

DODSFilter constructor.

Create an instance of DODSFilter using the command line arguments passed by the CGI (or other) program. The default constructor is private; this and the copy constructor (which is just the default copy constructor) are the only way to create an instance of DODSFilter.

These are the valid options:

filename

  The name of the file on which the filter is to operate. Usually this would be the file whose data has been requested. In fact, this class can be specialized and any meaning can be associated to this string. It could be the name of a database, for example.

`-o` response

  Specifies the type of response desired. The response is a string and must be one of `DAS`, `DDS`, `DataDDS` or `Version`. Note that `Version` returns version information in the body of the response and is useful for debugging, et cetera. Each response returns version information in an HTTP header for internal use by a client.

`-c`

  Send compressed data. Data are compressed using the deflate program.

`-e` expression

  This option specifies a non-blank constraint expression used to subsample a dataset.

`-v` cgi-version

  Set the CGI/Server version to `cgi-version`. This is a way for the caller to set version information passed back to the client either as the response to a version request of in the response headers.

`-d` ancdir

  Specifies that ancillary data be sought in the ancdir directory. ancdir must end in '/'.

`-f` ancfile

  Specifies that ancillary data may be found in a file called ancfile.

`-r` cache directory

  Specify a directory to use if/when files are to be cached. Not all handlers support caching and each uses its own rules tailored to a specific file or data type.

`-t` timeout

  Specifies a a timeout value in seconds. If the server runs longer than timeout seconds, an Error is returned to the client explaining that the request has timed out.

`-l` time

  Indicates that the request is a conditional request; send a complete response if and only if the data has changed since time. If it has not changed since time, then send a 304 (Not Modified) response. The time parameter is the `Last-Modified` time from an If-Modified-Since condition GET request. It is given in seconds since the start of the Unix epoch (Midnight, 1 Jan 1970).

Definition at line 168 of file DODSFilter.cc.

## ~DODSFilter()

libdap::DODSFilter::~DODSFilter | ( |  | ) |

virtual

Definition at line 184 of file DODSFilter.cc.

## Member Function Documentation

## dataset_constraint() [1/2]

void libdap::DODSFilter::dataset_constraint | ( | DDS & | dds,
|  | ConstraintEvaluator & | eval,
|  | FILE * | out,
|  | bool | ce_eval = `true`
| ) |  | const

virtual

Definition at line 734 of file DODSFilter.cc.

## dataset_constraint() [2/2]

void libdap::DODSFilter::dataset_constraint | ( | DDS & | dds,
|  | ConstraintEvaluator & | eval,
|  | ostream & | out,
|  | bool | ce_eval = `true`
| ) |  | const

virtual

Definition at line 740 of file DODSFilter.cc.

## dataset_constraint_ddx()

void libdap::DODSFilter::dataset_constraint_ddx | ( | DDS & | dds,
|  | ConstraintEvaluator & | eval,
|  | ostream & | out,
|  | const string & | boundary,
|  | const string & | start,
|  | bool | ce_eval = `true`
| ) |  | const

virtual

Definition at line 761 of file DODSFilter.cc.

## establish_timeout() [1/2]

void libdap::DODSFilter::establish_timeout | ( | FILE * | stream | ) | const

virtual

Use values of this instance to establish a timeout alarm for the server. If the timeout value is zero, do nothing.

Todo:
  When the alarm handler is called, two CRLF pairs are dumped to the stream and then an Error object is sent. No attempt is made to write the 'correct' MIME headers for an Error object. Instead, a savvy client will know that when an exception is thrown during a deserialize operation, it should scan ahead in the input stream for an Error object. Add this, or a sensible variant once libdap++ supports reliable error delivery. Dumb clients will never get the Error object...

Definition at line 544 of file DODSFilter.cc.

## establish_timeout() [2/2]

void libdap::DODSFilter::establish_timeout | ( | ostream & | stream | ) | const

virtual

Definition at line 555 of file DODSFilter.cc.

## functional_constraint() [1/2]

void libdap::DODSFilter::functional_constraint | ( | BaseType & | var,
|  | DDS & | dds,
|  | ConstraintEvaluator & | eval,
|  | FILE * | out
| ) |  | const

virtual

Definition at line 707 of file DODSFilter.cc.

## functional_constraint() [2/2]

void libdap::DODSFilter::functional_constraint | ( | BaseType & | var,
|  | DDS & | dds,
|  | ConstraintEvaluator & | eval,
|  | ostream & | out
| ) |  | const

virtual

Definition at line 715 of file DODSFilter.cc.

## get_action()

string libdap::DODSFilter::get_action | ( |  | ) | const

virtual

Get the string name of the response to be returned.

Definition at line 417 of file DODSFilter.cc.

## get_cache_dir()

string libdap::DODSFilter::get_cache_dir | ( |  | ) | const

virtual

Get the cache directory.

The `cache_dir` is used to hold the cached .dds and .das files. By default, this returns an empty string (store cache files in current directory.

Returns
  A string object that contains the cache file directory.

Definition at line 522 of file DODSFilter.cc.

## get_ce()

string libdap::DODSFilter::get_ce | ( |  | ) | const

virtual

Get the constraint expression.

Return the entire constraint expression in a string. This includes both the projection and selection clauses, but not the question mark.

Returns
  A string object that contains the constraint expression.

Definition at line 345 of file DODSFilter.cc.

## get_cgi_version()

string libdap::DODSFilter::get_cgi_version | ( |  | ) | const

virtual

Return the version information passed to the instance when it was created. This string is passed to the DODSFilter ctor using the -v option.

Returns
  The version string supplied at initialization.

Definition at line 337 of file DODSFilter.cc.

## get_das_last_modified_time()

time_t libdap::DODSFilter::get_das_last_modified_time | ( | const string & | anc_location = `""` | ) | const

virtual

Get the last modified time for the dataset's DAS. This time, given in seconds since the epoch (1 Jan 1970 00:00:00 GMT), is the greater of the datasets's and any ancillary DAS' last modified time.

Parameters

  anc_location | A directory to search for ancillary files (in addition to the CWD).

Returns
  Time of last modification of the DAS.

See also
  get_dataset_last_modified_time()
  get_dds_last_modified_time()

Definition at line 450 of file DODSFilter.cc.

## get_data_last_modified_time()

time_t libdap::DODSFilter::get_data_last_modified_time | ( | const string & | anc_location = `""` | ) | const

virtual

Get the last modified time to be used for a particular data request. This method should look at both the constraint expression and any ancillary files for this dataset. The implementation provided here returns the latest time returned by the `get_dataset`...(), `get_das`...() and `get_dds`...() methods and does not currently check the CE.

Parameters

  anc_location | A directory to search for ancillary files (in addition to the CWD).

Returns
  Time of last modification of the data.

See also
  get_dataset_last_modified_time()
  get_das_last_modified_time()
  get_dds_last_modified_time()

Definition at line 490 of file DODSFilter.cc.

## get_dataset_last_modified_time()

time_t libdap::DODSFilter::get_dataset_last_modified_time | ( |  | ) | const

virtual

Get the dataset's last modified time. This returns the time at which the dataset was last modified as defined by UNIX's notion of modification. This does not take into account the modification of an ancillary DAS or DDS. Time is given in seconds since the epoch (1 Jan 1970 00:00:00 GMT).

This method perform a simple check on the file named by the dataset given when the DODSFilter instance was created. If the dataset is not a filter, this method returns the current time. Servers which provide access to non-file-based data should subclass DODSFilter and supply a more suitable version of this method.

From the stat(2) man page: `‘Traditionally, `st_mtime` is changed by mknod(2), utime(2), and write(2). The `st_mtime` is not changed for changes in owner, group, hard link count, or mode.’'

Returns
  Time of the last modification in seconds since the epoch.

See also
  get_das_last_modified_time()
  get_dds_last_modified_time()

Definition at line 439 of file DODSFilter.cc.

## get_dataset_name()

string libdap::DODSFilter::get_dataset_name | ( |  | ) | const

virtual

Get the dataset name.

The `‘dataset name’' is the filename or other string that the filter program will use to access the data. In some cases this will indicate a disk file containing the data. In others, it may represent a database query or some other exotic data access method.

Returns
  A string object that contains the name of the dataset.

Definition at line 357 of file DODSFilter.cc.

## get_dataset_version()

string libdap::DODSFilter::get_dataset_version | ( |  | ) | const

virtual

Get the version information for the dataset.

To read version information that is specific to a certain dataset, override this method with an implementation that does what you want. By default, this returns an empty string.

Returns
  A string object that contains the dataset version information.

Definition at line 382 of file DODSFilter.cc.

## get_dds_last_modified_time()

time_t libdap::DODSFilter::get_dds_last_modified_time | ( | const string & | anc_location = `""` | ) | const

virtual

Get the last modified time for the dataset's DDS. This time, given in seconds since the epoch (1 Jan 1970 00:00:00 GMT), is the greater of the datasets's and any ancillary DDS' last modified time.

Returns
  Time of last modification of the DDS.

See also
  get_dataset_last_modified_time()
  get_dds_last_modified_time()

Definition at line 467 of file DODSFilter.cc.

## get_request_if_modified_since()

time_t libdap::DODSFilter::get_request_if_modified_since | ( |  | ) | const

virtual

Get the value of a conditional request's If-Modified-Since header. This value is used to determine if the request should get a full response or a Not Modified (304) response. The time is given in seconds since the Unix epoch (midnight, 1 Jan 1970). If no time was given with the request, this methods returns -1.

Returns
  If-Modified-Since time from a condition GET request.

Definition at line 514 of file DODSFilter.cc.

## get_response()

DODSFilter::Response libdap::DODSFilter::get_response | ( |  | ) | const

virtual

Get the enum name of the response to be returned.

Definition at line 414 of file DODSFilter.cc.

## get_timeout()

int libdap::DODSFilter::get_timeout | ( |  | ) | const

Get the server's timeout value.

Definition at line 531 of file DODSFilter.cc.

## get_URL()

string libdap::DODSFilter::get_URL | ( |  | ) | const

virtual

Get the URL. This returns the URL, minus the constraint originally sent to the server.

Returns
  The URL.

Definition at line 364 of file DODSFilter.cc.

## initialize() [1/2]

void libdap::DODSFilter::initialize | ( |  | ) |

protected

Called when initializing a DODSFilter that's not going to be passed a command line arguments.

Definition at line 188 of file DODSFilter.cc.

## initialize() [2/2]

void libdap::DODSFilter::initialize | ( | int | argc,
|  | char * | argv[]
| ) |  |

protected

Initialize. Specializations can call this once an empty DODSFilter has been created using the default constructor. Using a method such as this provides a way to specialize the process_options() method and then have that specialization called by the subclass' constructor.

This class and any class that specializes it should call this method in its constructor. Note that when this method is called, the object is not fully constructed.

Parameters

  argc | The argument count
  argv | The vector of char * argument strings.

Definition at line 228 of file DODSFilter.cc.

## is_conditional()

bool libdap::DODSFilter::is_conditional | ( |  | ) | const

virtual

Is this request conditional?

Returns
  True if the request is conditional.

See also
  get_request_if_modified_since().

Definition at line 315 of file DODSFilter.cc.

## print_usage()

void libdap::DODSFilter::print_usage | ( |  | ) | const

virtual

Print usage information for a filter program.

This message is printed when the filter program is incorrectly invoked by the dispatch CGI. This is an error in the server installation or the CGI implementation, so the error message is written to stderr instead of stdout. A server's stderr messages show up in the httpd log file. In addition, an error object is sent back to the client program telling them that the server is broken.

Definition at line 578 of file DODSFilter.cc.

## process_options()

int libdap::DODSFilter::process_options | ( | int | argc,
|  | char * | argv[]
| ) |  |

protected virtual

Processing the command line options passed to the filter is handled by this method so that specializations can change the options easily.

Parameters

  argc | The argument count
  argv | The vector of char * argument strings.

Returns
  The index of the next, unprocessed, argument. This must be the identifier passed to the filter program that identifies the data source. It's often a file name.

Definition at line 254 of file DODSFilter.cc.

## send_das() [1/3]

void libdap::DODSFilter::send_das | ( | DAS & | das,
|  | const string & | anc_location = `""`,
|  | bool | with_mime_headers = `true`
| ) |  | const

virtual

Definition at line 632 of file DODSFilter.cc.

## send_das() [2/3]

void libdap::DODSFilter::send_das | ( | FILE * | out,
|  | DAS & | das,
|  | const string & | anc_location = `""`,
|  | bool | with_mime_headers = `true`
| ) |  | const

virtual

Transmit a DAS.

This function formats and prints an ASCII representation of a DAS on stdout. This has the effect of sending the DAS object back to the client program.

Parameters

  out | The output FILE to which the DAS is to be sent.
  das | The DAS object to be sent.
  anc_location | The directory in which the external DAS file resides.
  with_mime_headers | If true (the default) send MIME headers.

Returns
  void

See also
  DAS

Definition at line 603 of file DODSFilter.cc.

## send_das() [3/3]

void libdap::DODSFilter::send_das | ( | ostream & | out,
|  | DAS & | das,
|  | const string & | anc_location = `""`,
|  | bool | with_mime_headers = `true`
| ) |  | const

virtual

Transmit a DAS.

This function formats and prints an ASCII representation of a DAS on stdout. This has the effect of sending the DAS object back to the client program.

Parameters

  out | The output stream to which the DAS is to be sent.
  das | The DAS object to be sent.
  anc_location | The directory in which the external DAS file resides.
  with_mime_headers | If true (the default) send MIME headers.

Returns
  void

See also
  DAS

Definition at line 620 of file DODSFilter.cc.

## send_data() [1/2]

void libdap::DODSFilter::send_data | ( | DDS & | dds,
|  | ConstraintEvaluator & | eval,
|  | FILE * | data_stream,
|  | const string & | anc_location = `""`,
|  | bool | with_mime_headers = `true`
| ) |  | const

virtual

Transmit data.

Send the data in the DDS object back to the client program. The data is encoded using a Marshaller, and enclosed in a MIME document which is all sent to `data_stream`. If this is being called from a CGI, `data_stream` is probably `stdout` and writing to it has the effect of sending the response back to the client.

Parameters

  dds | A DDS object containing the data to be sent.
  eval | A reference to the ConstraintEvaluator to use.
  data_stream | Write the response to this FILE.
  anc_location | A directory to search for ancillary files (in addition to the CWD). This is used in a call to get_data_last_modified_time().
  with_mime_headers | If true, include the MIME headers in the response. Defaults to true.

Returns
  void

Definition at line 814 of file DODSFilter.cc.

## send_data() [2/2]

void libdap::DODSFilter::send_data | ( | DDS & | dds,
|  | ConstraintEvaluator & | eval,
|  | ostream & | data_stream,
|  | const string & | anc_location = `""`,
|  | bool | with_mime_headers = `true`
| ) |  | const

virtual

Transmit data.

Send the data in the DDS object back to the client program. The data is encoded using a Marshaller, and enclosed in a MIME document which is all sent to `data_stream`. If this is being called from a CGI, `data_stream` is probably `stdout` and writing to it has the effect of sending the response back to the client.

Parameters

  dds | A DDS object containing the data to be sent.
  eval | A reference to the ConstraintEvaluator to use.
  data_stream | Write the response to this stream.
  anc_location | A directory to search for ancillary files (in addition to the CWD). This is used in a call to get_data_last_modified_time().
  with_mime_headers | If true, include the MIME headers in the response. Defaults to true.

Returns
  void

Definition at line 837 of file DODSFilter.cc.

## send_data_ddx()

void libdap::DODSFilter::send_data_ddx | ( | DDS & | dds,
|  | ConstraintEvaluator & | eval,
|  | ostream & | data_stream,
|  | const string & | start,
|  | const string & | boundary,
|  | const string & | anc_location = `""`,
|  | bool | with_mime_headers = `true`
| ) |  | const

virtual

Transmit data.

Send the data in the DDS object back to the client program. The data is encoded using a Marshaller, and enclosed in a MIME document which is all sent to `data_stream`. If this is being called from a CGI, `data_stream` is probably `stdout` and writing to it has the effect of sending the response back to the client.

Parameters

  dds | A DDS object containing the data to be sent.
  eval | A reference to the ConstraintEvaluator to use.
  data_stream | Write the response to this stream.
  start |
  boundary |
  anc_location | A directory to search for ancillary files (in addition to the CWD). This is used in a call to get_data_last_modified_time().
  with_mime_headers | If true, include the MIME headers in the response. Defaults to true.

Returns
  void

Definition at line 966 of file DODSFilter.cc.

## send_dds() [1/3]

void libdap::DODSFilter::send_dds | ( | DDS & | dds,
|  | ConstraintEvaluator & | eval,
|  | bool | constrained = `false`,
|  | const string & | anc_location = `""`,
|  | bool | with_mime_headers = `true`
| ) |  | const

virtual

Definition at line 700 of file DODSFilter.cc.

## send_dds() [2/3]

void libdap::DODSFilter::send_dds | ( | FILE * | out,
|  | DDS & | dds,
|  | ConstraintEvaluator & | eval,
|  | bool | constrained = `false`,
|  | const string & | anc_location = `""`,
|  | bool | with_mime_headers = `true`
| ) |  | const

virtual

Transmit a DDS.

This function formats and prints an ASCII representation of a DDS on stdout. When called by a CGI program, this has the effect of sending a DDS object back to the client program. Either an entire DDS or a constrained DDS may be sent.

Parameters

  out | The output FILE to which the DAS is to be sent.
  dds | The DDS to send back to a client.
  eval | A reference to the ConstraintEvaluator to use.
  constrained | If this argument is true, evaluate the current constraint expression and send the ‘constrained DDS’ back to the client.
  anc_location | The directory in which the external DAS file resides.
  with_mime_headers | If true (the default) send MIME headers.

Returns
  void

See also
  DDS

Definition at line 652 of file DODSFilter.cc.

## send_dds() [3/3]

void libdap::DODSFilter::send_dds | ( | ostream & | out,
|  | DDS & | dds,
|  | ConstraintEvaluator & | eval,
|  | bool | constrained = `false`,
|  | const string & | anc_location = `""`,
|  | bool | with_mime_headers = `true`
| ) |  | const

virtual

Transmit a DDS.

This function formats and prints an ASCII representation of a DDS on stdout. When called by a CGI program, this has the effect of sending a DDS object back to the client program. Either an entire DDS or a constrained DDS may be sent.

Parameters

  out | The output stream to which the DAS is to be sent.
  dds | The DDS to send back to a client.
  eval | A reference to the ConstraintEvaluator to use.
  constrained | If this argument is true, evaluate the current constraint expression and send the ‘constrained DDS’ back to the client.
  anc_location | The directory in which the external DAS file resides.
  with_mime_headers | If true (the default) send MIME headers.

Returns
  void

See also
  DDS

Definition at line 675 of file DODSFilter.cc.

## send_ddx() [1/2]

void libdap::DODSFilter::send_ddx | ( | DDS & | dds,
|  | ConstraintEvaluator & | eval,
|  | FILE * | out,
|  | bool | with_mime_headers = `true`
| ) |  | const

virtual

Send the DDX response. The DDX never contains data, instead it holds a reference to a Blob response which is used to get the data values. The DDS and DAS objects are built using code that already exists in the servers.

Parameters

  dds | The dataset's DDS with attributes in the variables.
  eval | A reference to the ConstraintEvaluator to use.
  out | Destination
  with_mime_headers | If true, include the MIME headers in the response. Defaults to true.

Definition at line 906 of file DODSFilter.cc.

## send_ddx() [2/2]

void libdap::DODSFilter::send_ddx | ( | DDS & | dds,
|  | ConstraintEvaluator & | eval,
|  | ostream & | out,
|  | bool | with_mime_headers = `true`
| ) |  | const

virtual

Send the DDX response. The DDX never contains data, instead it holds a reference to a Blob response which is used to get the data values. The DDS and DAS objects are built using code that already exists in the servers.

Parameters

  dds | The dataset's DDS with attributes in the variables.
  eval | A reference to the ConstraintEvaluator to use.
  out | Destination
  with_mime_headers | If true, include the MIME headers in the response. Defaults to true.

Definition at line 922 of file DODSFilter.cc.

## send_version_info()

void libdap::DODSFilter::send_version_info | ( |  | ) | const

virtual

Send version information back to the client program.

This function formats and sends to stdout version information from the httpd server, the server dispatch scripts, the DODS core software, and (optionally) the dataset.

Definition at line 590 of file DODSFilter.cc.

## set_ce()

void libdap::DODSFilter::set_ce | ( | string | _ce | ) |

virtual

Definition at line 347 of file DODSFilter.cc.

## set_cgi_version()

void libdap::DODSFilter::set_cgi_version | ( | string | version | ) |

virtual

Set the CGI/Server version number. Servers use this when answering requests for version information. The version ‘number’ should include both the name of the server (e.g., `ff_dods`) as well as the version number. Since this information is typically divined by configure, it's up to the executable to poke the correct value in using this method.

Note that the -v switch that this class understands is deprecated since it is usually called by Perl code. It makes more sense to have the actual C++ software set the version string.

Parameters

  version | A version string for this server.

Definition at line 330 of file DODSFilter.cc.

## set_dataset_name()

void libdap::DODSFilter::set_dataset_name | ( | const string | _dataset | ) |

virtual

Definition at line 359 of file DODSFilter.cc.

## set_response()

void libdap::DODSFilter::set_response | ( | const string & | r | ) |

virtual

Set the response to be returned. Valid response names are "DAS", "DDS", "DataDDS, "Version".

Parameters

  r | The name of the object.

Exceptions

  InternalErr | Thrown if the response is not one of the valid names.

Definition at line 390 of file DODSFilter.cc.

## set_timeout()

void libdap::DODSFilter::set_timeout | ( | int | t = `0` | ) |

Set the server's timeout value. A value of zero (the default) means no timeout.

Parameters

  t | Server timeout in seconds. Default is zero (no timeout).

Definition at line 528 of file DODSFilter.cc.

## set_URL()

void libdap::DODSFilter::set_URL | ( | const string & | url | ) |

virtual

Set the URL. Set the URL sent to the server.

Parameters

  url | The URL, minus the constraint.

Definition at line 368 of file DODSFilter.cc.

## Member Data Documentation

## d_action

string libdap::DODSFilter::d_action

protected

Definition at line 106 of file DODSFilter.h.

## d_anc_das_lmt

time_t libdap::DODSFilter::d_anc_das_lmt

protected

Definition at line 110 of file DODSFilter.h.

## d_anc_dds_lmt

time_t libdap::DODSFilter::d_anc_dds_lmt

protected

Definition at line 111 of file DODSFilter.h.

## d_anc_dir

string libdap::DODSFilter::d_anc_dir

protected

Definition at line 100 of file DODSFilter.h.

## d_anc_file

string libdap::DODSFilter::d_anc_file

protected

Definition at line 101 of file DODSFilter.h.

## d_bad_options

bool libdap::DODSFilter::d_bad_options

protected

Definition at line 93 of file DODSFilter.h.

## d_cache_dir

string libdap::DODSFilter::d_cache_dir

protected

Definition at line 102 of file DODSFilter.h.

## d_cgi_ver

string libdap::DODSFilter::d_cgi_ver

protected

Definition at line 99 of file DODSFilter.h.

## d_comp

bool libdap::DODSFilter::d_comp

protected

Definition at line 92 of file DODSFilter.h.

## d_conditional_request

bool libdap::DODSFilter::d_conditional_request

protected

Definition at line 94 of file DODSFilter.h.

## d_dap2ce

string libdap::DODSFilter::d_dap2ce

protected

Definition at line 98 of file DODSFilter.h.

## d_dataset

string libdap::DODSFilter::d_dataset

protected

Definition at line 97 of file DODSFilter.h.

## d_if_modified_since

time_t libdap::DODSFilter::d_if_modified_since

protected

Definition at line 112 of file DODSFilter.h.

## d_program_name

string libdap::DODSFilter::d_program_name

protected

Definition at line 96 of file DODSFilter.h.

## d_response

Response libdap::DODSFilter::d_response

protected

Definition at line 105 of file DODSFilter.h.

## d_timeout

int libdap::DODSFilter::d_timeout

protected

Definition at line 108 of file DODSFilter.h.

## d_url

string libdap::DODSFilter::d_url

protected

Definition at line 103 of file DODSFilter.h.

The documentation for this class was generated from the following files:

- DODSFilter.h
- DODSFilter.cc