Skip to content

Commit 9e662a7

Browse files
authored
Merge pull request #4330 from kalxas/metadata_schema
Adding Metadata schema for WP1 for QEP-91
2 parents 87e2aab + 944ce5f commit 9e662a7

File tree

2 files changed

+396
-0
lines changed

2 files changed

+396
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ResourceMetadata xmlns="http://qgis.org/resource-metadata/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" xsi:schemaLocation="http://qgis.org/resource-metadata/1.0 qgis-resource-metadata.xsd">
3+
<identifier>1234</identifier>
4+
<parentidentifier>xyz</parentidentifier>
5+
<language>en-CA</language>
6+
<type>dataset</type>
7+
<title>roads</title>
8+
<abstract>my roads</abstract>
9+
<keywords vocabulary="GEMET">
10+
<keyword>kw1</keyword>
11+
<keyword>kw2</keyword>
12+
</keywords>
13+
<fees>None</fees>
14+
<constraints type="access">None<constraints>
15+
<rights>Copyright foo 2017</rights>
16+
<encoding>utf-8</encoding>
17+
<crs>EPSG:4326</crs>
18+
<extent>
19+
<spatial dimensions="2" crs="EPSG:4326" minx="-180" miny="-90" maxx="180" maxy="90"/>
20+
<temporal>
21+
<instant>2001-12-17T09:30:47Z</instant>
22+
</temporal>
23+
</extent>
24+
<contact>
25+
<name>John Smith</name>
26+
<organization>ACME</organization>
27+
<position>staff</position>
28+
<address>
29+
<type>postal</type>
30+
<address>123 Main Street</address>
31+
<city>anycity</city>
32+
<administrativearea>anyprovince</administrativearea>
33+
<postalcode>90210</postalcode>
34+
<country>Canada</country>
35+
</address>
36+
<voice>xx.xxx.xxx.xxxx</voice>
37+
<fax>xx.xxx.xxx.xxxx</fax>
38+
<email>foo@example.org</email>
39+
<role>pointOfContact</role>
40+
</contact>
41+
<links>
42+
<link name="geonode:roads" type="OGC:WMS" description="my GeoNode road layer" url="http://example.org/wms"/>
43+
<link name="geonode:roads" type="OGC:WFS" description="my GeoNode road layer" url="http://example.org/wfs"/>
44+
<link name="roads" type="WWW:LINK" description="full dataset download" url="http://example.org/roads.tgz" format="ESRI Shapefile" mimeType="application/gzip" size="283676"/>
45+
</links>
46+
</ResourceMetadata>
Lines changed: 350 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,350 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
###############################################################################
4+
#
5+
# Copyright (C) 2017 Tom Kralidis (tomkralidis@gmail.com)
6+
# Copyright (C) 2017 Angelos Tzotsos (gcpp.kalxas@gmail.com)
7+
#
8+
# This source is free software; you can redistribute it and/or modify it under
9+
# the terms of the GNU General Public License as published by the Free
10+
# Software Foundation; either version 2 of the License, or (at your option)
11+
# any later version.
12+
#
13+
# This code is distributed in the hope that it will be useful, but WITHOUT ANY
14+
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15+
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
16+
# details.
17+
#
18+
# You should have received a copy of the GNU General Public License along
19+
# with this program; if not, write to the Free Software Foundation, Inc.,
20+
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21+
#
22+
###############################################################################
23+
-->
24+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:rm="http://qgis.org/resource-metadata/1.0" targetNamespace="http://qgis.org/resource-metadata/1.0" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
25+
<xs:element name="ResourceMetadata" type="rm:ResourceMetadataType">
26+
<xs:annotation>
27+
<xs:appinfo>QGIS Resource Metadata Schema</xs:appinfo>
28+
<xs:documentation>Copyright (C) 2017 Tom Kralidis (tomkralidis@gmail.com)</xs:documentation>
29+
<xs:documentation>Copyright (C) 2017 Angelos Tzotsos (gcpp.kalxas@gmail.com)</xs:documentation>
30+
</xs:annotation>
31+
</xs:element>
32+
<xs:complexType name="ResourceMetadataType">
33+
<xs:sequence>
34+
<xs:element name="identifier" type="xs:string">
35+
<xs:annotation>
36+
<xs:documentation>Reference, URI, URL or some other mechanism to identify a given resource. </xs:documentation>
37+
</xs:annotation>
38+
</xs:element>
39+
<xs:element name="parentidentifier" type="xs:string" minOccurs="0">
40+
<xs:annotation>
41+
<xs:documentation>Reference, URI, URL or some other mechanism that that a given resource is a part of (child).</xs:documentation>
42+
</xs:annotation>
43+
</xs:element>
44+
<xs:element name="language" type="xs:string">
45+
<xs:annotation>
46+
<xs:documentation>Human language associated with a given resource. While a formal vocabulary is not imposed, it is advised to use ISO 3166/ISO 639.</xs:documentation>
47+
</xs:annotation>
48+
</xs:element>
49+
<xs:element name="type" type="xs:string">
50+
<xs:annotation>
51+
<xs:documentation>Nature of a given resource. While a formal vocabulary is not imposed, it is advised to use the ISO 19115 MD_ScopeCode.</xs:documentation>
52+
</xs:annotation>
53+
</xs:element>
54+
<xs:element name="title" type="xs:string">
55+
<xs:annotation>
56+
<xs:documentation>Human readable name of a given resource typically displayed in search results.</xs:documentation>
57+
</xs:annotation>
58+
</xs:element>
59+
<xs:element name="abstract" type="xs:string">
60+
<xs:annotation>
61+
<xs:documentation>Description of a given resource.</xs:documentation>
62+
</xs:annotation>
63+
</xs:element>
64+
<xs:element name="keywords" type="rm:keywordsType" minOccurs="0" maxOccurs="unbounded">
65+
<xs:annotation>
66+
<xs:documentation>Set of descriptive keywords associated with a given resource.</xs:documentation>
67+
</xs:annotation>
68+
</xs:element>
69+
<xs:element name="fees" type="xs:string" minOccurs="0">
70+
<xs:annotation>
71+
<xs:documentation>Any fees associated with a given resource.</xs:documentation>
72+
</xs:annotation>
73+
</xs:element>
74+
<xs:element name="constraints" type="rm:constraintsType" minOccurs="0" maxOccurs="unbounded">
75+
<xs:annotation>
76+
<xs:documentation>List of constraints associated with a given resource.</xs:documentation>
77+
</xs:annotation>
78+
</xs:element>
79+
<xs:element name="rights" type="xs:string" minOccurs="0" maxOccurs="unbounded">
80+
<xs:annotation>
81+
<xs:documentation>Attribution or copyright associated with a given resource.</xs:documentation>
82+
</xs:annotation>
83+
</xs:element>
84+
<xs:element name="license" type="xs:string" minOccurs="1" maxOccurs="unbounded">
85+
<xs:annotation>
86+
<xs:documentation>License associated with a given resource (examples: http://opendefinition.org/licenses/).</xs:documentation>
87+
</xs:annotation>
88+
</xs:element>
89+
<xs:element name="encoding" type="xs:string" minOccurs="0">
90+
<xs:annotation>
91+
<xs:documentation>Character encoding of the data of a given resource.</xs:documentation>
92+
</xs:annotation>
93+
</xs:element>
94+
<xs:element name="crs" type="xs:string">
95+
<xs:annotation>
96+
<xs:documentation>Coordinate reference system associated with the data of a given resource. Examples:
97+
* EPSG:EPSGCODE
98+
* http://www.opengis.net/def/crs/EPSG/0/EPSGCODE (URI Style 1)
99+
* http://www.opengis.net/gml/srs/epsg.xml#EPSGCODE (URI Style 2)
100+
* urn:EPSG:geographicCRS:EPSGCODE
101+
* urn:ogc:def:crs:EPSG::EPSGCODE
102+
* urn:ogc:def:crs:EPSG:EPSGCODE
103+
</xs:documentation>
104+
</xs:annotation>
105+
</xs:element>
106+
<xs:element name="extent" type="rm:extentType" maxOccurs="1">
107+
<xs:annotation>
108+
<xs:documentation>Spatial and temporal extents associated with a given resource.</xs:documentation>
109+
</xs:annotation>
110+
</xs:element>
111+
<xs:element name="contact" type="rm:contactType" maxOccurs="unbounded">
112+
<xs:annotation>
113+
<xs:documentation>Contact person/entity associated with a given resource.</xs:documentation>
114+
</xs:annotation>
115+
</xs:element>
116+
<xs:element name="links" type="rm:linksType">
117+
<xs:annotation>
118+
<xs:documentation>Set of online resources associated with a given resource.</xs:documentation>
119+
</xs:annotation>
120+
</xs:element>
121+
<xs:element name="history" type="xs:string" minOccurs="0" maxOccurs="unbounded">
122+
<xs:annotation>
123+
<xs:documentation>Freeform description of the history or lineage of the resource.</xs:documentation>
124+
</xs:annotation>
125+
</xs:element>
126+
</xs:sequence>
127+
<xs:attribute name="version" use="required" fixed="1.0">
128+
<xs:annotation>
129+
<xs:documentation>Version of QGIS Resource Metadata schema used. </xs:documentation>
130+
</xs:annotation>
131+
</xs:attribute>
132+
</xs:complexType>
133+
<xs:complexType name="constraintsType">
134+
<xs:simpleContent>
135+
<xs:extension base="xs:string">
136+
<xs:attribute name="type" type="xs:string">
137+
<xs:annotation>
138+
<xs:documentation>Type of constraint. Suggested types are 'access', 'other'.</xs:documentation>
139+
</xs:annotation>
140+
</xs:attribute>
141+
</xs:extension>
142+
</xs:simpleContent>
143+
</xs:complexType>
144+
<xs:complexType name="keywordsType">
145+
<xs:sequence>
146+
<xs:element name="keyword" maxOccurs="unbounded">
147+
<xs:annotation>
148+
<xs:documentation>Descriptive keyword associated with a resource. While a formal vocabulary is not imposed, it is advised to use rm:keywords/@vocabulary to identify a codelist or applicable vocabulary.</xs:documentation>
149+
</xs:annotation>
150+
</xs:element>
151+
</xs:sequence>
152+
<xs:attribute name="vocabulary" type="xs:string">
153+
<xs:annotation>
154+
<xs:documentation>Reference (URI/URL preferred) to a codelist or vocabulary associated with keyword list.</xs:documentation>
155+
</xs:annotation>
156+
</xs:attribute>
157+
</xs:complexType>
158+
<xs:complexType name="extentType">
159+
<xs:sequence>
160+
<xs:element name="spatial" type="rm:spatialType" maxOccurs="unbounded">
161+
<xs:annotation>
162+
<xs:documentation>Geospatial Extent of a given resource.</xs:documentation>
163+
</xs:annotation>
164+
</xs:element>
165+
<xs:element name="temporal" type="rm:temporalType" minOccurs="0" maxOccurs="unbounded">
166+
<xs:annotation>
167+
<xs:documentation>Temporal extent associated with a given resource. It is advised to use ISO 8601 for consistency.</xs:documentation>
168+
</xs:annotation>
169+
</xs:element>
170+
</xs:sequence>
171+
</xs:complexType>
172+
<xs:complexType name="spatialType">
173+
<xs:attribute name="dimensions" type="xs:integer" default="2"/>
174+
<xs:attribute name="crs" type="xs:string" use="required">
175+
<xs:annotation>
176+
<xs:documentation>Coordinate reference system.</xs:documentation>
177+
</xs:annotation>
178+
</xs:attribute>
179+
<xs:attribute name="minx" type="xs:decimal" use="required">
180+
<xs:annotation>
181+
<xs:documentation>Minimum x value according to crs.</xs:documentation>
182+
</xs:annotation>
183+
</xs:attribute>
184+
<xs:attribute name="miny" type="xs:decimal" use="required">
185+
<xs:annotation>
186+
<xs:documentation>Minimum y value according to crs.</xs:documentation>
187+
</xs:annotation>
188+
</xs:attribute>
189+
<xs:attribute name="minz" type="xs:decimal" use="optional">
190+
<xs:annotation>
191+
<xs:documentation>Minimum z value according to crs.</xs:documentation>
192+
</xs:annotation>
193+
</xs:attribute>
194+
<xs:attribute name="maxx" type="xs:decimal" use="required">
195+
<xs:annotation>
196+
<xs:documentation>Maximum x value according to crs.</xs:documentation>
197+
</xs:annotation>
198+
</xs:attribute>
199+
<xs:attribute name="maxy" type="xs:decimal" use="required">
200+
<xs:annotation>
201+
<xs:documentation>Maximum y value according to crs.</xs:documentation>
202+
</xs:annotation>
203+
</xs:attribute>
204+
<xs:attribute name="maxz" type="xs:decimal" use="optional">
205+
<xs:annotation>
206+
<xs:documentation>Maximum z value according to crs.</xs:documentation>
207+
</xs:annotation>
208+
</xs:attribute>
209+
</xs:complexType>
210+
<xs:complexType name="temporalType">
211+
<xs:choice>
212+
<xs:element name="instant" type="xs:dateTime">
213+
<xs:annotation>
214+
<xs:documentation>Single point in time.</xs:documentation>
215+
</xs:annotation>
216+
</xs:element>
217+
<xs:element name="period" type="rm:periodType">
218+
<xs:annotation>
219+
<xs:documentation>Time period or envelope.</xs:documentation>
220+
</xs:annotation>
221+
</xs:element>
222+
</xs:choice>
223+
</xs:complexType>
224+
<xs:complexType name="periodType">
225+
<xs:sequence>
226+
<xs:element name="start" type="xs:dateTime">
227+
<xs:annotation>
228+
<xs:documentation>Begin date/time.</xs:documentation>
229+
</xs:annotation>
230+
</xs:element>
231+
<xs:element name="end" type="xs:dateTime" minOccurs="0">
232+
<xs:annotation>
233+
<xs:documentation>End date/time.</xs:documentation>
234+
</xs:annotation>
235+
</xs:element>
236+
</xs:sequence>
237+
<xs:attribute name="indeterminatePosition" type="xs:boolean">
238+
<xs:annotation>
239+
<xs:documentation>Whether resource has no end date/time (i.e. continuous acquisition).</xs:documentation>
240+
</xs:annotation>
241+
</xs:attribute>
242+
</xs:complexType>
243+
<xs:complexType name="contactType">
244+
<xs:sequence>
245+
<xs:element name="name" type="xs:string">
246+
<xs:annotation>
247+
<xs:documentation>Name of contact.</xs:documentation>
248+
</xs:annotation>
249+
</xs:element>
250+
<xs:element name="organization" type="xs:string" minOccurs="0">
251+
<xs:annotation>
252+
<xs:documentation>Organization contact belongs to/represents.</xs:documentation>
253+
</xs:annotation>
254+
</xs:element>
255+
<xs:element name="position" type="xs:string" minOccurs="0">
256+
<xs:annotation>
257+
<xs:documentation>Position/title of contact.</xs:documentation>
258+
</xs:annotation>
259+
</xs:element>
260+
<xs:element name="address" type="rm:addressType" minOccurs="0" maxOccurs="unbounded">
261+
<xs:annotation>
262+
<xs:documentation>Address associated with a given contact.</xs:documentation>
263+
</xs:annotation>
264+
</xs:element>
265+
<xs:element name="voice" type="xs:string" minOccurs="0">
266+
<xs:annotation>
267+
<xs:documentation>Voice telephone.</xs:documentation>
268+
</xs:annotation>
269+
</xs:element>
270+
<xs:element name="fax" type="xs:string" minOccurs="0">
271+
<xs:annotation>
272+
<xs:documentation>Facsimile telephone.</xs:documentation>
273+
</xs:annotation>
274+
</xs:element>
275+
<xs:element name="email" type="xs:string" minOccurs="0">
276+
<xs:annotation>
277+
<xs:documentation>Electronic mail address (note, do not include mailto: protocol as part of the email address).</xs:documentation>
278+
</xs:annotation>
279+
</xs:element>
280+
<xs:element name="role" type="xs:string" minOccurs="0">
281+
<xs:annotation>
282+
<xs:documentation>Role of contact. While no vocabulary is imposed, it is advised to use ISO 19115 CI_RoleCode.</xs:documentation>
283+
</xs:annotation>
284+
</xs:element>
285+
</xs:sequence>
286+
</xs:complexType>
287+
<xs:complexType name="addressType">
288+
<xs:sequence>
289+
<xs:element name="type" type="xs:string" minOccurs="0">
290+
<xs:annotation>
291+
<xs:documentation>Type of address (e.g. 'postal').</xs:documentation>
292+
</xs:annotation>
293+
</xs:element>
294+
<xs:element name="address" type="xs:string" minOccurs="0">
295+
<xs:annotation>
296+
<xs:documentation>Physical address.</xs:documentation>
297+
</xs:annotation>
298+
</xs:element>
299+
<xs:element name="city" type="xs:string" minOccurs="0">
300+
<xs:annotation>
301+
<xs:documentation>City.</xs:documentation>
302+
</xs:annotation>
303+
</xs:element>
304+
<xs:element name="administrativearea" type="xs:string" minOccurs="0">
305+
<xs:annotation>
306+
<xs:documentation>Administrative area (state, provice/territory, etc.).</xs:documentation>
307+
</xs:annotation>
308+
</xs:element>
309+
<xs:element name="postalcode" type="xs:string" minOccurs="0">
310+
<xs:annotation>
311+
<xs:documentation>Postal code.</xs:documentation>
312+
</xs:annotation>
313+
</xs:element>
314+
<xs:element name="country" type="xs:string" minOccurs="0">
315+
<xs:annotation>
316+
<xs:documentation>Country.</xs:documentation>
317+
</xs:annotation>
318+
</xs:element>
319+
</xs:sequence>
320+
</xs:complexType>
321+
<xs:complexType name="linksType">
322+
<xs:sequence>
323+
<xs:element name="link" type="rm:linkType" maxOccurs="unbounded">
324+
<xs:annotation>
325+
<xs:documentation>Online resource associated with a given resource. Attribute definitions:
326+
* name: short name (like WMS layer name)
327+
* type: link type. Strongly suggested to use values from the 'identifier' column in https://github.com/OSGeo/Cat-Interop/blob/master/LinkPropertyLookupTable.csv
328+
* description: abstract text about link
329+
* url: endpoint. If the URL is an OWS server, specify the *base* URL only without parameters like service=xxx.....
330+
* format: format specification of online resource. Strongly suggested to use GDAL/OGR format values
331+
* mimeType: MIME type representative of the online resource response (image/png, application/json, etc.)
332+
* size: estimated size (in bytes) of the online resource response
333+
</xs:documentation>
334+
</xs:annotation>
335+
</xs:element>
336+
</xs:sequence>
337+
</xs:complexType>
338+
<xs:complexType name="linkType">
339+
<xs:attributeGroup ref="rm:linkAttrs"/>
340+
</xs:complexType>
341+
<xs:attributeGroup name="linkAttrs">
342+
<xs:attribute name="name" type="xs:string"/>
343+
<xs:attribute name="type" type="xs:string"/>
344+
<xs:attribute name="description" type="xs:string" use="optional"/>
345+
<xs:attribute name="url" type="xs:anyURI" use="required"/>
346+
<xs:attribute name="format" type="xs:string" use="optional"/>
347+
<xs:attribute name="mimeType" type="xs:string" use="optional"/>
348+
<xs:attribute name="size" type="xs:string" use="optional"/>
349+
</xs:attributeGroup>
350+
</xs:schema>

0 commit comments

Comments
 (0)