source: FederatedSearch/schema/Core_2/Endpoint-Description.xsd

Last change on this file was 6704, checked in by Oliver Schonefeld, 9 years ago
  • first stab at FCS 2.0 schemas and examples
  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/xml
File size: 22.9 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
3    xmlns:h="http://www.w3.org/1999/xhtml"
4    xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
5    xmlns:ed="http://clarin.eu/fcs/endpoint-description" 
6    xml:lang="en"
7    vc:minVersion="1.0" vc:maxVersion="1.1"
8    elementFormDefault="qualified"
9    targetNamespace="http://clarin.eu/fcs/endpoint-description">
10    <xs:import namespace="http://www.w3.org/XML/1998/namespace"
11               schemaLocation="http://www.w3.org/2001/xml.xsd" />
12
13    <xs:annotation>
14        <xs:documentation>
15            <h:p>
16                This schema defines the structure of an extension to SRU/CQL
17                used by CLARIN-FCS.
18                </h:p>
19            <h:p>
20                An Endpoint MUST provide this information in the
21                <h:code>&lt;extraResponseData&gt;</h:code> element of the result
22                to an <h:em>explain</h:em> operation, if (and only if) a
23                CLARIN-FCS client performed the request with the
24                <h:code>x-clarin-fcs-endpoint-description</h:code> extra
25                request parameter with a value of <h:code>true</h:code>
26            </h:p>
27        </xs:documentation>   
28    </xs:annotation>
29   
30    <xs:element name="EndpointDescription">
31        <xs:annotation>
32            <xs:documentation>
33                <h:p>
34                    The root element of the Endpoint description extension for
35                    CLARIN-FCS extension.
36                </h:p>
37                <h:p>
38                    An Endpoint MUST provide this information in the
39                    <h:code>&lt;extraResponseData&gt;</h:code>
40                    element of the result to an <h:em>explain</h:em> operation,
41                    if (and only if) a CLARIN-FCS client performed the request
42                    with the <h:code>x-clarin-fcs-endpoint-description</h:code>
43                    extra request parameter with a value of <h:code>true</h:code>.
44                </h:p>
45            </xs:documentation>
46        </xs:annotation>
47        <xs:complexType>
48            <xs:sequence>
49                <!-- Capabilities -->
50                <xs:element name="Capabilities">
51                    <xs:annotation>
52                        <xs:documentation>
53                            <h:p>A list of Capabilities, that are supported by this Endpoint.</h:p>
54                        </xs:documentation>
55                    </xs:annotation>
56                    <xs:complexType>
57                        <xs:sequence>
58                            <xs:element name="Capability" maxOccurs="unbounded">
59                                <xs:annotation>
60                                    <xs:documentation>
61                                        A Capability, encoded by an URI, that is supported by this Endpoint.
62                                        For valid URIs, consult the CLARIN-FCS specification.
63                                    </xs:documentation>
64                                </xs:annotation>
65                                <xs:simpleType>
66                                    <xs:restriction base="xs:anyURI">
67                                        <xs:pattern value="http://clarin.eu/fcs/capability/\w([\.\-]{0,1}\w)*" />
68                                    </xs:restriction>
69                                </xs:simpleType>
70                            </xs:element>
71                        </xs:sequence>
72                    </xs:complexType>
73                </xs:element>
74
75                <!-- SupportedDataViews -->
76                <xs:element name="SupportedDataViews">
77                    <xs:annotation>
78                        <xs:documentation>
79                            <h:p>
80                                A list of Data Views, that are supported by this Endpoint.
81                            </h:p>
82                        </xs:documentation>
83                    </xs:annotation>
84                    <xs:complexType>
85                        <xs:sequence>
86                            <xs:element name="SupportedDataView" maxOccurs="unbounded">
87                                <xs:annotation>
88                                    <xs:documentation>
89                                        The MIME type of a supported Data View.
90                                    </xs:documentation>
91                                </xs:annotation>
92                                <xs:complexType>
93                                    <xs:simpleContent>
94                                        <xs:extension base="ed:mimetypeString">
95                                            <xs:attribute name="id" type="xs:ID" use="required">
96                                                <xs:annotation>
97                                                    <xs:documentation>
98                                                        <h:p>
99                                                            An unique ID for this support Data View. This value will be used,
100                                                            when referencing it in the &lt;AvailableDataViews&gt; element in
101                                                            the &lt;Resource&gt; description.
102                                                        </h:p>
103                                                    </xs:documentation>
104                                                </xs:annotation>
105                                            </xs:attribute>
106                                            <xs:attribute name="delivery-policy" use="required">
107                                                <xs:annotation>
108                                                    <xs:documentation>
109                                                        <h:p>
110                                                            This attribute indicates the <h:em>delivery policy</h:em> of this supported Data View.
111                                                        </h:p> 
112                                                    </xs:documentation>
113                                                </xs:annotation>
114                                                <xs:simpleType>
115                                                    <xs:restriction base="xs:string">
116                                                        <xs:enumeration value="send-by-default">
117                                                            <xs:annotation>
118                                                                <xs:documentation>
119                                                                    <h:p>
120                                                                        This Data View is automatically sent by the Endpoint for supported Resources.
121                                                                    </h:p>
122                                                                </xs:documentation>
123                                                            </xs:annotation>
124                                                        </xs:enumeration>
125                                                        <xs:enumeration value="need-to-request">
126                                                            <xs:annotation>
127                                                                <xs:documentation>
128                                                                    <h:p>
129                                                                        This Data View needs to be explicatively requested by the Client.
130                                                                    </h:p>
131                                                                </xs:documentation>
132                                                            </xs:annotation>
133                                                        </xs:enumeration>
134                                                    </xs:restriction>
135                                                </xs:simpleType>
136                                            </xs:attribute>
137                                        </xs:extension>
138                                    </xs:simpleContent>
139                                </xs:complexType>
140                            </xs:element>
141                        </xs:sequence>
142                    </xs:complexType>
143                </xs:element>
144               
145                <!-- SupportedLayers -->
146                <xs:element name="SupportedLayers" minOccurs="0">
147                    <xs:annotation>
148                        <xs:documentation>
149                            <h:p>
150                                A list of Layers, that are supported by this Endpoint.
151                            </h:p>
152                        </xs:documentation>
153                    </xs:annotation>
154                    <xs:complexType>
155                        <xs:sequence>
156                            <xs:element name="SupportedLayer" maxOccurs="unbounded">
157                                <xs:annotation>
158                                    <xs:documentation>
159                                        The Layer identifier of a supported layer.
160                                    </xs:documentation>
161                                </xs:annotation>
162                                <xs:complexType>
163                                    <xs:simpleContent>
164                                        <xs:extension base="xs:string">
165                                            <xs:attribute name="id" type="xs:ID" use="required">
166                                                <xs:annotation>
167                                                    <xs:documentation>
168                                                        <h:p>
169                                                            An unique ID for this support Layer. This value will be used,
170                                                            when referencing it in the &lt;AvailableLayers&gt; element in
171                                                            the &lt;Resource&gt; description.
172                                                        </h:p>
173                                                    </xs:documentation>
174                                                </xs:annotation>
175                                            </xs:attribute>
176                                            <xs:attribute name="result-id" type="xs:anyURI" use="required">
177                                                <xs:annotation>
178                                                    <xs:documentation>
179                                                        <h:p>
180                                                            Endpoint specific URI that will be used in Advanced Data View results to identify this layer.
181                                                        </h:p> 
182                                                    </xs:documentation>
183                                                </xs:annotation>
184                                            </xs:attribute>
185                                            <xs:attribute name="type" use="optional" default="value">
186                                                <xs:annotation>
187                                                    <xs:documentation>
188                                                        <h:p>
189                                                            This attribute indicates the <h:em>content type</h:em> for Advanced Data View results.
190                                                        </h:p>
191                                                    </xs:documentation>
192                                                </xs:annotation>
193                                                <xs:simpleType>
194                                                    <xs:restriction base="xs:string">
195                                                        <xs:enumeration value="value">
196                                                            <xs:annotation>
197                                                                <xs:documentation>
198                                                                    <h:p>
199                                                                        Value information is encoded as element content in this Layer.
200                                                                    </h:p>
201                                                                </xs:documentation>
202                                                            </xs:annotation>
203                                                        </xs:enumeration>
204                                                        <xs:enumeration value="empty">
205                                                            <xs:annotation>
206                                                                <xs:documentation>
207                                                                    <h:p>
208                                                                        No additional value information is encoded for this Layer.
209                                                                    </h:p>
210                                                                </xs:documentation>
211                                                            </xs:annotation>
212                                                        </xs:enumeration>
213                                                  </xs:restriction>
214                                                </xs:simpleType>
215                                            </xs:attribute>
216                                        </xs:extension>
217                                    </xs:simpleContent>
218                                </xs:complexType>
219                            </xs:element>
220                        </xs:sequence>
221                    </xs:complexType>
222                </xs:element>
223
224                <!-- Resources -->
225                <xs:element ref="ed:Resources">
226                    <xs:annotation>
227                        <xs:documentation>
228                            <h:p>
229                                A list of top-level resources, that are available
230                                at an Endpoint. An Endpoint MUST
231                                declare at least one top-level resource.
232                            </h:p>
233                        </xs:documentation>
234                    </xs:annotation>
235                </xs:element>
236
237                <!-- extension point -->
238                <xs:any namespace="##other" processContents="skip" minOccurs="0" maxOccurs="unbounded">
239                    <xs:annotation>
240                        <xs:documentation>
241                            <h:p>
242                                Extension point to allow Endpoints to embed custom data in the Endpoint Description.
243                                CLARIN-FCS clients SHOULD ignore any data they do not understand. 
244                            </h:p>
245                        </xs:documentation>
246                    </xs:annotation>
247                </xs:any>
248            </xs:sequence>
249            <xs:attribute name="version" type="xs:nonNegativeInteger" use="required">
250                <xs:annotation>
251                    <xs:documentation>
252                        <h:p>
253                            Version used for Endpoint Description. Endpoints MUST use the value "2".
254                        </h:p>
255                    </xs:documentation>
256                </xs:annotation>
257            </xs:attribute>
258        </xs:complexType>
259    </xs:element>
260
261    <xs:element name="Resources">
262        <xs:annotation>
263            <xs:documentation>
264                <h:p>
265                    A list of resources, that are available
266                    at an Endpoint. An Endpoint MUST
267                    declare at least one resource.
268                </h:p>
269            </xs:documentation>
270        </xs:annotation>
271        <xs:complexType>
272            <xs:sequence>
273                <xs:element ref="ed:Resource" maxOccurs="unbounded"/>
274            </xs:sequence>                           
275        </xs:complexType>
276    </xs:element>
277
278    <xs:element name="Resource">
279        <xs:annotation>
280            <xs:documentation>
281                <h:p>
282                    Detailed description of a resource that is available at an
283                    Endpoint. A resource is a searchable
284                    entity at an Endpoint, e.g. a single corpus.
285                </h:p>
286            </xs:documentation>
287        </xs:annotation>
288        <xs:complexType>
289            <xs:sequence>
290                <xs:element name="Title" type="ed:i18nString" maxOccurs="unbounded">
291                    <xs:annotation>
292                        <xs:documentation>
293                            <h:p>
294                                A human readable title for the resource. An English version is
295                                mandatory.
296                            </h:p>
297                        </xs:documentation>
298                    </xs:annotation>
299                </xs:element>
300               
301                <xs:element name="Description" type="ed:i18nString" minOccurs="0" maxOccurs="unbounded">
302                    <xs:annotation>
303                        <xs:documentation>
304                            <h:p>
305                                An optional human-readable description of the resource. Is should
306                                be at most one sentence. If supplied, an English version is
307                                mandatory.
308                            </h:p>
309                        </xs:documentation>
310                    </xs:annotation>
311                </xs:element>
312               
313                <xs:element name="LandingPageURI" type="xs:anyURI" minOccurs="0">
314                    <xs:annotation>
315                        <xs:documentation>
316                            <h:p>
317                                A link to a website for the resource, e.g. a landing page for a corpus.
318                            </h:p>
319                        </xs:documentation>
320                    </xs:annotation>
321                </xs:element>
322               
323                <xs:element name="Languages">
324                    <xs:annotation>
325                        <xs:documentation>
326                            <h:p>
327                                The (relevant) languages available <h:em>within</h:em> the resource.
328                            </h:p>
329                        </xs:documentation>
330                    </xs:annotation>
331                    <xs:complexType>
332                        <xs:sequence>
333                            <xs:element name="Language" maxOccurs="unbounded">
334                                <xs:annotation>
335                                    <xs:documentation>
336                                        <p>
337                                            A ISO 639-3 three letter language code. This
338                                            element should be repeated for all languages
339                                            (relevant) available <h:em>within</h:em> the resource.
340                                        </p>
341                                    </xs:documentation>
342                                </xs:annotation>
343                                <xs:simpleType>
344                                    <xs:restriction base="xs:string">
345                                        <xs:pattern value="[a-zA-Z]{3}"/>
346                                    </xs:restriction>
347                                </xs:simpleType>
348                            </xs:element>
349                        </xs:sequence>
350                    </xs:complexType>
351                </xs:element>
352               
353                <xs:element name="AvailableDataViews">
354                    <xs:annotation>
355                        <xs:documentation>
356                            <h:p>
357                                This element contains a reference to all Data Views that are
358                                supported by this resource in the <h:code>@ref</h:code> attribute.
359                            </h:p>
360                        </xs:documentation>
361                    </xs:annotation>
362                    <xs:complexType>
363                        <xs:attribute name="ref" type="xs:IDREFS" use="required"/>
364                    </xs:complexType>
365                </xs:element>
366
367                <xs:element name="AvailableLayers" minOccurs="0">
368                    <xs:annotation>
369                        <xs:documentation>
370                            <h:p>
371                                This element contains a reference to all Layers that are
372                                supported by this resource in the <h:code>@ref</h:code> attribute.
373                            </h:p>
374                        </xs:documentation>
375                    </xs:annotation>
376                    <xs:complexType>
377                        <xs:attribute name="ref" type="xs:IDREFS" use="required" />
378                    </xs:complexType>
379                </xs:element>
380
381                <xs:element ref="ed:Resources" minOccurs="0">
382                    <xs:annotation>
383                        <xs:documentation>
384                            <h:p>
385                                If a resource has searchable sub-resources
386                                the Endpoint MUST supply additional finer grained
387                                &lt;Resource&gt; elements. A sub-resource is a
388                                searchable entity within a resource, e.g. a sub-corpus.
389                            </h:p>
390                        </xs:documentation>
391                    </xs:annotation>
392                </xs:element>
393
394                <!-- extension point -->
395                <xs:any namespace="##other" processContents="skip" minOccurs="0" maxOccurs="unbounded">
396                    <xs:annotation>
397                        <xs:documentation>
398                            <h:p>
399                                Extension point to allow Endpoints to embed custom data in the Endpoint Description
400                                for a specific resource. CLARIN-FCS clients SHOULD ignore any data they do not understand. 
401                            </h:p>
402                        </xs:documentation>
403                    </xs:annotation>
404                </xs:any>
405            </xs:sequence>
406            <xs:attribute name="pid" type="xs:anyURI" use="required">
407                <xs:annotation>
408                    <xs:documentation>
409                        <h:p>
410                            The persistent identifier of this resource. This
411                            value MUST be the same as the <h:code>MdSelfLink</h:code>
412                            of the CMDI record describing the collection.
413                        </h:p>
414                    </xs:documentation>
415                </xs:annotation>
416            </xs:attribute>
417        </xs:complexType>
418    </xs:element>
419
420    <xs:simpleType name="mimetypeString">
421        <xs:restriction base="xs:string">
422            <xs:pattern value="\w+/\w([\.\-]{0,1}\w)*(\+\w+){0,1}" />
423        </xs:restriction>
424    </xs:simpleType>
425
426    <xs:complexType name="i18nString">
427        <xs:simpleContent>
428            <xs:extension base="xs:string">
429                <xs:attribute ref="xml:lang" use="required" />
430            </xs:extension>
431        </xs:simpleContent>
432    </xs:complexType>
433</xs:schema>
Note: See TracBrowser for help on using the repository browser.