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;
 
   87       std::string getType() 
const;
 
   89       const std::map<std::string, std::string>& getConnectionInfo() 
const;
 
   91       void setConnectionInfo(
const std::map<std::string, std::string>& connInfo);
 
   93       std::auto_ptr<te::da::DataSourceTransactor> getTransactor();
 
   99       bool isOpened() 
const;
 
  101       bool isValid() 
const;
 
  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>& ,
 
  122       void remove(
const 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::auto_ptr<te::da::ForeignKey> 
getForeignKey(
const std::string& , 
const std::string& )
 
  154       { 
return std::auto_ptr<te::da::ForeignKey>(); }
 
  157       { 
return std::vector<std::string>(); }
 
  168       std::auto_ptr<te::da::UniqueKey> 
getUniqueKey(
const std::string& , 
const std::string& )
 
  169       { 
return std::auto_ptr<te::da::UniqueKey>(); }
 
  181       { 
return std::auto_ptr<te::da::CheckConstraint>(); }
 
  184       { 
return std::vector<std::string>(); }
 
  195       std::auto_ptr<te::da::Index> 
getIndex(
const std::string& , 
const std::string& )
 
  196       { 
return std::auto_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& )
 
  212       { 
return std::auto_ptr<te::da::Sequence>(); }
 
  215       { 
return std::vector<std::string>(); }
 
  228       void create(
const std::map<std::string, std::string>& dsInfo);
 
  230       void drop(
const std::map<std::string, std::string>& dsInfo);
 
  232       bool exists(
const std::map<std::string, std::string>& dsInfo);
 
  234       std::vector<std::string> getDataSourceNames(
const std::map<std::string, std::string>& dsInfo);
 
  236       std::vector<te::common::CharEncoding> getEncodings(
const std::map<std::string, std::string>& dsInfo);
 
  252 #endif // __TERRALIB_GDAL_INTERNAL_DATASOURCE_H 
void addSequence(te::da::Sequence *)
It adds a new sequence in the data source. 
 
void addForeignKey(const std::string &, te::da::ForeignKey *)
It adds a foreign key constraint to a dataset. 
 
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. 
 
void addProperty(const std::string &, te::dt::Property *)
It adds a new property to the dataset schema. 
 
const te::da::SQLDialect * getDialect() const 
It returns the data source SQL dialect, if there is one. 
 
bool uniqueKeyExists(const std::string &, const std::string &)
It checks if a unique key with the given name exists in the dataset. 
 
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. 
 
bool foreignKeyExists(const std::string &, const std::string &)
It checks if a foreign key with the given name exists in the data source. 
 
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. 
 
void execute(const te::da::Query &)
It executes the specified command using a generic query representation. 
 
It represents the SQL query dialect accepted by a given data source. 
 
std::map< std::string, std::string > m_connectionInfo
 
bool indexExists(const std::string &, const std::string &)
It checks if an index with the given name exists in the dataset. 
 
It describes a sequence (a number generator). 
 
A class that represents the known capabilities of a specific data source, i.e. this class informs all...
 
static te::da::DataSourceCapabilities sm_capabilities
 
A class that describes a check constraint. 
 
An abstract class for data providers like a DBMS, Web Services or a regular file. ...
 
std::vector< std::string > getIndexNames(const std::string &)
It gets the index names of the given dataset. 
 
std::auto_ptr< te::da::Sequence > getSequence(const std::string &)
It gets the sequence with the given name in the data source. 
 
std::auto_ptr< te::da::ForeignKey > getForeignKey(const std::string &, const std::string &)
It retrieves the foreign key from the given dataset. 
 
It models a property definition. 
 
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 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. 
 
void dropPrimaryKey(const std::string &)
It removes the primary key constraint from the dataset schema. 
 
An exception class for the GDAL module. 
 
A driver to access raster data using the GDAL library. 
 
bool checkConstraintExists(const std::string &, const std::string &)
It checks if a check-constraint with the given name exists in the data source. 
 
bool primaryKeyExists(const std::string &, const std::string &)
It checks if a primary key exists in the dataset. 
 
This class represents a set of unique ids created in the same context. i.e. from the same data set...
 
te::da::DataSourceCapabilities capabilities
 
void dropForeignKey(const std::string &, const std::string &)
It removes the foreign key constraint from the dataset schema. 
 
It models a foreign key constraint for a DataSetType. 
 
std::string escape(const std::string &value)
It escapes a string for using in commands and queries. 
 
It describes a unique key (uk) constraint. 
 
std::size_t getNumberOfItems(const std::string &datasetName)
It retrieves the number of items of the given dataset. 
 
A dataset is the unit of information manipulated by the data access module of TerraLib. 
 
std::vector< std::string > getSequenceNames()
It gets the sequence names available in the data source. 
 
It describes a primary key (pk) constraint. 
 
void dropCheckConstraint(const std::string &, const std::string &)
It removes the check constraint from the dataset. 
 
void dropUniqueKey(const std::string &, const std::string &)
It removes the unique key constraint from the dataset. 
 
std::auto_ptr< te::da::Index > getIndex(const std::string &, const std::string &)
It gets the index with the given name from the dataset. 
 
void renameProperty(const std::string &, const std::string &, const std::string &)
It renames a property of the given dataset. 
 
void dropIndex(const std::string &, const std::string &)
It removes the index from the given dataset. 
 
void dropProperty(const std::string &, const std::string &)
It removes a property from the given dataset. 
 
std::auto_ptr< te::da::CheckConstraint > getCheckConstraint(const std::string &, const std::string &)
It gets the check constraint of the dataset with the given name. 
 
void addIndex(const std::string &, te::da::Index *, const std::map< std::string, std::string > &)
It adds an index to the dataset. 
 
std::vector< std::string > getCheckConstraintNames(const std::string &)
It gets the check constraint names of the given dataset. 
 
std::auto_ptr< te::da::UniqueKey > getUniqueKey(const std::string &, const std::string &)
It gets the unique key in the dataset with the given name. 
 
std::vector< std::string > getForeignKeyNames(const std::string &)
It gets the foreign key names of the given dataset. 
 
A Query is independent from the data source language/dialect. 
 
It describes an index associated to a DataSetType. 
 
Configuration flags for the GDAL Driver of TerraLib. 
 
void addCheckConstraint(const std::string &, te::da::CheckConstraint *)
It adds a check constraint to the dataset.