source: FederatedSearch/schema/Endpoint-Description.xsd

Last change on this file was 4896, checked in by Oliver Schonefeld, 10 years ago
  • change 'send-default' to 'send-by-default'
  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/xml
File size: 16.8 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> A list of Data Views, that are supported
80                                by this Endpoint. </h:p>
81                        </xs:documentation>
82                    </xs:annotation>
83                    <xs:complexType>
84                        <xs:sequence>
85                            <xs:element name="SupportedDataView"  maxOccurs="unbounded">
86                                <xs:annotation>
87                                    <xs:documentation>
88                                        The MIME type of a supported Data View.
89                                    </xs:documentation>
90                                </xs:annotation>
91                                <xs:complexType>
92                                    <xs:simpleContent>
93                                        <xs:extension base="ed:mimetypeString">
94                                            <xs:attribute name="id" type="xs:ID" use="required">
95                                                <xs:annotation>
96                                                    <xs:documentation>
97                                                        <h:p>
98                                                            An unique ID for this support Data View. This value will be used,
99                                                            when referencing in the &lt;AvailableDataViews&gt; element in
100                                                            the &lt;Resource&gt; description.
101                                                        </h:p>
102                                                    </xs:documentation>
103                                                </xs:annotation>
104                                            </xs:attribute>
105                                            <xs:attribute name="delivery-policy" use="required">
106                                                <xs:annotation>
107                                                    <xs:documentation>
108                                                        <h:p>
109                                                            This attribute indicated the <h:em>delivery policy</h:em> of this supported Data View.
110                                                        </h:p> 
111                                                    </xs:documentation>
112                                                </xs:annotation>
113                                                <xs:simpleType>
114                                                    <xs:restriction base="xs:string">
115                                                        <xs:enumeration value="send-by-default">
116                                                            <xs:annotation>
117                                                                <xs:documentation>
118                                                                    <h:p>
119                                                                        This Data View is automatically sent by the Endpoint for supported Resources.
120                                                                    </h:p>
121                                                                </xs:documentation>
122                                                            </xs:annotation>
123                                                        </xs:enumeration>
124                                                        <xs:enumeration value="need-to-request">
125                                                            <xs:annotation>
126                                                                <xs:documentation>
127                                                                    <h:p>
128                                                                        This Data View needs to be explicatively requested by the Client.
129                                                                    </h:p>
130                                                                </xs:documentation>
131                                                            </xs:annotation>
132                                                        </xs:enumeration>
133                                                    </xs:restriction>
134                                                </xs:simpleType>
135                                            </xs:attribute>
136                                        </xs:extension>
137                                    </xs:simpleContent>
138                                </xs:complexType>
139                            </xs:element>
140                        </xs:sequence>
141                    </xs:complexType>
142                </xs:element>
143               
144                <!-- Resources -->
145                <xs:element ref="ed:Resources">
146                    <xs:annotation>
147                        <xs:documentation>
148                            <h:p>
149                                A list of top-level resources, that are available
150                                at an Endpoint. An Endpoint MUST
151                                declare at least one top-level resource.
152                            </h:p>
153                        </xs:documentation>
154                    </xs:annotation>
155                </xs:element>
156
157                <!-- extension point -->
158                <xs:any namespace="##other" processContents="skip" minOccurs="0" maxOccurs="unbounded">
159                    <xs:annotation>
160                        <xs:documentation>
161                            <h:p>
162                                Extension point to allow Endpoints to embed custom data in the Endpoint Description.
163                                CLARIN-FCS clients SHOULD ignore any data they do not understand. 
164                            </h:p>
165                        </xs:documentation>
166                    </xs:annotation>
167                </xs:any>
168            </xs:sequence>
169            <xs:attribute name="version" type="xs:nonNegativeInteger" use="required">
170                <xs:annotation>
171                    <xs:documentation>
172                        <h:p>
173                            Version used for Endpoint Description. Endpoints MUST use the value "1".
174                        </h:p>
175                    </xs:documentation>
176                </xs:annotation>
177            </xs:attribute>
178        </xs:complexType>
179    </xs:element>
180
181    <xs:element name="Resources">
182        <xs:annotation>
183            <xs:documentation>
184                <h:p>
185                    A list of resources, that are available
186                    at an Endpoint. An Endpoint MUST
187                    declare at least one resource.
188                </h:p>
189            </xs:documentation>
190        </xs:annotation>
191        <xs:complexType>
192            <xs:sequence>
193                <xs:element ref="ed:Resource" maxOccurs="unbounded"/>
194            </xs:sequence>                           
195        </xs:complexType>
196    </xs:element>
197
198    <xs:element name="Resource">
199        <xs:annotation>
200            <xs:documentation>
201                <h:p>
202                    Detailed description of a resource that is available at an
203                    Endpoint. A resource is a searchable
204                    entity at an Endpoint, e.g. a single corpus.
205                </h:p>
206            </xs:documentation>
207        </xs:annotation>
208        <xs:complexType>
209            <xs:sequence>
210                <xs:element name="Title" type="ed:i18nString" maxOccurs="unbounded">
211                    <xs:annotation>
212                        <xs:documentation>
213                            <h:p>
214                                A human readable title for the resource. An English version is
215                                mandatory.
216                            </h:p>
217                        </xs:documentation>
218                    </xs:annotation>
219                </xs:element>
220               
221                <xs:element name="Description" type="ed:i18nString" minOccurs="0" maxOccurs="unbounded">
222                    <xs:annotation>
223                        <xs:documentation>
224                            <h:p>
225                                An optional human-readable description of the resource. Is should
226                                be at most one sentence. If supplied, an English version is
227                                mandatory.
228                            </h:p>
229                        </xs:documentation>
230                    </xs:annotation>
231                </xs:element>
232               
233                <xs:element name="LandingPageURI" type="xs:anyURI" minOccurs="0">
234                    <xs:annotation>
235                        <xs:documentation>
236                            <h:p>
237                                A link to a website for the resource, e.g. a landing page for a corpus.
238                            </h:p>
239                        </xs:documentation>
240                    </xs:annotation>
241                </xs:element>
242               
243                <xs:element name="Languages">
244                    <xs:annotation>
245                        <xs:documentation>
246                            <h:p>
247                                The (relevant) languages available <h:em>within</h:em> the resource.
248                            </h:p>
249                        </xs:documentation>
250                    </xs:annotation>
251                    <xs:complexType>
252                        <xs:sequence>
253                            <xs:element name="Language" maxOccurs="unbounded">
254                                <xs:annotation>
255                                    <xs:documentation>
256                                        <p>
257                                            A ISO 639-3 three letter language code. This
258                                            element should be repeated for all languages
259                                            (relevant) available <h:em>within</h:em> the resource.
260                                        </p>
261                                    </xs:documentation>
262                                </xs:annotation>
263                                <xs:simpleType>
264                                    <xs:restriction base="xs:string">
265                                        <xs:pattern value="[a-zA-Z]{3}"/>
266                                    </xs:restriction>
267                                </xs:simpleType>
268                            </xs:element>
269                        </xs:sequence>
270                    </xs:complexType>
271                </xs:element>
272               
273                <xs:element name="AvailableDataViews">
274                    <xs:annotation>
275                        <xs:documentation>
276                            <h:p>
277                                This element contains a reference to all Data Views that are
278                                supported by this resource in the <h:code>@ref</h:code> attribute.
279                            </h:p>
280                        </xs:documentation>
281                    </xs:annotation>
282                    <xs:complexType>
283                        <xs:attribute name="ref" type="xs:IDREFS" use="required" />
284                    </xs:complexType>
285                </xs:element>
286
287                <xs:element ref="ed:Resources" minOccurs="0">
288                    <xs:annotation>
289                        <xs:documentation>
290                            <h:p>
291                                If a resource has searchable sub-resources
292                                the Endpoint MUST supply additional finer grained
293                                &lt;Resource&gt; elements. A sub-resource is a
294                                searchable entity within a resource, e.g. a sub-corpus.
295                            </h:p>
296                        </xs:documentation>
297                    </xs:annotation>
298                </xs:element>
299
300                <!-- extension point -->
301                <xs:any namespace="##other" processContents="skip" minOccurs="0" maxOccurs="unbounded">
302                    <xs:annotation>
303                        <xs:documentation>
304                            <h:p>
305                                Extension point to allow Endpoints to embed custom data in the Endpoint Description
306                                for a specific resource. CLARIN-FCS clients SHOULD ignore any data they do not understand. 
307                            </h:p>
308                        </xs:documentation>
309                    </xs:annotation>
310                </xs:any>
311            </xs:sequence>
312            <xs:attribute name="pid" type="xs:anyURI" use="required">
313                <xs:annotation>
314                    <xs:documentation>
315                        <h:p>
316                            The persistent identifier of this resource. This
317                            value MUST be the same as the <h:code>MdSelfLink</h:code>
318                            of the CMDI record describing the collection.
319                        </h:p>
320                    </xs:documentation>
321                </xs:annotation>
322            </xs:attribute>
323        </xs:complexType>
324    </xs:element>
325
326    <xs:simpleType name="mimetypeString">
327        <xs:restriction base="xs:string">
328            <xs:pattern value="\w+/\w([\.\-]{0,1}\w)*(\+\w+){0,1}" />
329        </xs:restriction>
330    </xs:simpleType>
331
332    <xs:complexType name="i18nString">
333        <xs:simpleContent>
334            <xs:extension base="xs:string">
335                <xs:attribute ref="xml:lang" use="required" />
336            </xs:extension>
337        </xs:simpleContent>
338    </xs:complexType>
339</xs:schema>
Note: See TracBrowser for help on using the repository browser.