| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Protected Attributes
TeQuerierDB Class Reference

An abstract class to build STOs (Spatial Temporal Objects) from a TerraLib database. More...

`#include <TeQuerierDB.h>`

Inheritance diagram for TeQuerierDB:

List of all members.

## Public Member Functions

| TeQuerierDB (TeQuerierParams *params)
| Constructor.
virtual | ~TeQuerierDB ()
| Destructor.
TeTheme * | theme ()
| Returns the pointer to the theme.
TeLayer * | layer ()
| Returns the pointer to the layer.
TeGeomRep | geometryRep ()
| Returns the geometry representation of the theme.
virtual bool | loadInstances (TeTSEntry *ent=0)=0
| Loads the STOs from database.
virtual bool | fetchInstance (TeSTInstance &stoi)=0
| Returns each loaded STO.
virtual bool | loadGeometries (TeMultiGeometry &geometries, unsigned int &index)
| Loads all geometries of the index-th geometry representation.
virtual bool | loadGeometries (TeMultiGeometry &geometries)
| Loads all geometries.
void | clear ()
| Empties querier instances.

## Protected Member Functions

void | clearVectors ()
| clear internal vectors
virtual string | sqlWhereRestrictions (TeRepresentation *rep=0)
| Return a where clause in SQL that represent the querier restrictions.
string | sqlFrom (string geomTable="")
| Build the sql from clause.

## Protected Attributes

vector< TeDatabasePortal * > | portals_
| a portal to each geometry representation
vector< TeRepresentation > | geomRepr_
| keep the geometry representation of each portal
TeTable | attrTable_
| internal information used to fill the stos
bool | flagPortal_
| flag to control the portal
map< int, vector< int > > | uniqueIndex_
| map FROM each portal in the vector "portals_" TO the indexes of the unique attributes
vector< int > | linkIndex_
| index of the link attributes in each portal in the vector "portals_"
int | attrIndex1_
| index in the first portal of the first attribute
int | attrIndex2_
| index in the first portal of the last attribute
int | groupIndex_
| index in the first portal of the group, if there is collection table
vector< int > | geomIndex1_
| index where the geometry information begin in each portal in the vector "portals_"
vector< int > | geomIndex2_
| index where the geometry information finish in each portal in the vector "portals_"
vector< int > | timeIndex1_
| index of the initial time in each portal in the vector "portals_"
vector< int > | timeIndex2_
| index of the final time in each portal in the vector "portals_"
map< int, int > | legendIdGroup_
| map from legend identifier to group number

## Detailed Description

An abstract class to build STOs (Spatial Temporal Objects) from a TerraLib database.

## Constructor & Destructor Documentation

TeQuerierDB::TeQuerierDB | ( | TeQuerierParams * | params | ) | `[inline]`

Constructor.

TeQuerierDB::~TeQuerierDB | ( |  | ) | `[virtual]`

Destructor.

## Member Function Documentation

void TeQuerierDB::clear | ( | void |  | ) | `[virtual]`

Empties querier instances.

Reimplemented from TeQuerierImpl.

void TeQuerierDB::clearVectors | ( |  | ) | `[protected]`

clear internal vectors

virtual bool TeQuerierDB::fetchInstance | ( | TeSTInstance & | stoi | ) | `[pure virtual]`

Returns each loaded STO.

Implements TeQuerierImpl.

Implemented in TeQuerierDBStr1, TeQuerierDBStr2, and TeQuerierDBStr3.

TeGeomRep TeQuerierDB::geometryRep | ( |  | ) |

Returns the geometry representation of the theme.

TeLayer* TeQuerierDB::layer | ( |  | ) | `[inline]`

Returns the pointer to the layer.

bool TeQuerierDB::loadGeometries | ( | TeMultiGeometry & | geometries,
|  | unsigned int & | index
| ) |  | `[virtual]`

Loads all geometries of the index-th geometry representation.

Implements TeQuerierImpl.

bool TeQuerierDB::loadGeometries | ( | TeMultiGeometry & | geometries | ) | `[virtual]`

Loads all geometries.

Implements TeQuerierImpl.

virtual bool TeQuerierDB::loadInstances | ( | TeTSEntry * | ent = `0` | ) | `[pure virtual]`

Loads the STOs from database.

Implements TeQuerierImpl.

Implemented in TeQuerierDBStr1, TeQuerierDBStr2, and TeQuerierDBStr3.

string TeQuerierDB::sqlFrom | ( | string | geomTable = `""` | ) | `[protected]`

Build the sql from clause.

join with collection table

join with geometry table

join with collection table

join with geometry table

string TeQuerierDB::sqlWhereRestrictions | ( | TeRepresentation * | rep = `0` | ) | `[protected, virtual]`

Return a where clause in SQL that represent the querier restrictions.

TeTheme* TeQuerierDB::theme | ( |  | ) | `[inline]`

Returns the pointer to the theme.

Reimplemented from TeQuerierImpl.

## Member Data Documentation

int TeQuerierDB::attrIndex1_`[protected]`

index in the first portal of the first attribute

int TeQuerierDB::attrIndex2_`[protected]`

index in the first portal of the last attribute

TeTable TeQuerierDB::attrTable_`[protected]`

internal information used to fill the stos

bool TeQuerierDB::flagPortal_`[protected]`

flag to control the portal

vector<int> TeQuerierDB::geomIndex1_`[protected]`

index where the geometry information begin in each portal in the vector "portals_"

vector<int> TeQuerierDB::geomIndex2_`[protected]`

index where the geometry information finish in each portal in the vector "portals_"

vector<TeRepresentation> TeQuerierDB::geomRepr_`[protected]`

keep the geometry representation of each portal

int TeQuerierDB::groupIndex_`[protected]`

index in the first portal of the group, if there is collection table

map<int, int> TeQuerierDB::legendIdGroup_`[protected]`

map from legend identifier to group number

vector<int> TeQuerierDB::linkIndex_`[protected]`

index of the link attributes in each portal in the vector "portals_"

vector<TeDatabasePortal*> TeQuerierDB::portals_`[protected]`

a portal to each geometry representation

vector<int> TeQuerierDB::timeIndex1_`[protected]`

index of the initial time in each portal in the vector "portals_"

vector<int> TeQuerierDB::timeIndex2_`[protected]`

index of the final time in each portal in the vector "portals_"

map<int, vector<int> > TeQuerierDB::uniqueIndex_`[protected]`

map FROM each portal in the vector "portals_" TO the indexes of the unique attributes

The documentation for this class was generated from the following files:

- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeQuerierDB.h
- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeQuerierDB.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines