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

Transforms a DDS into JSON document on disk. More...

#include <FoInstanceJsonTransform.h>

Inheritance diagram for FoInstanceJsonTransform:
Inheritance graph
Collaboration diagram for FoInstanceJsonTransform:
Collaboration graph

Public Member Functions

virtual void dump (std::ostream &strm) const
 dumps information about this transformation object for debugging purposes
 
 FoInstanceJsonTransform (libdap::DDS *dds)
 Constructor that creates transformation object from the specified DataDDS object to the specified file.
 
virtual void transform (std::ostream &ostrm, bool sendData)
 Transforms the DDS object into a JSON instance object representation.
 

Detailed Description

Transforms a DDS into JSON document on disk.

Used to transform a DDS into an instance object representation (meta)data JSON document. The output is written to a local file whose name is passed as a parameter to the constructor.

Definition at line 54 of file FoInstanceJsonTransform.h.

Constructor & Destructor Documentation

◆ FoInstanceJsonTransform()

FoInstanceJsonTransform::FoInstanceJsonTransform ( libdap::DDS * dds)

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

Build a FoInstanceJsonTransform object.

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

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

Using this constructor configures the Transform object to write directly to the DataHandlerInterface's output stream without using an intermediate file.

Parameters
dds
dhi
ostrm

Definition at line 226 of file FoInstanceJsonTransform.cc.

◆ ~FoInstanceJsonTransform()

virtual FoInstanceJsonTransform::~FoInstanceJsonTransform ( )
inlinevirtual

Definition at line 84 of file FoInstanceJsonTransform.h.

Member Function Documentation

◆ dump()

void FoInstanceJsonTransform::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 JSON file.

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

Implements BESObj.

Definition at line 240 of file FoInstanceJsonTransform.cc.

◆ transform()

void FoInstanceJsonTransform::transform ( std::ostream & ostrm,
bool sendData )
virtual

Transforms the DDS object into a JSON instance object representation.

Transforms the DDS and all of it's "projected" variables into a JSON document using an instance object representation.

Modified from the original so that the object can be built using either an output stream or a local temporary file. In the latter case it will open the file and write to it. The object's client sorts it out from there...

Parameters
sendDataIf the sendData parameter is true data will be sent. If sendData is false then the metadata will be sent.

Definition at line 262 of file FoInstanceJsonTransform.cc.


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