Go to the documentation of this file.
26 #ifndef __TERRALIB_STMEMORY_INTERNAL_DATASOURCE_H
27 #define __TERRALIB_STMEMORY_INTERNAL_DATASOURCE_H
30 #include "../dataaccess/datasource/DataSource.h"
31 #include "../dataaccess/datasource/DataSourceCapabilities.h"
32 #include "../dataaccess/query/SQLDialect.h"
39 namespace te {
namespace da {
class DataSetType; } }
40 namespace te {
namespace dt {
class DateTimePeriod; } }
122 std::unique_ptr<te::da::DataSet>
getDataSet(
const std::string& name,
125 bool connected =
false,
151 std::unique_ptr<te::da::DataSet>
getDataSet(
const std::string& name,
155 bool connected =
false,
181 std::unique_ptr<te::da::DataSet>
getDataSet(
const std::string& name,
185 bool connected =
false,
202 void create(
const std::string& connInfo);
204 void drop(
const std::string& connInfo);
206 bool exists(
const std::string& connInfo);
226 #endif // __TERRALIB_STMEMORY_INTERNAL_DATASOURCE_H
An Envelope defines a 2D rectangular region.
Implements a DataSource that contains In-Memory DataSets indexed by space and time.
bool isOpened() const
It returns true if the data source is opened, otherwise it returns false.
It represents the SQL query dialect accepted by a given data source.
void close()
It closes the data source and clears all the resources used by its internal communication channel.
#define TESTMEMORYEXPORT
You can use this macro in order to export/import classes and functions from this module.
void create(const std::string &connInfo)
It creates a new data source.
std::unique_ptr< te::dt::DateTimePeriod > getTemporalExtent(const std::string &name)
It returns the temporal extent associated to a DataSet.
TraverseType
A dataset can be traversed in two ways:
std::unique_ptr< Transactor > m_transactor
A transactor.
bool m_deepCopy
If true each dataset is cloned in the getDataSet method.
void drop(const std::string &connInfo)
It removes the data source with the connection information from a driver.
DataSource(const std::string &connInfo)
Constructor.
std::unique_ptr< te::da::DataSet > getDataSet(const std::string &name, const te::gm::Geometry *geom, te::gm::SpatialRelation sr, const te::dt::DateTime *dt, te::dt::TemporalRelation tr=te::dt::DURING, te::common::TraverseType travType=te::common::FORWARDONLY, bool connected=false, const te::common::AccessPolicy accessPolicy=te::common::RAccess)
It returns a data set with observations whose observed geometries satisfy a given spatial relation an...
const te::da::SQLDialect * getDialect() const
It returns the data source SQL dialect, if there is one.
std::unique_ptr< te::da::DataSet > getDataSet(const std::string &name, const te::gm::Envelope *e, te::gm::SpatialRelation sr, const te::dt::DateTime *dt, te::dt::TemporalRelation tr=te::dt::DURING, te::common::TraverseType travType=te::common::FORWARDONLY, bool connected=false, const te::common::AccessPolicy accessPolicy=te::common::RAccess)
It returns a data set with observations whose observed geometries satisfy a given spatial relation an...
std::size_t m_maxdatasets
The maximum number of datasets to be handled by the data source.
const te::da::DataSourceCapabilities & getCapabilities() const
It returns the known capabilities of the data source.
bool isValid() const
It checks if the data source is valid (available for using).
DataSource(const te::core::URI &uri)
Constructor.
SpatialRelation
Spatial relations between geometric objects.
A class to store the proxy information that must be used to access data located in URIs.
std::unique_ptr< te::da::DataSourceTransactor > getTransactor()
It returns the set of parameters used to set up the access channel to the underlying repository.
std::map< std::string, te::da::DataSetType * > m_schemas
The set of dataset schemas.
std::map< std::string, DataSet * > m_datasets
The set of datasets stored in memory.
bool m_isOpened
A flag to control the state of the data source.
std::unique_ptr< te::da::DataSet > getDataSet(const std::string &name, const te::dt::DateTime *dt, te::dt::TemporalRelation r=te::dt::DURING, te::common::TraverseType travType=te::common::FORWARDONLY, bool connected=false, const te::common::AccessPolicy accessPolicy=te::common::RAccess)
It returns a data set with observations whose phenomenon times satisfy a given temporal relation.
static const te::da::SQLDialect sm_dialect
A dummy dialect.
bool exists(const std::string &connInfo)
Check the existence of a data source in a driver.
void add(const std::string &name, te::da::DataSetType *t, DataSet *d)
It adds a new DataSet and DataSetType into the DataSource.
static te::da::DataSourceCapabilities sm_capabilities
The Memory data source capabilities.
A class that represents the known capabilities of a specific data source, i.e. this class informs all...
An abstract class for data providers like a DBMS, Web Services or a regular file.
An implementation of DataSourceTransactor class for the ST in-memory driver.
std::string getType() const
It returns the data source type name (in UPPER CASE). Ex: POSTGIS, SQLITE, WFS, WMS,...
Proxy configuration file for TerraView (see terraview_config.h).
void open()
It opens the data source and makes it ready for using.
A class that models the description of a dataset.
Implementation of a in-memory data set that contains spatiotemporal observations indexed by time and ...
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
TemporalRelation
Temporal relations between date and time (Source: Allen, 1991).
AccessPolicy
Supported data access policies (can be used as bitfield).
std::vector< std::string > getDataSourceNames(const std::string &connInfo)
It gets the data source names available in a driver.