TerraLib 4.1
E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeCoverageParams.h
Go to the documentation of this file.
00001 /************************************************************************************
00002 TerraLib - a library for developing GIS applications.
00003 Copyright © 2001-2007 INPE and Tecgraf/PUC-Rio.
00004 
00005 This code is part of the TerraLib library.
00006 This library is free software; you can redistribute it and/or
00007 modify it under the terms of the GNU Lesser General Public
00008 License as published by the Free Software Foundation; either
00009 version 2.1 of the License, or (at your option) any later version.
00010 
00011 You should have received a copy of the GNU Lesser General Public
00012 License along with this library.
00013 
00014 The authors reassure the license terms regarding the warranties.
00015 They specifically disclaim any warranties, including, but not limited to,
00016 the implied warranties of merchantability and fitness for a particular purpose.
00017 The library provided hereunder is on an "as is" basis, and the authors have no
00018 obligation to provide maintenance, support, updates, enhancements, or modifications.
00019 In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
00020 indirect, special, incidental, or consequential damages arising out of the use
00021 of this library and its documentation.
00022 *************************************************************************************/
00027 #ifndef  __TERRALIB_INTERNAL_COVERAGEPARAMS_H
00028 #define  __TERRALIB_INTERNAL_COVERAGEPARAMS_H
00029 
00030 #include "TeDataTypes.h"
00031 #include "TeDatabase.h"
00032 
00037 enum TeCoveragePersistenceType
00038 {          TePERSISTENCE_NONE, TePERSISTENCE_DATABASE, TePERSISTENCE_DATABASE_CACHELRU };
00039 
00044 struct TL_DLL TeCoverageDimension
00045 {
00046     int dimension_id;   
00047     std::string name;   
00048     TeDataType type;    
00049 
00051     TeCoverageDimension(){}
00052 
00054     TeCoverageDimension(const int& dimension_id, const std::string& name, const TeDataType& type):
00055             dimension_id(dimension_id),
00056             name(name),
00057             type(type){}
00058 };
00059 
00070 class TL_DLL TeCoverageParams
00071 {
00072 public:
00073 
00075     TeCoverageParams () :
00076       database_(NULL),
00077       layerId_(-1),
00078       coverageId_(""),
00079       coverageTable_(""),
00080       fileName_(""),
00081       dimensions_(NULL),
00082       projection_(NULL),
00083       boundingBox_(TeBox()),
00084       numElements_(-1),
00085       persistenceType_(TePERSISTENCE_DATABASE_CACHELRU)
00086     {
00087     }
00088 
00090     TeCoverageParams (TeDatabase* database, const int layerId, const std::string& coverageId = "0") :
00091       database_(database),
00092       layerId_(layerId),
00093       coverageId_(coverageId),
00094       coverageTable_(""),
00095       fileName_(""),
00096       dimensions_(NULL),
00097       projection_(NULL),
00098       boundingBox_(TeBox()),
00099       numElements_(-1),
00100       persistenceType_(TePERSISTENCE_DATABASE_CACHELRU)
00101     {
00102         
00103     }
00104 
00106     TeCoverageParams(const TeCoverageParams& other);
00107 
00109     TeCoverageParams& operator=(const TeCoverageParams& rhs);
00110 
00112     virtual ~TeCoverageParams()
00113     {
00114     }
00115 
00117     void setDatabase(TeDatabase* database)
00118     {
00119         database_ = database;
00120     }
00121 
00123     TeDatabase* getDatabase() const
00124     {
00125         return database_;
00126     }
00127 
00129     void setLayerId(const int layerId)
00130     {
00131         layerId_ = layerId;
00132     }
00133 
00135     int getLayerId() const
00136     {
00137         return layerId_;
00138     }
00139 
00141     void setCoverageId(std::string& coverageId)
00142     {
00143         coverageId_ = coverageId;
00144     }
00145 
00147     std::string getCoverageId() const
00148     {
00149         return coverageId_;
00150     }
00151 
00153     void setCoverageTable(std::string& coverageTable)
00154     {
00155         coverageTable_ = coverageTable;
00156     }
00157 
00159     std::string getCoverageTable() const
00160     {
00161         return coverageTable_;
00162     }
00163 
00165     void setFileName(std::string& fileName)
00166     {
00167         fileName_ = fileName;
00168     }
00169 
00171     std::string getFileName() const
00172     {
00173         return fileName_;
00174     }
00175 
00177     void setDimensions(std::vector<TeCoverageDimension>& dimensions)
00178     {
00179         dimensions_ = dimensions;
00180     }
00181 
00183     std::vector<TeCoverageDimension> getDimensions() const
00184     {
00185         return dimensions_;
00186     }
00187 
00189     void setProjection(TeProjection* projection)
00190     {
00191         projection_ = projection;
00192     }
00193 
00195     TeProjection* getProjection() const
00196     {
00197         return projection_;
00198     }
00199 
00201     void setBoundingBox(TeBox& boundingBox)
00202     {
00203         boundingBox_ = boundingBox;
00204     }
00205 
00207     TeBox getBoundingBox() const
00208     {
00209         return boundingBox_;
00210     }
00211 
00213     void setNumElements(const int numElements)
00214     {
00215         numElements_ = numElements;
00216     }
00217 
00219     int getNumElements() const
00220     {
00221         return numElements_;
00222     }
00223 
00225     void setPersistenceType(const TeCoveragePersistenceType persistenceType)
00226     {
00227         persistenceType_ = persistenceType;
00228     }
00229 
00231     TeCoveragePersistenceType getPersistenceType() const
00232     {
00233         return persistenceType_;
00234     }
00235 
00236 protected:
00237     TeDatabase* database_;          
00238     int layerId_;                   
00239     std::string coverageId_;        
00240     std::string coverageTable_;     
00241     std::string fileName_;          
00242     std::vector<TeCoverageDimension> dimensions_;   
00243     TeProjection* projection_;      
00244     TeBox boundingBox_;             
00245     int numElements_;               
00246     TeCoveragePersistenceType persistenceType_; 
00247 };
00248 
00249 #endif // __TERRALIB_INTERNAL_COVERAGEPARAMS_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines