bes Updated for version 3.20.13
ncml_module::AggregationElement Class Reference
Collaboration diagram for ncml_module::AggregationElement:
Collaboration graph

Public Types

typedef vector< string >::const_iterator AggVarIter
 

Public Member Functions

void addAggregationVariable (const string &name)
 
void addChildDataset (NetcdfElement *pDataset)
 
void addPreDeleteCB (UseCountHitZeroCB *pCB)
 
void addScanElement (ScanElement *pScanner)
 
 AggregationElement (const AggregationElement &proto)
 
AggVarIter beginAggVarIter () const
 
virtual AggregationElementclone () const
 
const string & dimName () const
 
AggVarIter endAggVarIter () const
 
const std::string & getAggregationVariableCoordinateAxisType () const
 
NetcdfElementgetParentDataset () const
 
virtual int getRefCount () const
 
virtual const string & getTypeName () const
 
bool gotVariableAggElement () const
 
virtual void handleBegin ()
 
virtual void handleContent (const std::string &content)
 
virtual void handleContent (const string &content)
 
virtual void handleEnd ()
 
bool isAggregationVariable (const string &name) const
 
bool isJoinExistingAggregation () const
 
bool isJoinNewAggregation () const
 
bool isUnionAggregation () const
 
int line () const
 
string printAggregationVariables () const
 
void processParentDatasetComplete ()
 
const string & recheckEvery () const
 
virtual int ref () const
 
virtual void removeFromPool () const
 
void removePreDeleteCB (UseCountHitZeroCB *pCB)
 
void setAggregationVariableCoordinateAxisType (const std::string &cat)
 
virtual void setAttributes (const XMLAttributeMap &attrs)
 
NetcdfElementsetParentDataset (NetcdfElement *parent)
 Private Impl.
 
void setParser (NCMLParser *p)
 
void setVariableAggElement ()
 
virtual string toString () const
 
const string & type () const
 
virtual int unref () const
 
virtual bool validateAttributes (const XMLAttributeMap &attrs, const std::vector< std::string > &validAttrs, std::vector< std::string > *pInvalidAttrs=0, bool printInvalid=true, bool throwOnError=true)
 

Static Public Member Functions

static bool areAllAttributesValid (const XMLAttributeMap &attrMap, const std::vector< std::string > &validAttrs, std::vector< std::string > *pInvalidAttributes=0)
 
static bool isValidAttribute (const std::vector< std::string > &validAttrs, const std::string &attr)
 
static std::string printAttributeIfNotEmpty (const std::string &attrName, const std::string &attrValue)
 

Static Public Attributes

static const string _sTypeName = "aggregation"
 
static const vector< string > _sValidAttrs = getValidAttributes()
 

Protected Attributes

NCMLParser_parser
 

Detailed Description

Definition at line 63 of file AggregationElement.h.

Member Typedef Documentation

◆ AggVarIter

typedef vector<string>::const_iterator ncml_module::AggregationElement::AggVarIter

Definition at line 129 of file AggregationElement.h.

Constructor & Destructor Documentation

◆ AggregationElement() [1/2]

ncml_module::AggregationElement::AggregationElement ( )

Definition at line 77 of file AggregationElement.cc.

◆ AggregationElement() [2/2]

ncml_module::AggregationElement::AggregationElement ( const AggregationElement proto)

Definition at line 83 of file AggregationElement.cc.

◆ ~AggregationElement()

ncml_module::AggregationElement::~AggregationElement ( )
virtual

Definition at line 114 of file AggregationElement.cc.

Member Function Documentation

◆ addAggregationVariable()

void ncml_module::AggregationElement::addAggregationVariable ( const string &  name)

Set the variable with name as an aggregation variable for this aggregation.

Definition at line 267 of file AggregationElement.cc.

◆ addChildDataset()

void ncml_module::AggregationElement::addChildDataset ( NetcdfElement pDataset)

Add a new dataset to the aggregation for the parse. We now have a strong reference to it.

Definition at line 254 of file AggregationElement.cc.

◆ addPreDeleteCB()

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

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

Definition at line 129 of file RCObject.cc.

◆ addScanElement()

void ncml_module::AggregationElement::addScanElement ( ScanElement pScanner)

