bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
W10nJsonTransform Class Reference

#include <W10nJsonTransform.h>

Inheritance diagram for W10nJsonTransform:
Inheritance graph
Collaboration diagram for W10nJsonTransform:
Collaboration graph

Public Member Functions

virtual void dump (std::ostream &strm) const
 dumps information about this transformation object for debugging purposes
 
template<typename T>
void json_simple_type_array (ostream *strm, libdap::Array *a, std::string indent)
 
template<typename T>
unsigned int json_simple_type_array_worker (ostream *strm, T *values, unsigned int indx, vector< unsigned int > *shape, unsigned int currentDim, bool flatten)
 
virtual void sendW10nDataForVariable (string &vName)
 
virtual void sendW10nMetaForDDS ()
 
virtual void sendW10nMetaForVariable (string &vName, bool isTop)
 
 W10nJsonTransform (libdap::DDS *dds, BESDataHandlerInterface &dhi, const std::string &localfile)
 Constructor that creates transformation object from the specified DataDDS object to the specified file.
 
 W10nJsonTransform (libdap::DDS *dds, BESDataHandlerInterface &dhi, std::ostream *ostrm)
 
virtual ~W10nJsonTransform ()
 Destructor.
 

Detailed Description

Used to transform a DDS into a w10n JSON metadata or w10n JSON data document. The output is written to a local file whose name is passed as a parameter to the constructor.

Definition at line 50 of file W10nJsonTransform.h.

Constructor & Destructor Documentation

◆ W10nJsonTransform() [1/2]

W10nJsonTransform::W10nJsonTransform ( libdap::DDS * dds,
BESDataHandlerInterface & dhi,
const std::string & localfile )

Constructor that creates transformation object from the specified DataDDS object to the specified file.

Parameters
ddsDataDDS object that contains the data structure, attributes and data
dhiThe data interface containing information about the current request
localfilenetcdf to create and write the information to
Exceptions
BESInternalErrorif dds provided is empty or not read, if the file is not specified or failed to create the netcdf file

Definition at line 278 of file W10nJsonTransform.cc.

◆ W10nJsonTransform() [2/2]

W10nJsonTransform::W10nJsonTransform ( libdap::DDS * dds,
BESDataHandlerInterface & dhi,
std::ostream * ostrm )

Definition at line 294 of file W10nJsonTransform.cc.

◆ ~W10nJsonTransform()

W10nJsonTransform::~W10nJsonTransform ( )
virtual

Destructor.

Cleans up any temporary data created during the transformation

Definition at line 314 of file W10nJsonTransform.cc.

Member Function Documentation

◆ dump()

void W10nJsonTransform::dump ( std::ostream & strm) const
virtual

dumps information about this transformation object for debugging purposes

Displays the pointer value of this instance plus instance data, including all of the FoJson objects converted from DAP objects that are to be sent to the netcdf file.

Parameters
strmC++ i/o stream to dump the information to

Implements BESObj.

Definition at line 327 of file W10nJsonTransform.cc.

◆ json_simple_type_array()

template<typename T>
void W10nJsonTransform::json_simple_type_array ( ostream * strm,
libdap::Array * a,
std::string indent )

Writes the w10n json representation of the passed DAP Array of simple types. If the parameter "sendData" evaluates to true then data will also be sent.

Definition at line 213 of file W10nJsonTransform.cc.

◆ json_simple_type_array_worker()

template<typename T>
unsigned int W10nJsonTransform::json_simple_type_array_worker ( ostream * strm,
T * values,
unsigned int indx,
vector< unsigned int > * shape,
unsigned int currentDim,
bool flatten )

@TODO Handle String and URL Arrays including backslash escaping double quotes in values.

Definition at line 66 of file W10nJsonTransform.cc.

◆ sendW10nMetaForDDS()

void W10nJsonTransform::sendW10nMetaForDDS ( )
virtual

Definition at line 457 of file W10nJsonTransform.cc.


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