OPeNDAP Hyrax Back End Server (BES)  Updated for version 3.8.3
FoDapJsonTransform Class Reference

Used to transform a DDS into a w10n JSON metadata or w10n JSON data document. More...

#include <FoDapJsonTransform.h>

Inheritance diagram for FoDapJsonTransform:
Inheritance graph
Collaboration diagram for FoDapJsonTransform:
Collaboration graph

Public Member Functions

virtual void dump (std::ostream &strm) const
 dumps information about this transformation object for debugging purposes More...
 
 FoDapJsonTransform (libdap::DDS *dds, BESDataHandlerInterface &dhi, const std::string &localfile)
 Constructor that creates transformation object from the specified DataDDS object to the specified file. More...
 
 FoDapJsonTransform (libdap::DDS *dds, BESDataHandlerInterface &dhi, std::ostream *ostrm)
 
virtual void transform (bool sendData)
 Transforms each of the marked variables of the DataDDS to the JSON file. More...
 
virtual ~FoDapJsonTransform ()
 Destructor. More...
 

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 FoDapJsonTransform.h.

Constructor & Destructor Documentation

FoDapJsonTransform::FoDapJsonTransform ( 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 275 of file FoDapJsonTransform.cc.

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

Definition at line 285 of file FoDapJsonTransform.cc.

FoDapJsonTransform::~FoDapJsonTransform ( )
virtual

Destructor.

Cleans up any temporary data created during the transformation

Definition at line 299 of file FoDapJsonTransform.cc.

Member Function Documentation

void FoDapJsonTransform::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 312 of file FoDapJsonTransform.cc.

References BESIndent::Indent(), BESIndent::LMarg(), and BESIndent::UnIndent().

Here is the call graph for this function:

void FoDapJsonTransform::transform ( bool  sendData)
virtual

Transforms each of the marked variables of the DataDDS to the JSON file.

For each variable in the DataDDS write out that variable and its attributes to the JSON file. Each OPeNDAP data type translates into a particular JSON type. Also write out any global attributes stored at the top level of the DataDDS.

Definition at line 334 of file FoDapJsonTransform.cc.


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