Go to the documentation of this file.
26 #ifndef __TERRALIB_GDAL_INTERNAL_DATASOURCE_H
27 #define __TERRALIB_GDAL_INTERNAL_DATASOURCE_H
30 #include "../dataaccess/datasource/DataSource.h"
31 #include "../dataaccess/datasource/DataSourceCapabilities.h"
32 #include "../dataaccess/dataset/DataSetType.h"
38 #include <boost/shared_ptr.hpp>
39 #include <boost/ptr_container/ptr_vector.hpp>
40 #include <boost/filesystem.hpp>
64 class DataSourceTransactor;
114 void renameProperty(
const std::string& ,
const std::string& ,
const std::string& ) {}
117 void add(
const std::string& ,
119 const std::map<std::string, std::string>& ,
127 const std::vector<std::size_t>&,
129 const std::map<std::string, std::string>& ,
141 std::string
escape(
const std::string& value)
153 std::unique_ptr<te::da::ForeignKey>
getForeignKey(
const std::string& ,
const std::string& )
154 {
return std::unique_ptr<te::da::ForeignKey>(); }
157 {
return std::vector<std::string>(); }
168 std::unique_ptr<te::da::UniqueKey>
getUniqueKey(
const std::string& ,
const std::string& )
169 {
return std::unique_ptr<te::da::UniqueKey>(); }
180 std::unique_ptr<te::da::CheckConstraint>
getCheckConstraint(
const std::string& ,
const std::string& )
181 {
return std::unique_ptr<te::da::CheckConstraint>(); }
184 {
return std::vector<std::string>(); }
195 std::unique_ptr<te::da::Index>
getIndex(
const std::string& ,
const std::string& )
196 {
return std::unique_ptr<te::da::Index>(); }
199 {
return std::vector<std::string>(); }
205 const std::map<std::string, std::string>& )
208 void dropIndex(
const std::string& ,
const std::string& )
211 std::unique_ptr<te::da::Sequence>
getSequence(
const std::string& )
212 {
return std::unique_ptr<te::da::Sequence>(); }
215 {
return std::vector<std::string>(); }
228 void create(
const std::string& connInfo);
230 void drop(
const std::string& connInfo);
232 bool exists(
const std::string& connInfo);
246 #endif // __TERRALIB_GDAL_INTERNAL_DATASOURCE_H
void addForeignKey(const std::string &, te::da::ForeignKey *)
It adds a foreign key constraint to a dataset.
void dropPrimaryKey(const std::string &)
It removes the primary key constraint from the dataset schema.
A class that describes a check constraint.
std::unique_ptr< te::da::CheckConstraint > getCheckConstraint(const std::string &, const std::string &)
It gets the check constraint of the dataset with the given name.
std::string getType() const
It returns the data source type name (in UPPER CASE). Ex: POSTGIS, SQLITE, WFS, WMS,...
void dropProperty(const std::string &, const std::string &)
It removes a property from the given dataset.
It represents the SQL query dialect accepted by a given 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 addProperty(const std::string &, te::dt::Property *)
It adds a new property to the dataset schema.
std::vector< std::string > getIndexNames(const std::string &)
It gets the index names of the given dataset.
~DataSource()
Virtual destructor.
void addIndex(const std::string &, te::da::Index *, const std::map< std::string, std::string > &)
It adds an index to the dataset.
bool indexExists(const std::string &, const std::string &)
It checks if an index with the given name exists in the dataset.
bool exists(const std::string &connInfo)
Check the existence of a data source in a 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 create(const std::string &connInfo)
It creates a new data source.
void update(const std::string &, te::da::DataSet *, const std::vector< std::size_t > &, const te::da::ObjectIdSet *, const std::map< std::string, std::string > &, std::size_t)
It updates the contents of a dataset for the set of data items.
DataSource(const te::core::URI &uri)
void addUniqueKey(const std::string &, te::da::UniqueKey *)
It adds a unique key constraint to the dataset.
void execute(const std::string &)
It executes the specified command in the data source native language.
A Query is independent from the data source language/dialect.
bool sequenceExists(const std::string &)
It checks if a sequence with the given name exists in the data source.
void addPrimaryKey(const std::string &, te::da::PrimaryKey *)
It adds a primary key constraint to the dataset schema.
A driver to access raster data using the GDAL library.
std::size_t getNumberOfItems(const std::string &datasetName)
It retrieves the number of items of the given dataset.
It describes an index associated to a DataSetType.
Implementation of the transactor for the WS OGC WMS.
bool primaryKeyExists(const std::string &, const std::string &)
It checks if a primary key exists in the dataset.
void addSequence(te::da::Sequence *)
It adds a new sequence in the data source.
void add(const std::string &, te::da::DataSet *, const std::map< std::string, std::string > &, std::size_t)
It adds data items to the dataset in the data source.
void dropSequence(const std::string &)
It removes the sequence from the data source.
#define TEGDALEXPORT
You can use this macro in order to export/import classes and functions from this module.
te::da::DataSourceCapabilities capabilities
void dropForeignKey(const std::string &, const std::string &)
It removes the foreign key constraint from the dataset schema.
bool checkConstraintExists(const std::string &, const std::string &)
It checks if a check-constraint with the given name exists in the data source.
void dropIndex(const std::string &, const std::string &)
It removes the index from the given dataset.
static te::da::DataSourceCapabilities sm_capabilities
void dropUniqueKey(const std::string &, const std::string &)
It removes the unique key constraint from the dataset.
static void setCapabilities(const te::da::DataSourceCapabilities &capabilities)
It models a foreign key constraint for a DataSetType.
An exception class for the XML module.
std::unique_ptr< te::da::UniqueKey > getUniqueKey(const std::string &, const std::string &)
It gets the unique key in the dataset with the given name.
void execute(const te::da::Query &)
It executes the specified command using a generic query representation.
std::vector< std::string > getCheckConstraintNames(const std::string &)
It gets the check constraint names of the given dataset.
DataSource(const std::string &connInfo)
A class to store the proxy information that must be used to access data located in URIs.
void open()
It opens the data source and makes it ready for using.
std::string escape(const std::string &value)
It escapes a string for using in commands and queries.
void dropCheckConstraint(const std::string &, const std::string &)
It removes the check constraint from the dataset.
std::vector< std::string > getSequenceNames()
It gets the sequence names available in the data source.
void renameProperty(const std::string &, const std::string &, const std::string &)
It renames a property of the given dataset.
std::unique_ptr< te::da::ForeignKey > getForeignKey(const std::string &, const std::string &)
It retrieves the foreign key from the given dataset.
void drop(const std::string &connInfo)
It removes the data source with the connection information from a driver.
It describes a unique key (uk) constraint.
A class that represents the known capabilities of a specific data source, i.e. this class informs all...
std::vector< std::string > getForeignKeyNames(const std::string &)
It gets the foreign key names of the given dataset.
An abstract class for data providers like a DBMS, Web Services or a regular file.
It models a property definition.
bool uniqueKeyExists(const std::string &, const std::string &)
It checks if a unique key with the given name exists in the dataset.
A dataset is the unit of information manipulated by the data access module of TerraLib.
It describes a sequence (a number generator).
Proxy configuration file for TerraView (see terraview_config.h).
bool isValid() const
It checks if the data source is valid (available for using).
It describes a primary key (pk) constraint.
void close()
It closes the data source and clears all the resources used by its internal communication channel.
std::unique_ptr< te::da::Index > getIndex(const std::string &, const std::string &)
It gets the index with the given name from the dataset.
const te::da::SQLDialect * getDialect() const
It returns the data source SQL dialect, if there is one.
bool foreignKeyExists(const std::string &, const std::string &)
It checks if a foreign key with the given name exists in the data source.
const te::da::DataSourceCapabilities & getCapabilities() const
It returns the known capabilities of the data source.
std::unique_ptr< te::da::Sequence > getSequence(const std::string &)
It gets the sequence with the given name in the data source.
This class represents a set of unique ids created in the same context. i.e. from the same data set.
void addCheckConstraint(const std::string &, te::da::CheckConstraint *)
It adds a check constraint to the dataset.
void remove(const std::string &, const te::da::ObjectIdSet *)
It removes all the informed items from the dataset.