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);
A class to store the proxy information that must be used to access data located in URIs.
A class that models the description of a dataset.
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.
It represents the SQL query dialect accepted by a given data source.
An Envelope defines a 2D rectangular region.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Implementation of a in-memory data set that contains spatiotemporal observations indexed by time and ...
Implements a DataSource that contains In-Memory DataSets indexed by space and time.
void close()
It closes the data source and clears all the resources used by its internal communication channel.
bool m_deepCopy
If true each dataset is cloned in the getDataSet method.
bool isValid() const
It checks if the data source is valid (available for using).
std::unique_ptr< te::dt::DateTimePeriod > getTemporalExtent(const std::string &name)
It returns the temporal extent associated to a DataSet.
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...
static te::da::DataSourceCapabilities sm_capabilities
The Memory data source capabilities.
DataSource(const te::core::URI &uri)
Constructor.
std::map< std::string, DataSet * > m_datasets
The set of datasets stored in memory.
std::size_t m_maxdatasets
The maximum number of datasets to be handled by the data source.
DataSource(const std::string &connInfo)
Constructor.
bool exists(const std::string &connInfo)
Check the existence of a data source in a driver.
static const te::da::SQLDialect sm_dialect
A dummy dialect.
std::string getType() const
It returns the data source type name (in UPPER CASE). Ex: POSTGIS, SQLITE, WFS, WMS,...
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::map< std::string, te::da::DataSetType * > m_schemas
The set of dataset schemas.
void open()
It opens the data source and makes it ready for using.
std::unique_ptr< Transactor > m_transactor
A transactor.
void create(const std::string &connInfo)
It creates a new data source.
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::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.
void drop(const std::string &connInfo)
It removes the data source with the connection information from a driver.
bool m_isOpened
A flag to control the state of the data source.
bool isOpened() const
It returns true if the data source is opened, otherwise it returns false.
std::vector< std::string > getDataSourceNames(const std::string &connInfo)
It gets the data source names available 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.
std::unique_ptr< te::da::DataSourceTransactor > getTransactor()
It returns the set of parameters used to set up the access channel to the underlying repository.
const te::da::DataSourceCapabilities & getCapabilities() const
It returns the known capabilities of the data source.
An implementation of DataSourceTransactor class for the ST in-memory driver.
TraverseType
A dataset can be traversed in two ways:
AccessPolicy
Supported data access policies (can be used as bitfield).
TemporalRelation
Temporal relations between date and time (Source: Allen, 1991).
SpatialRelation
Spatial relations between geometric objects.
#define TESTMEMORYEXPORT
You can use this macro in order to export/import classes and functions from this module.
Proxy configuration file for TerraView (see terraview_config.h).