OPeNDAP Hyrax Back End Server (BES)  Updated for version 3.8.3
agg_util::ArrayAggregateOnOuterDimension Class Reference

class ArrayAggregateOnOuterDimension More...

#include <ArrayAggregateOnOuterDimension.h>

Inheritance diagram for agg_util::ArrayAggregateOnOuterDimension:
Inheritance graph
Collaboration diagram for agg_util::ArrayAggregateOnOuterDimension:
Collaboration graph

Public Member Functions

 ArrayAggregateOnOuterDimension (const libdap::Array &proto, const AMDList &memberDatasets, std::auto_ptr< ArrayGetterInterface > &arrayGetter, const Dimension &newDim)
 Construct a joinNew Array aggregation given the parameters. More...
 
 ArrayAggregateOnOuterDimension (const ArrayAggregateOnOuterDimension &proto)
 Construct from a copy. More...
 
const AMDListgetDatasetList () const
 Get the list of AggMemberDataset's that comprise this aggregation. More...
 
ArrayAggregateOnOuterDimensionoperator= (const ArrayAggregateOnOuterDimension &rhs)
 Assign this from rhs object. More...
 
virtual ArrayAggregateOnOuterDimensionptr_duplicate ()
 Virtual Constructor: Make a deep copy (clone) of the object and return it. More...
 
virtual bool read ()
 Base implementation that works for both joinNew and joinExisting. More...
 
virtual ~ArrayAggregateOnOuterDimension ()
 Destroy any local memory. More...
 

Protected Member Functions

const ArrayGetterInterfacegetArrayGetterInterface () const
 Accessor for subclasses Note this is protected, so not const! Subclasses may mutate the return hence this, but should not delete it, hence the reference. More...
 
libdap::Array & getGranuleTemplateArray ()
 Accessor for subclasses Note this is protected, so not const! Subclasses may mutate the return hence this, but should not delete it, hence the reference. More...
 
void printConstraints (const Array &fromArray)
 Print out the constraints on fromArray to the debug channel. More...
 
virtual void readConstrainedGranuleArraysAndAggregateDataHook ()
 Actually go through the constraints and stream the correctly constrained data into the superclass's output buffer for serializing out. More...
 
virtual void transferOutputConstraintsIntoGranuleTemplateHook ()
 Subclass hook for read() to copy granule constraints properly (inner dim ones). More...
 

Detailed Description

class ArrayAggregateOnOuterDimension

Array variable which contains information for performing a joinNew (new outer dimension) aggregation of an Array variable using samples of this variable in a specified list of member datasets.

The list is specified as a list of RCPtr<AggMemberDataset>, i.e. reference-counted AggMemberDataset's (AMD). The AMD is in charge of lazy-loading it's contained DataDDS as needed as well as for only loading the required data for a read() call. In other words, read() on this subclass will respect the constraints given to the superclass Array.

Note: this class is designed to lazy-load the member datasets only if there are needed for the actual serialization at read() call time.

Note: the member datasets might be external files or might be wrapped virtual datasets (specified in NcML) or nested aggregation's.

Definition at line 64 of file ArrayAggregateOnOuterDimension.h.

Constructor & Destructor Documentation

agg_util::ArrayAggregateOnOuterDimension::ArrayAggregateOnOuterDimension ( const libdap::Array &  proto,
const AMDList memberDatasets,
std::auto_ptr< ArrayGetterInterface > &  arrayGetter,
const Dimension newDim 
)

Construct a joinNew Array aggregation given the parameters.

