#include <AISMerge.h>
Collaboration diagram for AISMerge:
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 |
Definition at line 61 of file AISMerge.h.
AISMerge::AISMerge | ( | const string & | database | ) | throw (AISDatabaseReadFailed) [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 73 of file AISMerge.h.
virtual AISMerge::~AISMerge | ( | ) | [inline, virtual] |
Destroy an instance. This is explicitly declared virtual to support subclassing.
Definition at line 79 of file AISMerge.h.
Response * AISMerge::get_ais_resource | ( | const string & | res | ) | [virtual] |
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 48 of file AISMerge.cc.
References HTTPConnect::fetch_url().
Referenced by merge().
Here is the call graph for this function:
void AISMerge::merge | ( | const string & | primary, | |
DAS & | das | |||
) | [virtual] |
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 76 of file AISMerge.cc.
References AttrTable::erase(), Resource::fallback, get_ais_resource(), Error::get_error_message(), AISResources::get_resource(), AttrTable::get_size(), AISResources::has_resource(), Resource::overwrite, DAS::parse(), and Resource::replace.
Referenced by AISConnect::request_das().
Here is the call graph for this function:
friend class AISMergeTest [friend] |
Definition at line 67 of file AISMerge.h.