29 #ifndef __NCML_MODULE__NETCDF_ELEMENT_H__
30 #define __NCML_MODULE__NETCDF_ELEMENT_H__
47 class AggregationElement;
48 class DimensionElement;
50 class VariableElement;
87 const string&
location()
const {
return _location; }
88 const string&
id()
const {
return _id; }
89 const string&
title()
const {
return _title; }
91 const string&
ncoords()
const {
return _ncoords; }
113 virtual const libdap::DDS*
getDDS()
const;
118 virtual libdap::DDS*
getDDS();
122 return _gotMetadataDirective;
127 _gotMetadataDirective =
true;
217 #if 0 // not sure we need this yet
227 template <
typename T>
int getCoordValueVector(vector<T>& values)
const;
307 void throwOnUnsupportedAttributes();
314 bool validateAttributeContextOrThrow()
const;
316 static vector<string> getValidAttributes();
326 string _fmrcDefinition;
330 bool _gotMetadataDirective;
358 std::vector< DimensionElement* > _dimensions;
478 vector<VVVEntry> _entries;
~VariableValueValidator()
Will decrement the ref count of all contained VariableElement's.
virtual const string & getTypeName() const
Return the type of the element, which should be: the same as ConcreteClassName::getTypeName() ...
void addVariableToValidateOnClose(libdap::BaseType *pNewVar, VariableElement *pVE)
Add the pNewvar created by pVE to this dataset's list of variables to validate for having values set ...
ResponseType
For telling the loader what type of BESDapResponse to load and return.
virtual string toString() const
Return a string describing the element.
VariableElement * _pVarElt
static bool isCoordValueLexicographicallyLessThan(const NetcdfElement *pLHS, const NetcdfElement *pRHS)
Compare the coordvalue fields of the two arguments and return true if lhs.coordValue() < rhs...
const string & location() const
void setParentAggregation(AggregationElement *parent)
Set my parent AggregationElement to parent.
void addDimension(DimensionElement *dim)
Add the given element to this scope.
void setChildAggregation(AggregationElement *agg, bool throwIfExists=true)
Set our aggregation to the given agg.
An abstract superclass for NCMLArray that handles the non-parameterized functionality and allows u...
const string & coordValue() const
void clearDimensions()
Clear the dimension table, releasing all strong references.
virtual void handleEnd()
Handle the closing of this element.
virtual void handleContent(const string &content)
Handle the characters content for the element.
Concrete class for NcML element.
libdap::BaseType * _pNewVar
virtual const libdap::DDS * getDDS() const
Return the DDS for this dataset, loading it in if needed.
const DimensionElement * getDimensionInLocalScope(const string &name) const
static const vector< string > _sValidAttributes
static const string _sTypeName
virtual NetcdfElement * clone() const
Make and return a copy of this.
void setVariableGotValues(libdap::BaseType *pVarToValidate)
Lookup the VariableElement pVE associated with the given pVarToValidate and call pVE->setGotValues() ...
RCPtr< agg_util::AggMemberDataset > getAggMemberDataset() const
Return a shared reference to the AggMemberDataset that encapsulates this dataset. ...
string printDimensions() const
"Print" out the dimensions to a string
bool validate()
Make sure all the entries has had their values set else throw a parse error explaining which variable...
static bool isLocationLexicographicallyLessThan(const NetcdfElement *pLHS, const NetcdfElement *pRHS)
Compare the location fields of the two arguments and return true if lhs.location() < rhs...
Inner class for keeping track of new variables created within the context of this dataset for which w...
static class NCMLUtil overview
const string & id() const
AggregationElement * getChildAggregation() const
Return the raw pointer (or NULL) to our contained aggregation.
VVVEntry(libdap::BaseType *pBT, VariableElement *pVE)
virtual void handleBegin()
Handle a begin on this element.
Mixture interface for when we a reference-counted DDS container.
const std::vector< DimensionElement * > & getDimensionElements() const
Get the list of dimension elements local to only this dataset, not its enclosing scope.
const string & ncoords() const
bool getProcessedMetadataDirective() const
const DimensionElement * getDimensionInFullScope(const string &name) const
void removeVariableToValidate(libdap::BaseType *pVarToRemove)
Remove an entry previously added under the key pVarToRemove with addVariableToValidate.
void createResponseObject(agg_util::DDSLoader::ResponseType type)
Called if this is a member of an aggregation (i.e.
unsigned int getNcoordsAsUnsignedInt() const
Get the ncoords() field as a valid size.
A reference to an RCObject which automatically ref() and deref() on creation and destruction.
bool getCoordValueAsDouble(double &val) const
Parse the netcdf attribute as a double.
VariableElement * findVariableElementForLibdapVar(libdap::BaseType *pNewVar)
If a VariableElement has been associated with a new var to validate, return it.
void setVariableGotValues(libdap::BaseType *pVarToValidate, bool removeEntry)
Lookup the VariableElement* associated with pVarToValidate via a previous addVariableToValidateOnClos...
void unborrowResponseObject(BESDapResponse *pResponse)
Kind of superfluous, but tells this object to clear its reference to pReponse, which had better match...
Base class for NcML element concrete classes.
Represents an OPeNDAP DAP response object within the BES.
Concrete class for NcML element.
void setProcessedMetadataDirective()
virtual void setAttributes(const XMLAttributeMap &attrs)
Set the attributes of this from the map.
VariableValueValidator(NetcdfElement *pParent)
AggregationElement * getParentAggregation() const
void addVariableToValidate(libdap::BaseType *pNewVar, VariableElement *pVE)
Add a validation entry for the given VariableElement and the actual variable that it has created and ...
const string & title() const
NetcdfElement * getParentDataset() const
Return the next enclosing dataset for this, or NULL if we're the root.
void borrowResponseObject(BESDapResponse *pResponse)
Used by the NCMLParser to let us know to borrow the response object and not own it.
VariableElement * findVariableElementForLibdapVar(libdap::BaseType *pNewVar)
If a VariableElement has been associated with a new var to validate, return it.