libdap Updated for version 3.21.1
libdap4 is an implementation of OPeNDAP's DAP protocol.
|
#include <AISConnect.h>
Public Member Functions | |
Suppress the C++ defaults for these. | |
bool | is_local () |
virtual string | URL (bool CE=true) |
Get the object's URL. | |
virtual string | CE () |
Get the Connect's constraint expression. | |
void | set_credentials (string u, string p) |
Set the credentials for responding to challenges while dereferencing URLs. | |
void | set_accept_deflate (bool deflate) |
void | set_xdap_protocol (int major, int minor) |
void | set_cache_enabled (bool enabled) |
bool | is_cache_enabled () |
void | set_xdap_accept (int major, int minor) |
string | get_version () |
string | get_protocol () |
virtual string | request_version () |
virtual string | request_protocol () |
virtual void | request_das_url (DAS &das) |
Get the DAS from a server. | |
virtual void | request_dds (DDS &dds, string expr="") |
Get the DDS from a server. | |
virtual void | request_dds_url (DDS &dds) |
Get the DDS from a server. | |
virtual void | request_ddx (DDS &dds, string expr="") |
Get the DDX from a server. | |
virtual void | request_ddx_url (DDS &dds) |
The 'url' version of request_ddx. | |
virtual void | request_data (DataDDS &data, string expr="") |
Get the DAS from a server. | |
virtual void | request_data_url (DataDDS &data) |
Get the DAS from a server. | |
virtual void | request_data_ddx (DataDDS &data, string expr="") |
virtual void | request_data_ddx_url (DataDDS &data) |
virtual void | read_data (DataDDS &data, Response *rs) |
Read data which is preceded by MIME headers. This method works for both data dds and data ddx responses. | |
virtual void | read_data (DDS &data, Response *rs) |
virtual void | read_data_no_mime (DataDDS &data, Response *rs) |
Read data from a file which does not have response MIME headers. This method is a companion to read_data(). While read_data() assumes that the response has MIME headers, this method does not. If you call this with a Response that does contain headers, it will throw an Error (and the message is likely to be inscrutable). | |
virtual void | read_data_no_mime (DDS &data, Response *rs) |
Suppress the C++ defaults for these. | |
AISConnect () | |
AISConnect (const AISConnect &ac) | |
AISConnect (const string &name) throw (AISDatabaseReadFailed) | |
AISConnect (const string &name, const string &ais_db) throw (AISDatabaseReadFailed) | |
virtual | ~AISConnect () |
virtual void | request_das (DAS &das) |
Provide seamless client-side AIS services.
Definition at line 44 of file AISConnect.h.
|
inlineprotected |
Definition at line 51 of file AISConnect.h.
|
inlineprotected |
Definition at line 52 of file AISConnect.h.
libdap::AISConnect::AISConnect | ( | const string & | name | ) | ||
throw | ( | AISDatabaseReadFailed ) |
Build an AISConnect. This calls Connect's constructor with name
and accepts its default values for the other parameters. The AIS database to use is read from the configuration file ~/.dodsrc
.
name | Create a virtual, AIS-enhanced, connection for this OPeNDAP data source. |
AISDatabaseReadFailed | Thrown if the AIS database listed in the ~/.dodsrc file could not be opened. |
Definition at line 40 of file AISConnect.cc.
libdap::AISConnect::AISConnect | ( | const string & | name, | |||
const string & | ais ) | |||||
throw | ( | AISDatabaseReadFailed ) |
Build an AISConnect. This calls Connect's constructor with name
and accepts its default values for the other parameters. The AIS is initialized to use the database named by ais
.
name | Create a virtual, AIS-enhanced, connection for this OPeNDAP data source. |
ais | Read the AIS information from this XML file. |
AISDatabaseReadFailed | Thrown if the AIS database listed in the ~/.dodsrc file could not be opened. |
Definition at line 55 of file AISConnect.cc.
|
virtual |
Destroy an AISConnect.
Definition at line 61 of file AISConnect.cc.
|
virtualinherited |
Get the Connect's constraint expression.
Return the constraint expression (CE) part of the Connect URL. Note that this CE is supplied as part of the URL passed to the Connect's constructor. It is not the CE passed to the request_data()
function.
Definition at line 1093 of file Connect.cc.
|
inlineinherited |
|
inlineinherited |
Return the protocol/implementation version of the most recent response. This is a poorly designed method, but it returns information that is useful when used correctly. Before a response is made, this contains the string "unknown." This should ultimately hold the protocol version; it currently holds the implementation version.
@see get_protocol() @deprecated
|
inherited |
Definition at line 1136 of file Connect.cc.
|
inherited |
Definition at line 1057 of file Connect.cc.
Read data which is preceded by MIME headers. This method works for both data dds and data ddx responses.
data | Result. |
rs | Read from this Response object. |
Definition at line 948 of file Connect.cc.
Definition at line 957 of file Connect.cc.
Read data from a file which does not have response MIME headers. This method is a companion to read_data(). While read_data() assumes that the response has MIME headers, this method does not. If you call this with a Response that does contain headers, it will throw an Error (and the message is likely to be inscrutable).
data | Result. |
rs | Read from this Response object. |
Definition at line 1016 of file Connect.cc.
Definition at line 1035 of file Connect.cc.
|
virtual |
Request an AIS-enhanced DAS object. Read the DAS object for this virtual connection's data source. Then check the AIS database and merge in any ancillary resources listed for it.
das | Deposit information to this object. |
Error | Thrown if the DAS request fails due to user error. |
InternalErr | Thrown if either the DAS request or the AIS merge request fails. |
Reimplemented from libdap::Connect.
Definition at line 74 of file AISConnect.cc.
|
virtualinherited |
Get the DAS from a server.
Reads the DAS corresponding to the dataset in the Connect object's URL. Although DAP does not support using CEs with DAS requests, if present in the Connect object's instance, they will be escaped and passed as the query string of the request.
Different from request_das method in that this method uses the URL as given without attaching .das or projections or selections.
das | Result. |
Definition at line 482 of file Connect.cc.
Get the DAS from a server.
Reads the DataDDS object corresponding to the dataset in the Connect object's URL. If present in the Connect object's instance, a CE will be escaped, combined with expr
and passed as the query string of the request. The result is a DataDDS which contains the data values bound to variables.
data | Result. |
expr | Send this constraint expression to the server. |
Definition at line 814 of file Connect.cc.
Definition at line 883 of file Connect.cc.
|
virtualinherited |
Definition at line 915 of file Connect.cc.
|
virtualinherited |
Get the DAS from a server.
Reads the DataDDS object corresponding to the dataset in the Connect object's URL. If present in the Connect object's instance, a CE will be escaped, combined with expr
and passed as the query string of the request. The result is a DataDDS which contains the data values bound to variables.
Different from request_data in that this method uses the syntax of the new OPeNDAP server commands using dispatch
data | Result. |
Definition at line 862 of file Connect.cc.
Get the DDS from a server.
Reads the DDS corresponding to the dataset in the Connect object's URL. If present in the Connect object's instance, a CE will be escaped, combined with expr
and passed as the query string of the request.
dds | Result. |
expr | Send this constraint expression to the server. |
Definition at line 545 of file Connect.cc.
|
virtualinherited |
Get the DDS from a server.
Reads the DDS corresponding to the dataset in the Connect object's URL. If present in the Connect object's instance, a CE will be escaped, combined with expr
and passed as the query string of the request.
Different from request_dds method above in that this method assumes URL is complete and does not add anything to the command, such as .dds or projections or selections.
dds | Result. |
Definition at line 621 of file Connect.cc.
Get the DDX from a server.
Reads the DDX corresponding to the dataset in the Connect object's URL. If present in the Connect object's instance, a CE will be escaped, combined with expr
and passed as the query string of the request.
dds | Result. |
expr | Send this constraint expression to the server. |
Definition at line 681 of file Connect.cc.
|
virtualinherited |
The 'url' version of request_ddx.
Definition at line 745 of file Connect.cc.
|
virtualinherited |
Get protocol version information from the server. This is a new method which will ease the transition to DAP 4. Note that this method returns the version of the DAP protocol implemented by the server. The request_version() method returns the server's version number, not the DAP protocol version.
Definition at line 389 of file Connect.cc.
|
virtualinherited |
Get version information from the server. This is a new method which will ease the transition to DAP 4.
Definition at line 355 of file Connect.cc.
|
inherited |
Set the accept deflate property.
deflate | True if the client can accept compressed responses, False otherwise. |
Definition at line 1113 of file Connect.cc.
|
inherited |
Disable any further use of the client-side cache. In a future version of this software, this should be handled so that the www library is not initialized with the cache running by default.
Definition at line 1131 of file Connect.cc.
Set the credentials for responding to challenges while dereferencing URLs.
u | The username. |
p | The password. |
Definition at line 1105 of file Connect.cc.
|
inherited |
|
inherited |
Set the XDAP-Accept property/header. This is used to send to a server the (highest) DAP protocol version number that this client understands.
major | The client dap protocol major version |
minor | The client dap protocol minor version |
Definition at line 1123 of file Connect.cc.
|
virtualinherited |
Get the object's URL.
Return the Connect object's URL in a string. The URL was set by the class constructor, and may not be reset. If you want to open another URL, you must create another Connect object. There is a Connections class created to handle the management of multiple Connect objects.
ce | If TRUE, the returned URL will include any constraint expression enclosed with the Connect object's URL (including the ? ). If FALSE, any constraint expression will be removed from the URL. The default is TRUE. |
Definition at line 1075 of file Connect.cc.