openModeller
Version 1.5.0
|
#include <TapirOccurrences.hh>
Public Member Functions | |
TapirOccurrences (const char *url, const char *coordSystem) | |
~TapirOccurrences () | |
bool | load () |
OccurrencesPtr | getPresences (const char *groupId) |
OccurrencesPtr | getAbsences (const char *groupId) |
Public Member Functions inherited from OccurrencesReader | |
virtual | ~OccurrencesReader () |
void | printOccurrences (const std::string &msg="") |
Static Public Member Functions | |
static OccurrencesReader * | CreateOccurrencesReaderCallback (const char *source, const char *coordSystem) |
Private Member Functions | |
bool | _parseCapabilities (const std::string *xml, CapabilitiesInfo *info) |
bool | _retrieveRecords (TapirRecordData *data, int limit) |
Static Private Member Functions | |
static size_t | _curl_header_writer (void *ptr, size_t size, size_t nmemb, void *stream) |
static size_t | _curl_body_writer (void *ptr, size_t size, size_t nmemb, void *stream) |
static void | _startCapabilitiesElement (void *data, const char *el, const char **attr) |
static void | _maxRecordsDataHandler (void *data, const char *value, int len) |
static void | _endCapabilitiesElement (void *data, const char *el) |
static void | _startSearchElement (void *data, const char *el, const char **attr) |
Private Attributes | |
bool | _loaded |
int | _default_limit |
int | _provider_limit |
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 from a TAPIR service that uses DarwinCore 1.4 and the corresponding geospatial extension.
Definition at line 69 of file TapirOccurrences.hh.
TapirOccurrences::TapirOccurrences | ( | const char * | url, |
const char * | coordSystem | ||
) |
Constructor.
url | Service URL. |
coordSystem | Default coordinate system in WKT. |
Definition at line 96 of file TapirOccurrences.cpp.
References OccurrencesReader::_coord_system, _default_limit, _loaded, and OccurrencesReader::_source.
Referenced by CreateOccurrencesReaderCallback().
TapirOccurrences::~TapirOccurrences | ( | ) |
Destructor.
Definition at line 115 of file TapirOccurrences.cpp.
|
staticprivate |
Definition at line 79 of file TapirOccurrences.cpp.
Referenced by _retrieveRecords(), and load().
|
staticprivate |
Definition at line 61 of file TapirOccurrences.cpp.
Referenced by _retrieveRecords(), and load().
|
staticprivate |
Definition at line 405 of file TapirOccurrences.cpp.
References CapabilitiesInfo::_parser, and _startCapabilitiesElement().
Referenced by _startCapabilitiesElement().
|
staticprivate |
Definition at line 394 of file TapirOccurrences.cpp.
References CapabilitiesInfo::_max_records.
Referenced by _startCapabilitiesElement().
|
private |
Definition at line 272 of file TapirOccurrences.cpp.
References CapabilitiesInfo::_max_records, CapabilitiesInfo::_parser, _provider_limit, _startCapabilitiesElement(), Log::error(), and Log::instance().
Referenced by load().
|
private |
Definition at line 481 of file TapirOccurrences.cpp.
References _curl_body_writer(), _curl_header_writer(), TapirRecordData::_next, TapirRecordData::_occurrences, OccurrencesReader::_source, _startSearchElement(), Log::error(), Log::info(), Log::instance(), and TP_TEMPLATE_LOCATION.
Referenced by getPresences().
|
staticprivate |
Definition at line 315 of file TapirOccurrences.cpp.
References CapabilitiesInfo::_accepts_any_model, CapabilitiesInfo::_accepts_om_model, CapabilitiesInfo::_accepts_om_template, _endCapabilitiesElement(), CapabilitiesInfo::_has_guid, CapabilitiesInfo::_has_lat, CapabilitiesInfo::_has_long, CapabilitiesInfo::_has_name, CapabilitiesInfo::_is_tapir, _maxRecordsDataHandler(), CapabilitiesInfo::_parser, TP_OUTPUT_MODEL_LOCATION, TP_OUTPUT_MODEL_STRSIZE, TP_TEMPLATE_LOCATION, and TP_TEMPLATE_STRSIZE.
Referenced by _endCapabilitiesElement(), and _parseCapabilities().
|
staticprivate |
Definition at line 627 of file TapirOccurrences.cpp.
References TapirRecordData::_next, and TapirRecordData::_occurrences.
Referenced by _retrieveRecords().
|
static |
Return a new instance of TapirOccurrences.
Definition at line 53 of file TapirOccurrences.cpp.
References TapirOccurrences().
Referenced by OccurrencesFactory::instance().
|
inlinevirtual |
Return the absences (abundance == 0) from a specific group.
groupId | Identifier for a group of occurrences (usually a species name). |
Reimplemented from OccurrencesReader.
Definition at line 106 of file TapirOccurrences.hh.
|
virtual |
Return the presences (abundance > 0) from a specific group.
groupId | Identifier for a group of occurrences (usually a species name). |
Reimplemented from OccurrencesReader.
Definition at line 421 of file TapirOccurrences.cpp.
References OccurrencesReader::_coord_system, _default_limit, TapirRecordData::_next, TapirRecordData::_occurrences, OccurrencesReader::_presences, _provider_limit, _retrieveRecords(), Log::info(), and Log::instance().
|
virtual |
Read occurrences from a TAPIR service.
Implements OccurrencesReader.
Definition at line 124 of file TapirOccurrences.cpp.
References CapabilitiesInfo::_accepts_any_model, CapabilitiesInfo::_accepts_om_model, CapabilitiesInfo::_accepts_om_template, _curl_body_writer(), _curl_header_writer(), CapabilitiesInfo::_has_guid, CapabilitiesInfo::_has_lat, CapabilitiesInfo::_has_long, CapabilitiesInfo::_has_name, CapabilitiesInfo::_is_tapir, _loaded, _parseCapabilities(), OccurrencesReader::_source, Log::error(), Log::info(), Log::instance(), and Log::warn().
|
private |
Definition at line 114 of file TapirOccurrences.hh.
Referenced by getPresences(), and TapirOccurrences().
|
private |
Definition at line 111 of file TapirOccurrences.hh.
Referenced by load(), and TapirOccurrences().
|
private |
Definition at line 117 of file TapirOccurrences.hh.
Referenced by _parseCapabilities(), and getPresences().