rasdaman complete source
createinitmdd.hh
Go to the documentation of this file.
1 #ifndef CREATE_INIT_MDD_HH
2 #define CREATE_INIT_MDD_HH
3 /*
4 * This file is part of rasdaman community.
5 *
6 * Rasdaman community is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Rasdaman community is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with rasdaman community. If not, see <http://www.gnu.org/licenses/>.
18 *
19 * Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann /
20 rasdaman GmbH.
21 *
22 * For more information please see <http://www.rasdaman.org>
23 * or contact Peter Baumann via <baumann@rasdaman.com>.
24 */
25 /*************************************************************
26  *
27  *
28  * COMMENTS:
29  *
30  * These are tools for fast, low level acces to MDD and Colelctions
31  * The main purpose is speeding up initialization and import operations
32  *
33  ************************************************************/
34 
35 
36 #include "mddmgr/mddcoll.hh"
37 #include "mddmgr/mddobj.hh"
38 #include "mddmgr/mddcolliter.hh"
39 #include "tilemgr/tile.hh"
41 #include "relcatalogif/mddtype.hh"
43 #include "relcatalogif/settype.hh"
44 #include "reladminif/eoid.hh"
45 #include "raslib/basetype.hh"
46 #include "raslib/oid.hh"
47 #include "servercomm/servercomm.hh"
48 
57 {
58 public:
59  FastCollectionCreator(const char *collName, const char* collTypeName);
60 
62 
63 private:
64  // allow only [A-Z,a-z,_]
65  void verifyName( const char* name ) throw(r_Error);
66 
67  const char *collectionName;
68  const char *collectionTypeName;
69 
70 };
71 
72 
77 {
78 public:
81 
82  void setCollectionName(const char *collName);
83  void setMDDTypeName(const char* mddTypeName);
84 
85  r_OId createMDD(const char *domain);
86  r_OId createRCxMDD(const char *domain, const char *tileDomain);
87 
88  void addStripe(r_OId mddOId, const char *stripeDomain, const char *tileDomain);
89 
90  vector<r_Minterval> getTileDomains(r_OId mddOId, const char *stripeDomain);
91 private:
92  void verifyCompatibility(MDDColl *collection) throw(r_Error);
93 
94  void createCompressedTileData(r_Minterval&, const BaseType* baseType);
95 
96  std::string collectionName;
97  std::string mddTypeName;
98 
99  r_Minterval definitionInterval;
100 
101  r_Data_Format storageFormat;
102  const char *formatParams;
103 
104  r_OId mddOId;
105  int cellSize;
106 
107  char *comprData;
108  int comprDataSize;
109 
110  MDDObj *mymdd;
111 };
112 
113 #endif
r_OId createMDD(const char *domain)
FastCollectionCreator(const char *collName, const char *collTypeName)
void setCollectionName(const char *collName)
Definition: error.hh:88
Definition: createinitmdd.hh:56
r_OId createRCxMDD(const char *domain, const char *tileDomain)
r_Data_Format
Definition: mddtypes.hh:133
void addStripe(r_OId mddOId, const char *stripeDomain, const char *tileDomain)
Definition: mddcoll.hh:98
vector< r_Minterval > getTileDomains(r_OId mddOId, const char *stripeDomain)
Definition: relcatalogif/basetype.hh:66
Definition: createinitmdd.hh:76
Definition: mddobj.hh:66
void setMDDTypeName(const char *mddTypeName)
Definition: oid.hh:47
Definition: minterval.hh:249