QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
qgswfstransaction_1_0_0.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgswfstransaction.h
3  -------------------------
4  begin : December 20 , 2016
5  copyright : (C) 2007 by Marco Hugentobler (original code)
6  (C) 2012 by RenĂ©-Luc D'Hont (original code)
7  (C) 2014 by Alessandro Pasotti (original code)
8  (C) 2017 by David Marteau
9  email : marco dot hugentobler at karto dot baug dot ethz dot ch
10  a dot pasotti at itopen dot it
11  david dot marteau at 3liz dot com
12  ***************************************************************************/
13 
14 /***************************************************************************
15  * *
16  * This program is free software; you can redistribute it and/or modify *
17  * it under the terms of the GNU General Public License as published by *
18  * the Free Software Foundation; either version 2 of the License, or *
19  * (at your option) any later version. *
20  * *
21  ***************************************************************************/
22 #ifndef QGSWFSTRANSACTION_1_0_0_H
23 #define QGSWFSTRANSACTION_1_0_0_H
24 
25 
26 namespace QgsWfs
27 {
28  namespace v1_0_0
29  {
31  {
32  QString typeName;
33 
34  QString handle;
35 
36  QDomNodeList featureNodeList;
37 
38  QStringList insertFeatureIds;
39 
40  bool error;
41 
42  QString errorMsg;
43  };
44 
46  {
47  QString typeName;
48 
49  QString handle;
50 
51  QMap<QString, QString> propertyMap;
52 
53  QDomElement geometryElement;
54 
56 
57  QStringList serverFids;
58 
59  bool error;
60 
61  QString errorMsg;
62  };
63 
65  {
66  QString typeName;
67 
68  QString handle;
69 
71 
72  QStringList serverFids;
73 
74  bool error;
75 
76  QString errorMsg;
77  };
78 
80  {
81  QList< transactionInsert > inserts;
82 
83  QList< transactionUpdate > updates;
84 
85  QList< transactionDelete > deletes;
86  };
87 
91  transactionInsert parseInsertActionElement( QDomElement &actionElem );
92 
96  transactionUpdate parseUpdateActionElement( QDomElement &actionElem, const QgsProject *project );
97 
101  transactionDelete parseDeleteActionElement( QDomElement &actionElem, const QgsProject *project );
102 
106  transactionRequest parseTransactionRequestBody( QDomElement &docElem, const QgsProject *project );
107 
109 
113  QgsFeatureList featuresFromGML( QDomNodeList featureNodeList, QgsVectorDataProvider *provider );
114 
118  void performTransaction( transactionRequest &aRequest, QgsServerInterface *serverIface, const QgsProject *project );
119 
123  void writeTransaction( QgsServerInterface *serverIface, const QgsProject *project,
124  const QString &version, const QgsServerRequest &request,
125  QgsServerResponse &response );
126 
127 
131  QDomDocument createTransactionDocument( QgsServerInterface *serverIface, const QgsProject *project,
132  const QString &version, const QgsServerRequest &request );
133 
134  } // namespace v1_0_0
135 } // namespace QgsWfs
136 
137 #endif
138 
QgsWfs::v1_0_0::transactionRequest::inserts
QList< transactionInsert > inserts
Definition: qgswfstransaction_1_0_0.h:81
QgsWfs::v1_0_0::featuresFromGML
QgsFeatureList featuresFromGML(QDomNodeList featureNodeList, QgsVectorDataProvider *provider)
Transform GML feature nodes to features.
Definition: qgswfstransaction_1_0_0.cpp:765
QgsWfs::v1_0_0::transactionInsert::featureNodeList
QDomNodeList featureNodeList
Definition: qgswfstransaction_1_0_0.h:36
QgsWfs::v1_0_0::transactionInsert::handle
QString handle
Definition: qgswfstransaction_1_0_0.h:34
QgsWfs::v1_0_0::transactionUpdate::serverFids
QStringList serverFids
Definition: qgswfstransaction_1_0_0.h:57
QgsWfs::v1_0_0::transactionDelete::handle
QString handle
Definition: qgswfstransaction_1_0_0.h:68
QgsWfs::v1_0_0::transactionDelete
Definition: qgswfstransaction_1_0_0.h:65
QgsServerRequest
QgsServerRequest Class defining request interface passed to services QgsService::executeRequest() met...
Definition: qgsserverrequest.h:39
QgsWfs::v1_0_0::transactionUpdate::handle
QString handle
Definition: qgswfstransaction_1_0_0.h:49
QgsProject
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition: qgsproject.h:95
QgsWfs::v1_0_0::parseTransactionParameters
transactionRequest parseTransactionParameters(QgsServerRequest::Parameters parameters, const QgsProject *project)
Definition: qgswfstransaction_1_0_0.cpp:834
QgsServerRequest::Parameters
QMap< QString, QString > Parameters
Definition: qgsserverrequest.h:44
QgsWfs::v1_0_0::createTransactionDocument
QDomDocument createTransactionDocument(QgsServerInterface *serverIface, const QgsProject *project, const QString &version, const QgsServerRequest &request)
Create a wfs transaction document.
Definition: qgswfstransaction_1_0_0.cpp:62
QgsWfs::v1_0_0::parseUpdateActionElement
transactionUpdate parseUpdateActionElement(QDomElement &actionElem, const QgsProject *project)
Transform Update element to transactionUpdate.
Definition: qgswfstransaction_1_0_0.cpp:1150
QgsWfs::v1_0_0::transactionRequest::updates
QList< transactionUpdate > updates
Definition: qgswfstransaction_1_0_0.h:83
QgsWfs::v1_0_0::transactionUpdate
Definition: qgswfstransaction_1_0_0.h:46
QgsWfs::v1_0_0::transactionDelete::errorMsg
QString errorMsg
Definition: qgswfstransaction_1_0_0.h:76
QgsFeatureRequest
This class wraps a request for features to a vector layer (or directly its vector data provider).
Definition: qgsfeaturerequest.h:76
QgsWfs::v1_0_0::transactionUpdate::errorMsg
QString errorMsg
Definition: qgswfstransaction_1_0_0.h:61
QgsWfs::v1_0_0::parseInsertActionElement
transactionInsert parseInsertActionElement(QDomElement &actionElem)
Transform Insert element to transactionInsert.
Definition: qgswfstransaction_1_0_0.cpp:1208
QgsWfs::v1_0_0::transactionInsert::typeName
QString typeName
Definition: qgswfstransaction_1_0_0.h:32
QgsWfs
WMS implementation.
Definition: qgswfs.cpp:36
QgsFeatureList
QList< QgsFeature > QgsFeatureList
Definition: qgsfeature.h:583
QgsWfs::v1_0_0::transactionDelete::featureRequest
QgsFeatureRequest featureRequest
Definition: qgswfstransaction_1_0_0.h:70
QgsWfs::v1_0_0::transactionDelete::error
bool error
Definition: qgswfstransaction_1_0_0.h:74
QgsWfs::v1_0_0::transactionUpdate::featureRequest
QgsFeatureRequest featureRequest
Definition: qgswfstransaction_1_0_0.h:55
QgsWfs::v1_0_0::transactionDelete::typeName
QString typeName
Definition: qgswfstransaction_1_0_0.h:66
QgsWfs::v1_0_0::transactionUpdate::typeName
QString typeName
Definition: qgswfstransaction_1_0_0.h:47
QgsWfs::v1_0_0::transactionRequest
Definition: qgswfstransaction_1_0_0.h:80
QgsWfs::v1_0_0::transactionInsert::error
bool error
Definition: qgswfstransaction_1_0_0.h:40
QgsWfs::v1_0_0::transactionRequest::deletes
QList< transactionDelete > deletes
Definition: qgswfstransaction_1_0_0.h:85
QgsWfs::v1_0_0::parseTransactionRequestBody
transactionRequest parseTransactionRequestBody(QDomElement &docElem, const QgsProject *project)
Transform RequestBody root element to getFeatureRequest.
Definition: qgswfstransaction_1_0_0.cpp:1087
QgsWfs::v1_0_0::transactionInsert::errorMsg
QString errorMsg
Definition: qgswfstransaction_1_0_0.h:42
QgsWfs::v1_0_0::performTransaction
void performTransaction(transactionRequest &aRequest, QgsServerInterface *serverIface, const QgsProject *project)
Perform the transaction.
Definition: qgswfstransaction_1_0_0.cpp:202
QgsWfs::v1_0_0::transactionUpdate::propertyMap
QMap< QString, QString > propertyMap
Definition: qgswfstransaction_1_0_0.h:51
QgsWfs::v1_0_0::writeTransaction
void writeTransaction(QgsServerInterface *serverIface, const QgsProject *project, const QString &version, const QgsServerRequest &request, QgsServerResponse &response)
Output WFS transaction response.
Definition: qgswfstransaction_1_0_0.cpp:51
QgsWfs::v1_0_0::transactionUpdate::error
bool error
Definition: qgswfstransaction_1_0_0.h:59
QgsVectorDataProvider
This is the base class for vector data providers.
Definition: qgsvectordataprovider.h:59
QgsWfs::v1_0_0::transactionDelete::serverFids
QStringList serverFids
Definition: qgswfstransaction_1_0_0.h:72
QgsWfs::v1_0_0::parseDeleteActionElement
transactionDelete parseDeleteActionElement(QDomElement &actionElem, const QgsProject *project)
Transform Delete element to transactionDelete.
Definition: qgswfstransaction_1_0_0.cpp:1121
QgsWfs::v1_0_0::transactionUpdate::geometryElement
QDomElement geometryElement
Definition: qgswfstransaction_1_0_0.h:53
QgsWfs::v1_0_0::transactionInsert
Definition: qgswfstransaction_1_0_0.h:31
QgsWfs::v1_0_0::transactionInsert::insertFeatureIds
QStringList insertFeatureIds
Definition: qgswfstransaction_1_0_0.h:38
QgsServerInterface
QgsServerInterface Class defining interfaces exposed by QGIS Server and made available to plugins.
Definition: qgsserverinterface.h:61
QgsServerResponse
QgsServerResponse Class defining response interface passed to services QgsService::executeRequest() m...
Definition: qgsserverresponse.h:44