Revision 5069

View differences:

org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.39/.directory
1
[Dolphin]
2
Timestamp=2020,9,1,10,21,14
3
Version=4
4
ViewMode=1
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.39/org.gvsig.vcsgis.main/src/main/resources/README.txt
1
====
2
    gvSIG. Desktop Geographic Information System.
3

  
4
    Copyright (C) 2007-2012 gvSIG Association.
5

  
6
    This program is free software; you can redistribute it and/or
7
    modify it under the terms of the GNU General Public License
8
    as published by the Free Software Foundation; either version 2
9
    of the License, or (at your option) any later version.
10

  
11
    This program is distributed in the hope that it will be useful,
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
    GNU General Public License for more details.
15

  
16
    You should have received a copy of the GNU General Public License
17
    along with this program; if not, write to the Free Software
18
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
    MA  02110-1301, USA.
20

  
21
    For any additional information, do not hesitate to contact us
22
    at info AT gvsig.com, or visit our website www.gvsig.com.
23
====
24

  
25
Put into this folder the resources needed by your classes.
26

  
27
This folder is added to the classpath, so you can load any resources 
28
through the ClassLoader.
29

  
30
By default, in this folder you can find an example of log4j configuration,
31
prepared to log messages through the console, so logging works when you
32
run your classes.
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.39/org.gvsig.vcsgis.main/src/main/resources/log4j.xml
1
<?xml version="1.0" encoding="ISO-8859-1" ?>
2
<!--
3

  
4
    gvSIG. Desktop Geographic Information System.
5

  
6
    Copyright (C) 2007-2012 gvSIG Association.
7

  
8
    This program is free software; you can redistribute it and/or
9
    modify it under the terms of the GNU General Public License
10
    as published by the Free Software Foundation; either version 2
11
    of the License, or (at your option) any later version.
12

  
13
    This program is distributed in the hope that it will be useful,
14
    but WITHOUT ANY WARRANTY; without even the implied warranty of
15
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
    GNU General Public License for more details.
17

  
18
    You should have received a copy of the GNU General Public License
19
    along with this program; if not, write to the Free Software
20
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21
    MA  02110-1301, USA.
22

  
23
    For any additional information, do not hesitate to contact us
24
    at info AT gvsig.com, or visit our website www.gvsig.com.
25

  
26
-->
27
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
28

  
29
<!-- 
30
Log4J configuration file for unit tests execution.
31
 -->
32
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
33

  
34
	<!-- Appender configuration to show logging messages through the console -->
35
	<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
36
		<layout class="org.apache.log4j.PatternLayout">
37
			<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{2}.%M()]  %m%n" />
38
		</layout>
39
	</appender>
40

  
41
	<!-- 
42
	Activate logging messages of DEBUG level of higher only for the
43
	org.gvsig.tools packages.
44
	You can put full classes names or packages instead, to configure
45
	logging for all the classes and subpackages of the package.
46
	-->
47
	<category name="org.gvsig">
48
		<priority value="WARN" />
49
	</category>
50
	<category name="org.cresques">
51
		<priority value="WARN" />
52
	</category>
53

  
54
	<!-- 
55
	By default, show only logging messages of INFO level or higher, 
56
	through the previously configured CONSOLE appender. 
57
	-->
58
	<root>
59
		<priority value="INFO" />
60
		<appender-ref ref="CONSOLE" />
61
	</root>
62
</log4j:configuration>
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.39/org.gvsig.vcsgis.main/src/main/assembly/package-main.xml
1
<assembly>
2

  
3
    <id>package-main</id>
4
    <formats>
5
        <format>dir</format>
6
        <format>zip</format>
7
    </formats>
8

  
9
    <baseDirectory>${project.artifactId}</baseDirectory>
10
    <includeBaseDirectory>false</includeBaseDirectory>
11

  
12
    <files>
13
        <file>
14
            <source>target/${project.artifactId}-${project.version}.jar</source>
15
            <outputDirectory>.</outputDirectory>
16
        </file>
17
    </files>
18

  
19
    <fileSets>
20
        <fileSet>
21
            <directory>src/main/resources/data</directory>
22
            <outputDirectory>data</outputDirectory>
23
        </fileSet>
24
    </fileSets>
25

  
26
    <dependencySets>
27
        <dependencySet>
28
            <useProjectArtifact>false</useProjectArtifact>
29
            <useTransitiveDependencies>true</useTransitiveDependencies>
30
            <outputDirectory>lib</outputDirectory>
31
        </dependencySet>
32
    </dependencySets>
33

  
34
</assembly>
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.39/org.gvsig.vcsgis.main/src/main/java/org/gvsig/vcsgis/main/Main.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright ? 2007-2020 gvSIG Association
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.vcsgis.main;
25

  
26
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer;
27

  
28
/**
29
 * Main executable class of vcsgis tool.
30
 *
31
 * @author gvSIG Team
32
 */
33
public class Main {
34

  
35
    public static void main(String args[]) {
36
        new DefaultLibrariesInitializer().fullInitialize();
37
    }
38

  
39
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.39/org.gvsig.vcsgis.main/pom.xml
1
<?xml version="1.0" encoding="ISO-8859-1"?>
2
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3
    <modelVersion>4.0.0</modelVersion>
4
    <artifactId>org.gvsig.vcsgis.main</artifactId>
5
    <packaging>jar</packaging>
6
    <name>${project.artifactId}</name>
7
    <parent>
8
        <groupId>org.gvsig</groupId>
9
        <artifactId>org.gvsig.vcsgis</artifactId>
10
        <version>1.0.0-SNAPSHOT</version>
11
    </parent>
12
  
13
  
14
    <build>
15
        <plugins>
16
            <plugin>
17
                <artifactId>maven-assembly-plugin</artifactId>
18
                <executions>
19
                    <execution>
20
                        <id>package-main</id>
21
                        <phase>package</phase>
22
                        <goals>
23
                            <goal>single</goal>
24
                        </goals>
25
                        <configuration>
26
                            <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
27
                            <appendAssemblyId>false</appendAssemblyId>
28
                            <finalName>${project.artifactId}-${project.version}</finalName>
29
                            <descriptors>
30
                                <descriptor>src/main/assembly/package-main.xml</descriptor>
31
                            </descriptors>
32
                        </configuration>
33
                    </execution>
34
                </executions>
35
            </plugin>
36

  
37
            <plugin>
38
                <groupId>org.apache.maven.plugins</groupId>
39
                <artifactId>maven-jar-plugin</artifactId>
40
                <configuration>
41
                    <archive>
42
                        <manifest>
43
                            <addClasspath>true</addClasspath>
44
                            <mainClass>org.gvsig.vcsgis.main.Main</mainClass>
45
                            <classpathPrefix>lib</classpathPrefix>
46
                        </manifest>
47
                    </archive>
48
                </configuration>
49
            </plugin>
50

  
51
        </plugins>
52

  
53
    </build>
54
  
55
  
56
    <dependencies>
57
        <dependency>
58
            <groupId>org.gvsig</groupId>
59
            <artifactId>org.gvsig.vcsgis.lib.api</artifactId>
60
            <scope>compile</scope>
61
        </dependency>
62
        <dependency>
63
            <groupId>org.gvsig</groupId>
64
            <artifactId>org.gvsig.vcsgis.swing.api</artifactId>
65
            <scope>compile</scope>
66
        </dependency>
67

  
68
        <!-- runtime dependencies -->
69
        <dependency>
70
            <groupId>org.gvsig</groupId>
71
            <artifactId>org.gvsig.vcsgis.lib.impl</artifactId>
72
            <scope>runtime</scope>
73
        </dependency>
74
        <dependency>
75
            <groupId>org.gvsig</groupId>
76
            <artifactId>org.gvsig.vcsgis.swing.impl</artifactId>
77
            <scope>compile</scope>
78
        </dependency>
79
        <dependency>
80
            <groupId>org.gvsig</groupId>
81
            <artifactId>${org.gvsig.metadata.lib.basic.impl}</artifactId>
82
            <scope>runtime</scope>
83
        </dependency>
84
        <dependency>
85
            <groupId>org.gvsig</groupId>
86
            <artifactId>org.gvsig.fmap.dal.impl</artifactId>
87
            <scope>runtime</scope>
88
        </dependency>
89
        <dependency>
90
            <groupId>org.gvsig</groupId>
91
            <artifactId>org.gvsig.fmap.dal.spi</artifactId>
92
            <scope>runtime</scope>
93
        </dependency>
94
        <dependency>
95
            <groupId>org.gvsig</groupId>
96
            <artifactId>org.gvsig.fmap.dal.file.lib</artifactId>
97
            <scope>runtime</scope>
98
        </dependency>
99
        <dependency>
100
            <groupId>org.gvsig</groupId>
101
            <artifactId>org.gvsig.fmap.dal.file.shp</artifactId>
102
            <scope>runtime</scope>
103
        </dependency>
104
        <dependency>
105
            <groupId>org.gvsig</groupId>
106
            <artifactId>org.gvsig.fmap.dal.file.dbf</artifactId>
107
            <scope>runtime</scope>
108
        </dependency>
109
        <dependency>
110
            <groupId>org.gvsig</groupId>
111
            <artifactId>org.gvsig.fmap.dal.db.lib</artifactId>
112
            <scope>runtime</scope>
113
        </dependency>
114
        <dependency>
115
            <groupId>org.gvsig</groupId>
116
            <artifactId>org.gvsig.fmap.dal.db.h2</artifactId>
117
            <scope>runtime</scope>
118
        </dependency>
119

  
120
        <dependency>
121
            <groupId>org.gvsig</groupId>
122
            <artifactId>org.gvsig.timesupport.lib.api</artifactId>
123
            <scope>runtime</scope>
124
        </dependency>
125
        <dependency>
126
            <groupId>org.gvsig</groupId>
127
            <artifactId>${org.gvsig.timesupport.lib.impl}</artifactId>
128
            <scope>runtime</scope>
129
        </dependency>
130

  
131
        <dependency>
132
            <groupId>org.gvsig</groupId>
133
            <artifactId>${org.gvsig.compat.impl}</artifactId>
134
            <scope>runtime</scope>
135
        </dependency>
136
        <dependency>
137
            <groupId>org.gvsig</groupId>
138
            <artifactId>${org.gvsig.fmap.geometry.impl}</artifactId>
139
            <scope>runtime</scope>
140
        </dependency>
141

  
142
        <dependency>
143
            <groupId>org.gvsig</groupId>            
144
            <artifactId>${org.gvsig.proj.lib.impl}</artifactId>
145
            <scope>runtime</scope>
146
        </dependency>
147

  
148
        <dependency>
149
            <groupId>org.gvsig</groupId>
150
            <artifactId>org.gvsig.tools.swing.api</artifactId>
151
            <scope>runtime</scope>
152
        </dependency>
153
        <dependency>
154
            <groupId>org.gvsig</groupId>
155
            <artifactId>org.gvsig.tools.swing.impl</artifactId>
156
            <scope>runtime</scope>
157
        </dependency>
158

  
159

  
160
    </dependencies>
161
</project>
0 162

  
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.39/org.gvsig.vcsgis.lib/pom.xml
1
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2
  <modelVersion>4.0.0</modelVersion>
3
  <parent>
4
    <groupId>org.gvsig</groupId>
5
    <artifactId>org.gvsig.vcsgis</artifactId>
6
    <version>1.0.39</version>
7
  </parent>
8
  <artifactId>org.gvsig.vcsgis.lib</artifactId>
9
  <packaging>pom</packaging>
10
  <modules>
11
    <module>org.gvsig.vcsgis.lib.api</module>
12
    <module>org.gvsig.vcsgis.lib.impl</module>
13
  </modules>
14
</project>
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.39/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
1
org.gvsig.vcsgis.lib.VCSGisLibrary
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.39/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/resources/org/gvsig/vcsgis/lib/vcsgisapiservices.json
1
{
2
  "openapi": "3.0.1",
3
  "info": {
4
    "title": "VCSGis Simple API",
5
    "description": "Simple API to access VCSGis services",
6
    "version": "1.0.0"
7
  },
8
  "paths": {
9
    "/rowcreate": {
10
      "post": {
11
        "summary": "Create a new record in a table/entity",
12
        "operationId": "RowCreate",
13
        "requestBody": {
14
          "description": "Data for creating the new record",
15
          "content": {
16
            "application/json": {
17
              "schema": {
18
                "$ref": "#/components/schemas/RowCreateRequest"
19
              }
20
            }
21
          },
22
          "required": true
23
        },
24
        "responses": {
25
          "200": {
26
            "description": "successful operation",
27
            "content": {
28
              "application/json": {
29
                "schema": {
30
                  "$ref": "#/components/schemas/RowCreateResponse"
31
                }
32
              }
33
            }
34
          }
35
        }
36
      }
37
    },
38
    "/rowupdate": {
39
      "post": {
40
        "summary": "Update a record in a table/entity",
41
        "operationId": "RowUpdate",
42
        "requestBody": {
43
          "description": "Data for updating a record",
44
          "content": {
45
            "application/json": {
46
              "schema": {
47
                "$ref": "#/components/schemas/RowUpdateRequest"
48
              }
49
            }
50
          },
51
          "required": true
52
        },
53
        "responses": {
54
          "200": {
55
            "description": "successful operation",
56
            "content": {
57
              "application/json": {
58
                "schema": {
59
                  "$ref": "#/components/schemas/RowUpdateResponse"
60
                }
61
              }
62
            }
63
          }
64
        }
65
      }
66
    },
67
    "/rowdelete": {
68
      "post": {
69
        "summary": "Delete a record in a table/entity",
70
        "operationId": "RowDelete",
71
        "requestBody": {
72
          "description": "Data for deletion of a record",
73
          "content": {
74
            "application/json": {
75
              "schema": {
76
                "$ref": "#/components/schemas/RowDeleteRequest"
77
              }
78
            }
79
          },
80
          "required": true
81
        },
82
        "responses": {
83
          "200": {
84
            "description": "successful operation",
85
            "content": {
86
              "application/json": {
87
                "schema": {
88
                  "$ref": "#/components/schemas/RowDeleteResponse"
89
                }
90
              }
91
            }
92
          }
93
        }
94
      }
95
    },
96
    "/update": {
97
      "post": {
98
        "summary": "Brings changes from the repository to your working copy.",
99
        "operationId": "Update",
100
        "requestBody": {
101
          "description": "It contains the information to determine what data should be sent to the client.",
102
          "content": {
103
            "application/json": {
104
              "schema": {
105
                "$ref": "#/components/schemas/UpdateRequest"
106
              }
107
            }
108
          },
109
          "required": true
110
        },
111
        "responses": {
112
          "200": {
113
            "description": "successful operation",
114
            "content": {
115
              "application/json": {
116
                "schema": {
117
                  "$ref": "#/components/schemas/UpdateResponse"
118
                }
119
              }
120
            }
121
          }
122
        }
123
      }
124
    }
125
  },
126
  "components": {
127
    "examples": {
128
      "ObjectEntity": {
129
        "summary": "Entity example",
130
        "value": {
131
          "EntityCode": "00000000000002abcdef0123456789",
132
          "EntityName": "test",
133
          "DatatableName": "VCSGIS_DATA",
134
          "Description": "",
135
          "FeatureIdFieldName": "VCSGISCODE",
136
          "FeatureTypeAsJson": "...",
137
          "FieldForLabel": "text",
138
          "GeometryFieldName": "",
139
          "RevisionCode": "00000000000034abcdef0123456789",
140
          "TopologyPlanCode": "",
141
          "UserCode": "00000000000001abcdef0123456789"
142
        }
143
      },
144
      "ObjectUpdateEntry": {
145
        "summary": "UpdateEntry example",
146
        "value": {
147
          "DataCode": "00000000000100abcdef0123456789",
148
          "EntityCode": "00000000000002abcdef0123456789",
149
          "RevisionCode": "00000000000034abcdef0123456789",
150
          "Operation": 1,
151
          "RevisionNumber": 4,
152
          "EfectiveDate": "2020-02-19 10:11:12.123",
153
          "FeatureRelatedCode": "00000000000022abcdef0123456789",
154
          "Data": "{ \"id\": 4, \"text\": \"DD2\", \"VCSGISCODE\": \"00000000000022abcdef0123456789\"}"
155
        }
156
      }
157
    },
158
    "schemas": {
159
      "RowCreateRequest": {
160
        "required": [
161
          "EntityName",
162
          "LocalRevisionCode",
163
          "Data"
164
        ],
165
        "type": "object",
166
        "description": "This object represents a request to create a new record in a table.\n\nWhen the record is created, a unique code will be assigned with the VCS, overwriting the value of the VCSGISCODE attribute with the new value.",
167
        "example": {
168
          "EntityName": "test",
169
          "LocalRevisionCode": "00000000000014abcdef0123456789",
170
          "EfectiveDate": "2020-02-18 10:11:12.123",
171
          "Comment": "test row create (4, ddd)",
172
          "Data": "{ \"id\": 4, \"text\": \"DDD\", \"VCSGISCODE\": \"\"}"
173
        },
174
        "properties": {
175
          "EntityName": {
176
            "type": "string",
177
            "description": "Name of the table in which to create the new record"
178
          },
179
          "LocalRevisionCode": {
180
            "type": "string",
181
            "format": "string40",
182
            "description": "Code of the revision in which the client data is found"
183
          },
184
          "EfectiveDate": {
185
            "type": "string",
186
            "format": "timestamp",
187
            "description": "Efective date of the operation, in the format yyyy-mm-dd hh: MM: ss.LLL. In case of being null, the current date will be assigned."
188
          },
189
          "Comment": {
190
            "type": "string",
191
            "description": "Comment associated with the operation to be performed. It can be null."
192
          },
193
          "Data": {
194
            "type": "string",
195
            "description": "The feature data to create in the table coded as a string json. If the feature has the VCSGISCODE field it will be overwritten, assigning a new code to it."
196
          }
197
        }
198
      },
199
      "RowCreateResponse": {
200
        "type": "object",
201
        "description": "This object represents the response to a request to create a new record in a table.\n\nYou will inform us of the status of the request, as well as:\n  - The code of the new record created.\n  - The code of the revision in which the\n    table on the server.",
202
        "example": {
203
          "StatusCode": 0,
204
          "StatusMessage": "",
205
          "RelatedFeatureCode": "00000000000022abcdef0123456789",
206
          "EntityName": "test",
207
          "EntityCode": "00000000000002abcdef0123456789",
208
          "RevisionCode": "00000000000024abcdef0123456789"
209
        },
210
        "properties": {
211
          "StatusCode": {
212
            "type": "integer",
213
            "description": "Status code of the operation. Zero when the operation has been done correctly."
214
          },
215
          "StatusMessage": {
216
            "type": "string",
217
            "description": "In case the operation did not go well, a message describing the problem."
218
          },
219
          "RelatedFeatureCode": {
220
            "type": "string",
221
            "format": "string40",
222
            "description": "Code assigned to the VCSGISCODE field of the new record, which represents the identifier of this in the VCS."
223
          },
224
          "EntityName": {
225
            "type": "string",
226
            "description": "Name of the table in which the new one was requested to be created registry"
227
          },
228
          "EntityCode": {
229
            "type": "string",
230
            "format": "string40",
231
            "description": "Internal code associated with the table to identify it in a way Unique."
232
          },
233
          "RevisionCode": {
234
            "type": "string",
235
            "format": "string40",
236
            "description": "Code of the revision in which the data is found in the server after the operation is performed."
237
          }
238
        }
239
      },
240
      "RowUpdateRequest": {
241
        "required": [
242
          "EntityName",
243
          "LocalRevisionCode",
244
          "Data"
245
        ],
246
        "type": "object",
247
        "description": "This object represents a request to update a record in a table.\nIt is essential that the value of the VCSGISCODE attribute of the  data of the record that we want to update has the correct code,  since it is used to identify the record we want to update.",
248
        "example": {
249
          "EntityName": "test",
250
          "LocalRevisionCode": "00000000000024abcdef0123456789",
251
          "EfectiveDate": null,
252
          "Comment": "test row update (4, dd2)",
253
          "Data": "{ \"id\": 4, \"text\": \"DD2\", \"VCSGISCODE\": \"00000000000022abcdef0123456789\"}"
254
        },
255
        "properties": {
256
          "EntityName": {
257
            "type": "string",
258
            "description": "Name of the table in which the record is requested to be updated"
259
          },
260
          "LocalRevisionCode": {
261
            "type": "string",
262
            "format": "string40",
263
            "description": "Code of the revision in which the client data is located"
264
          },
265
          "EfectiveDate": {
266
            "type": "string",
267
            "format": "timestamp",
268
            "description": "Efective date of the operation, in the format yyyy-mm-dd hh: MM: ss.LLL. In case of being null, the current date will be assigned."
269
          },
270
          "Comment": {
271
            "type": "string",
272
            "description": "Comment associated with the operation to be performed. It can be null."
273
          },
274
          "Data": {
275
            "type": "string",
276
            "description": "The feature data to create in the table coded as a string json. The VCSGISCODE attribute must have a valid code and It will identify the record that is being updated."
277
          }
278
        }
279
      },
280
      "RowUpdateResponse": {
281
        "type": "object",
282
        "description": "This object represents the response to a request to update a record in a table.",
283
        "example": {
284
          "StatusCode": 0,
285
          "StatusMessage": "",
286
          "EntityName": "test",
287
          "EntityCode": "00000000000002abcdef0123456789",
288
          "RevisionCode": "00000000000029abcdef0123456789"
289
        },
290
        "properties": {
291
          "StatusCode": {
292
            "type": "integer",
293
            "description": "Operation status code. Zero when the operation has done correctly."
294
          },
295
          "StatusMessage": {
296
            "type": "string",
297
            "description": "In case the operation did not go well, a message describing the problem."
298
          },
299
          "EntityName": {
300
            "type": "string",
301
            "description": "Name of the table in which the requested was create the new record"
302
          },
303
          "EntityCode": {
304
            "type": "string",
305
            "format": "string40",
306
            "description": "Internal code associated with the table to identify."
307
          },
308
          "RevisionCode": {
309
            "type": "string",
310
            "format": "string40",
311
            "description": "Code of the revision in which the data is found in the server after the operation is performed."
312
          }
313
        }
314
      },
315
      "RowDeleteRequest": {
316
        "required": [
317
          "EntityName",
318
          "LocalRevisionCode",
319
          "RelatedFeatureCode"
320
        ],
321
        "type": "object",
322
        "description": "This object represents a request to delete a record in a table.\n\nThe record to be deleted will be identified by the value of the *RelatedFeatureCode* attribute.",
323
        "example": {
324
          "EntityName": "test",
325
          "LocalRevisionCode": "00000000000029abcdef0123456789",
326
          "RelatedFeatureCode": "00000000000022abcdef0123456789",
327
          "EfectiveDate": "2020-02-19 10:11:12.123",
328
          "Comment": "test row delete (4, dd2)"
329
        },
330
        "properties": {
331
          "EntityName": {
332
            "type": "string",
333
            "description": "Name of the table in which to delete the record"
334
          },
335
          "LocalRevisionCode": {
336
            "type": "string",
337
            "format": "string40",
338
            "description": "Code of the revision in which the client data is located"
339
          },
340
          "EfectiveDate": {
341
            "type": "string",
342
            "format": "timestamp",
343
            "description": "Efective date of the operation, in the format yyyy-mm-dd hh: MM: ss.LLL. In case of being null, the current date will be assigned."
344
          },
345
          "Comment": {
346
            "type": "string",
347
            "description": "Comment associated with the operation to be performed. It can be null."
348
          },
349
          "RelatedFeatureCode": {
350
            "type": "string",
351
            "format": "string40",
352
            "description": "Code of the record to be deleted. Delete the record that have the value of the VCSGISCODE attribute as the value of this field."
353
          }
354
        }
355
      },
356
      "RowDeleteResponse": {
357
        "type": "object",
358
        "description": "This object represents the response to a request to delete a record in a table.",
359
        "example": {
360
          "StatusCode": 0,
361
          "StatusMessage": "",
362
          "EntityName": "test",
363
          "EntityCode": "00000000000002abcdef0123456789",
364
          "RevisionCode": "00000000000034abcdef0123456789"
365
        },
366
        "properties": {
367
          "StatusCode": {
368
            "type": "integer",
369
            "description": "Operation status code. Zero when the operation has done correctly."
370
          },
371
          "StatusMessage": {
372
            "type": "string",
373
            "description": "In case the operation did not go well, a message describing the problem."
374
          },
375
          "EntityName": {
376
            "type": "string",
377
            "description": "Name of the table in which the new one was requested to be created registry"
378
          },
379
          "EntityCode": {
380
            "type": "string",
381
            "format": "string40",
382
            "description": "Internal code associated with the table to identify."
383
          },
384
          "RevisionCode": {
385
            "type": "string",
386
            "format": "string40",
387
            "description": "Code of the revision in which the data is found in the server after the operation is performed."
388
          }
389
        }
390
      },
391
      "Entity": {
392
        "type": "object",
393
        "description": "This object represents an entity or table on the server.  It contains the metadata of this, such as its name, code, code of  the last revision, user who created it ...",
394
        "properties": {
395
          "EntityCode": {
396
            "type": "string",
397
            "format": "string40",
398
            "description": "Code of this entity"
399
          },
400
          "EntityName": {
401
            "type": "string",
402
            "description": "Name of this entity"
403
          },
404
          "DatatableName": {
405
            "type": "string",
406
            "description": "Name of the table in which the entity's data is stored"
407
          },
408
          "Description": {
409
            "type": "string"
410
          },
411
          "FeatureIdFieldName": {
412
            "type": "string"
413
          },
414
          "FeatureTypeAsJson": {
415
            "type": "string"
416
          },
417
          "FieldForLabel": {
418
            "type": "string"
419
          },
420
          "GeometryFieldName": {
421
            "type": "string"
422
          },
423
          "RevisionCode": {
424
            "type": "string"
425
          },
426
          "TopologyPlanCode": {
427
            "type": "string"
428
          },
429
          "UserCode": {
430
            "type": "string"
431
          }
432
        }
433
      },
434
      "UpdateEntry": {
435
        "type": "object",
436
        "description": "This object defines the data associated with a record that has  changed in a table. It tells us if we should delete our record  from the working copy, update it or insert a new one, as well  as the data associated with the records.",
437
        "properties": {
438
          "DataCode": {
439
            "type": "string",
440
            "description": "Unique identifier asociated to this entry."
441
          },
442
          "EntityCode": {
443
            "type": "string",
444
            "description": "The entity code, table, asociated to this entry."
445
          },
446
          "RevisionCode": {
447
            "type": "string",
448
            "description": "The revision code asociated to this entry."
449
          },
450
          "Operation": {
451
            "type": "integer",
452
            "description": "The operation asociated to this entry:\n  - 0 for delete\n  - 1 for update\n  - 2 for insert",
453
            "enum": [
454
              0,
455
              1,
456
              2
457
            ]
458
          },
459
          "RevisionNumber": {
460
            "type": "string",
461
            "description": "The revision number asociated to this entry"
462
          },
463
          "EfectiveDate": {
464
            "type": "string",
465
            "format": "timestamp",
466
            "description": "The efective date asociated to this entry"
467
          },
468
          "FeatureRelatedCode": {
469
            "type": "string",
470
            "description": "The code that identify the feature in the VCS."
471
          },
472
          "Data": {
473
            "type": "string",
474
            "description": "The feature data coded as a json string."
475
          }
476
        }
477
      },
478
      "UpdateRequest": {
479
        "required": [
480
          "EntityName",
481
          "LocalRevisionCode"
482
        ],
483
        "type": "object",
484
        "description": "This object contains the information necessary to determine what  data should be sent to the client so that the data of a table is  updated with the last revision of this one.",
485
        "example": {
486
          "EntityName": "test",
487
          "LocalRevisionCode": "00000000000024abcdef0123456789"
488
        },
489
        "properties": {
490
          "EntityName": {
491
            "type": "string",
492
            "description": "Name of the table we want to update"
493
          },
494
          "LocalRevisionCode": {
495
            "type": "string",
496
            "format": "string40",
497
            "description": "Code of the revision in which the client data is located"
498
          }
499
        }
500
      },
501
      "UpdateResponse": {
502
        "type": "object",
503
        "description": "It contains the necessary data to update the local table and to go  from being in the revision in which it is to the last revision  that the server contains.",
504
        "example": {
505
          "StatusCode": 0,
506
          "StatusMessage": "",
507
          "Entity": {
508
            "$ref": "#/components/examples/ObjectEntity/value"
509
          },
510
          "Data": [
511
            {
512
              "$ref": "#/components/examples/ObjectUpdateEntry/value"
513
            }
514
          ]
515
        },
516
        "properties": {
517
          "StatusCode": {
518
            "type": "integer",
519
            "description": "Operation status code. Zero when the operation has done correctly."
520
          },
521
          "StatusMessage": {
522
            "type": "string",
523
            "description": "In case the operation did not go well, a message describing the problem."
524
          },
525
          "Entity": {
526
            "$ref": "#/components/schemas/Entity"
527
          },
528
          "Data": {
529
            "type": "array",
530
            "items": {
531
              "$ref": "#/components/schemas/UpdateEntry"
532
            }
533
          }
534
        }
535
      }
536
    }
537
  }
538
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.39/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/resources/org/gvsig/vcsgis/lib/vcsgisapiservices.yaml
1
#
2
# https://editor.swagger.io/
3
#
4
openapi: 3.0.1
5
info:
6
  title: VCSGis Simple API
7
  description: >-
8
    Simple API to access VCSGis services
9
  version: 1.0.0
10
tags:
11
  - name: Application API
12
    description: >
13
      They provide the commands necessary to implement a 
14
      desktop client of a VCS.
15
  - name: Developers API
16
    description: >
17
      It exposes services to facilitate integration with 
18
      third-party applications.
19
paths:
20
  /rowcreate:
21
    post:
22
      tags:
23
        - Develeloppers API
24
      summary: >
25
          Create a new record in a table/entity
26
      operationId: RowCreate
27
      requestBody:
28
        description: >
29
          Data for creating the new record
30
        content:
31
          application/json:
32
            schema:
33
              $ref: '#/components/schemas/RowCreateRequest'
34
        required: true
35
      responses:
36
        '200':
37
          description: successful operation
38
          content:
39
            application/json:
40
              schema:
41
                $ref: '#/components/schemas/RowCreateResponse'
42
  /rowupdate:
43
    post:
44
      tags:
45
        - Develeloppers API
46
      summary: >
47
          Update a record in a table/entity
48
      operationId: RowUpdate
49
      requestBody:
50
        description: >
51
          Data for updating a record
52
        content:
53
          application/json:
54
            schema:
55
              $ref: '#/components/schemas/RowUpdateRequest'
56
        required: true
57
      responses:
58
        '200':
59
          description: successful operation
60
          content:
61
            application/json:
62
              schema:
63
                $ref: '#/components/schemas/RowUpdateResponse'
64
  /rowdelete:
65
    post:
66
      tags:
67
        - Develeloppers API
68
      summary: >
69
        Delete a record in a table/entity
70
      operationId: RowDelete
71
      requestBody:
72
        description: >
73
          Data for deletion of a record
74
        content:
75
          application/json:
76
            schema:
77
              $ref: '#/components/schemas/RowDeleteRequest'
78
        required: true
79
      responses:
80
        '200':
81
          description: successful operation
82
          content:
83
            application/json:
84
              schema:
85
                $ref: '#/components/schemas/RowDeleteResponse'
86
  /update:
87
    post:
88
      tags:
89
        - Application API
90
      summary: >
91
         Brings changes from the repository to your working copy.
92
      operationId: Update
93
      requestBody:
94
        description: >
95
          It contains the information to determine what data should be sent to the client.
96
        content:
97
          application/json:
98
            schema:
99
              $ref: '#/components/schemas/UpdateRequest'
100
        required: true
101
      responses:
102
        '200':
103
          description: successful operation
104
          content:
105
            application/json:
106
              schema:
107
                $ref: '#/components/schemas/UpdateResponse'
108
components:
109
  examples:
110
    ObjectEntity:
111
      summary: Entity example
112
      value:
113
        EntityCode: "00000000000002abcdef0123456789"
114
        EntityName: "test"
115
        DatatableName: "VCSGIS_DATA"
116
        Description: ""
117
        FeatureIdFieldName: "VCSGISCODE"
118
        FeatureTypeAsJson: "..."
119
        FieldForLabel: "text"
120
        GeometryFieldName: ""
121
        RevisionCode: "00000000000034abcdef0123456789"
122
        TopologyPlanCode: ""
123
        UserCode: "00000000000001abcdef0123456789"
124
        
125
    ObjectUpdateEntry: 
126
      summary: UpdateEntry example
127
      value:
128
        DataCode: "00000000000100abcdef0123456789"
129
        EntityCode: "00000000000002abcdef0123456789"
130
        RevisionCode: "00000000000034abcdef0123456789"
131
        Operation: 1
132
        RevisionNumber: 4
133
        EfectiveDate: "2020-02-19 10:11:12.123"
134
        FeatureRelatedCode: "00000000000022abcdef0123456789"
135
        Data: "{ \"id\": 4, \"text\": \"DD2\", \"VCSGISCODE\": \"00000000000022abcdef0123456789\"}"    
136

  
137
  schemas:
138
    RowCreateRequest:
139
      required:
140
      - EntityName
141
      - LocalRevisionCode
142
      - Data
143
      type: object
144
      description: >
145
        This object represents a request to create a new record in a
146
        table.
147

  
148
        When the record is created, a unique code will be assigned with
149
        the VCS, overwriting the value of the VCSGISCODE attribute with the new
150
        value.
151

  
152
      example:
153
        EntityName: "test"
154
        LocalRevisionCode: "00000000000014abcdef0123456789"
155
        EfectiveDate: "2020-02-18 10:11:12.123"
156
        Comment: "test row create (4, ddd)"
157
        Data: "{ \"id\": 4, \"text\": \"DDD\", \"VCSGISCODE\": \"\"}"
158
      properties:
159
        EntityName:
160
          type: string
161
          description: >
162
            Name of the table in which to create the new record
163
        LocalRevisionCode:
164
          type: string
165
          format: string40
166
          description: >
167
            Code of the revision in which the client data is found
168
        EfectiveDate:
169
          type: string
170
          format: timestamp
171
          description: >
172
            Efective date of the operation, in the format yyyy-mm-dd
173
            hh: MM: ss.LLL. In case of being null, the current date will be assigned.
174
        Comment:
175
          type: string
176
          description: >
177
            Comment associated with the operation to be performed. It can be null.
178
        Data:
179
          type: string
180
          description: >
181
            The feature data to create in the table coded as a
182
            string json. If the feature has the VCSGISCODE field it will be
183
            overwritten, assigning a new code to it.
184
            
185
    RowCreateResponse:
186
      type: object
187
      description: >
188
        This object represents the response to a request to create a new
189
        record in a table.
190

  
191

  
192
        You will inform us of the status of the request, as well as:
193
          - The code of the new record created.
194
          - The code of the revision in which the
195
            table on the server.
196

  
197
      example:
198
        StatusCode: 0
199
        StatusMessage: ""
200
        RelatedFeatureCode: "00000000000022abcdef0123456789"
201
        EntityName: "test"
202
        EntityCode: "00000000000002abcdef0123456789"
203
        RevisionCode: "00000000000024abcdef0123456789"
204

  
205
      properties:
206
        StatusCode:
207
          type: integer
208
          description: >
209
            Status code of the operation. Zero when the operation has been
210
            done correctly.
211
        StatusMessage:
212
          type: string
213
          description: >
214
            In case the operation did not go well, a message describing
215
            the problem.
216
        RelatedFeatureCode:
217
          type: string
218
          format: string40
219
          description: >
220
            Code assigned to the VCSGISCODE field of the new record, which
221
            represents the identifier of this in the VCS.
222
        EntityName:
223
          type: string
224
          description: >
225
            Name of the table in which the new one was requested to be created
226
            registry
227
        EntityCode:
228
          type: string
229
          format: string40
230
          description: >
231
            Internal code associated with the table to identify it in a way
232
            Unique.
233
        RevisionCode:
234
          type: string
235
          format: string40
236
          description: >
237
            Code of the revision in which the data is found in the
238
            server after the operation is performed.
239

  
240

  
241
    RowUpdateRequest:
242
      required:
243
      - EntityName
244
      - LocalRevisionCode
245
      - Data
246
      type: object
247
      description: >
248
        This object represents a request to update a record in a
249
        table.
250

  
251
        It is essential that the value of the VCSGISCODE attribute of the 
252
        data of the record that we want to update has the correct code, 
253
        since it is used to identify the record we want to update.
254

  
255
      example:
256
        EntityName: "test"
257
        LocalRevisionCode: "00000000000024abcdef0123456789"
258
        EfectiveDate: null
259
        Comment: "test row update (4, dd2)"
260
        Data: "{ \"id\": 4, \"text\": \"DD2\", \"VCSGISCODE\": \"00000000000022abcdef0123456789\"}"
261
      properties:
262
        EntityName:
263
          type: string
264
          description: >
265
            Name of the table in which the record is requested to be updated
266
        LocalRevisionCode:
267
          type: string
268
          format: string40
269
          description: >
270
            Code of the revision in which the client data is located
271
        EfectiveDate:
272
          type: string
273
          format: timestamp
274
          description: >
275
            Efective date of the operation, in the format yyyy-mm-dd
276
            hh:MM:ss.LLL. In case of being null, the current date will be assigned.
277
        Comment:
278
          type: string
279
          description: >
280
            Comment associated with the operation to be performed. It can be null.
281
        Data:
282
          type: string
283
          description: >
284
            The feature data to create in the table coded as a
285
            string json. The VCSGISCODE attribute must have a valid code and
286
            It will identify the record that is being updated.
287
            
288
    RowUpdateResponse:
289
      type: object
290
      description: >
291
        This object represents the response to a request to update a
292
        record in a table.
293

  
294
      example:
295
        StatusCode: 0
296
        StatusMessage: ""
297
        EntityName: "test"
298
        EntityCode: "00000000000002abcdef0123456789"
299
        RevisionCode: "00000000000029abcdef0123456789"
300
      properties:
301
        StatusCode:
302
          type: integer
303
          description: >
304
            Operation status code. Zero when the operation has
305
            done correctly.
306
        StatusMessage:
307
          type: string
308
          description: >
309
            In case the operation did not go well, a message describing
310
            the problem.
311
        EntityName:
312
          type: string
313
          description: >
314
            Name of the table in which the requested was create the new record
315
        EntityCode:
316
          type: string
317
          format: string40
318
          description: >
319
            Internal code associated with the table to identify.
320
        RevisionCode:
321
          type: string
322
          format: string40
323
          description: >
324
            Code of the revision in which the data is found in the
325
            server after the operation is performed.
326

  
327
    RowDeleteRequest:
328
      required:
329
      - EntityName
330
      - LocalRevisionCode
331
      - RelatedFeatureCode
332
      type: object
333
      description: >
334
        This object represents a request to delete a record in a
335
        table.
336

  
337

  
338
        The record to be deleted will be identified by the value of the
339
        *RelatedFeatureCode* attribute.
340

  
341
      example:
342
        EntityName: "test"
343
        LocalRevisionCode: "00000000000029abcdef0123456789"
344
        RelatedFeatureCode: "00000000000022abcdef0123456789"
345
        EfectiveDate: "2020-02-19 10:11:12.123"
346
        Comment: "test row delete (4, dd2)"
347
      properties:
348
        EntityName:
349
          type: string
350
          description: >
351
            Name of the table in which to delete the record
352
        LocalRevisionCode:
353
          type: string
354
          format: string40
355
          description: >
356
            Code of the revision in which the client data is located
357
        EfectiveDate:
358
          type: string
359
          format: timestamp
360
          description: >
361
            Efective date of the operation, in the format yyyy-mm-dd
362
            hh:MM:ss.LLL. In case of being null, the current date will be assigned.
363
        Comment:
364
          type: string
365
          description: >
366
            Comment associated with the operation to be performed. It can be null.
367
        RelatedFeatureCode:
368
          type: string
369
          format: string40
370
          description: >
371
            Code of the record to be deleted. Delete the record that
372
            have the value of the VCSGISCODE attribute as the value of this field.
373
    RowDeleteResponse:
374
      type: object
375
      description: >
376
        This object represents the response to a request to delete a
377
        record in a table.
378

  
379
      example:
380
        StatusCode: 0
381
        StatusMessage: ""
382
        EntityName: "test"
383
        EntityCode: "00000000000002abcdef0123456789"
384
        RevisionCode: "00000000000034abcdef0123456789"
385
      properties:
386
        StatusCode:
387
          type: integer
388
          description: >
389
            Operation status code. Zero when the operation has
390
            done correctly.
391
        StatusMessage:
392
          type: string
393
          description: >
394
            In case the operation did not go well, a message describing
395
            the problem.
396
        EntityName:
397
          type: string
398
          description: >
399
            Name of the table in which the new one was requested to be created
400
            registry
401
        EntityCode:
402
          type: string
403
          format: string40
404
          description: >
405
            Internal code associated with the table to identify.
406
        RevisionCode:
407
          type: string
408
          format: string40
409
          description: >
410
            Code of the revision in which the data is found in the
411
            server after the operation is performed.
412

  
413
    Entity:
414
      type: object
415
      description: >
416
        This object represents an entity or table on the server. 
417
        It contains the metadata of this, such as its name, code, code of 
418
        the last revision, user who created it ...
419

  
420
      properties:
421
        EntityCode:
422
          type: string
423
          format: string40
424
          description: >
425
            Code of this entity
426
        EntityName:
427
          type: string
428
          description: >
429
            Name of this entity
430
        DatatableName:
431
          type: string
432
          description: >
433
            Name of the table in which the entity's data is stored
434
        Description:
435
          type: string
436
        FeatureIdFieldName:
437
          type: string
438
        FeatureTypeAsJson:
439
          type: string
440
        FieldForLabel:
441
          type: string
442
        GeometryFieldName:
443
          type: string
444
        RevisionCode:
445
          type: string
446
        TopologyPlanCode:
447
          type: string
448
        UserCode:
449
          type: string
450

  
451
    UpdateEntry:
452
      type: object
453
      description: >
454
        This object defines the data associated with a record that has 
455
        changed in a table. It tells us if we should delete our record 
456
        from the working copy, update it or insert a new one, as well 
457
        as the data associated with the records.
458
      properties:
459
        DataCode:
460
          type: string
461
          description: >
462
            Unique identifier asociated to this entry.
463
        EntityCode:
464
          type: string
465
          description: >
466
            The entity code, table, asociated to this entry.
467
        RevisionCode:
468
          type: string
469
          description: >
470
            The revision code asociated to this entry.
471
        Operation:
472
          type: integer
473
          description: >
474
            The operation asociated to this entry:
475
              - 0 for delete
476
              - 1 for update
477
              - 2 for insert
478
          enum:
479
            - 0 # Delete
480
            - 1 # Update
481
            - 2 # Insert
482
        RevisionNumber:
483
          type: string
484
          description: >
485
            The revision number asociated to this entry
486
        EfectiveDate:
487
          type: string
488
          format: timestamp
489
          description: >
490
            The efective date asociated to this entry
491
        FeatureRelatedCode:
492
          type: string
493
          description: >
494
            The code that identify the feature in the VCS.
495
        Data:
496
          type: string
497
          description: >
498
            The feature data coded as a json string.
499

  
500
    UpdateRequest:
501
      required:
502
      - EntityName
503
      - LocalRevisionCode
504
      type: object
505
      description: >
506
        This object contains the information necessary to determine what 
507
        data should be sent to the client so that the data of a table is 
508
        updated with the last revision of this one.
509

  
510
      example:
511
        EntityName: "test"
512
        LocalRevisionCode: "00000000000024abcdef0123456789"
513
      properties:
514
        EntityName:
515
          type: string
516
          description: >
517
            Name of the table we want to update
518
        LocalRevisionCode:
519
          type: string
520
          format: string40
521
          description: >
522
            Code of the revision in which the client data is located
523

  
524
    UpdateResponse:
525
      type: object
526
      description: >
527
        It contains the necessary data to update the local table and to go 
528
        from being in the revision in which it is to the last revision 
529
        that the server contains.
530
      example:
531
        StatusCode: 0
532
        StatusMessage: ""
533
        Entity:
534
          $ref: '#/components/examples/ObjectEntity/value'
535
        Data: 
536
            - $ref: '#/components/examples/ObjectUpdateEntry/value'
537

  
538
      properties:
539
        StatusCode:
540
          type: integer
541
          description: >
542
            Operation status code. Zero when the operation has
543
            done correctly.
544
        StatusMessage:
545
          type: string
546
          description: >
547
            In case the operation did not go well, a message describing
548
            the problem.
549
        Entity:
550
          $ref: "#/components/schemas/Entity"
551
        Data:
552
          type: "array"
553
          items:
554
            $ref: "#/components/schemas/UpdateEntry"
555
            
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff