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

Container representing a data resource that is 'owned' by NGAP/EDC/NASA but that is described by a DMR++ that OPeNDAP 'owns.'. More...

#include <NgapOwnedContainer.h>

Inheritance diagram for ngap::NgapOwnedContainer:
Inheritance graph
Collaboration diagram for ngap::NgapOwnedContainer:
Collaboration graph

Public Member Functions

std::string access () override
 Get the DMR++ from a remote source or a local cache.
 
void dump (std::ostream &strm) const override
 dumps information about this object
 
std::string get_attributes () const
 retrieve the attributes desired from this container
 
std::string get_constraint () const
 retrieve the constraint expression for this container
 
std::string get_container_type () const
 retrieve the type of data this container holds, such as cedar or netcdf.
 
std::string get_dap4_constraint () const
 retrieve the constraint expression for this container
 
std::string get_dap4_function () const
 retrieve the constraint expression for this container
 
std::string get_ngap_path () const
 
std::string get_real_name () const
 retrieve the real name for this container, such as a file name.
 
std::string get_relative_name () const
 Get the relative name of the object in this container.
 
std::string get_symbolic_name () const
 retrieve the symbolic name for this container
 
 NgapOwnedContainer (const NgapOwnedContainer &copy_from)=delete
 
 NgapOwnedContainer (const std::string &sym_name, const std::string &real_name, const std::string &)
 Creates an instances of NgapOwnedContainer with symbolic name and real name, which is the remote request.
 
 NgapOwnedContainer (NgapOwnedContainer &&move_from)=delete
 
NgapOwnedContaineroperator= (const NgapOwnedContainer &rhs)=delete
 
NgapOwnedContaineroperator= (NgapOwnedContainer &&rhs)=delete
 
BESContainerptr_duplicate () override
 pure abstract method to duplicate this instances of BESContainer
 
bool release () override
 
void set_attributes (const std::string &attrs)
 set desired attributes for this container
 
void set_constraint (const std::string &s)
 set the constraint for this container
 
void set_container_type (const std::string &type)
 set the type of data that this container represents, such as cedar or netcdf.
 
void set_dap4_constraint (const std::string &s)
 set the constraint for this container
 
void set_dap4_function (const std::string &s)
 set the constraint for this container
 
void set_ngap_path (const std::string &ngap_path)
 
void set_real_name (const std::string &real_name)
 set the real name for this container, such as a file name if reading a data file.
 
void set_relative_name (const std::string &relative)
 Set the relative name of the object in this container.
 

Static Public Member Functions

static std::string get_data_source_location ()
 
static void set_data_source_location (const std::string &data_source_location)
 Set the S3 bucket used for 'owned' DMR++ documents.
 

Protected Member Functions

void _duplicate (BESContainer &copy_to)
 duplicate this instance into the passed container
 
void _duplicate (NgapOwnedContainer &copy_to)
 

Friends

class NgapOwnedContainerTest
 

Detailed Description

Container representing a data resource that is 'owned' by NGAP/EDC/NASA but that is described by a DMR++ that OPeNDAP 'owns.'.

This container nominally stores the 'restified' URL to a NASA granule. The container handles the operation needed to access a DMR++ file that can then be used to read data from that granule.

This operation is to retrieve that DMR++ file and store it in a cache as text (DMR++ files are XML).

The NgapOwnedContainer::access() method performs this operation the first time it is called. Subsequent calls to NgapOwnedContainer::access() will return cached XML text. Like NgapContainer::access(), this object uses the container attributes to indicate that access() may return a string that holds the DMR++ XML text.

See also
NgapOwnedContainerStorage

Definition at line 61 of file NgapOwnedContainer.h.

Constructor & Destructor Documentation

◆ NgapOwnedContainer()

ngap::NgapOwnedContainer::NgapOwnedContainer ( const std::string & sym_name,
const std::string & real_name,
const std::string &  )

Creates an instances of NgapOwnedContainer with symbolic name and real name, which is the remote request.

The real_name is the remote request URL.

Parameters
sym_namesymbolic name representing this remote container
real_nameThe NGAP REST path.
Exceptions
BESSyntaxUserErrorif the url does not validate
See also
NgapUtils

Definition at line 80 of file NgapOwnedContainer.cc.

Member Function Documentation

◆ _duplicate() [1/2]

void BESContainer::_duplicate ( BESContainer & copy_to)
protectedinherited

duplicate this instance into the passed container

Parameters
copy_toThe container to copy this instance into

Definition at line 54 of file BESContainer.cc.

◆ _duplicate() [2/2]

void ngap::NgapOwnedContainer::_duplicate ( NgapOwnedContainer & copy_to)
inlineprotected

Definition at line 90 of file NgapOwnedContainer.h.

◆ access()

string ngap::NgapOwnedContainer::access ( )
overridevirtual

Get the DMR++ from a remote source or a local cache.

Note
The Container::access() methods are called by the framework when it runs execute_commands() and then, often, a second time in the RequestHandler code when it is looking for data.
Returns
The DMR++ as a string.
Exceptions
BESErrorif there is a problem making the remote request

Implements BESContainer.

