bes  Updated for version 3.20.5
FoDapCovJsonTransform Class Reference

#include <FoDapCovJsonTransform.h>

Collaboration diagram for FoDapCovJsonTransform:
Collaboration graph

Public Member Functions

virtual void addTestAxis (std::string name, std::string values)
 
virtual void addTestParameter (std::string id, std::string name, std::string type, std::string dataType, std::string unit, std::string longName, std::string standardName, std::string shape, std::string values)
 
virtual void dump (std::ostream &strm) const
 Dumps information about this transformation object for debugging purposes. More...
 
 FoDapCovJsonTransform (libdap::DDS *dds)
 Get the CovJSON encoding for a DDS. More...
 
virtual void printAxesWorker (std::ostream &ostrm, std::string indent)
 
virtual void printCoverageFooterWorker (std::ostream &ostrm, std::string indent)
 
virtual void printCoverageHeaderWorker (std::ostream &ostrm, std::string indent, bool isCoverageCollection)
 
virtual void printParametersWorker (std::ostream &ostrm, std::string indent)
 
virtual void printRangesWorker (std::ostream &ostrm, std::string indent)
 
virtual void printReferenceWorker (std::ostream &ostrm, std::string indent)
 
virtual void setTestAxesExistence (bool x, bool y, bool z, bool t)
 
virtual void setTestDomainType (int domainType)
 
virtual void transform (std::ostream &ostrm, bool sendData, bool testOverride)
 Transforms each of the marked variables of the DDS to CovJSON. More...
 

Detailed Description

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

Definition at line 51 of file FoDapCovJsonTransform.h.

Constructor & Destructor Documentation

◆ FoDapCovJsonTransform()

FoDapCovJsonTransform::FoDapCovJsonTransform ( libdap::DDS *  dds)

Get the CovJSON encoding for a DDS.

Set up the CovJSON output transform object. This constructor builds an object that will build a CovJSON encoding for a DDS. This class can return both the entire DDS, including data, and a metadata-only response.

Note
The 'transform' method is used to build the response and a bool flag is passed to it to select data or metadata. However, if that flag is true and the DDS does not already contain data, the result is undefined.
Parameters
ddsDDS object
Exceptions
BESInternalErrorif the DDS* is null or if localfile is empty.

Definition at line 766 of file FoDapCovJsonTransform.cc.

Member Function Documentation

◆ dump()

void FoDapCovJsonTransform::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 785 of file FoDapCovJsonTransform.cc.

◆ transform()

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

Transforms each of the marked variables of the DDS to CovJSON.

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

Parameters
ostrmWrite the CovJSON to this stream
sendDataTrue if data should be sent, False to send only metadata.
testOverridetrue: print to stream regardless of whether the file can be converted to CoverageJSON (for testing purposes) false: run normally

Definition at line 809 of file FoDapCovJsonTransform.cc.


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