38 #include <sys/types.h>
95 const string c_xml_xsi =
"http://www.w3.org/2001/XMLSchema-instance";
133 DDS::duplicate(
const DDS &dds)
135 DBG(cerr <<
"Entering DDS::duplicate... " <<endl);
141 string d_container_name;
147 string d_dap_version;
148 string d_request_xml_base;
153 vector<BaseType *> vars;
160 long d_max_response_size;
163 d_factory = dds.d_factory;
166 d_filename = dds.d_filename;
167 d_container_name = dds.d_container_name;
168 d_container = dds.d_container;
170 d_dap_major = dds.d_dap_major;
171 d_dap_minor = dds.d_dap_minor;
173 d_dap_version = dds.d_dap_version;
174 d_request_xml_base = dds.d_request_xml_base;
175 d_namespace = dds.d_namespace;
179 DDS &dds_tmp =
const_cast<DDS &
>(dds);
186 d_timeout = dds.d_timeout;
188 d_keywords = dds.d_keywords;
190 d_max_response_size = dds.d_max_response_size;
207 : d_factory(factory), d_name(name), d_container_name(
""), d_container(0),
208 d_request_xml_base(
""),
209 d_timeout(0), d_keywords(), d_max_response_size(0)
211 DBG(cerr <<
"Building a DDS for the default version (3.2)" << endl);
234 : d_factory(factory), d_name(name), d_container_name(
""), d_container(0),
235 d_request_xml_base(
""),
236 d_timeout(0), d_keywords(), d_max_response_size(0)
238 DBG(cerr <<
"Building a DDS for version: " << version << endl);
248 DBG(cerr <<
"Entering DDS(const DDS &rhs) ..." << endl);
250 DBG(cerr <<
" bye." << endl);
256 for (
Vars_iter i = vars.begin(); i != vars.end(); i++) {
258 delete btp ; btp = 0;
265 DBG(cerr <<
"Entering DDS::operator= ..." << endl);
271 DBG(cerr <<
" bye." << endl);
296 "Error transferring attributes: working on a container in dds, but not das");
302 (*i)->transfer_attributes(top);
308 DBG(cerr <<
"Processing the attributes for: " << (*var)->d_name() <<
" a " << (*var)->type_name() << endl);
309 (*var)->transfer_attributes(top);
322 if ((*i)->type ==
Attr_container && (*i)->attributes->is_global_attribute()) {
331 while (at_cont_p != top_level->attr_end()) {
335 if ((*at_cont_p)->type ==
Attr_container && (*at_cont_p)->attributes->is_global_attribute()) {
336 DBG(cerr << (*at_cont_p)->d_name <<
" is a global attribute." << endl);
414 if (d_dap_minor >= 0) {
416 oss << d_dap_major <<
"." << d_dap_minor;
417 d_dap_version = oss.str();
429 if (d_dap_major >= 0) {
431 oss << d_dap_major <<
"." << d_dap_minor;
432 d_dap_version = oss.str();
444 istringstream iss(v);
446 int major = -1, minor = -1;
448 if (!iss.eof() && !iss.fail())
450 if (!iss.eof() && !iss.fail())
452 if (!iss.eof() && !iss.fail())
455 if (major == -1 || minor == -1 or dot !=
'.')
456 throw InternalErr(__FILE__, __LINE__,
"Could not parse dap version. Value given: " + v);
467 switch (d_dap_major) {
478 throw InternalErr(__FILE__, __LINE__,
"Unknown DAP version.");
492 int major = floor(d);
493 int minor = (d-major)*10;
495 DBG(cerr <<
"Major: " << major <<
", Minor: " << minor << endl);
498 oss << major <<
"." << minor;
515 return d_container_name;
543 d_container_name = cn;
570 for (
Vars_iter i = vars.begin(); i != vars.end(); i++) {
573 w += (*i)->width(constrained);
576 w += (*i)->width(constrained);
590 throw InternalErr(__FILE__, __LINE__,
"Trying to add a BaseType object with a NULL pointer.");
592 if (bt->is_dap4_only_type())
593 throw InternalErr(__FILE__, __LINE__,
"Attempt to add a DAP4 type to a DAP2 DDS.");
595 DBG2(cerr <<
"In DDS::add_var(), bt's address is: " << bt << endl);
598 DBG2(cerr <<
"In DDS::add_var(), btp's address is: " << btp << endl);
618 throw InternalErr(__FILE__, __LINE__,
"Trying to add a BaseType object with a NULL pointer.");
621 if (bt->is_dap4_only_type())
622 throw InternalErr(__FILE__, __LINE__,
"Attempt to add a DAP4 type to a DAP2 DDS.");
625 DBG2(cerr <<
"In DDS::add_var(), bt's address is: " << bt << endl);
651 for (
Vars_iter i = vars.begin(); i != vars.end(); i++) {
652 if ((*i)->name() == n) {
668 if (i != vars.end()) {
684 for (
Vars_iter i_tmp = i1; i_tmp != i2; i_tmp++) {
727 return d_container->
var( name,
false, s ) ;
739 DBG(cerr <<
"DDS::leaf_match: Looking for " << n << endl);
741 for (
Vars_iter i = vars.begin(); i != vars.end(); i++) {
743 DBG(cerr <<
"DDS::leaf_match: Looking for " << n <<
" in: " << btp->d_name() << endl);
745 if (btp->
name() == n) {
746 DBG(cerr <<
"Found " << n <<
" in: " << btp->d_name() << endl);
753 DBG(cerr <<
"Found " << n <<
" in: " << btp->d_name() << endl);
757 #if STRUCTURE_ARRAY_SYNTAX_OLD
762 DBG(cerr <<
"Found " << n <<
" in: " << btp->
var()->d_name() << endl);
775 for (
Vars_iter i = vars.begin(); i != vars.end(); i++) {
777 DBG2(cerr <<
"Looking for " << d_name <<
" in: " << btp << endl);
779 if (btp->
name() == name) {
780 DBG2(cerr <<
"Found " << d_name <<
" in: " << btp << endl);
785 string::size_type dot_pos = name.find(
".");
786 if (dot_pos != string::npos) {
787 string aggregate = name.substr(0, dot_pos);
788 string field = name.substr(dot_pos + 1);
792 DBG2(cerr <<
"Descending into " << agg_ptr->
name() << endl);
793 return agg_ptr->
var(field,
true, s);
814 return vars.rbegin();
835 return vars.begin() + i;
844 return *(vars.begin() + i);
855 if (ptr->is_dap4_only_type())
856 throw InternalErr(__FILE__, __LINE__,
"Attempt to add a DAP4 type to a DAP2 DDS.");
872 if (ptr->is_dap4_only_type())
873 throw InternalErr(__FILE__, __LINE__,
"Attempt to add a DAP4 type to a DAP2 DDS.");
897 d_timeout = alarm(0);
919 for (
Vars_iter i = vars.begin(); i != vars.end(); i++) {
921 dynamic_cast<Sequence&>(**i).set_leaf_sequence();
923 dynamic_cast<Structure&>(**i).set_leaf_sequence();
931 FILE *in = fopen(fname.c_str(),
"r");
953 FILE *in = fdopen(_dup(fd),
"r");
955 FILE *in = fdopen(dup(fd),
"r");
959 throw InternalErr(__FILE__, __LINE__,
"Could not access file.");
982 throw InternalErr(__FILE__, __LINE__,
"Null input stream.");
994 DBG2(cout <<
"Status from parser: " << status << endl);
998 if (!status || !arg.
status()) {
1010 fwrite(oss.str().data(),
sizeof(char), oss.str().length(), out);
1017 out <<
"Dataset {\n" ;
1019 for (
Vars_citer i = vars.begin(); i != vars.end(); i++) {
1020 (*i)->print_decl(out) ;
1023 out <<
"} " <<
id2www(d_name) <<
";\n" ;
1040 out <<
"Attributes {\n" ;
1042 d_attr.
print(out,
" ");
1043 for (
Vars_citer i = vars.begin(); i != vars.end(); i++) {
1044 (*i)->get_attr_table().print(out,
" ");
1065 fwrite(oss.str().data(),
sizeof(char), oss.str().length(), out);
1081 out <<
"Dataset {\n" ;
1083 for (
Vars_citer i = vars.begin(); i != vars.end(); i++) {
1087 (*i)->print_decl(out,
" ",
true,
false,
true) ;
1090 out <<
"} " <<
id2www(d_name) <<
";\n" ;
1111 fwrite(oss.str().data(), 1, oss.str().length(), out);
1131 class VariablePrintXMLWriter :
public unary_function<BaseType *, void>
1136 VariablePrintXMLWriter(
XMLWriter &xml,
bool constrained)
1137 : d_xml(xml), d_constrained(constrained)
1139 void operator()(BaseType *bt)
1141 bt->print_xml_writer(d_xml, d_constrained);
1169 if (xmlTextWriterStartElement(xml.
get_writer(), (
const xmlChar*)
"Group") < 0)
1170 throw InternalErr(__FILE__, __LINE__,
"Could not write Group element");
1171 if (xmlTextWriterWriteAttribute(xml.
get_writer(), (
const xmlChar*)
"name", (
const xmlChar*)d_name.c_str()) < 0)
1172 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for name");
1174 if (xmlTextWriterWriteAttribute(xml.
get_writer(), (
const xmlChar*)
"dapVersion", (
const xmlChar*)
get_dap_version().c_str()) < 0)
1175 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for dapVersion");
1178 if (xmlTextWriterWriteAttribute(xml.
get_writer(), (
const xmlChar*)
"xmlns:xml", (
const xmlChar*)
c_xml_namespace.c_str()) < 0)
1179 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns:xml");
1182 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xml:base");
1185 if (xmlTextWriterWriteAttribute(xml.
get_writer(), (
const xmlChar*)
"xmlns", (
const xmlChar*)
get_namespace().c_str()) < 0)
1186 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns");
1190 if (xmlTextWriterStartElement(xml.
get_writer(), (
const xmlChar*)
"Dataset") < 0)
1191 throw InternalErr(__FILE__, __LINE__,
"Could not write Dataset element");
1192 if (xmlTextWriterWriteAttribute(xml.
get_writer(), (
const xmlChar*)
"name", (
const xmlChar*)d_name.c_str()) < 0)
1193 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for name");
1194 if (xmlTextWriterWriteAttribute(xml.
get_writer(), (
const xmlChar*)
"xmlns:xsi", (
const xmlChar*)
"http://www.w3.org/2001/XMLSchema-instance") < 0)
1195 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns:xsi");
1197 if (xmlTextWriterWriteAttribute(xml.
get_writer(), (
const xmlChar*)
"xsi:schemaLocation", (
const xmlChar*)
c_dap_32_n_sl.c_str()) < 0)
1198 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns:schemaLocation");
1200 if (xmlTextWriterWriteAttribute(xml.
get_writer(), (
const xmlChar*)
"xmlns:grddl", (
const xmlChar*)
"http://www.w3.org/2003/g/data-view#") < 0)
1201 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns:grddl");
1204 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns:transformation");
1207 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns");
1209 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns:dap");
1211 if (xmlTextWriterWriteAttribute(xml.
get_writer(), (
const xmlChar*)
"dapVersion", (
const xmlChar*)
"3.2") < 0)
1212 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for dapVersion");
1215 if (xmlTextWriterWriteAttribute(xml.
get_writer(), (
const xmlChar*)
"xmlns:xml", (
const xmlChar*)
c_xml_namespace.c_str()) < 0)
1216 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns:xml");
1219 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xml:base");
1223 if (xmlTextWriterStartElement(xml.
get_writer(), (
const xmlChar*)
"Dataset") < 0)
1224 throw InternalErr(__FILE__, __LINE__,
"Could not write Dataset element");
1225 if (xmlTextWriterWriteAttribute(xml.
get_writer(), (
const xmlChar*)
"name", (
const xmlChar*)d_name.c_str()) < 0)
1226 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for d_name");
1227 if (xmlTextWriterWriteAttribute(xml.
get_writer(), (
const xmlChar*)
"xmlns:xsi", (
const xmlChar*)
"http://www.w3.org/2001/XMLSchema-instance") < 0)
1228 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns:xsi");
1231 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns");
1233 if (xmlTextWriterWriteAttribute(xml.
get_writer(), (
const xmlChar*)
"xsi:schemaLocation", (
const xmlChar*)
c_dap_20_n_sl.c_str()) < 0)
1234 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns:schemaLocation");
1241 for_each(
var_begin(),
var_end(), VariablePrintXMLWriter(xml, constrained));
1248 if (!blob.empty()) {
1249 if (xmlTextWriterStartElement(xml.
get_writer(), (
const xmlChar*)
"blob") < 0)
1250 throw InternalErr(__FILE__, __LINE__,
"Could not write blob element");
1251 string cid =
"cid:" + blob;
1252 if (xmlTextWriterWriteAttribute(xml.
get_writer(), (
const xmlChar*)
"href", (
const xmlChar*) cid.c_str()) < 0)
1253 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for d_name");
1254 if (xmlTextWriterEndElement(xml.
get_writer()) < 0)
1255 throw InternalErr(__FILE__, __LINE__,
"Could not end blob element");
1259 if (xmlTextWriterStartElement(xml.
get_writer(), (
const xmlChar*)
"blob") < 0)
1260 throw InternalErr(__FILE__, __LINE__,
"Could not write blob element");
1261 string cid =
"cid:" + blob;
1262 if (xmlTextWriterWriteAttribute(xml.
get_writer(), (
const xmlChar*)
"href", (
const xmlChar*) cid.c_str()) < 0)
1263 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for d_name");
1264 if (xmlTextWriterEndElement(xml.
get_writer()) < 0)
1265 throw InternalErr(__FILE__, __LINE__,
"Could not end blob element");
1268 if (xmlTextWriterStartElement(xml.
get_writer(), (
const xmlChar*)
"dataBLOB") < 0)
1269 throw InternalErr(__FILE__, __LINE__,
"Could not write dataBLOB element");
1270 if (xmlTextWriterWriteAttribute(xml.
get_writer(), (
const xmlChar*)
"href", (
const xmlChar*)
"") < 0)
1271 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for d_name");
1272 if (xmlTextWriterEndElement(xml.
get_writer()) < 0)
1273 throw InternalErr(__FILE__, __LINE__,
"Could not end dataBLOB element");
1276 if (xmlTextWriterEndElement(xml.
get_writer()) < 0)
1277 throw InternalErr(__FILE__, __LINE__,
"Could not end Dataset element");
1298 throw InternalErr(__FILE__, __LINE__,
"Tried to print a DMR with DAP major version less than 4");
1303 if (xmlTextWriterStartElement(xml.
get_writer(), (
const xmlChar*)
"Group") < 0)
1304 throw InternalErr(__FILE__, __LINE__,
"Could not write Group element");
1306 if (xmlTextWriterWriteAttribute(xml.
get_writer(), (
const xmlChar*)
"xmlns:xml",
1308 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns:xml");
1310 if (xmlTextWriterWriteAttribute(xml.
get_writer(), (
const xmlChar*)
"xmlns:xsi", (
const xmlChar*)
c_xml_xsi.c_str())
1312 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns:xsi");
1314 if (xmlTextWriterWriteAttribute(xml.
get_writer(), (
const xmlChar*)
"xsi:schemaLocation",
1316 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns:schemaLocation");
1318 if (xmlTextWriterWriteAttribute(xml.
get_writer(), (
const xmlChar*)
"xmlns",
1320 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xmlns");
1322 if (xmlTextWriterWriteAttribute(xml.
get_writer(), (
const xmlChar*)
"dapVersion",
1324 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for dapVersion");
1326 if (xmlTextWriterWriteAttribute(xml.
get_writer(), (
const xmlChar*)
"dmrVersion", (
const xmlChar*)
get_dmr_version().c_str()) < 0)
1327 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for dapVersion");
1330 if (xmlTextWriterWriteAttribute(xml.
get_writer(), (
const xmlChar*)
"xml:base",
1332 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for xml:base");
1335 if (xmlTextWriterWriteAttribute(xml.
get_writer(), (
const xmlChar*)
"name", (
const xmlChar*) d_name.c_str()) < 0)
1336 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for name");
1342 for_each(
var_begin(),
var_end(), VariablePrintXMLWriter(xml, constrained));
1350 if (!blob.empty()) {
1351 if (xmlTextWriterStartElement(xml.
get_writer(), (
const xmlChar*)
"blob") < 0)
1352 throw InternalErr(__FILE__, __LINE__,
"Could not write blob element");
1353 string cid =
"cid:" + blob;
1354 if (xmlTextWriterWriteAttribute(xml.
get_writer(), (
const xmlChar*)
"href", (
const xmlChar*) cid.c_str()) < 0)
1355 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for d_name");
1356 if (xmlTextWriterEndElement(xml.
get_writer()) < 0)
1357 throw InternalErr(__FILE__, __LINE__,
"Could not end blob element");
1362 if (xmlTextWriterEndElement(xml.
get_writer()) < 0)
1363 throw InternalErr(__FILE__, __LINE__,
"Could not end the top-level Group element");
1388 cerr <<
"A dataset must have a d_name" << endl;
1397 for (
Vars_iter i = vars.begin(); i != vars.end(); i++)
1398 if (!(*i)->check_semantics(msg,
true))
1435 DBG2(cerr <<
"DDS::mark: Looking for " << n << endl);
1439 DBG2(cerr <<
"Could not find variable " << n << endl);
1445 DBG2(cerr <<
"DDS::mark: Set variable " << variable->d_name()
1446 <<
" (a " << variable->
type_name() <<
")" << endl);
1452 while (!s->empty()) {
1453 s->top()->BaseType::set_send_p(state);
1455 DBG2(cerr <<
"DDS::mark: Set variable " << s->top()->d_name()
1456 <<
" (a " << s->top()->type_name() <<
")" << endl);
1459 string parent_name = (s->top()->get_parent()) ? s->top()->get_parent()->name():
"none";
1460 string parent_type = (s->top()->get_parent()) ? s->top()->get_parent()->type_name():
"none";
1461 DBG2(cerr <<
"DDS::mark: Parent variable " << parent_name <<
" (a " << parent_type <<
")" << endl);
1479 for (
Vars_iter i = vars.begin(); i != vars.end(); i++)
1480 (*i)->set_send_p(state);
1494 << (
void *)
this <<
")" << endl ;
1512 for (; i != ie; i++) {
std::vector< entry * >::iterator Attr_iter
const string c_dap32_namespace
void print(FILE *out)
Print the entire DDS to the specified file.
const string c_dap_32_n_sl
xmlTextWriterPtr get_writer()
virtual Attr_iter attr_end()
virtual BaseType * var(const string &name, bool exact_match=true, btp_stack *s=0)
btp_stack no longer needed; use back pointers (BaseType::get_parent())
void insert_var_nocopy(Vars_iter i, BaseType *ptr)
const string c_dap20_namespace
Contains the attributes for a dataset.
string get_dmr_version() const
void dds_delete_buffer(void *buffer)
Vars_iter get_vars_iter(int i)
Get an iterator.
string get_error_message() const
const string c_default_dap32_schema_location
BaseType * leaf_match(const string &name, BaseType::btp_stack *s=0)
void insert_var(Vars_iter i, BaseType *ptr)
Insert a variable before the referenced element.
Vars_iter var_begin()
Return an iterator to the first variable.
const string c_default_dap40_schema_location
string get_request_xml_base() const
Get the URL that will return this DDS/DDX/DataThing.
int ddsparse(libdap::parser_arg *arg)
DDS(BaseTypeFactory *factory, const string &name="")
int get_request_size(bool constrained)
Get the estimated response size.
BaseType * var(const string &n, BaseType::btp_stack &s)
virtual void transfer_attributes(DAS *das)
void print_xml(FILE *out, bool constrained, const string &blob="")
void print_xml_writer(XMLWriter &xml)
virtual void add_var_nocopy(BaseType *bt, Part part=nil)
virtual void print(FILE *out, string pad=" ", bool dereference=false)
Prints the attribute table.
std::vector< BaseType * >::const_iterator Vars_citer
void print_xml_writer(ostream &out, bool constrained, const string &blob="")
void add_var_nocopy(BaseType *bt)
Adds the variable to the DDS.
Holds a structure (aggregate) type.
Vars_riter var_rend()
Return a reverse iterator.
virtual void add_var(BaseType *bt, Part part=nil)
virtual string get_name() const
Get the name of this attribute table.
int num_var()
Returns the number of variables in the DDS.
std::vector< BaseType * >::reverse_iterator Vars_riter
stack< BaseType * > btp_stack
bool mark(const string &name, bool state)
Mark the send_p flag of the named variable to state.
A class for software fault reporting.
void parse(string fname)
Parse a DDS from a file with the given d_name.
DDS & operator=(const DDS &rhs)
const string c_dap40_namespace
virtual BaseType * var(const string &name="", bool exact_match=true, btp_stack *s=0)
Returns a pointer to a member of a constructor class.
string type_name() const
Returns the type of the class instance as a string.
string get_namespace() const
Get the namespace associated with the DDS - likely set only by DDX responses.
virtual bool is_constructor_type() const
Returns true if the instance is a constructor (i.e., Structure, Sequence or Grid) type variable...
string get_dap_version() const
int get_dap_major() const
Get the DAP major version as sent by the client.
virtual void set_send_p(bool state)
void mark_all(bool state)
virtual AttrTable * append_container(const string &name)
Add a container to the attribute table.
const string c_xml_namespace
std::vector< BaseType * >::iterator Vars_iter
void print_das(ostream &out)
virtual bool is_vector_type() const
Returns true if the instance is a vector (i.e., array) type variable.
const string c_dap_40_n_sl
void print_dmr(ostream &out, bool constrained)
virtual AttrTable & get_attr_table()
BaseType * get_var_index(int i)
Get a variable.
bool check_semantics(bool all=false)
Check the semantics of each of the variables represented in the DDS.
void * dds_buffer(FILE *fp)
void dds_switch_to_buffer(void *new_buffer)
string name() const
Returns the name of the class instance.
virtual AttrTable * get_top_level_attributes()
Returns the top most set of attributes.
virtual Attr_iter attr_begin()
virtual BaseType * ptr_duplicate()=0
string www2id(const string &in, const string &escape, const string &except)
Vars_iter var_end()
Return an iterator.
BaseType * exact_match(const string &name, BaseType::btp_stack *s=0)
void tag_nested_sequences()
Traverse DDS, set Sequence leaf nodes.
static ostream & LMarg(ostream &strm)
const string c_default_dap20_schema_location
void set_dap_minor(int p)
void set_dataset_name(const string &n)
The basic data type for the DODS DAP types.
libdap base object for common functionality of libdap objects
Pass parameters by reference to a parser.
void del_var(const string &n)
Removes a variable from the DDS.
bool unique_names(vector< BaseType * > l, const string &var_name, const string &type_name, string &msg)
virtual void dump(ostream &strm) const
dumps information about this object
Vars_riter var_rbegin()
Return a reverse iterator.
Hold attribute data for a DAP2 dataset.
const string grddl_transformation_dap32
int get_dap_minor() const
Get the DAP minor version as sent by the client.
A class for error processing.
string get_dataset_name() const
void duplicate(const DDS &dds)
void set_dap_major(int p)
virtual void del_var(const string &name)
void print_constrained(FILE *out)
Print a constrained DDS to the specified file.
virtual void dump(ostream &strm) const
dumps information about this object
virtual string container_name()
Returns the name of the current attribute container when multiple files used to build this DAS...
void set_dap_version(const string &version_string="2.0")
string id2www(string in, const string &allowable)
void add_var(BaseType *bt)
Adds a copy of the variable to the DDS. Using the ptr_duplicate() method, perform a deep copy on the ...
const string c_dap_20_n_sl