Add a child ScanElement to the Aggregation to be used to to add to the list of child datasets. This will be a strong (ref()'d) reference.

Parameters
pScannerthe element to which to maintain a strong ref and use in the processing.

Definition at line 326 of file AggregationElement.cc.

◆ areAllAttributesValid()

bool ncml_module::NCMLElement::areAllAttributesValid ( const XMLAttributeMap attrMap,
const std::vector< std::string > &  validAttrs,
std::vector< std::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 229 of file NCMLElement.cc.

◆ beginAggVarIter()

AggregationElement::AggVarIter ncml_module::AggregationElement::beginAggVarIter ( ) const

Definition at line 306 of file AggregationElement.cc.

◆ clone()

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

Make and return a copy of this. Used by the factory from a prototype.

Implements ncml_module::NCMLElement.

Definition at line 145 of file AggregationElement.cc.

◆ dimName()

const string & ncml_module::AggregationElement::dimName ( ) const
inline

Definition at line 89 of file AggregationElement.h.

◆ endAggVarIter()

AggregationElement::AggVarIter ncml_module::AggregationElement::endAggVarIter ( ) const

Definition at line 311 of file AggregationElement.cc.

◆ getAggregationVariableCoordinateAxisType()

const std::string & ncml_module::AggregationElement::getAggregationVariableCoordinateAxisType ( ) const

Return the value set by setAggregationVariableCoordinateAxisType() or "" if none was set.

Definition at line 1119 of file AggregationElement.cc.

◆ getParentDataset()

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

Definition at line 108 of file AggregationElement.h.

◆ getRefCount()

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

Get the current reference count

Implements agg_util::RCObjectInterface.

Definition at line 101 of file RCObject.cc.

◆ getTypeName()

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

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

Implements ncml_module::NCMLElement.

Definition at line 139 of file AggregationElement.cc.

◆ gotVariableAggElement()

bool ncml_module::AggregationElement::gotVariableAggElement ( ) const

whether this aggregation contained a variableAgg element to select aggregation variables.

Definition at line 316 of file AggregationElement.cc.

◆ handleBegin()

void ncml_module::AggregationElement::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 160 of file AggregationElement.cc.

◆ handleContent() [1/2]

void ncml_module::NCMLElement::handleContent ( const std::string &  content)
virtualinherited

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 in ncml_module::DimensionElement, ncml_module::ExplicitElement, ncml_module::NetcdfElement, ncml_module::ReadMetadataElement, ncml_module::RemoveElement, ncml_module::ScanElement, and ncml_module::ValuesElement.

Definition at line 165 of file NCMLElement.cc.

◆ handleContent() [2/2]

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

Definition at line 192 of file AggregationElement.cc.

◆ handleEnd()

void ncml_module::AggregationElement::handleEnd ( )
virtual

Handle the closing of this element.

Implements ncml_module::NCMLElement.

Definition at line 202 of file AggregationElement.cc.

◆ isAggregationVariable()

bool ncml_module::AggregationElement::isAggregationVariable ( const string &  name) const
Returns
whether the variable with name has been added as an aggregation variable

Definition at line 279 of file AggregationElement.cc.

◆ isJoinExistingAggregation()

bool ncml_module::AggregationElement::isJoinExistingAggregation ( ) const

Definition at line 249 of file AggregationElement.cc.

◆ isJoinNewAggregation()

bool ncml_module::AggregationElement::isJoinNewAggregation ( ) const

Definition at line 239 of file AggregationElement.cc.

◆ isUnionAggregation()

bool ncml_module::AggregationElement::isUnionAggregation ( ) const

Definition at line 244 of file AggregationElement.cc.

◆ isValidAttribute()

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

Definition at line 217 of file NCMLElement.cc.

◆ line()

int ncml_module::NCMLElement::line ( ) const
inherited

Return the current parse line number. Shorthand

Definition at line 160 of file NCMLElement.cc.

◆ printAggregationVariables()

string ncml_module::AggregationElement::printAggregationVariables ( ) const

Definition at line 293 of file AggregationElement.cc.

◆ printAttributeIfNotEmpty()

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 212 of file NCMLElement.cc.

◆ processParentDatasetComplete()

void ncml_module::AggregationElement::processParentDatasetComplete ( )

Called when the enclosing dataset is closing for the aggregation to handle any post processing that it needs to, in particular adding any map vectors to Grid's.

Definition at line 334 of file AggregationElement.cc.

◆ recheckEvery()

const string & ncml_module::AggregationElement::recheckEvery ( ) const
inline

Definition at line 93 of file AggregationElement.h.

◆ ref()

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 71 of file RCObject.cc.

◆ removeFromPool()

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 106 of file RCObject.cc.

◆ removePreDeleteCB()

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

Remove it exists. If not, this unchanged.

Definition at line 142 of file RCObject.cc.

◆ setAggregationVariableCoordinateAxisType()

void ncml_module::AggregationElement::setAggregationVariableCoordinateAxisType ( const std::string &  cat)

If a child scan contains a dateFormatMark, then we want to add a "_CoordinateAxisType" of "Time" By setting this to a non empty() string, a new attribute _CoordinateAxisType will be added to aggregation variable in a joinNew or joinExisting aggregation.

Parameters
catthe desired value for _CoordinateAxisType, or "" if no attribute addition is desired.

Definition at line 1113 of file AggregationElement.cc.

◆ setAttributes()

void ncml_module::AggregationElement::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 150 of file AggregationElement.cc.

◆ setParentDataset()

NetcdfElement * ncml_module::AggregationElement::setParentDataset ( NetcdfElement parent)

Private Impl.

Set the parent and return the old one, which could be null. Should only be called on a handleBegin() call here when we know we can find it in the NCMLParser at the current scope. We only retain a weak reference to parent.

Definition at line 350 of file AggregationElement.cc.

◆ setParser()

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

Definition at line 153 of file NCMLElement.cc.

◆ setVariableAggElement()

void ncml_module::AggregationElement::setVariableAggElement ( )

Should only be used by the VariableAggElement class to let us know it added the vars.

Definition at line 321 of file AggregationElement.cc.

◆ toString()

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

Return a string describing the element

Implements ncml_module::NCMLElement.

Definition at line 233 of file AggregationElement.cc.

◆ type()

const string & ncml_module::AggregationElement::type ( ) const
inline

Definition at line 85 of file AggregationElement.h.

◆ unref()

int agg_util::RCObject::unref ( ) const
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 78 of file RCObject.cc.

◆ validateAttributes()

bool ncml_module::NCMLElement::validateAttributes ( const XMLAttributeMap attrs,
const std::vector< std::string > &  validAttrs,
std::vector< std::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 174 of file NCMLElement.cc.

Member Data Documentation

◆ _parser

NCMLParser* ncml_module::NCMLElement::_parser
protectedinherited

Definition at line 187 of file NCMLElement.h.

◆ _sTypeName

const string ncml_module::AggregationElement::_sTypeName = "aggregation"
static

Definition at line 69 of file AggregationElement.h.

◆ _sValidAttrs

const vector< string > ncml_module::AggregationElement::_sValidAttrs = getValidAttributes()
static

Definition at line 72 of file AggregationElement.h.


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