27 #include "../common/STLUtils.h" 28 #include "../common/StringUtils.h" 29 #include "../core/translator/Translator.h" 30 #include "../core/uri/URI.h" 31 #include "../core/uri/Utils.h" 32 #include "../dataaccess/dataset/DataSet.h" 33 #include "../dataaccess/dataset/DataSetType.h" 34 #include "../dataaccess/dataset/CheckConstraint.h" 35 #include "../dataaccess/dataset/ForeignKey.h" 36 #include "../dataaccess/dataset/Index.h" 37 #include "../dataaccess/dataset/PrimaryKey.h" 38 #include "../dataaccess/dataset/Sequence.h" 39 #include "../dataaccess/dataset/UniqueKey.h" 40 #include "../datatype/DateTimePeriod.h" 49 #include <boost/format.hpp> 50 #include <boost/lexical_cast.hpp> 79 std::map<std::string, DataSet* >::iterator it =
m_datasets.begin();
88 std::map<std::string, te::da::DataSetType* >::iterator it2 =
m_schemas.begin();
104 return std::unique_ptr<te::da::DataSourceTransactor>(
new Transactor(
this));
115 std::map<std::string, std::string>::const_iterator it = kvp.begin();
116 std::map<std::string, std::string>::const_iterator itend = kvp.end();
119 it = kvp.find(
"MAX_DATASETS");
120 if(it != itend && !it->second.empty())
121 m_maxdatasets = boost::lexical_cast<std::size_t>(it->second);
124 it = kvp.find(
"OPERATION_MODE");
137 std::map<std::string, DataSet* >::iterator it =
m_datasets.begin();
146 std::map<std::string, te::da::DataSetType* >::iterator it2 =
m_schemas.begin();
192 return m_transactor->getDataSet(name, dt, r, travType, connected, accessPolicy);
201 return m_transactor->getDataSet(name, geom, sr, dt, tr, travType, connected, accessPolicy);
210 return m_transactor->getDataSet(name, e, sr, dt, tr, travType, connected, accessPolicy);
213 std::unique_ptr<te::dt::DateTimePeriod>
238 return std::vector<std::string>();
void create(const std::string &connInfo)
protected Methods
#define TE_STMEMORY_DRIVER_MAX_DATASETS
The maximum number of datasets to be handled by a data source.
static const std::string sm_driverIdentifier
The STMEMORY driver identifier.
A static class with global definitions for the TerraLib ST In-memory driver.
bool m_deepCopy
If true each dataset is cloned in the getDataSet method.
A class that models the description of a dataset.
Implements a DataSource that contains In-Memory DataSets indexed by space and time.
TemporalRelation
Temporal relations between date and time (Source: Allen, 1991).
It represents the SQL query dialect accepted by a given data source.
void add(const std::string &name, te::da::DataSetType *t, DataSet *d)
It adds a new DataSet and DataSetType into the DataSource.
std::string Convert2UCase(const std::string &value)
It converts a string to upper case.
SpatialRelation
Spatial relations between geometric objects.
A class that represents the known capabilities of a specific data source, i.e. this class informs all...
bool isOpened() const
It returns true if the data source is opened, otherwise it returns false.
std::map< std::string, te::da::DataSetType * > m_schemas
The set of dataset schemas.
std::vector< std::string > getDataSourceNames(const std::string &connInfo)
It gets the data source names available in a driver.
bool isValid() const
It checks if the data source is valid (available for using).
std::string getType() const
It returns the data source type name (in UPPER CASE). Ex: POSTGIS, SQLITE, WFS, WMS, or MYSQL.
void open()
It opens the data source and makes it ready for using.
bool m_isOpened
A flag to control the state of the data source.
std::string query() const
Retrieving the query.
std::unique_ptr< Transactor > m_transactor
A transactor.
std::unique_ptr< te::dt::DateTimePeriod > getTemporalExtent(const std::string &name)
It returns the temporal extent associated to a DataSet.
AccessPolicy
Supported data access policies (can be used as bitfield).
TraverseType
A dataset can be traversed in two ways:
bool exists(const std::string &connInfo)
Check the existence of a data source in a driver.
static te::da::DataSourceCapabilities sm_capabilities
The Memory data source capabilities.
An Envelope defines a 2D rectangular region.
const te::da::SQLDialect * getDialect() const
It returns the data source SQL dialect, if there is one.
static te::dt::DateTime d(2010, 8, 9, 15, 58, 39)
static te::dt::TimeDuration dt(20, 30, 50, 11)
std::map< std::string, DataSet * > m_datasets
The set of datasets stored in memory.
An implementation of DataSourceTransactor class for the ST In-memory driver.
std::unique_ptr< te::da::DataSourceTransactor > getTransactor()
It returns the set of parameters used to set up the access channel to the underlying repository...
void drop(const std::string &connInfo)
It removes the data source with the connection information from a driver.
DataSource(const std::string &connInfo)
Constructor.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
A class for representing an Uniform Resource Identifier (URI).
Implementation of a in-memory data set that contains spatiotemporal observations indexed by time and ...
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...
An exception class for the TerraLib ST memory driver.
te::core::URI m_uri
The URI used to describe the datasource connection;.
TECOREEXPORT std::map< std::string, std::string > Expand(const std::string &query_str)
Split a query string into its components.
const te::da::DataSourceCapabilities & getCapabilities() const
It returns the known capabilities of the data source.
Implements a DataSource that contains st memory DataSets indexed by space and time.
static const te::da::SQLDialect sm_dialect
A dummy dialect.
A dataset is the unit of information manipulated by the data access module of TerraLib.
std::size_t m_maxdatasets
The maximum number of datasets to be handled by the data source.
void close()
It closes the data source and clears all the resources used by its internal communication channel...