bes Updated for version 3.20.13
NgapContainer.h
1// -*- mode: c++; c-basic-offset:4 -*-
2
3// This file is part of ngap_module, A C++ module that can be loaded in to
4// the OPeNDAP Back-End Server (BES) and is able to handle remote requests.
5
6// Copyright (c) 2020 OPeNDAP, Inc.
7// Author: Nathan Potter <ndp@opendap.org>
8//
9// This library is free software; you can redistribute it and/or
10// modify it under the terms of the GNU Lesser General Public
11// License as published by the Free Software Foundation; either
12// version 2.1 of the License, or (at your option) any later version.
13//
14// This library is distributed in the hope that it will be useful,
15// but WITHOUT ANY WARRANTY; without even the implied warranty of
16// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17// Lesser General Public License for more details.
18//
19// You should have received a copy of the GNU Lesser General Public
20// License along with this library; if not, write to the Free Software
21// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22//
23// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
24
25
26#ifndef NgapContainer_h_
27#define NgapContainer_h_ 1
28
29#include <string>
30#include <ostream>
31
32#include "BESContainer.h"
33#include "RemoteResource.h"
34
35
36namespace ngap {
37
38
39
49enum RestifiedPathValues { cmrProvider, cmrDatasets, cmrGranuleUR };
50
52
53private:
54 http::RemoteResource *d_dmrpp_rresource;
55
56 // std::vector<std::string> d_collections;
57 // std::vector<std::string> d_facets;
58
59 virtual void initialize();
60
61 bool inject_data_url();
62
63
64protected:
65 void _duplicate(NgapContainer &copy_to);
66
68 BESContainer(), d_dmrpp_rresource(nullptr)
69 {
70 }
71
72public:
73 NgapContainer(const std::string &sym_name, const std::string &real_name, const std::string &type);
74
75 NgapContainer(const NgapContainer &copy_from);
76
77 // void get_granule_path(const std::string &path) const ;
78
79 static bool signed_url_is_expired(std::map<std::string,std::string> url_info);
80
81 virtual ~NgapContainer();
82
83 virtual BESContainer * ptr_duplicate();
84
85 virtual std::string access();
86
87 virtual bool release();
88
89 virtual void dump(std::ostream &strm) const;
90};
91
92} // namespace ngap
93
94#endif // NgapContainer_h_
A container is something that holds data. E.G., a netcdf file or a database entry.
Definition: BESContainer.h:65
virtual void dump(std::ostream &strm) const
dumps information about this object
virtual std::string access()
access the remote target response by making the remote request
virtual BESContainer * ptr_duplicate()
pure abstract method to duplicate this instances of BESContainer
virtual bool release()
release the resources