Skip to content

Commit 3a94efe

Browse files
committed
Reinstate queryCapability.0.4.xsd. It is still used in the radar server (QueryCapability code) and XMLEntityResolver.
1 parent b20a674 commit 3a94efe

1 file changed

Lines changed: 297 additions & 0 deletions

File tree

Lines changed: 297 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,297 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<xsd:schema targetNamespace="http://www.unidata.ucar.edu/namespaces/thredds/queryCapability/v0.4"
3+
xmlns="http://www.unidata.ucar.edu/namespaces/thredds/queryCapability/v0.4"
4+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
5+
xmlns:cat="http://www.unidata.ucar.edu/namespaces/thredds/InvCatalog/v1.0"
6+
xmlns:xlink="http://www.w3.org/1999/xlink"
7+
elementFormDefault="qualified">
8+
9+
<xsd:import namespace="http://www.unidata.ucar.edu/namespaces/thredds/InvCatalog/v1.0"
10+
schemaLocation="https://schemas.unidata.ucar.edu/thredds/InvCatalog.1.0.xsd" />
11+
12+
<!--
13+
The queryCapability element.
14+
-->
15+
<xsd:element name="queryCapability">
16+
<xsd:complexType>
17+
<xsd:sequence>
18+
<xsd:element ref="query"/>
19+
<!-- Require a selectService, more allowed because of selector elements. -->
20+
<xsd:element ref="selectService"/>
21+
<xsd:element ref="selector" minOccurs="1" maxOccurs="unbounded"/>
22+
<xsd:element ref="userInterface" minOccurs="0" maxOccurs="unbounded"/>
23+
</xsd:sequence>
24+
<xsd:attribute name="version" type="xsd:token" default="0.4"/>
25+
<xsd:attribute name="name" type="xsd:token"/>
26+
</xsd:complexType>
27+
28+
<!-- The id attribute of the selector element must be unique. -->
29+
<xsd:unique name="selectorID">
30+
<xsd:selector xpath=".//selector"/>
31+
<xsd:field xpath="@id"/>
32+
</xsd:unique>
33+
</xsd:element>
34+
35+
<!--
36+
The query element.
37+
-->
38+
<xsd:element name="query">
39+
<xsd:complexType>
40+
<xsd:attribute name="base" type="xsd:string" use="required"/>
41+
</xsd:complexType>
42+
</xsd:element>
43+
44+
<!--
45+
An abstract base class for all selector elements.
46+
-->
47+
<xsd:element name="selector" type="selectorType" abstract="true"/>
48+
<xsd:complexType name="selectorType">
49+
<xsd:sequence>
50+
<xsd:element name="description" type="cat:documentationType" minOccurs="0" maxOccurs="1"/>
51+
</xsd:sequence>
52+
<xsd:attribute name="id" type="xsd:token" use="required"/>
53+
<xsd:attribute name="title" type="xsd:token" use="required"/>
54+
<xsd:attribute name="template" type="xsd:token"/>
55+
<xsd:attribute name="required" type="xsd:boolean" default="true"/>
56+
</xsd:complexType>
57+
58+
<!--
59+
compound selectors.
60+
-->
61+
<xsd:element name="compound" substitutionGroup="selector">
62+
<xsd:complexType>
63+
<xsd:complexContent>
64+
<xsd:extension base="selectorType">
65+
<xsd:sequence>
66+
<xsd:element ref="selector"/>
67+
<xsd:element name="or"/>
68+
<xsd:element ref="selector"/>
69+
</xsd:sequence>
70+
</xsd:extension>
71+
</xsd:complexContent>
72+
</xsd:complexType>
73+
</xsd:element>
74+
75+
<xsd:simpleType name="operator">
76+
<xsd:union memberTypes="xsd:token">
77+
<xsd:simpleType>
78+
<xsd:restriction base="xsd:token">
79+
<xsd:enumeration value="and"/>
80+
<xsd:enumeration value="or"/>
81+
</xsd:restriction>
82+
</xsd:simpleType>
83+
</xsd:union>
84+
</xsd:simpleType>
85+
86+
<!--
87+
The selectList element defines a list of choices from which a user can
88+
select one or more entries.
89+
-->
90+
<!-- When the construct method is set to "template", the
91+
template string must contain exactly one replacement string.
92+
The template string does not have to be related to the id
93+
of the selector, if one is given. No matter the actual
94+
replacement string used, it will be replaced with the value
95+
of the selection. When the "paramValue" construct method
96+
is chosen, the parameter name will be the value of the id
97+
or "item" if no id is given, i.e., "<id>=<value>" or
98+
"item=<value>".
99+
-->
100+
<xsd:element name="selectList" substitutionGroup="selector">
101+
<xsd:complexType>
102+
<xsd:complexContent>
103+
<xsd:extension base="selectorType">
104+
<xsd:sequence>
105+
<xsd:element ref="choice" minOccurs="1" maxOccurs="unbounded"/>
106+
</xsd:sequence>
107+
<xsd:attribute name="multiple" type="xsd:boolean" default="false"/>
108+
</xsd:extension>
109+
</xsd:complexContent>
110+
</xsd:complexType>
111+
</xsd:element>
112+
113+
<xsd:element name="choice" type="choiceType"/>
114+
<xsd:complexType name="choiceType">
115+
<xsd:sequence>
116+
<xsd:element name="description" type="cat:documentationType" minOccurs="0" maxOccurs="1"/>
117+
<xsd:element ref="selectList" minOccurs="0" maxOccurs="unbounded"/>
118+
</xsd:sequence>
119+
<xsd:attribute name="name" type="xsd:string" use="required"/>
120+
<xsd:attribute name="value" type="xsd:string" use="required"/>
121+
</xsd:complexType>
122+
123+
<!--
124+
A selectService element defines the list of serviceTypes available through
125+
a query. The user can select the service type(s) they understand and limit the
126+
datasets returned to only those service types..
127+
-->
128+
<xsd:element name="selectService" substitutionGroup="selector">
129+
<xsd:complexType>
130+
<xsd:complexContent>
131+
<xsd:extension base="selectorType">
132+
<xsd:sequence>
133+
<xsd:element name="serviceType" minOccurs="1" maxOccurs="unbounded">
134+
<xsd:complexType>
135+
<xsd:simpleContent>
136+
<xsd:extension base="cat:serviceTypes">
137+
<xsd:attribute name="title" type="xsd:token"/>
138+
<xsd:attribute name="dataFormatType" type="cat:dataFormatTypes"/>
139+
<xsd:attribute name="returns" type="xsd:token" use="required"/>
140+
<xsd:attribute name="value" type="xsd:token" use="required"/>
141+
</xsd:extension>
142+
</xsd:simpleContent>
143+
</xsd:complexType>
144+
</xsd:element>
145+
</xsd:sequence>
146+
<xsd:attribute name="multiple" type="xsd:boolean" default="false"/>
147+
</xsd:extension>
148+
</xsd:complexContent>
149+
</xsd:complexType>
150+
</xsd:element>
151+
152+
<!--
153+
A selectStation element defines a list of stations from which a user can select.
154+
-->
155+
<!-- When the construct method is set to "template", the
156+
template string must contain exactly one replacement string.
157+
The template string does not have to be related to the id
158+
of the selector, if one is given. No matter the actual
159+
replacement string used, it will be replaced with the value
160+
of the selection. When the "paramValue" construct method
161+
is chosen, the parameter name will be the value of the id
162+
or "stn" if no id is given, i.e., "<id>=<value>" or
163+
"stn=<value>".
164+
-->
165+
<xsd:element name="selectStation" substitutionGroup="selector">
166+
<xsd:complexType>
167+
<xsd:complexContent>
168+
<xsd:extension base="selectorType">
169+
<xsd:sequence>
170+
<xsd:element ref="station" minOccurs="1" maxOccurs="unbounded"/>
171+
</xsd:sequence>
172+
<xsd:attribute name="multiple" type="xsd:boolean" default="false"/>
173+
</xsd:extension>
174+
</xsd:complexContent>
175+
</xsd:complexType>
176+
</xsd:element>
177+
178+
<xsd:element name="station" substitutionGroup="choice">
179+
<xsd:complexType>
180+
<xsd:complexContent>
181+
<xsd:extension base="choiceType">
182+
<xsd:sequence>
183+
<xsd:element ref="location"/>
184+
</xsd:sequence>
185+
</xsd:extension>
186+
</xsd:complexContent>
187+
</xsd:complexType>
188+
</xsd:element>
189+
190+
<xsd:element name="location" type="locationType"/>
191+
<xsd:complexType name="locationType">
192+
<xsd:attribute name="latitude" type="xsd:float" use="required"/>
193+
<xsd:attribute name="longitude" type="xsd:float" use="required"/>
194+
<xsd:attribute name="latitude_units" type="xsd:token" default="degrees_north"/>
195+
<xsd:attribute name="longitude_units" type="xsd:token" default="degrees_east"/>
196+
</xsd:complexType>
197+
198+
<xsd:element name="location3D" substitutionGroup="location">
199+
<xsd:complexType>
200+
<xsd:complexContent>
201+
<xsd:extension base="locationType">
202+
<xsd:attribute name="elevation" type="xsd:float" use="required"/>
203+
<xsd:attribute name="elevation_units" type="xsd:token" default="msl"/>
204+
</xsd:extension>
205+
</xsd:complexContent>
206+
</xsd:complexType>
207+
</xsd:element>
208+
209+
<!--
210+
A selectFromRange element defines a range from which a user may select
211+
a point or a range.
212+
213+
To select a point, a single replacement string is required: {point}. To
214+
select a range, two replacement strings are required: {min} and {max}.
215+
-->
216+
<xsd:element name="selectFromRange" substitutionGroup="selector">
217+
<xsd:complexType>
218+
<xsd:complexContent>
219+
<xsd:extension base="selectorType">
220+
<xsd:attribute name="min" type="xsd:decimal" use="required"/>
221+
<xsd:attribute name="max" type="xsd:decimal" use="required"/>
222+
<xsd:attribute name="units" type="xsd:string"/>
223+
<xsd:attribute name="modulo" type="xsd:boolean" default="false"/>
224+
<xsd:attribute name="resolution" type="xsd:float" use="required"/>
225+
<xsd:attribute name="selectType" type="rangeSelectTypeEnum" default="subrange" />
226+
</xsd:extension>
227+
</xsd:complexContent>
228+
</xsd:complexType>
229+
</xsd:element>
230+
231+
<!-- Enumeration of allowed types of selections from a range. -->
232+
<xsd:simpleType name="rangeSelectTypeEnum">
233+
<xsd:restriction base="xsd:token">
234+
<xsd:enumeration value="point"/>
235+
<xsd:enumeration value="subrange"/>
236+
<!--xsd:enumeration value="pointOrRange"/-->
237+
</xsd:restriction>
238+
</xsd:simpleType>
239+
240+
<!--
241+
A selectFromDateRange element defines a date range from which a user may
242+
select a point or a date range.
243+
244+
To select a point, a single replacement string is required: {point}. To
245+
select a range, two replacement strings are required: {min} and {max}.
246+
-->
247+
<xsd:element name="selectFromDateRange" substitutionGroup="selector">
248+
<xsd:complexType>
249+
<xsd:complexContent>
250+
<xsd:extension base="selectorType">
251+
<xsd:attribute name="start" type="cat:dateType"/>
252+
<xsd:attribute name="end" type="cat:dateType"/>
253+
<xsd:attribute name="duration" type="cat:duration"/>
254+
<xsd:attribute name="resolution" type="cat:duration" use="required"/>
255+
<xsd:attribute name="selectType" type="rangeSelectTypeEnum" default="subrange"/>
256+
</xsd:extension>
257+
</xsd:complexContent>
258+
</xsd:complexType>
259+
</xsd:element>
260+
261+
<!--
262+
The selectFromGeoRegion element defines a geographic region from which the
263+
user can select a geographic region, currently limited to a bounding box.
264+
-->
265+
<xsd:element name="selectFromGeoRegion" substitutionGroup="selector">
266+
<xsd:complexType>
267+
<xsd:complexContent>
268+
<xsd:extension base="selectorType">
269+
<xsd:sequence>
270+
<xsd:element ref="geoBoundingBox"/>
271+
</xsd:sequence>
272+
</xsd:extension>
273+
</xsd:complexContent>
274+
</xsd:complexType>
275+
</xsd:element>
276+
277+
<xsd:element name="geoBoundingBox">
278+
<xsd:complexType>
279+
<xsd:sequence>
280+
<xsd:element name="lowerLeft" type="locationType"/>
281+
<xsd:element name="upperRight" type="locationType"/>
282+
</xsd:sequence>
283+
</xsd:complexType>
284+
</xsd:element>
285+
286+
<!--
287+
The userInterface element definition.
288+
-->
289+
<xsd:element name="userInterface">
290+
<xsd:complexType>
291+
<xsd:sequence>
292+
<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
293+
</xsd:sequence>
294+
</xsd:complexType>
295+
</xsd:element>
296+
297+
</xsd:schema>

0 commit comments

Comments
 (0)