openModeller
Version 1.5.0
|
Read occurrences data of one or more group from a TeTable in a TeDataBase. More...
#include <TeOccurrences.hh>
Public Member Functions | |
TeOccurrences (const char *source, const char *coordSystem) | |
~TeOccurrences () | |
bool | load () |
Public Member Functions inherited from OccurrencesReader | |
virtual | ~OccurrencesReader () |
virtual OccurrencesPtr | getPresences (const char *groupId) |
virtual OccurrencesPtr | getAbsences (const char *groupId) |
void | printOccurrences (const std::string &msg="") |
Static Public Member Functions | |
static OccurrencesReader * | CreateOccurrencesReaderCallback (const char *source, const char *coordSystem) |
Private Attributes | |
bool | _loaded |
TeDatabase * | _db |
TeStringParser * | _te_str_parser |
Additional Inherited Members | |
Protected Types inherited from OccurrencesReader | |
typedef std::vector < OccurrencesPtr > | LstOccurrences |
Protected Member Functions inherited from OccurrencesReader | |
int | _addOccurrence (const char *id, const char *groupId, Coord lg, Coord lt, Scalar error, Scalar abundance, int num_attributes, Scalar *attributes) |
OccurrencesReader () | |
Protected Attributes inherited from OccurrencesReader | |
LstOccurrences | _presences |
LstOccurrences | _absences |
char * | _source |
char * | _coord_system |
Read occurrences data of one or more group from a TeTable in a TeDataBase.
Table is read and stored as a linked list of objects from the Occurrences class.
Allow navigation through the object list.
Format:
The table must have 4 columns.
Definition at line 61 of file TeOccurrences.hh.
TeOccurrences::TeOccurrences | ( | const char * | source, |
const char * | coordSystem | ||
) |
Constructor.
source | Source string from where to load occurrences. |
coordSystem | Default coordinate system in WKT. |
Definition at line 72 of file TeOccurrences.cpp.
References OccurrencesReader::_coord_system, _loaded, and OccurrencesReader::_source.
Referenced by CreateOccurrencesReaderCallback().
TeOccurrences::~TeOccurrences | ( | ) |
Destructor.
Definition at line 84 of file TeOccurrences.cpp.
|
static |
Return a new instance of TeOccurrences. OccurrencesFactory calls this function to build a new OccurrencesReader.
Definition at line 65 of file TeOccurrences.cpp.
References TeOccurrences().
Referenced by OccurrencesFactory::instance().
|
virtual |
Load occurrences from a TerraLib Database.
Implements OccurrencesReader.
Definition at line 96 of file TeOccurrences.cpp.
References OccurrencesReader::_addOccurrence(), _db, _loaded, OccurrencesReader::_source, _te_str_parser, TeStringParser::columnName_, TeDatabaseManager::create(), error, Log::error(), Log::instance(), TeDatabaseManager::instance(), TeStringParser::layerName_, TeStringParser::parse(), TeStringParser::str_, and TeStringParser::tableName_.
|
private |
Definition at line 91 of file TeOccurrences.hh.
Referenced by load().
|
private |
Definition at line 88 of file TeOccurrences.hh.
Referenced by load(), and TeOccurrences().
|
private |
Definition at line 94 of file TeOccurrences.hh.
Referenced by load().