libdap Updated for version 3.21.1
libdap4 is an implementation of OPeNDAP's DAP protocol.
|
Merge AIS resources. More...
#include <AISMerge.h>
Public Member Functions | |
AISMerge (const string &database) throw (AISDatabaseReadFailed) | |
virtual Response * | get_ais_resource (const string &res) |
virtual void | merge (const string &primary, DAS &das) |
virtual | ~AISMerge () |
Friends | |
class | AISMergeTest |
Merge AIS resources.
Manage a single AIS database. Open an AIS database and handle merging DAP objects with the ancillary resources it references. This class uses AISResources to actually open the AIS database and locate AIS resources for a particular primary data source. This class dereferences AIS resources returned by AISResources and merges that with an existing DAP object (currently only the DAS object is supported. 02/25/03 jhrg).
Definition at line 63 of file AISMerge.h.
|
inline |
Initialize an instance so that it reads from database
.
database | Name of a database of AIS resources. |
AISDatabaseReadFailed | Thrown if the named database cannot be opened. |
Definition at line 75 of file AISMerge.h.
|
inlinevirtual |
Destroy an instance. This is explicitly declared virtual to support subclassing.
Definition at line 79 of file AISMerge.h.
Access an AIS resource. The resource may be a local file or a URL. Assume all resource URIs have no leading spaces. This method is public so that a client of libdap++ can specialize its behavior. This implementation dereferences a URL or opens a file and returns a FILE pointer which can be used to read the contents. In the case of a URL, 'the contents' means the body of the HTTP response. For a file, it means the entire file.
res | The AIS resource. |
Definition at line 51 of file AISMerge.cc.
Access the AIS ancillary resources matched to primary
and merge those with the DAS object das.
This method uses AISResources::has_resource(...) to determine if primary
has an entry in the AIS database. It uses AISResources::get_resource(...) to get a ResourceVector of AIS resources for primary
. It then uses its own get_ais_resources(...) to access the actual resources via a FILE pointer. Clients may use this information to specialize AISMerge::merge(...).
primary | The URL of the primary resource. |
das | The target of the merge operation. This must already contain the DAS for primary. |
Definition at line 75 of file AISMerge.cc.
|
friend |
Definition at line 68 of file AISMerge.h.