bes  Updated for version 3.20.8
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 
36 namespace ngap {
37 
38 
39 
49  enum RestifiedPathValues { cmrProvider, cmrDatasets, cmrGranuleUR };
50 
51  class NgapContainer: public BESContainer {
52 
53  private:
54  http::RemoteResource *d_dmrpp_rresource;
55 
56  // std::vector<std::string> d_collections;
57  // std::vector<std::string> d_facets;
58 
59  NgapContainer() :
60  BESContainer(), d_dmrpp_rresource(0)
61  {
62  }
63  bool inject_data_url();
64 
65 
66  protected:
67  void _duplicate(NgapContainer &copy_to);
68 
69  public:
70  NgapContainer(const std::string &sym_name, const std::string &real_name, const std::string &type);
71 
72  NgapContainer(const NgapContainer &copy_from);
73 
74  // void get_granule_path(const std::string &path) const ;
75 
76  static bool signed_url_is_expired(std::map<std::string,std::string> url_info);
77 
78  virtual ~NgapContainer();
79 
80  virtual BESContainer * ptr_duplicate();
81 
82  virtual std::string access();
83 
84  virtual bool release();
85 
86  virtual void dump(std::ostream &strm) const;
87  };
88 
89 } // namespace ngap
90 
91 #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