OPeNDAP Hyrax Back End Server (BES)  Updated for version 3.8.3
ncml_module::NetcdfElement Class Reference

Concrete class for NcML <netcdf> element. More...

#include <NetcdfElement.h>

Inheritance diagram for ncml_module::NetcdfElement:
Inheritance graph
Collaboration diagram for ncml_module::NetcdfElement:
Collaboration graph

Classes

class  VariableValueValidator
 Inner class for keeping track of new variables created within the context of this dataset for which we do not get <values> set up front. More...
 

Public Member Functions

void addDimension (DimensionElement *dim)
 Add the given element to this scope. More...
 
void addPreDeleteCB (UseCountHitZeroCB *pCB)
 Add uniquely. More...
 
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 upon closing (handleEnd() of this element). More...
 
void borrowResponseObject (BESDapResponse *pResponse)
 Used by the NCMLParser to let us know to borrow the response object and not own it. More...
 
void clearDimensions ()
 Clear the dimension table, releasing all strong references. More...
 
virtual NetcdfElementclone () const
 Make and return a copy of this. More...
 
const string & coordValue () const
 
void createResponseObject (agg_util::DDSLoader::ResponseType type)
 Called if this is a member of an aggregation (i.e. More...
 
VariableElementfindVariableElementForLibdapVar (libdap::BaseType *pNewVar)
 If a VariableElement has been associated with a new var to validate, return it. More...
 
RCPtr< agg_util::AggMemberDatasetgetAggMemberDataset () const
 Return a shared reference to the AggMemberDataset that encapsulates this dataset. More...
 
AggregationElementgetChildAggregation () const
 Return the raw pointer (or NULL) to our contained aggregation. More...
 
bool getCoordValueAsDouble (double &val) const
 Parse the netcdf attribute as a double. More...
 
virtual const libdap::DDS * getDDS () const
 Return the DDS for this dataset, loading it in if needed. More...
 
virtual libdap::DDS * getDDS ()
 Non-const version to allow changes to the DDS. More...
 
const std::vector< DimensionElement * > & getDimensionElements () const
 Get the list of dimension elements local to only this dataset, not its enclosing scope. More...
 
const DimensionElementgetDimensionInFullScope (const string &name) const
 
const DimensionElementgetDimensionInLocalScope (const string &name) const
 
unsigned int getNcoordsAsUnsignedInt () const
 Get the ncoords() field as a valid size. More...
 
AggregationElementgetParentAggregation () const
 
NetcdfElementgetParentDataset () const
 Return the next enclosing dataset for this, or NULL if we're the root. More...
 
bool getProcessedMetadataDirective () const
 
virtual int getRefCount () const
 Get the current reference count. More...
 
virtual const string & getTypeName () const
 Return the type of the element, which should be: the same as ConcreteClassName::getTypeName() More...
 
virtual void handleBegin ()
 Handle a begin on this element. More...
 
virtual void handleContent (const string &content)
 Handle the characters content for the element. More...
 
virtual void handleEnd ()
 Handle the closing of this element. More...
 
bool hasNcoords () const
 
const string & id () const
 
bool isValid () const
 
int line () const
 Return the current parse line number. More...
 
const string & location () const
 
const string & ncoords () const
 
 NetcdfElement ()
 
 NetcdfElement (const NetcdfElement &proto)
 
string printDimensions () const
 "Print" out the dimensions to a string More...
 
virtual int ref () const
 Increase the reference count by one. More...
 
virtual void removeFromPool () const
 If the object is in an auto-delete pool, remove it from the pool and force it to only delete when it's ref count goes to 0. More...
 
void removePreDeleteCB (UseCountHitZeroCB *pCB)
 Remove it exists. More...
 
virtual void setAttributes (const XMLAttributeMap &attrs)
 Set the attributes of this from the map. More...
 
void setChildAggregation (AggregationElement *agg, bool throwIfExists=true)
 Set our aggregation to the given agg. More...
 
void setParentAggregation (AggregationElement *parent)
 Set my parent AggregationElement to parent. More...
 
void setParser (NCMLParser *p)
 
void setProcessedMetadataDirective ()
 
void setVariableGotValues (libdap::BaseType *pVarToValidate, bool removeEntry)
 Lookup the VariableElement* associated with pVarToValidate via a previous addVariableToValidateOnClose() and call pVE->setGotValues() on the associated element so that it will be considered valid at handleEnd() of this element. More...
 
const string & title () const
 
virtual string toString () const
 Return a string describing the element. More...
 
void unborrowResponseObject (BESDapResponse *pResponse)
 Kind of superfluous, but tells this object to clear its reference to pReponse, which had better match _response or we throw internal exception. More...
 
virtual int unref () const throw ()
 Decrease the reference count by one. More...
 
virtual bool validateAttributes (const XMLAttributeMap &attrs, const vector< string > &validAttrs, vector< string > *pInvalidAttrs=0, bool printInvalid=true, bool throwOnError=true)
 Check that the given attributes are all in the valid set, otherwise fill in *pInvalidAttrs with the problematic ones if it's not null. More...
 
virtual ~NetcdfElement ()
 

Static Public Member Functions

static bool areAllAttributesValid (const XMLAttributeMap &attrMap, const std::vector< string > &validAttrs, std::vector< string > *pInvalidAttributes=0)
 
static bool isCoordValueLexicographicallyLessThan (const NetcdfElement *pLHS, const NetcdfElement *pRHS)
 Compare the coordvalue fields of the two arguments and return true if lhs.coordValue() < rhs.coordValue() in a lexicographic string sense. More...
 
static bool isLocationLexicographicallyLessThan (const NetcdfElement *pLHS, const NetcdfElement *pRHS)
 Compare the location fields of the two arguments and return true if lhs.location() < rhs.location() in a lexicographic string sense. More...
 
static bool isValidAttribute (const std::vector< string > &validAttrs, const string &attr)
 
static std::string printAttributeIfNotEmpty (const std::string &attrName, const std::string &attrValue)
 Helper for subclasses implementing toString(). More...
 

Static Public Attributes

static const string _sTypeName = "netcdf"
 
static const vector< string > _sValidAttributes = getValidAttributes()
 

Protected Attributes

NCMLParser_parser
 

Detailed Description

Concrete class for NcML <netcdf> element.

This element specifies the location attribute for the local data file that we wrap and load into a DDX (DDS w/ AttrTable tree).

We keep a ptr to our containing NCMLParser to help with the differences needed if we are the root dataset element or not, in particular that the response object is either passed in to us (root) or loaded brandy new if we're the child of an aggregation.

Definition at line 63 of file NetcdfElement.h.

Constructor & Destructor Documentation

ncml_module::NetcdfElement::NetcdfElement ( )

Definition at line 61 of file NetcdfElement.cc.

Referenced by clone().

ncml_module::NetcdfElement::NetcdfElement ( const NetcdfElement proto)

Definition at line 82 of file NetcdfElement.cc.

References addDimension(), ncml_module::DimensionElement::clone(), setChildAggregation(), and THROW_NCML_INTERNAL_ERROR.

Here is the call graph for this function:

ncml_module::NetcdfElement::~NetcdfElement ( )
virtual

Definition at line 128 of file NetcdfElement.cc.

References BESDEBUG, clearDimensions(), and SAFE_DELETE.

Here is the call graph for this function:

Member Function Documentation

void ncml_module::NetcdfElement::addDimension ( DimensionElement dim)

Add the given element to this scope.

We maintain a strong reference, so the caller should respect the RCObject count and not delete it on us!

Definition at line 410 of file NetcdfElement.cc.

References BESDEBUG, getDimensionInLocalScope(), ncml_module::DimensionElement::name(), printDimensions(), agg_util::RCObject::ref(), THROW_NCML_INTERNAL_ERROR, ncml_module::DimensionElement::toString(), and VALID_PTR.

Referenced by ncml_module::DimensionElement::handleBegin(), and NetcdfElement().

Here is the call graph for this function:

void agg_util::RCObject::addPreDeleteCB ( UseCountHitZeroCB pCB)
inherited

Add uniquely.

If it is added agan, the second time is ignored.

Definition at line 145 of file RCObject.cc.

References BESDEBUG.

void ncml_module::NetcdfElement::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 upon closing (handleEnd() of this element).

All new variables are required to have values at the time the dataset is closed or a parse error is thrown at that time.

Parameters
pNewVarthe new variable to watch, used as a key to find pVE later
pVEthe variable element that created the pNewVar, which contains whether the value of pNewVar has been set yet (since there's no direct way in BaseType to do that now). pVE->ref() will be called to keep pVE around sicne it will go out of scope after this call. On the ~NetcdfElement, pVE->unref() will be called to undo this.

Definition at line 559 of file NetcdfElement.cc.

References ncml_module::NetcdfElement::VariableValueValidator::addVariableToValidate().

Here is the call graph for this function:

bool ncml_module::NCMLElement::areAllAttributesValid ( const XMLAttributeMap attrMap,
const std::vector< string > &  validAttrs,
std::vector< string > *  pInvalidAttributes = 0 
)
staticinherited
Returns
whether all the attributes in attrMap are in validAttrs. If pInvalidAttributes, fill it in with all the illegal attributes.

Definition at line 261 of file NCMLElement.cc.

References ncml_module::XMLAttributeMap::begin(), ncml_module::XMLAttributeMap::end(), and ncml_module::NCMLElement::isValidAttribute().

Referenced by ncml_module::NCMLElement::validateAttributes().

Here is the call graph for this function:

void ncml_module::NetcdfElement::borrowResponseObject ( BESDapResponse pResponse)

Used by the NCMLParser to let us know to borrow the response object and not own it.

Used for the root element only! Nested datasets will create and own their own!

Definition at line 307 of file NetcdfElement.cc.

References NCML_ASSERT_MSG.

void ncml_module::NetcdfElement::clearDimensions ( )

Clear the dimension table, releasing all strong references.

Definition at line 439 of file NetcdfElement.cc.

References agg_util::RCObject::unref().

Referenced by ~NetcdfElement().

Here is the call graph for this function:

NetcdfElement * ncml_module::NetcdfElement::clone ( ) const
virtual

Make and return a copy of this.

Used by the factory from a prototype.

Implements ncml_module::NCMLElement.

Definition at line 150 of file NetcdfElement.cc.

References NetcdfElement().

Referenced by ncml_module::AggregationElement::AggregationElement().

Here is the call graph for this function:

const string& ncml_module::NetcdfElement::coordValue ( ) const
inline

Definition at line 90 of file NetcdfElement.h.

Referenced by isCoordValueLexicographicallyLessThan().

void ncml_module::NetcdfElement::createResponseObject ( agg_util::DDSLoader::ResponseType  type)

Called if this is a member of an aggregation (i.e.

not root) to create a dynamic response object of the given type. This call or borrowResponseObject() must be called before this is used.

Definition at line 322 of file NetcdfElement.cc.

References ncml_module::NCMLElement::_parser, agg_util::DDSLoader::makeResponseForType(), THROW_NCML_INTERNAL_ERROR, and VALID_PTR.

Here is the call graph for this function:

VariableElement * ncml_module::NetcdfElement::findVariableElementForLibdapVar ( libdap::BaseType *  pNewVar)

If a VariableElement has been associated with a new var to validate, return it.

If not, return null.

Parameters
pNewVarthe libdap variable (key) to look up
Returns
the associated VariableElement for pNewVar, else null if not set with addVariableToValidate.

Definition at line 752 of file NetcdfElement.cc.

References ncml_module::NetcdfElement::VariableValueValidator::findVariableElementForLibdapVar().

Here is the call graph for this function:

RCPtr< agg_util::AggMemberDataset > ncml_module::NetcdfElement::getAggMemberDataset ( ) const

Return a shared reference to the AggMemberDataset that encapsulates this dataset.

If it doesn't exist in this instance yet, it is created and stored in this (semantically const accessor) If it does exist, a shared reference to the contained object is returned.

Definition at line 339 of file NetcdfElement.cc.

References ncml_module::NCMLElement::_parser, agg_util::WeakRCPtr< T >::empty(), agg_util::RCPtr< T >::get(), agg_util::WeakRCPtr< T >::lock(), NCML_ASSERT, and VALID_PTR.

Here is the call graph for this function:

AggregationElement * ncml_module::NetcdfElement::getChildAggregation ( ) const

Return the raw pointer (or NULL) to our contained aggregation.

Only guaranteed valid for the life of this object.

Definition at line 496 of file NetcdfElement.cc.

Referenced by ncml_module::AggregationElement::handleBegin(), and ncml_module::ScanElement::handleEnd().

bool ncml_module::NetcdfElement::getCoordValueAsDouble ( double &  val) const

Parse the netcdf attribute as a double.

If successful, put the value in val and return true. If unsuccessful, val is unchanged and false is returned. ASSUMES: there is only ONE token in the coordValue field. TODO: look into loading multiple values later as needed.

Parameters
valoutput the parsed value here if possible
Returns
whether the parse was successful

Definition at line 536 of file NetcdfElement.cc.

const libdap::DDS * ncml_module::NetcdfElement::getDDS ( ) const
virtual

Return the DDS for this dataset, loading it in if needed.

(semantically const although the loaded DDS is cached).

Implements agg_util::DDSAccessInterface.

Definition at line 257 of file NetcdfElement.cc.

Referenced by ncml_module::ExplicitElement::handleBegin().

libdap::DDS * ncml_module::NetcdfElement::getDDS ( )
virtual

Non-const version to allow changes to the DDS.

Do NOT delete the return value!

Definition at line 263 of file NetcdfElement.cc.

References BESDEBUG, ncml_module::NCMLUtil::getDDSFromEitherResponse(), and location().

Here is the call graph for this function:

const std::vector< DimensionElement * > & ncml_module::NetcdfElement::getDimensionElements ( ) const

Get the list of dimension elements local to only this dataset, not its enclosing scope.

Definition at line 451 of file NetcdfElement.cc.

const DimensionElement * ncml_module::NetcdfElement::getDimensionInFullScope ( const string &  name) const
Returns
the first DimensionElement with name found by checking getDimensionInLocalScope() starting at this element and traversing upwards to the enclosing scopes (in case we're in an aggregation). Return NULL if not found. this allows dimensions to be lexically "shadowed". Ultimately, shared dimensions cannot be shadowed, so we will need to make sure of this when we handle shared dimensions.

Definition at line 393 of file NetcdfElement.cc.

References getDimensionInFullScope(), getDimensionInLocalScope(), and getParentDataset().

Referenced by getDimensionInFullScope().

Here is the call graph for this function:

const DimensionElement * ncml_module::NetcdfElement::getDimensionInLocalScope ( const string &  name) const
Returns
the DimensionElement with the given name in the dimension table for THIS NetcdfElement only (no traversing up the tree is allowed). If not found, NULL is returned.

Definition at line 375 of file NetcdfElement.cc.

References ncml_module::DimensionElement::name(), and VALID_PTR.

Referenced by addDimension(), getDimensionInFullScope(), and ncml_module::DimensionElement::handleBegin().

Here is the call graph for this function:

unsigned int ncml_module::NetcdfElement::getNcoordsAsUnsignedInt ( ) const

Get the ncoords() field as a valid size.

Throws: if !hasNCoords().

Returns
the parsed value of the ncoords() field.

Definition at line 292 of file NetcdfElement.cc.

References hasNcoords(), ncml_module::NCMLElement::line(), NCML_ASSERT_MSG, THROW_NCML_PARSE_ERROR, and ncml_module::NCMLUtil::toUnsignedInt().

Here is the call graph for this function:

AggregationElement * ncml_module::NetcdfElement::getParentAggregation ( ) const
Returns
the AggregationElement that contains me, or NULL if we're root.

Definition at line 484 of file NetcdfElement.cc.

NetcdfElement * ncml_module::NetcdfElement::getParentDataset ( ) const

Return the next enclosing dataset for this, or NULL if we're the root.

Basically traverse upwards through any aggregation parent to get containing datset.

Definition at line 473 of file NetcdfElement.cc.

References ncml_module::AggregationElement::getParentDataset().

Referenced by getDimensionInFullScope().

Here is the call graph for this function:

bool ncml_module::NetcdfElement::getProcessedMetadataDirective ( ) const
inline
int agg_util::RCObject::getRefCount ( ) const
virtualinherited

Get the current reference count.

Implements agg_util::RCObjectInterface.

Definition at line 110 of file RCObject.cc.

const string & ncml_module::NetcdfElement::getTypeName ( ) const
virtual

Return the type of the element, which should be: the same as ConcreteClassName::getTypeName()

Implements ncml_module::NCMLElement.

Definition at line 144 of file NetcdfElement.cc.

References _sTypeName.

void ncml_module::NetcdfElement::handleBegin ( )
virtual

Handle a begin on this element.

Called after creation and it is assumed the attributes and _parser are already set.

Implements ncml_module::NCMLElement.

Definition at line 176 of file NetcdfElement.cc.

References ncml_module::NCMLElement::_parser, BESDEBUG, ncml_module::NCMLParser::getParseLineNumber(), THROW_NCML_PARSE_ERROR, and toString().

Here is the call graph for this function:

void ncml_module::NetcdfElement::handleContent ( const string &  content)
virtual

Handle the characters content for the element.

Default impl throws if the content is not all whitespace. Subclasses that handle non-whitespace content should override.

Parameters
contentthe string of characters in the element content.

Reimplemented from ncml_module::NCMLElement.

Definition at line 198 of file NetcdfElement.cc.

References ncml_module::NCMLElement::_parser, ncml_module::NCMLParser::getParseLineNumber(), ncml_module::NCMLUtil::isAllWhitespace(), THROW_NCML_PARSE_ERROR, and toString().

Here is the call graph for this function:

void ncml_module::NetcdfElement::handleEnd ( )
virtual

Handle the closing of this element.

Implements ncml_module::NCMLElement.

Definition at line 209 of file NetcdfElement.cc.

References ncml_module::NCMLElement::_parser, BESDEBUG, ncml_module::NCMLParser::getParseLineNumber(), THROW_NCML_PARSE_ERROR, and ncml_module::NetcdfElement::VariableValueValidator::validate().

Here is the call graph for this function:

bool ncml_module::NetcdfElement::hasNcoords ( ) const
inline

Definition at line 93 of file NetcdfElement.h.

Referenced by getNcoordsAsUnsignedInt().

const string& ncml_module::NetcdfElement::id ( ) const
inline

Definition at line 88 of file NetcdfElement.h.

bool ncml_module::NetcdfElement::isCoordValueLexicographicallyLessThan ( const NetcdfElement pLHS,
const NetcdfElement pRHS 
)
static

Compare the coordvalue fields of the two arguments and return true if lhs.coordValue() < rhs.coordValue() in a lexicographic string sense.

Used for std::sort on vector<NetcdfElement*>

See also
isLocationLexicographicallyLessThan()
Parameters
pLHSthe lefthandside of the less than Must not be null!
pRHSthe righthandside of the less than Must not be null!
Returns
if pLHS->coordValue() < pRHS->coordValue() lexicographically.

Definition at line 590 of file NetcdfElement.cc.

References assert, and coordValue().

Referenced by ncml_module::ScanElement::getDatasetList().

Here is the call graph for this function:

bool ncml_module::NetcdfElement::isLocationLexicographicallyLessThan ( const NetcdfElement pLHS,
const NetcdfElement pRHS 
)
static

Compare the location fields of the two arguments and return true if lhs.location() < rhs.location() in a lexicographic string sense.

Used for std::sort on vector<NetcdfElement*>

See also
isCoordValueLexicographicallyLessThan()
Parameters
pLHSthe lefthandside of the less than must not be null!
pRHSthe righthandside of the less than must not be null!
Returns
if pLHS->location() < pRHS->location() lexicographically.

Definition at line 578 of file NetcdfElement.cc.

References assert, and location().

Referenced by ncml_module::ScanElement::getDatasetList().

Here is the call graph for this function:

bool ncml_module::NetcdfElement::isValid ( ) const
Returns
whether this is initialized properly and ready to be used. It should be true after handleBegin() if all is well.

Definition at line 283 of file NetcdfElement.cc.

References ncml_module::NCMLElement::_parser.

bool ncml_module::NCMLElement::isValidAttribute ( const std::vector< string > &  validAttrs,
const string &  attr 
)
staticinherited
Returns
whether the given attr is in the array validAttrs or not... Helper for subclasses

Definition at line 246 of file NCMLElement.cc.

Referenced by ncml_module::NCMLElement::areAllAttributesValid().

int ncml_module::NCMLElement::line ( ) const
inherited
const string& ncml_module::NetcdfElement::location ( ) const
inline

Definition at line 87 of file NetcdfElement.h.

Referenced by getDDS(), and isLocationLexicographicallyLessThan().

const string& ncml_module::NetcdfElement::ncoords ( ) const
inline

Definition at line 91 of file NetcdfElement.h.

std::string ncml_module::NCMLElement::printAttributeIfNotEmpty ( const std::string &  attrName,
const std::string &  attrValue 
)
staticinherited

Helper for subclasses implementing toString().

Returns
a string with attrName="attrValue" if !attrValue.empty(), otherwise return the empty string.

Definition at line 240 of file NCMLElement.cc.

Referenced by ncml_module::VariableAggElement::toString(), ncml_module::ScanElement::toString(), ncml_module::DimensionElement::toString(), toString(), and ncml_module::AggregationElement::toString().

string ncml_module::NetcdfElement::printDimensions ( ) const

"Print" out the dimensions to a string

Definition at line 425 of file NetcdfElement.cc.

Referenced by addDimension().

int agg_util::RCObject::ref ( ) const
virtualinherited

Increase the reference count by one.

const since we do not consider the ref count part of the semantic constness of the rep

Implements agg_util::RCObjectInterface.

Definition at line 74 of file RCObject.cc.

References BESDEBUG.

Referenced by ncml_module::AggregationElement::addChildDataset(), addDimension(), ncml_module::AggregationElement::addScanElement(), ncml_module::NetcdfElement::VariableValueValidator::addVariableToValidate(), and agg_util::RCPtr< ncml_module::AggregationElement >::refAndGet().

void agg_util::RCObject::removeFromPool ( ) const
virtualinherited

If the object is in an auto-delete pool, remove it from the pool and force it to only delete when it's ref count goes to 0.

Useful when we desire a particular object stay around outside of the pool's lifetime.

Implements agg_util::RCObjectInterface.

Definition at line 116 of file RCObject.cc.

References NCML_ASSERT, and agg_util::RCObjectPool::remove().

Here is the call graph for this function:

void agg_util::RCObject::removePreDeleteCB ( UseCountHitZeroCB pCB)
inherited

Remove it exists.

If not, this unchanged.

Definition at line 164 of file RCObject.cc.

References BESDEBUG.

void ncml_module::NetcdfElement::setAttributes ( const XMLAttributeMap attrs)
virtual

Set the attributes of this from the map.

Parameters
attrsthe attribute map to set this class to.

Implements ncml_module::NCMLElement.

Definition at line 156 of file NetcdfElement.cc.

References _sValidAttributes, ncml_module::XMLAttributeMap::getValueForLocalNameOrDefault(), and ncml_module::NCMLElement::validateAttributes().

Here is the call graph for this function:

void ncml_module::NetcdfElement::setChildAggregation ( AggregationElement agg,
bool  throwIfExists = true 
)

Set our aggregation to the given agg.

If there exists an aggregation already and !throwIfExists, agg will replace it, which might cause the previous one to be deleted.

If there exists one already and agg != NULL and throwIfExists, an exception will be thrown.

If agg == NULL, it always removes the strong reference to the previous, regardless of throwIfExists.

Definition at line 457 of file NetcdfElement.cc.

References THROW_NCML_INTERNAL_ERROR, and ncml_module::AggregationElement::toString().

Referenced by ncml_module::AggregationElement::handleBegin(), and NetcdfElement().

Here is the call graph for this function:

void ncml_module::NetcdfElement::setParentAggregation ( AggregationElement parent)

Set my parent AggregationElement to parent.

This is a weak reference.

Definition at line 490 of file NetcdfElement.cc.

Referenced by ncml_module::AggregationElement::addChildDataset().

void ncml_module::NCMLElement::setParser ( NCMLParser p)
inherited

Definition at line 166 of file NCMLElement.cc.

References ncml_module::NCMLElement::_parser, and NCML_ASSERT_MSG.

void ncml_module::NetcdfElement::setProcessedMetadataDirective ( )
inline
void ncml_module::NetcdfElement::setVariableGotValues ( libdap::BaseType *  pVarToValidate,
bool  removeEntry 
)

Lookup the VariableElement* associated with pVarToValidate via a previous addVariableToValidateOnClose() and call pVE->setGotValues() on the associated element so that it will be considered valid at handleEnd() of this element.

Should be called when the values are set on pVarToValidate.

Parameters
pVarToValidatethe variable which has had its deferred values set to be used as a key to lookup the associated VariableElement that created it.
removeEntryif the entry is found, remove it from the list as well as setting gotvalues.

Definition at line 565 of file NetcdfElement.cc.

References ncml_module::NetcdfElement::VariableValueValidator::removeVariableToValidate(), and ncml_module::NetcdfElement::VariableValueValidator::setVariableGotValues().

Here is the call graph for this function:

const string& ncml_module::NetcdfElement::title ( ) const
inline

Definition at line 89 of file NetcdfElement.h.

string ncml_module::NetcdfElement::toString ( ) const
virtual

Return a string describing the element.

Implements ncml_module::NCMLElement.

Definition at line 242 of file NetcdfElement.cc.

References _sTypeName, and ncml_module::NCMLElement::printAttributeIfNotEmpty().

Referenced by ncml_module::AggregationElement::addChildDataset(), handleBegin(), ncml_module::AggregationElement::handleBegin(), and handleContent().

Here is the call graph for this function:

void ncml_module::NetcdfElement::unborrowResponseObject ( BESDapResponse pResponse)

Kind of superfluous, but tells this object to clear its reference to pReponse, which had better match _response or we throw internal exception.

Definition at line 315 of file NetcdfElement.cc.

References NCML_ASSERT_MSG.

int agg_util::RCObject::unref ( ) const
throw (
)
virtualinherited

Decrease the reference count by one.

If it goes from 1 to 0, delete this and this is no longer valid.

Returns
the new ref count. If it is 0, the caller knows the object was deleted.

It is illegal to unref() an object with a count of 0. We don't throw to allow use in dtors, so the caller is assumed not to do it!

const since the reference count is not part of the semantic constness of the rep

Implements agg_util::RCObjectInterface.

Definition at line 82 of file RCObject.cc.

References BESDEBUG, agg_util::RCObjectPool::release(), and agg_util::RCObject::toString().

Referenced by clearDimensions(), agg_util::RCPtr< ncml_module::AggregationElement >::operator=(), ncml_module::AggregationElement::~AggregationElement(), and ncml_module::NetcdfElement::VariableValueValidator::~VariableValueValidator().

Here is the call graph for this function:

bool ncml_module::NCMLElement::validateAttributes ( const XMLAttributeMap attrs,
const vector< string > &  validAttrs,
vector< string > *  pInvalidAttrs = 0,
bool  printInvalid = true,
bool  throwOnError = true 
)
virtualinherited

Check that the given attributes are all in the valid set, otherwise fill in *pInvalidAttrs with the problematic ones if it's not null.

If pInvalidAttrs && printInvalid is set, we print the problematic attributes to BESDEBUG "ncml" channel If throwOnError is set, we throw a parse error instead of returning.

Returns
whether all attributes are in the valid set if not throw

Definition at line 191 of file NCMLElement.cc.

References ncml_module::NCMLElement::_parser, ncml_module::NCMLElement::areAllAttributesValid(), BESDEBUG, ncml_module::NCMLParser::getParseLineNumber(), ncml_module::NCMLElement::getTypeName(), THROW_NCML_PARSE_ERROR, and VALID_PTR.

Referenced by ncml_module::RemoveElement::setAttributes(), ncml_module::ExplicitElement::setAttributes(), ncml_module::ReadMetadataElement::setAttributes(), ncml_module::VariableAggElement::setAttributes(), ncml_module::ValuesElement::setAttributes(), ncml_module::AttributeElement::setAttributes(), ncml_module::ScanElement::setAttributes(), ncml_module::DimensionElement::setAttributes(), ncml_module::VariableElement::setAttributes(), setAttributes(), and ncml_module::AggregationElement::setAttributes().

Here is the call graph for this function:

Member Data Documentation

NCMLParser* ncml_module::NCMLElement::_parser
protectedinherited

Definition at line 193 of file NCMLElement.h.

Referenced by ncml_module::AggregationElement::addAggregationVariable(), createResponseObject(), getAggMemberDataset(), ncml_module::ScanElement::getDatasetList(), ncml_module::VariableAggElement::getParentAggregation(), ncml_module::RemoveElement::handleBegin(), ncml_module::ReadMetadataElement::handleBegin(), ncml_module::ExplicitElement::handleBegin(), ncml_module::VariableAggElement::handleBegin(), ncml_module::ValuesElement::handleBegin(), ncml_module::AttributeElement::handleBegin(), ncml_module::ScanElement::handleBegin(), ncml_module::DimensionElement::handleBegin(), ncml_module::VariableElement::handleBegin(), handleBegin(), ncml_module::AggregationElement::handleBegin(), ncml_module::RemoveElement::handleContent(), ncml_module::ExplicitElement::handleContent(), ncml_module::ReadMetadataElement::handleContent(), ncml_module::ValuesElement::handleContent(), ncml_module::AttributeElement::handleContent(), ncml_module::DimensionElement::handleContent(), ncml_module::VariableElement::handleContent(), handleContent(), ncml_module::AggregationElement::handleContent(), ncml_module::NCMLElement::handleContent(), ncml_module::ValuesElement::handleEnd(), ncml_module::AttributeElement::handleEnd(), ncml_module::ScanElement::handleEnd(), ncml_module::VariableElement::handleEnd(), handleEnd(), ncml_module::AggregationElement::handleEnd(), isValid(), ncml_module::NCMLElement::line(), ncml_module::ValuesElement::setAttributes(), ncml_module::NCMLElement::setParser(), ncml_module::NCMLElement::validateAttributes(), and ncml_module::NCMLElement::~NCMLElement().

const string ncml_module::NetcdfElement::_sTypeName = "netcdf"
static

Definition at line 71 of file NetcdfElement.h.

Referenced by getTypeName(), and toString().

const vector< string > ncml_module::NetcdfElement::_sValidAttributes = getValidAttributes()
static

Definition at line 72 of file NetcdfElement.h.

Referenced by setAttributes().


The documentation for this class was generated from the following files: