28 #ifndef __TERRALIB_WS_OGC_WMS_DATAACCESS_TRANSACTOR_H 29 #define __TERRALIB_WS_OGC_WMS_DATAACCESS_TRANSACTOR_H 37 #include "../../../../dataaccess/datasource/DataSourceTransactor.h" 38 #include "../client/WMSClient.h" 40 #include "../client/DataTypes.h" 64 Transactor(
const std::shared_ptr<te::ws::ogc::WMSClient> wms);
76 bool isInTransaction()
const;
78 std::unique_ptr<te::da::DataSet> getDataSet(
const std::string& name,
80 bool connected =
false,
83 std::unique_ptr<te::da::DataSet> getDataSet(
const std::string& name,
84 const std::string& propertyName,
88 bool connected =
false,
91 std::unique_ptr<te::da::DataSet> getDataSet(
const std::string& name,
92 const std::string& propertyName,
96 bool connected =
false,
99 std::unique_ptr<te::da::DataSet> getDataSet(
const std::string& name,
102 bool connected =
false,
107 bool connected =
false,
110 std::unique_ptr<te::da::DataSet> query(
const std::string& query,
112 bool connected =
false,
117 void execute(
const std::string& command);
119 std::unique_ptr<te::da::PreparedQuery> getPrepared(
const std::string& qName = std::string(
""));
121 std::unique_ptr<te::da::BatchExecutor> getBatchExecutor();
125 boost::int64_t getLastGeneratedId();
127 std::string escape(
const std::string& value);
129 bool isDataSetNameValid(
const std::string& datasetName);
131 bool isPropertyNameValid(
const std::string& propertyName);
133 std::vector<std::string> getDataSetNames();
135 std::size_t getNumberOfDataSets();
137 std::unique_ptr<te::da::DataSetType> getDataSetType(
const std::string& name);
139 boost::ptr_vector<te::dt::Property> getProperties(
const std::string& datasetName);
141 std::unique_ptr<te::dt::Property> getProperty(
const std::string& datasetName,
const std::string& name);
143 std::unique_ptr<te::dt::Property> getProperty(
const std::string& datasetName, std::size_t propertyPos);
145 std::vector<std::string> getPropertyNames(
const std::string& datasetName);
147 std::size_t getNumberOfProperties(
const std::string& datasetName);
149 bool propertyExists(
const std::string& datasetName,
const std::string& name);
153 void dropProperty(
const std::string& datasetName,
const std::string& name);
155 void renameProperty(
const std::string& datasetName ,
const std::string& propertyName,
const std::string& newPropertyName);
157 std::unique_ptr<te::da::PrimaryKey> getPrimaryKey(
const std::string& datasetName);
159 bool primaryKeyExists(
const std::string& datasetName,
const std::string& name);
163 void dropPrimaryKey(
const std::string& datasetName);
165 std::unique_ptr<te::da::ForeignKey> getForeignKey(
const std::string& datasetName,
const std::string& name);
167 std::vector<std::string> getForeignKeyNames(
const std::string& datasetName);
169 bool foreignKeyExists(
const std::string& datasetName ,
const std::string& name);
173 void dropForeignKey(
const std::string& datasetName ,
const std::string& fkName);
175 std::unique_ptr<te::da::UniqueKey> getUniqueKey(
const std::string& datasetName,
const std::string& name);
177 std::vector<std::string> getUniqueKeyNames(
const std::string& datasetName);
179 bool uniqueKeyExists(
const std::string& datasetName,
const std::string& name);
183 void dropUniqueKey(
const std::string& datasetName,
const std::string& name);
185 std::unique_ptr<te::da::CheckConstraint> getCheckConstraint(
const std::string& datasetName,
const std::string& name);
187 std::vector<std::string> getCheckConstraintNames(
const std::string& datasetName);
189 bool checkConstraintExists(
const std::string& datasetName,
const std::string& name);
193 void dropCheckConstraint(
const std::string& datasetName,
const std::string& name);
195 std::unique_ptr<te::da::Index> getIndex(
const std::string& datasetName,
const std::string& name);
197 std::vector<std::string> getIndexNames(
const std::string& datasetName);
199 bool indexExists(
const std::string& datasetName,
const std::string& name);
201 void addIndex(
const std::string& datasetName,
te::da::Index* idx,
const std::map<std::string, std::string>& options);
203 void dropIndex(
const std::string& datasetName,
const std::string& idxName);
205 std::unique_ptr<te::da::Sequence> getSequence(
const std::string& name);
207 std::vector<std::string> getSequenceNames();
209 bool sequenceExists(
const std::string& name);
213 void dropSequence(
const std::string& name);
215 std::unique_ptr<te::gm::Envelope> getExtent(
const std::string& datasetName,
216 const std::string& propertyName);
218 std::unique_ptr<te::gm::Envelope> getExtent(
const std::string& datasetName,
219 std::size_t propertyPos);
221 std::size_t getNumberOfItems(
const std::string& datasetName);
225 bool dataSetExists(
const std::string& name);
228 const std::map<std::string, std::string>& options);
230 void cloneDataSet(
const std::string& name,
231 const std::string& cloneName,
232 const std::map<std::string, std::string>& options);
234 void dropDataSet(
const std::string& name);
236 void renameDataSet(
const std::string& name,
237 const std::string& newName);
239 void add(
const std::string& datasetName,
241 const std::map<std::string, std::string>& options,
242 std::size_t limit = 0,
243 bool enableProgress =
true);
247 void update(
const std::string& datasetName,
249 const std::vector<std::size_t>& properties,
251 const std::map<std::string, std::string>& options,
252 std::size_t limit = 0);
254 void optimize(
const std::map<std::string, std::string>& opInfo);
256 std::vector<std::string> getLayerNames();
266 std::shared_ptr<te::ws::ogc::WMSClient>
m_wms;
277 #endif // __TERRALIB_WS_OGC_WMS_DATAACCESS_TRANSACTOR_H
A class that models the description of a dataset.
SpatialRelation
Spatial relations between geometric objects.
It describes a sequence (a number generator).
A class that describes a check constraint.
An abstract class for data providers like a DBMS, Web Services or a regular file. ...
std::shared_ptr< te::ws::ogc::WMSClient > m_wms
It models a property definition.
AccessPolicy
Supported data access policies (can be used as bitfield).
TraverseType
A dataset can be traversed in two ways:
Configuration flags for the Terrralib WS OGC WMS DATA ACCESS module.
An Envelope defines a 2D rectangular region.
This class represents a set of unique ids created in the same context. i.e. from the same data set...
The Layer WMS 1.3.0 struct.
It models a foreign key constraint for a DataSetType.
It describes a unique key (uk) constraint.
std::map< std::string, te::ws::ogc::wms::Layer > m_layerMap
A DataSourceTransactor can be viewed as a connection to the data source for reading/writing things in...
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
A Select models a query to be used when retrieving data from a DataSource.
#define TEOGCWMSDATAACCESSEXPORT
You can use this macro in order to export/import classes and functions from this module.
A dataset is the unit of information manipulated by the data access module of TerraLib.
It describes a primary key (pk) constraint.
Implementation of the transactor for the WMS driver.
A Query is independent from the data source language/dialect.
It describes an index associated to a DataSetType.