Definition at line 460 of file NgapOwnedContainer.cc.

◆ dump()

void ngap::NgapOwnedContainer::dump ( std::ostream & strm) const
overridevirtual

dumps information about this object

Displays the pointer value of this instance along with information about this container.

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

Reimplemented from BESContainer.

Definition at line 484 of file NgapOwnedContainer.cc.

◆ get_attributes()

std::string BESContainer::get_attributes ( ) const
inlineinherited

retrieve the attributes desired from this container

Returns
attributes desired from this container

Definition at line 243 of file BESContainer.h.

◆ get_constraint()

std::string BESContainer::get_constraint ( ) const
inlineinherited

retrieve the constraint expression for this container

Returns
constraint expression for this execution for the symbolic name

Definition at line 195 of file BESContainer.h.

◆ get_container_type()

std::string BESContainer::get_container_type ( ) const
inlineinherited

retrieve the type of data this container holds, such as cedar or netcdf.

Returns
type of data this container represents, such as cedar or netcdf

Definition at line 233 of file BESContainer.h.

◆ get_dap4_constraint()

std::string BESContainer::get_dap4_constraint ( ) const
inlineinherited

retrieve the constraint expression for this container

Returns
constraint expression for this execution for the symbolic name

Definition at line 204 of file BESContainer.h.

◆ get_dap4_function()

std::string BESContainer::get_dap4_function ( ) const
inlineinherited

retrieve the constraint expression for this container

Returns
constraint expression for this execution for the symbolic name

Definition at line 213 of file BESContainer.h.

◆ get_data_source_location()

static std::string ngap::NgapOwnedContainer::get_data_source_location ( )
inlinestatic

Definition at line 118 of file NgapOwnedContainer.h.

◆ get_ngap_path()

std::string ngap::NgapOwnedContainer::get_ngap_path ( ) const
inline

Definition at line 112 of file NgapOwnedContainer.h.

◆ get_real_name()

std::string BESContainer::get_real_name ( ) const
inlineinherited

retrieve the real name for this container, such as a file name.

Returns
real name, such as file name

Definition at line 181 of file BESContainer.h.

◆ get_relative_name()

std::string BESContainer::get_relative_name ( ) const
inlineinherited

Get the relative name of the object in this container.

Definition at line 187 of file BESContainer.h.

◆ get_symbolic_name()

std::string BESContainer::get_symbolic_name ( ) const
inlineinherited

retrieve the symbolic name for this container

Returns
symbolic name for this container

Definition at line 222 of file BESContainer.h.

◆ ptr_duplicate()

BESContainer * ngap::NgapOwnedContainer::ptr_duplicate ( )
inlineoverridevirtual

pure abstract method to duplicate this instances of BESContainer

Implements BESContainer.

Definition at line 105 of file NgapOwnedContainer.h.

◆ release()

bool ngap::NgapOwnedContainer::release ( )
inlineoverridevirtual

Implements BESContainer.

Definition at line 122 of file NgapOwnedContainer.h.

◆ set_attributes()

void BESContainer::set_attributes ( const std::string & attrs)
inlineinherited

set desired attributes for this container

Parameters
attrsattributes desired to access for this container

Definition at line 171 of file BESContainer.h.

◆ set_constraint()

void BESContainer::set_constraint ( const std::string & s)
inlineinherited

set the constraint for this container

Parameters
sconstraint

Definition at line 119 of file BESContainer.h.

◆ set_container_type()

void BESContainer::set_container_type ( const std::string & type)
inlineinherited

set the type of data that this container represents, such as cedar or netcdf.

Parameters
typetype of data, such as cedar or netcdf

Definition at line 162 of file BESContainer.h.

◆ set_dap4_constraint()

void BESContainer::set_dap4_constraint ( const std::string & s)
inlineinherited

set the constraint for this container

Parameters
sconstraint

Definition at line 128 of file BESContainer.h.

◆ set_dap4_function()

void BESContainer::set_dap4_function ( const std::string & s)
inlineinherited

set the constraint for this container

Parameters
sconstraint

Definition at line 137 of file BESContainer.h.

◆ set_data_source_location()

static void ngap::NgapOwnedContainer::set_data_source_location ( const std::string & data_source_location)
inlinestatic

Set the S3 bucket used for 'owned' DMR++ documents.

Definition at line 115 of file NgapOwnedContainer.h.

◆ set_ngap_path()

void ngap::NgapOwnedContainer::set_ngap_path ( const std::string & ngap_path)
inline

Definition at line 111 of file NgapOwnedContainer.h.

◆ set_real_name()

void BESContainer::set_real_name ( const std::string & real_name)
inlineinherited

set the real name for this container, such as a file name if reading a data file.

Parameters
real_namereal name, such as the file name

Definition at line 147 of file BESContainer.h.

◆ set_relative_name()

void BESContainer::set_relative_name ( const std::string & relative)
inlineinherited

Set the relative name of the object in this container.

Definition at line 153 of file BESContainer.h.

Friends And Related Symbol Documentation

◆ NgapOwnedContainerTest

friend class NgapOwnedContainerTest
friend

Definition at line 87 of file NgapOwnedContainer.h.


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