Implementation of the data source for the WCS driver. More...
#include <DataSource.h>
Public Member Functions | |
void | close () |
It closes the data source and clears all the resources used by its internal communication channel. More... | |
DataSource () | |
const te::da::DataSourceCapabilities & | getCapabilities () const |
It returns the known capabilities of the data source. More... | |
const std::map< std::string, std::string > & | getConnectionInfo () const |
It returns the set of parameters used to set up the access channel to the underlying repository. More... | |
const te::da::SQLDialect * | getDialect () const |
It returns the data source SQL dialect, if there is one. More... | |
const std::string & | getId () const |
An identification value for the data source. More... | |
std::auto_ptr< te::da::DataSourceTransactor > | getTransactor () |
It returns an object that can execute transactions in the context of a data source. More... | |
std::string | getType () const |
It returns the data source type name (in UPPER CASE). Ex: POSTGIS, SQLITE, WFS, WMS, or MYSQL. More... | |
bool | isOpened () const |
It returns true if the data source is opened, otherwise it returns false. More... | |
bool | isValid () const |
It checks if the data source is valid (available for using). More... | |
void | open () |
It opens the data source and makes it ready for using. More... | |
void | setConnectionInfo (const std::map< std::string, std::string > &connInfo) |
It sets the connection information to be used when connecting to the data source. More... | |
void | setId (const std::string &id) |
It sets the data source identification. More... | |
~DataSource () | |
Virtual destructor. More... | |
Dataset Metadata Retrieval | |
Methods for retrieving metadata about the datasets of the data source. | |
std::auto_ptr< te::da::DataSetTypeCapabilities > | getCapabilities (const std::string &name) |
It gets capabilities about a data set. More... | |
virtual std::vector< std::string > | getDataSetNames () |
It gets the dataset names available in the data source. More... | |
virtual std::size_t | getNumberOfDataSets () |
It retrieves the number of data sets available in the data source. More... | |
virtual std::auto_ptr< te::da::DataSetType > | getDataSetType (const std::string &name) |
It gets information about the given dataset. More... | |
virtual boost::ptr_vector< te::dt::Property > | getProperties (const std::string &datasetName) |
It retrieves the properties of the dataset. More... | |
virtual std::auto_ptr< te::dt::Property > | getProperty (const std::string &datasetName, const std::string &name) |
It retrieves the property with the given name from the dataset. More... | |
virtual std::auto_ptr< te::dt::Property > | getProperty (const std::string &datasetName, std::size_t propertyPos) |
It retrieves the property lying in the given position from the dataset. More... | |
virtual std::vector< std::string > | getPropertyNames (const std::string &datasetName) |
It gets the property names of the given dataset. More... | |
virtual std::size_t | getNumberOfProperties (const std::string &datasetName) |
It gets the number of properties of the given dataset. More... | |
virtual bool | propertyExists (const std::string &datasetName, const std::string &name) |
It checks if a property with the given name exists in the dataset. More... | |
virtual void | addProperty (const std::string &datasetName, te::dt::Property *p) |
It adds a new property to the dataset schema. More... | |
virtual void | dropProperty (const std::string &datasetName, const std::string &name) |
It removes a property from the given dataset. More... | |
virtual void | renameProperty (const std::string &datasetName, const std::string &propertyName, const std::string &newPropertyName) |
It renames a property of the given dataset. More... | |
virtual void | changePropertyDefinition (const std::string &datasetName, const std::string &propName, te::dt::Property *newProp) |
virtual void | changePropertiesDefinitions (const std::string &datasetName, const std::vector< std::string > &propsNames, const std::vector< te::dt::Property * > newProps) |
virtual std::auto_ptr< te::da::PrimaryKey > | getPrimaryKey (const std::string &datasetName) |
It retrieves the primary key of the dataset. More... | |
virtual bool | primaryKeyExists (const std::string &datasetName, const std::string &name) |
It checks if a primary key exists in the dataset. More... | |
virtual void | addPrimaryKey (const std::string &datasetName, PrimaryKey *pk) |
It adds a primary key constraint to the dataset schema. More... | |
virtual void | dropPrimaryKey (const std::string &datasetName) |
It removes the primary key constraint from the dataset schema. More... | |
virtual std::auto_ptr< ForeignKey > | getForeignKey (const std::string &datasetName, const std::string &name) |
It retrieves the foreign key from the given dataset. More... | |
virtual std::vector< std::string > | getForeignKeyNames (const std::string &datasetName) |
It gets the foreign key names of the given dataset. More... | |
virtual bool | foreignKeyExists (const std::string &datasetName, const std::string &name) |
It checks if a foreign key with the given name exists in the data source. More... | |
virtual void | addForeignKey (const std::string &datasetName, ForeignKey *fk) |
It adds a foreign key constraint to a dataset. More... | |
virtual void | dropForeignKey (const std::string &datasetName, const std::string &fkName) |
It removes the foreign key constraint from the dataset schema. More... | |
virtual std::auto_ptr< te::da::UniqueKey > | getUniqueKey (const std::string &datasetName, const std::string &name) |
It gets the unique key in the dataset with the given name. More... | |
virtual std::vector< std::string > | getUniqueKeyNames (const std::string &datasetName) |
It gets the unique key names of the given dataset. More... | |
virtual bool | uniqueKeyExists (const std::string &datasetName, const std::string &name) |
It checks if a unique key with the given name exists in the dataset. More... | |
virtual void | addUniqueKey (const std::string &datasetName, UniqueKey *uk) |
It adds a unique key constraint to the dataset. More... | |
virtual void | dropUniqueKey (const std::string &datasetName, const std::string &name) |
It removes the unique key constraint from the dataset. More... | |
virtual std::auto_ptr< te::da::CheckConstraint > | getCheckConstraint (const std::string &datasetName, const std::string &name) |
It gets the check constraint of the dataset with the given name. More... | |
virtual std::vector< std::string > | getCheckConstraintNames (const std::string &datasetName) |
It gets the check constraint names of the given dataset. More... | |
virtual bool | checkConstraintExists (const std::string &datasetName, const std::string &name) |
It checks if a check-constraint with the given name exists in the data source. More... | |
virtual void | addCheckConstraint (const std::string &datasetName, CheckConstraint *cc) |
It adds a check constraint to the dataset. More... | |
virtual void | dropCheckConstraint (const std::string &datasetName, const std::string &name) |
It removes the check constraint from the dataset. More... | |
virtual std::auto_ptr< te::da::Index > | getIndex (const std::string &datasetName, const std::string &name) |
It gets the index with the given name from the dataset. More... | |
virtual std::vector< std::string > | getIndexNames (const std::string &datasetName) |
It gets the index names of the given dataset. More... | |
virtual bool | indexExists (const std::string &datasetName, const std::string &name) |
It checks if an index with the given name exists in the dataset. More... | |
virtual void | addIndex (const std::string &datasetName, Index *idx, const std::map< std::string, std::string > &options) |
It adds an index to the dataset. More... | |
virtual void | dropIndex (const std::string &datasetName, const std::string &idxName) |
It removes the index from the given dataset. More... | |
virtual std::auto_ptr< Sequence > | getSequence (const std::string &name) |
It gets the sequence with the given name in the data source. More... | |
virtual std::vector< std::string > | getSequenceNames () |
It gets the sequence names available in the data source. More... | |
virtual bool | sequenceExists (const std::string &name) |
It checks if a sequence with the given name exists in the data source. More... | |
virtual void | addSequence (Sequence *sequence) |
It adds a new sequence in the data source. More... | |
virtual void | dropSequence (const std::string &name) |
It removes the sequence from the data source. More... | |
virtual std::auto_ptr< te::gm::Envelope > | getExtent (const std::string &datasetName, const std::string &propertyName) |
It retrieves the bounding rectangle of the spatial property for the given dataset. More... | |
virtual std::auto_ptr< te::gm::Envelope > | getExtent (const std::string &datasetName, std::size_t propertyPos) |
It retrieves the bounding rectangle for the spatial property lying in the given position in the dataset. More... | |
virtual std::size_t | getNumberOfItems (const std::string &datasetName) |
It retrieves the number of items of the given dataset. More... | |
virtual bool | hasDataSets () |
It checks if the data source has any dataset. More... | |
virtual bool | dataSetExists (const std::string &name) |
It checks if a dataset with the given name exists in the data source. More... | |
Data Retrieval | |
Methods for retrieving data from the data source. | |
virtual std::auto_ptr< DataSet > | getDataSet (const std::string &name, te::common::TraverseType travType=te::common::FORWARDONLY, const te::common::AccessPolicy accessPolicy=te::common::RAccess) |
It gets the dataset identified by the given name. This method always returns a disconnected dataset, that is, a dataset that no more depends of the data source that provided the connection for its creation. Therefore, the disconnected dataset continues to live after the connection given by the data source has been released. More... | |
virtual std::auto_ptr< DataSet > | getDataSet (const std::string &name, const std::string &propertyName, const te::gm::Envelope *e, te::gm::SpatialRelation r, te::common::TraverseType travType=te::common::FORWARDONLY, const te::common::AccessPolicy accessPolicy=te::common::RAccess) |
It gets the dataset identified by the given name using a spatial filter over the specified property. This method always returns a disconnected dataset, that is, a dataset that no more depends of the data source that provided the connection for its creation. Therefore, the disconnected dataset continues to live after the connection given by the data source has been released. More... | |
virtual std::auto_ptr< DataSet > | getDataSet (const std::string &name, const std::string &propertyName, const te::gm::Geometry *g, te::gm::SpatialRelation r, te::common::TraverseType travType=te::common::FORWARDONLY, const te::common::AccessPolicy accessPolicy=te::common::RAccess) |
It gets the dataset identified by the given name using a spatial filter over the given geometric property. This method always returns a disconnected dataset, that is, a dataset that no more depends of the data source that provided the connection for its creation. Therefore, the disconnected dataset continues to live after the connection given by the data source has been released. More... | |
std::auto_ptr< te::da::DataSet > | getDataSet (const std::string &name, const te::da::ObjectIdSet *oids, te::common::TraverseType travType=te::common::FORWARDONLY, const te::common::AccessPolicy accessPolicy=te::common::RAccess) |
It gets the dataset identified by the given name using the identification of the objects. This method always returns a disconnected dataset, that is, a dataset that no more depends of the data source that provided the connection for its creation. Therefore, the disconnected dataset continues to live after the connection given by the data source has been released. More... | |
virtual std::auto_ptr< DataSet > | query (const Select &q, te::common::TraverseType travType=te::common::FORWARDONLY, const te::common::AccessPolicy accessPolicy=te::common::RAccess) |
It executes a query that may return some data using a generic query. This method always returns a disconnected dataset, that is, a dataset that no more depends of the data source that provided the connection for its creation. Therefore, the disconnected dataset continues to live after the connection given by the data source has been released. More... | |
virtual std::auto_ptr< DataSet > | query (const std::string &query, te::common::TraverseType travType=te::common::FORWARDONLY, const te::common::AccessPolicy accessPolicy=te::common::RAccess) |
It executes a query that may return some data using the data source native language. This method always returns a disconnected dataset, that is, a dataset that is no more dependent of the data source that provided the connection for its creation. Therefore, the disconnected dataset continues to live after the connection given by the data source has been released. More... | |
Command Execution Methods | |
Methods for executing commands against the data source. | |
virtual void | execute (const Query &command) |
It executes the specified command using a generic query representation. More... | |
virtual void | execute (const std::string &command) |
It executes the specified command in the data source native language. More... | |
Auxiliary Methods for Commands and Queries | |
Auxiliary methods for commands and queries. | |
virtual std::string | escape (const std::string &value) |
It escapes a string for using in commands and queries. More... | |
virtual bool | isDataSetNameValid (const std::string &datasetName) |
It checks if the given dataset name is valid. More... | |
virtual bool | isPropertyNameValid (const std::string &propertyName) |
It checks if the given property name is valid. More... | |
Dataset Schema Persistence Methods | |
Methods for dealing with datasource and dataset schema changes. | |
virtual void | createDataSet (DataSetType *dt, const std::map< std::string, std::string > &options) |
It creates the dataset schema definition in the target data source. More... | |
virtual void | cloneDataSet (const std::string &name, const std::string &cloneName, const std::map< std::string, std::string > &options) |
It clones the dataset in the data source. More... | |
virtual void | dropDataSet (const std::string &name) |
It removes the dataset schema from the data source. More... | |
virtual void | renameDataSet (const std::string &name, const std::string &newName) |
It renames a dataset. More... | |
Dataset Persistence Methods | |
Methods for dealing with the persistence of data in a data source. | |
virtual void | add (const std::string &datasetName, DataSet *d, const std::map< std::string, std::string > &options, std::size_t limit=0) |
It adds data items to the dataset in the data source. More... | |
virtual te::common::CharEncoding | getEncoding () |
It return the DataSource current encoding. More... | |
virtual void | remove (const std::string &datasetName, const te::da::ObjectIdSet *oids=0) |
It removes all the informed items from the dataset. More... | |
virtual void | update (const std::string &datasetName, DataSet *dataset, const std::vector< std::size_t > &properties, const te::da::ObjectIdSet *oids, const std::map< std::string, std::string > &options, std::size_t limit=0) |
It updates the contents of a dataset for the set of data items. More... | |
virtual void | update (const std::string &datasetName, DataSet *dataset, const std::vector< std::set< int > > &properties, const std::vector< size_t > &ids) |
It updates the contents of a dataset. More... | |
Static Public Member Functions | |
static void | setCapabilities (const te::da::DataSourceCapabilities &capabilities) |
Data Source static methods | |
Data Source static methods | |
static std::auto_ptr< DataSource > | create (const std::string &dsType, const std::map< std::string, std::string > &dsInfo) |
It creates a new repository for a data source. More... | |
static void | drop (const std::string &dsType, const std::map< std::string, std::string > &dsInfo) |
It removes a data source identified by its connection information and the driver type. More... | |
static bool | exists (const std::string &dsType, const std::map< std::string, std::string > &dsInfo) |
It checks if the data source exists with the connection information and the driver type. More... | |
static std::vector< std::string > | getDataSourceNames (const std::string &dsType, const std::map< std::string, std::string > &info) |
It returns the data source names available in the driver. More... | |
static std::vector< te::common::CharEncoding > | getEncodings (const std::string &dsType, const std::map< std::string, std::string > &info) |
It gets the encoding names of the data source. More... | |
Protected Member Functions | |
void | create (const std::map< std::string, std::string > &dsInfo) |
It creates a new data source. More... | |
void | drop (const std::map< std::string, std::string > &dsInfo) |
It removes the data source with the connection information from a driver. More... | |
bool | exists (const std::map< std::string, std::string > &dsInfo) |
Check the existence of a data source in a driver. More... | |
std::vector< std::string > | getDataSourceNames (const std::map< std::string, std::string > &dsInfo) |
It gets the data source names available in a driver. More... | |
std::vector< te::common::CharEncoding > | getEncodings (const std::map< std::string, std::string > &dsInfo) |
It gets the encodings for the data source. More... | |
Protected Attributes | |
std::string | m_id |
The data source identification. More... | |
Private Member Functions | |
void | verifyConnectionInfo () const |
Private Attributes | |
std::map< std::string, std::string > | m_connectionInfo |
bool | m_isOpened |
Static Private Attributes | |
static te::da::DataSourceCapabilities | sm_capabilities |
Implementation of the data source for the WCS driver.
Definition at line 48 of file DataSource.h.
te::wcs::DataSource::DataSource | ( | ) |
|
virtual |
Virtual destructor.
Reimplemented from te::da::DataSource.
|
virtualinherited |
It adds data items to the dataset in the data source.
datasetName | The target dataset name. |
d | The data items to be added to the dataset. |
options | A list of optional modifiers (driver specific). |
limit | The number of items to be used from the input dataset. If set to 0 (default), all items are used. |
Exception | An exception can be thrown, if the input dataset items could not be added to the given dataset. |
Reimplemented in te::mem::DataSource, and te::gdal::DataSource.
|
virtualinherited |
It adds a check constraint to the dataset.
datasetName | The dataset where the constraint will be added. |
cc | The check constraint to be added. |
Exception | An exception can be thrown, if the check constraint could not be added to the dataset schema. |
Reimplemented in te::gdal::DataSource.
|
virtualinherited |
It adds a foreign key constraint to a dataset.
datasetName | The dataset where the foreign key constraint will be added. |
fk | The foreign key constraint. |
Exception | An exception can be thrown, if the foreign key could not be added to the dataset schema. |
Reimplemented in te::gdal::DataSource.
|
virtualinherited |
It adds an index to the dataset.
datasetName | The dataset where the index will be added. |
idx | The index to be added. |
options | A list of optional modifiers (driver specific). |
Exception | An exception can be thrown, if the index could not be added to the dataset schema. |
Reimplemented in te::gdal::DataSource.
|
virtualinherited |
It adds a primary key constraint to the dataset schema.
datasetName | The name of the dataset where the primary key will be added. |
pk | The primary key constraint. |
Exception | An exception can be thrown, if the primary key could not be added to the dataset schema. |
Reimplemented in te::gdal::DataSource.
|
virtualinherited |
It adds a new property to the dataset schema.
datasetName | The dataset where the property will be added. |
p | The new property to be added. |
Exception | An exception can be thrown, if the property could not be added to the dataset schema. |
Reimplemented in te::mem::DataSource, and te::gdal::DataSource.
|
virtualinherited |
It adds a new sequence in the data source.
Exception | An exception can be thrown, if the sequence could not be added to the data source. |
Reimplemented in te::gdal::DataSource.
|
virtualinherited |
It adds a unique key constraint to the dataset.
datasetName | The dataset where the unique key will be added. |
uk | The unique key constraint. |
Exception | An exception can be thrown, if the unique key could not be added to the dataset schema. |
Reimplemented in te::gdal::DataSource.
|
virtualinherited |
|
virtualinherited |
|
virtualinherited |
It checks if a check-constraint with the given name exists in the data source.
datasetName | The dataset name. |
name | The check-constraint name. |
Exception | An exception can be thrown, if the existence of the check constraint could not be determined. |
Reimplemented in te::gdal::DataSource.
|
virtualinherited |
It clones the dataset in the data source.
name | The dataset to be cloned. |
cloneName | The name of the cloned dataset. |
options | A list of optional modifiers. It is driver specific. |
Exception | An exception can be thrown, if the dataset schema could not be cloned. |
Reimplemented in te::mem::DataSource.
|
virtual |
It closes the data source and clears all the resources used by its internal communication channel.
This method closes any connection, any opened file, and releases any other resources.
Exception | An exception can be thrown, if the data source cannot be closed. |
Implements te::da::DataSource.
|
protectedvirtual |
It creates a new data source.
dsInfo | The information for creating a new data source. |
Exception | An exception can be thrown, if the data source could not be created. |
Implements te::da::DataSource.
|
staticinherited |
It creates a new repository for a data source.
dsType | The type of data source to be created (example: POSTGIS, ORACLE, SQLITE). |
dsInfo | The information for creating a new data source. |
Exception | An exception can be thrown, if the data source could not be created. |
|
virtualinherited |
It creates the dataset schema definition in the target data source.
If a dataset schema with the same name already exists in the target data source, this may throw an exception.
After calling this method, the dataset schema may be updated.
dt | The dataset schema to be created. It may be changed during the operation. |
options | A list of optional modifiers (driver specific). |
Reimplemented in te::mem::DataSource, te::ogr::DataSource, and te::gpkg::DataSource.
|
virtualinherited |
It checks if a dataset with the given name exists in the data source.
name | The dataset name. |
Exception | An exception can be thrown, if the existence of a dataset in the data source could not be determined. |
Reimplemented in te::mem::DataSource.
|
protectedvirtual |
It removes the data source with the connection information from a driver.
dsInfo | The information for removing a data source from a driver. |
Exception | An exception can be thrown, if the data source could not be removed. |
Implements te::da::DataSource.
|
staticinherited |
It removes a data source identified by its connection information and the driver type.
dsType | The data source type name (example: POSTGIS, ORACLE, SQLITE). |
dsInfo | The connection information for removing the data source. |
Exception | An exception can be thrown, if the data source could not be removed. |
|
virtualinherited |
It removes the check constraint from the dataset.
datasetName | The dataset from where the check constraint will be removed. |
name | The check constraint to be removed. |
Exception | An exception can be thrown, if the check constraint could not be removed from the dataset schema. |
Reimplemented in te::gdal::DataSource.
|
virtualinherited |
It removes the dataset schema from the data source.
name | The dataset name whose schema will be removed from the data source. |
Exception | An exception can be thrown, if the dataset could not be removed from the data source. |
Reimplemented in te::mem::DataSource.
|
virtualinherited |
It removes the foreign key constraint from the dataset schema.
datasetName | The dataset where the foreign key will be removed. |
fkName | The foreign key to be removed. |
Exception | An exception can be thrown, if the foreign key could not be removed from the dataset schema. |
Reimplemented in te::gdal::DataSource.
|
virtualinherited |
It removes the index from the given dataset.
datasetName | The dataset where the index will be removed. |
idxName | The index to be removed. |
Exception | An exception can be thrown, if the index could not be removed from the dataset schema. |
Reimplemented in te::gdal::DataSource.
|
virtualinherited |
It removes the primary key constraint from the dataset schema.
datasetName | The dataset from where the primary key will be removed. |
Exception | An exception can be thrown, if the primary key could not be dropped from the dataset schema. |
Reimplemented in te::gdal::DataSource.
|
virtualinherited |
It removes a property from the given dataset.
datasetName | The dataset from where the given property will be removed. |
name | The property to be removed from the dataset. |
Exception | An exception can be thrown, if the dataset property could not be removed. |
Reimplemented in te::mem::DataSource, and te::gdal::DataSource.
|
virtualinherited |
It removes the sequence from the data source.
name | The sequence that will be removed. |
Exception | An exception can be thrown, if the sequence could not be removed from the data source. |
Reimplemented in te::gdal::DataSource.
|
virtualinherited |
It removes the unique key constraint from the dataset.
datasetName | The dataset from where the unique key will be removed. |
name | The unique key constraint name. |
Exception | An exception can be thrown, if the unique key could not be removed from the dataset schema. |
Reimplemented in te::gdal::DataSource.
|
virtualinherited |
It escapes a string for using in commands and queries.
value | Any string. |
Reimplemented in te::gdal::DataSource.
|
virtualinherited |
It executes the specified command using a generic query representation.
command | A query like: CREATE, DROP, ALTER, INSERT, UPDATE, DELETE. |
Exception | An exception can be thrown if the query cannot be performed. |
Reimplemented in te::gdal::DataSource.
|
virtualinherited |
It executes the specified command in the data source native language.
command | A query string in the data source native language (like: CREATE, DROP, ALTER, INSERT, UPDATE, DELETE). |
Exception | An exception can be thrown if the query can not be performed. |
Reimplemented in te::gdal::DataSource.
|
protectedvirtual |
Check the existence of a data source in a driver.
dsInfo | The data source information. |
Exception | An exception can be thrown, if the existence of a data source in a driver could not be determined. |
Implements te::da::DataSource.
|
staticinherited |
It checks if the data source exists with the connection information and the driver type.
dsType | The data source type name (example: POSTGIS, ORACLE, SQLITE). |
dsInfo | The data source information. |
Exception | An exception can be thrown, if the data source exists in the driver. |
|
virtualinherited |
It checks if a foreign key with the given name exists in the data source.
datasetName | The dataset name. |
name | The foreign key name. |
Exception | An exception can be thrown, if the existence of the foreign key could not be obtained. |
Reimplemented in te::gdal::DataSource.
|
virtual |
It returns the known capabilities of the data source.
The returned object has all the information about the operations the data source can perform. Here you will find if the data source implementation supports primary keys, foreign keys, if it can be used in a thread environment and much more information.
capabilities | The known capabilities of the data source. |
Implements te::da::DataSource.
|
inherited |
It gets capabilities about a data set.
name | Name of the dataset. |
|
virtualinherited |
It gets the check constraint of the dataset with the given name.
datasetName | The dataset name. |
name | The check constraint name. |
Exception | An exception can be thrown, if the check constraint could not be retrieved. |
Reimplemented in te::gdal::DataSource.
|
virtualinherited |
It gets the check constraint names of the given dataset.
datasetName | The dataset name. |
Exception | An exception can be thrown, if the check constraint names could not be retrieved. |
Reimplemented in te::gdal::DataSource.
|
virtual |
It returns the set of parameters used to set up the access channel to the underlying repository.
This is the connection information used by a data source in order to enter in an operational mode, when the open method is called.
The key-value-pairs (kvp) may contain information about: maximum number of accepted connections, user name and password required for establishing a connection, the url of a service, or any other information needed by the data source to operate. This information is dependent on the data source driver, so check the driver documentation for any additional information about the kvp.
Implements te::da::DataSource.
|
virtualinherited |
It gets the dataset identified by the given name. This method always returns a disconnected dataset, that is, a dataset that no more depends of the data source that provided the connection for its creation. Therefore, the disconnected dataset continues to live after the connection given by the data source has been released.
name | The dataset name. |
accessPolicy | Access policy. |
travType | The traverse type associated to the returned dataset. |
Exception | It can throw an exception if:
|
Reimplemented in te::mem::DataSource.
|
virtualinherited |
It gets the dataset identified by the given name using a spatial filter over the specified property. This method always returns a disconnected dataset, that is, a dataset that no more depends of the data source that provided the connection for its creation. Therefore, the disconnected dataset continues to live after the connection given by the data source has been released.
name | The dataset name. |
propertyName | The name of the spatial property used to apply the spatial filter. |
e | A rectangle used as a spatial filter when retrieving the dataset. |
r | The spatial relation used during the filtering. |
accessPolicy | Access policy. |
travType | The traversal type associated to the returned dataset. |
Exception | It can throw an exception if:
|
|
virtualinherited |
It gets the dataset identified by the given name using a spatial filter over the given geometric property. This method always returns a disconnected dataset, that is, a dataset that no more depends of the data source that provided the connection for its creation. Therefore, the disconnected dataset continues to live after the connection given by the data source has been released.
name | The dataset name. |
propertyName | The name of the spatial property used to apply the spatial filter. |
g | The geometry used as a spatial filter when retrieving the dataset. |
r | The spatial relation used during the filtering. |
accessPolicy | Access policy. |
travType | The traverse type associated to the returned dataset. |
|
inherited |
It gets the dataset identified by the given name using the identification of the objects. This method always returns a disconnected dataset, that is, a dataset that no more depends of the data source that provided the connection for its creation. Therefore, the disconnected dataset continues to live after the connection given by the data source has been released.
name | The dataset name. |
oids | A pointer to the set of objects. Do not pass a null pointer nor an empty set. |
accessPolicy | Access policy. |
travType | The traverse type associated to the returned dataset. |
Exception | It can throw an exception if:
|
|
virtualinherited |
It gets the dataset names available in the data source.
Exception | An exception can be thrown, if the dataset names could not be retrieved. |
Reimplemented in te::mem::DataSource.
|
virtualinherited |
It gets information about the given dataset.
This method can provide the following information about a dataset:
name | The name of the dataset we are looking information for. |
Exception | An exception can be thrown, if the information about the dataset could not be retrieved. |
Reimplemented in te::mem::DataSource.
|
protectedvirtual |
It gets the data source names available in a driver.
dsInfo | The data source information. |
Exception | An exception can be thrown, if the data source names could not be retrieved. |
Implements te::da::DataSource.
|
staticinherited |
It returns the data source names available in the driver.
dsType | The type name of the data source(example: PostGIS, Oracle, WFS). |
dsInfo | The information about the data sources. |
Exception | An exception can be thrown, if the data source names could not be retrieved. |
Exception | An exception can be thrown, if the list of data source names could not be retrieved. |
|
virtual |
It returns the data source SQL dialect, if there is one.
Implements te::da::DataSource.
|
virtualinherited |
It return the DataSource current encoding.
|
protectedvirtual |
It gets the encodings for the data source.
dsInfo | The data source information. |
Exception | An exception can be thrown, if the encoding names could not be retrieved. |
Implements te::da::DataSource.
|
staticinherited |
It gets the encoding names of the data source.
dsType | The data source type name (example: PostGIS, Oracle, WFS). |
dsInfo | The data source information. |
Exception | An exception can be thrown, if the encoding names could not be retrieved. |
|
virtualinherited |
It retrieves the bounding rectangle of the spatial property for the given dataset.
datasetName | The dataset name. |
propertyName | The spatial property name. |
Exception | An exception can be thrown, if the extent of the geometry property could not be retrieved. |
|
virtualinherited |
It retrieves the bounding rectangle for the spatial property lying in the given position in the dataset.
datasetName | The dataset name. |
propertyPos | The spatial property position. |
Exception | An exception can be thrown, if the extent of the geometry property lying in the given position could not be retrieved. |
|
virtualinherited |
It retrieves the foreign key from the given dataset.
datasetName | The dataset name. |
name | The foreign key name. |
Exception | An exception can be thrown, if the foreign key could not be retrieved. |
Reimplemented in te::gdal::DataSource.
|
virtualinherited |
It gets the foreign key names of the given dataset.
datasetName | The dataset name. |
Exception | An exception can be thrown, if the foreign key names could not be retrieved. |
Reimplemented in te::gdal::DataSource.
|
inherited |
An identification value for the data source.
|
virtualinherited |
It gets the index with the given name from the dataset.
datasetName | The dataset name. |
name | The index name. |
Exception | An exception can be thrown, if the index could not be retrieved. |
Reimplemented in te::gdal::DataSource.
|
virtualinherited |
It gets the index names of the given dataset.
datasetName | The dataset name. |
Exception | An exception can be thrown, if the index names could not be retrieved. |
Reimplemented in te::gdal::DataSource.
|
virtualinherited |
It retrieves the number of data sets available in the data source.
Exception | An exception can be thrown, if the number of datasets could not be retrieved. |
Reimplemented in te::mem::DataSource.
|
virtualinherited |
It retrieves the number of items of the given dataset.
datasetName | The dataset name. |
Exception | An exception can be thrown, if the number of items of the dataset could not be retrieved. |
Reimplemented in te::mem::DataSource, and te::gdal::DataSource.
|
virtualinherited |
It gets the number of properties of the given dataset.
datasetName | The dataset name. |
Exception | An exception can be thrown, if the number of dataset properties could not be retrieved. |
Reimplemented in te::mem::DataSource.
|
virtualinherited |
It retrieves the primary key of the dataset.
datasetName | The dataset name. |
Exception | An exception can be thrown, if the primary key could not be retrieved. |
|
virtualinherited |
It retrieves the properties of the dataset.
datasetName | The dataset name. |
Exception | An exception can be thrown, if the dataset properties could not be retrieved. |
Reimplemented in te::mem::DataSource.
|
virtualinherited |
It retrieves the property with the given name from the dataset.
datasetName | The dataset name. |
propertyName | The property name. |
Exception | An exception can be thrown, if the dataset property could not be retrieved. |
Reimplemented in te::mem::DataSource.
|
virtualinherited |
It retrieves the property lying in the given position from the dataset.
datasetName | The dataset name. |
propertyPos | The property position. |
Exception | An exception can be thrown, if the property lying in the given position could not be retrieved. |
Reimplemented in te::mem::DataSource.
|
virtualinherited |
It gets the property names of the given dataset.
datasetName | The dataset name. |
Exception | An exception can be thrown, if the property names of the dataset could not be retrieved. |
Reimplemented in te::mem::DataSource.
|
virtualinherited |
It gets the sequence with the given name in the data source.
name | The sequence name. |
Exception | An exception can be thrown, if the sequence could not be retrieved from the data source. |
Reimplemented in te::gdal::DataSource.
|
virtualinherited |
It gets the sequence names available in the data source.
Exception | An exception can be thrown, if the sequence names could not be retrieved. |
Reimplemented in te::gdal::DataSource.
|
virtual |
It returns an object that can execute transactions in the context of a data source.
Use this method to get an object that allows to retrieve a dataset, to insert or update data, or to modify dataset types(schemas). You don't need to cache this kind of object because each driver in TerraLib already keeps a connection pooling. So, as soon as you finish using the transactor, destroy it.
Exception | An exception can be thrown, if it is not possible to get a transactor; for example, if there is no available connection. |
Implements te::da::DataSource.
|
virtual |
It returns the data source type name (in UPPER CASE). Ex: POSTGIS, SQLITE, WFS, WMS, or MYSQL.
Implements te::da::DataSource.
|
virtualinherited |
It gets the unique key in the dataset with the given name.
datasetName | The dataset name. |
name | The unique key name. |
Exception | An exception can be thrown, if the unique key could not be retrieved. |
Reimplemented in te::gdal::DataSource.
|
virtualinherited |
It gets the unique key names of the given dataset.
datasetName | The dataset name. |
Exception | An exception can be thrown, if the unique key names could not be obtained. |
|
virtualinherited |
It checks if the data source has any dataset.
Exception | An exception can be thrown, if it is not possible to check if the data source has datasets . |
Reimplemented in te::mem::DataSource.
|
virtualinherited |
It checks if an index with the given name exists in the dataset.
datasetName | The dataset name. |
name | The index name. |
Exception | An exception can be thrown, if the index existence could not be determined. |
Reimplemented in te::gdal::DataSource.
|
virtualinherited |
It checks if the given dataset name is valid.
datasetName | A dataset name whose validity will be checked. |
|
virtual |
It returns true if the data source is opened, otherwise it returns false.
This method will not check if the data source is available for using; it will just answer if the data source has already been opened. If you want to know if the data source is available for using, check the isValid() method.
Implements te::da::DataSource.
|
virtualinherited |
It checks if the given property name is valid.
propertyName | A property name whose validity will be checked. |
|
virtual |
It checks if the data source is valid (available for using).
For a DBMS, it will check the opened connections. For a WFS client, it will check if the server is reachable. For a file, it will check if it can be read.
Implements te::da::DataSource.
|
virtual |
It opens the data source and makes it ready for using.
If the subclass needs to open a connection to a database server, to open a file, or to get information from a Web Service, this method can do this kind of job to prepare the data source to be in an operational mode. It will use the connection information provided by the setConnectionInfo methods.
Exception | An exception can be thrown, if the data source cannot be opened. |
Implements te::da::DataSource.
|
virtualinherited |
It checks if a primary key exists in the dataset.
datasetName | The dataset name. |
name | The primary key name. |
Exception | An exception can be thrown, if the existence of the primary key could not be determined. |
Reimplemented in te::gdal::DataSource.
|
virtualinherited |
It checks if a property with the given name exists in the dataset.
datasetName | The dataset name. |
name | The property name. |
Exception | An exception can be thrown, if the existence of the dataset property could not be obtained. |
Reimplemented in te::mem::DataSource.
|
virtualinherited |
It executes a query that may return some data using a generic query. This method always returns a disconnected dataset, that is, a dataset that no more depends of the data source that provided the connection for its creation. Therefore, the disconnected dataset continues to live after the connection given by the data source has been released.
This method is different of the method that accepts a dataset name and a spatial filter; this method allows the retrieving of only a subset of the attributes, since a query can include a property list.
q | A valid query object. |
travType | The traverse type associated to the returned dataset. |
accessPolicy | Access policy. |
Exception | It can throw an exception if:
|
|
virtualinherited |
It executes a query that may return some data using the data source native language. This method always returns a disconnected dataset, that is, a dataset that is no more dependent of the data source that provided the connection for its creation. Therefore, the disconnected dataset continues to live after the connection given by the data source has been released.
query | A query string in the data source native language. |
travType | The traverse type associated to the returned dataset. |
accessPolicy | Access policy. |
Exception | It can throw an exception if:
|
|
virtualinherited |
It removes all the informed items from the dataset.
It removes all the data items from a dataset which are identified by a set of object identifiers. If this set is not informed, all items will be removed.
datasetName | The dataset name. |
oids | A set of object identifiers used used to remove data from the dataset, or NULL, for removing all. |
Exception | An exception can be thrown, if the data items could not be removed. |
Reimplemented in te::mem::DataSource, and te::gdal::DataSource.
|
virtualinherited |
It renames a dataset.
name | The name of the dataset to be renamed. |
newName | The new dataset name. |
Exception | An exception can be thrown, if the dataset could not be renamed. |
Reimplemented in te::mem::DataSource.
|
virtualinherited |
It renames a property of the given dataset.
datasetName | The dataset containing the property to be renamed. |
propertyName | The property to be renamed from the dataset. |
newPropertyName | The new property name. |
Exception | An exception can be thrown, if the dataset property could not be renamed. |
Reimplemented in te::mem::DataSource, and te::gdal::DataSource.
|
virtualinherited |
It checks if a sequence with the given name exists in the data source.
name | The sequence name. |
Exception | An exception can be thrown, if the index existence could not be determined. |
Reimplemented in te::gdal::DataSource.
|
static |
|
virtual |
It sets the connection information to be used when connecting to the data source.
connInfo | Key-value-pairs (kvp) with the connection information. |
Implements te::da::DataSource.
|
inherited |
It sets the data source identification.
id | An identification value. |
|
virtualinherited |
It checks if a unique key with the given name exists in the dataset.
datasetName | The dataset name. |
name | The unique key name. |
Exception | An exception can be thrown, if the existence of the unique key could not be determined. |
Reimplemented in te::gdal::DataSource.
|
virtualinherited |
It updates the contents of a dataset for the set of data items.
datasetName | The target dataset name. |
dataset | The list of data items to be updated. |
properties | The list of properties of the dataset to be updated. |
oids | The list of objects to be updated. |
options | A list of optional modifiers. It is driver specific. |
limit | The number of items to be used from the input dataset. If set to 0 (default) all items are used. |
Exception | An exception can be thrown, if the dataset could not be updated. |
Reimplemented in te::mem::DataSource, and te::gdal::DataSource.
|
virtualinherited |
It updates the contents of a dataset.
All rows are edited. The third parameter tells wich columns are edited for each row.
datasetName | Name pf the dataset. |
dataset | Dataset with editions. |
properties | Columns edited for each row. Note that the size of properties must be the same of the dataset. |
ids | List of positions of the columns that identifies rows. |
te::da::Exception | An exception can be thrown, if the dataset could not be updated. |
|
private |
|
private |
Definition at line 96 of file DataSource.h.
|
protectedinherited |
The data source identification.
Definition at line 1432 of file DataSource.h.
|
private |
Definition at line 97 of file DataSource.h.
|
staticprivate |
Definition at line 98 of file DataSource.h.