1
/************************************************************************************
2
TerraLib - a library for developing GIS applications.
3
Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
5
This code is part of the TerraLib library.
6
This library is free software; you can redistribute it and/or
7
modify it under the terms of the GNU Lesser General Public
8
License as published by the Free Software Foundation; either
9
version 2.1 of the License, or (at your option) any later version.
11
You should have received a copy of the GNU Lesser General Public
12
License along with this library.
14
The authors reassure the license terms regarding the warranties.
15
They specifically disclaim any warranties, including, but not limited to,
16
the implied warranties of merchantability and fitness for a particular purpose.
17
The library provided hereunder is on an "as is" basis, and the authors have no
18
obligation to provide maintenance, support, updates, enhancements, or modifications.
19
In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
20
indirect, special, incidental, or consequential damages arising out of the use
21
of this library and its documentation.
22
*************************************************************************************/
24
#ifndef __TERRALIB_INTERNAL_QUERIER_DBSTR2_H
25
#define __TERRALIB_INTERNAL_QUERIER_DBSTR2_H
27
#include "TeQuerierDB.h"
28
#include "TeTemporalSeries.h"
30
//! A class that implement a strategy to build STOs (Spatial Temporal Objects) from a TerraLib database (Strategy 2)
31
//! Strategy 2: simple chronon, without geometry, theme with collection table, operator exist in the database
32
class TeQuerierDBStr2: public TeQuerierDB
36
int timeFramePortal_; // the time frame appointed by the portal
39
/* @name Internal functions to initialize portals */
41
bool initPortal(TeTSEntry* ent=0);
44
//! Internal function to fill STO
45
bool fillSTO(TeSTInstance& sto);
50
TeQuerierDBStr2(TeQuerierParams& params):
55
//! Loads the instances
56
bool loadInstances(TeTSEntry* ent=0);
58
//! Returns each loaded STO
59
bool fetchInstance(TeSTInstance& sto);
62
//! A class that define a factory to build a querier strategy from database(strategy 2)
63
class TeQuerierDBStr2Factory : public TeQuerierImplFactory
68
TeQuerierDBStr2Factory(const string& name) : TeQuerierImplFactory(name) {}
70
//! Builds a database querier
71
virtual TeQuerierImpl* build (const TeQuerierParams& arg)
73
TeQuerierParams tempArg = arg;
74
return new TeQuerierDBStr2(tempArg);