Parameters
protothe Array to use as a prototype for the UNaggregated Array (ie module the new dimension). It is the object for the aggVar as loaded from memberDatasets[0].
memberDatasetslist of the member datasets forming the aggregation. this list will be copied internally so memberDatasets may be destroyed after this call (though the element AggMemberDataset objects will be ref()'d in our copy).
arrayGettersmart ptr to the algorithm for getting out the constrained array from each individual AMDList DataDDS. Ownership transferred to this (clearly).
newDimthe new outer dimension this instance will add to the proto Array template

Definition at line 48 of file ArrayAggregateOnOuterDimension.cc.

References BESDEBUG, agg_util::Dimension::name, and agg_util::Dimension::size.

Referenced by ptr_duplicate().

agg_util::ArrayAggregateOnOuterDimension::ArrayAggregateOnOuterDimension ( const ArrayAggregateOnOuterDimension proto)

Construct from a copy.

Definition at line 67 of file ArrayAggregateOnOuterDimension.cc.

References BESDEBUG.

agg_util::ArrayAggregateOnOuterDimension::~ArrayAggregateOnOuterDimension ( )
virtual

Destroy any local memory.

Definition at line 79 of file ArrayAggregateOnOuterDimension.cc.

References BESDEBUG.

Member Function Documentation

const ArrayGetterInterface & agg_util::ArrayAggregationBase::getArrayGetterInterface ( ) const
protectedinherited

Accessor for subclasses Note this is protected, so not const! Subclasses may mutate the return hence this, but should not delete it, hence the reference.

Definition at line 168 of file ArrayAggregationBase.cc.

References VALID_PTR.

Referenced by agg_util::ArrayJoinExistingAggregation::readConstrainedGranuleArraysAndAggregateDataHook(), and readConstrainedGranuleArraysAndAggregateDataHook().

const AMDList & agg_util::ArrayAggregationBase::getDatasetList ( ) const
inherited
libdap::Array & agg_util::ArrayAggregationBase::getGranuleTemplateArray ( )
protectedinherited
ArrayAggregateOnOuterDimension & agg_util::ArrayAggregateOnOuterDimension::operator= ( const ArrayAggregateOnOuterDimension rhs)

Assign this from rhs object.

Parameters
rhsthe object to copy from
Returns
*this

Definition at line 92 of file ArrayAggregateOnOuterDimension.cc.

References agg_util::ArrayAggregationBase::operator=().

Here is the call graph for this function:

void agg_util::ArrayAggregationBase::printConstraints ( const Array &  fromArray)
protectedinherited

Print out the constraints on fromArray to the debug channel.

Definition at line 152 of file ArrayAggregationBase.cc.

References BESDEBUG, and agg_util::AggregationUtil::printConstraints().

Referenced by agg_util::ArrayAggregationBase::read().

Here is the call graph for this function:

ArrayAggregateOnOuterDimension * agg_util::ArrayAggregateOnOuterDimension::ptr_duplicate ( )
virtual

Virtual Constructor: Make a deep copy (clone) of the object and return it.

Returns
ptr to the cloned object.

Reimplemented from agg_util::ArrayAggregationBase.

Definition at line 86 of file ArrayAggregateOnOuterDimension.cc.

References ArrayAggregateOnOuterDimension().

Here is the call graph for this function:

bool agg_util::ArrayAggregationBase::read ( )
virtualinherited

Base implementation that works for both joinNew and joinExisting.

Sets ups constraints and things and then calls the subclass helper readAndAggregateGranules() for the specialized subclass behaviors.

Exceptions
Canthrow BESError, minimally
Returns
whether it works

Definition at line 93 of file ArrayAggregationBase.cc.

References BESDEBUG_FUNC, agg_util::ArrayAggregationBase::getGranuleTemplateArray(), agg_util::ArrayAggregationBase::printConstraints(), agg_util::ArrayAggregationBase::readConstrainedGranuleArraysAndAggregateDataHook(), and agg_util::ArrayAggregationBase::transferOutputConstraintsIntoGranuleTemplateHook().

Here is the call graph for this function:

void agg_util::ArrayAggregateOnOuterDimension::readConstrainedGranuleArraysAndAggregateDataHook ( )
protectedvirtual

Actually go through the constraints and stream the correctly constrained data into the superclass's output buffer for serializing out.

Reimplemented from agg_util::ArrayAggregationBase.

Definition at line 134 of file ArrayAggregateOnOuterDimension.cc.

References agg_util::AggregationUtil::addDatasetArrayDataToAggregationOutputArray(), BESDEBUG, agg_util::ArrayAggregationBase::getArrayGetterInterface(), agg_util::ArrayAggregationBase::getDatasetList(), agg_util::ArrayAggregationBase::getGranuleTemplateArray(), agg_util::AggMemberDataset::getLocation(), NCML_ASSERT_MSG, and THROW_NCML_PARSE_ERROR.

Here is the call graph for this function:

void agg_util::ArrayAggregateOnOuterDimension::transferOutputConstraintsIntoGranuleTemplateHook ( )
protectedvirtual

Subclass hook for read() to copy granule constraints properly (inner dim ones).

Reimplemented from agg_util::ArrayAggregationBase.

Definition at line 119 of file ArrayAggregateOnOuterDimension.cc.

References agg_util::ArrayAggregationBase::getGranuleTemplateArray(), and agg_util::AggregationUtil::transferArrayConstraints().

Here is the call graph for this function:


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