29#ifndef __NCML_MODULE__NETCDF_ELEMENT_H__
30#define __NCML_MODULE__NETCDF_ELEMENT_H__
32#include "AggMemberDataset.h"
33#include "DDSAccessInterface.h"
35#include "NCMLElement.h"
62class NetcdfElement:
public NCMLElement,
66 NetcdfElement& operator=(
const NetcdfElement& rhs);
69 static const std::string _sTypeName;
70 static const std::vector<std::string> _sValidAttributes;
73 NetcdfElement(
const NetcdfElement& proto);
74 virtual ~NetcdfElement();
76 virtual NetcdfElement*
clone()
const;
85 const std::string& location()
const
89 const std::string& id()
const
93 const std::string& title()
const
97 const std::string& coordValue()
const
101 const std::string& ncoords()
const
106 bool hasNcoords()
const
108 return !_ncoords.empty();
129 virtual const libdap::DDS*
getDDS()
const;
136 bool getProcessedMetadataDirective()
const
138 return _gotMetadataDirective;
141 void setProcessedMetadataDirective()
143 _gotMetadataDirective =
true;
242 template <
typename T>
int getCoordValueVector(std::vector<T>& values)
const;
321 void throwOnUnsupportedAttributes();
328 bool validateAttributeContextOrThrow()
const;
330 static std::vector<std::string> getValidAttributes();
333 std::string _location;
336 std::string _ncoords;
337 std::string _enhance;
338 std::string _addRecords;
339 std::string _coordValue;
340 std::string _fmrcDefinition;
344 bool _gotMetadataDirective;
372 std::vector<DimensionElement*> _dimensions;
411 class VariableValueValidator {
413 VariableValueValidator(NetcdfElement* pParent);
463 VariableValueValidator(
const VariableValueValidator&);
464 VariableValueValidator& operator=(
const VariableValueValidator&);
471 _pNewVar(0), _pVarElt(0)
475 _pNewVar(pBT), _pVarElt(pVE)
483 libdap::BaseType* _pNewVar;
499 std::vector<VVVEntry> _entries;
500 NetcdfElement* _pParent;
Represents an OPeNDAP DAP response object within the BES.
A reference to an RCObject which automatically ref() and deref() on creation and destruction.
void removeVariableToValidate(libdap::BaseType *pVarToRemove)
void setVariableGotValues(libdap::BaseType *pVarToValidate)
void addVariableToValidate(libdap::BaseType *pNewVar, VariableElement *pVE)
~VariableValueValidator()
VariableElement * findVariableElementForLibdapVar(libdap::BaseType *pNewVar)
RCPtr< agg_util::AggMemberDataset > getAggMemberDataset() const
virtual const std::string & getTypeName() const
virtual void handleContent(const std::string &content)
virtual libdap::DDS * getDDS()
virtual void handleBegin()
virtual std::string toString() const
virtual NetcdfElement * clone() const
bool getCoordValueAsDouble(double &val) const
void createResponseObject(agg_util::DDSLoader::ResponseType type)
void unborrowResponseObject(BESDapResponse *pResponse)
void addDimension(DimensionElement *dim)
const DimensionElement * getDimensionInFullScope(const std::string &name) const
virtual void setAttributes(const XMLAttributeMap &attrs)
static bool isLocationLexicographicallyLessThan(const NetcdfElement *pLHS, const NetcdfElement *pRHS)
void setChildAggregation(AggregationElement *agg, bool throwIfExists=true)
AggregationElement * getParentAggregation() const
const DimensionElement * getDimensionInLocalScope(const std::string &name) const
unsigned int getNcoordsAsUnsignedInt() const
void setVariableGotValues(libdap::BaseType *pVarToValidate, bool removeEntry)
void setParentAggregation(AggregationElement *parent)
VariableElement * findVariableElementForLibdapVar(libdap::BaseType *pNewVar)
void addVariableToValidateOnClose(libdap::BaseType *pNewVar, VariableElement *pVE)
const std::vector< DimensionElement * > & getDimensionElements() const
std::string printDimensions() const
void borrowResponseObject(BESDapResponse *pResponse)
virtual const libdap::DDS * getDDS() const
AggregationElement * getChildAggregation() const
static bool isCoordValueLexicographicallyLessThan(const NetcdfElement *pLHS, const NetcdfElement *pRHS)
NetcdfElement * getParentDataset() const
Concrete class for NcML <variable> element.
NcML Parser for adding/modifying/removing metadata (attributes) to existing local datasets using NcML...