34 #include "AISExceptions.h" 53 if (res.find(
"http:") == 0
54 || res.find(
"file:") == 0 || res.find(
"https:") == 0) {
61 FILE *s = fopen(res.c_str(),
"r");
63 throw Error(
"I could not open local AIS resource '" 90 for (ResourceVectorIter i = rv.begin(); i != rv.end(); ++i) {
92 switch (i->get_rule()) {
93 case Resource::overwrite:
94 das.
parse(ais_resource->get_stream());
96 case Resource::replace:
98 das.
parse(ais_resource->get_stream());
100 case Resource::fallback:
102 das.
parse(ais_resource->get_stream());
112 (
"I caught a 'NoSuchPrimaryResource' exception, it said:\n")
virtual Response * get_ais_resource(const string &res)
virtual bool has_resource(const string &primary) const
virtual ResourceVector get_resource(const string &primary)
HTTPResponse * fetch_url(const string &url)
top level DAP object to house generic methods
A class for software fault reporting.
virtual void merge(const string &primary, DAS &das)
std::string get_error_message() const
virtual unsigned int get_size() const
Returns the number of attributes in the current attribute table.
virtual void erase()
erase all attributes in this DAS
virtual void parse(string fname)
Reads a DAS from the named file.
Hold attribute data for a DAP2 dataset.
A class for error processing.