source: FederatedSearch/schema/Endpoint-Description.xsd @ 4677

Last change on this file since 4677 was 4677, checked in by Oliver Schonefeld, 10 years ago
  • update Schemas:
    • remove version number from namespace URI (and sanitize them a little)
    • Endpoint Description:
      • change element names <Collection*> to <Resource*>
      • drop <Profile> element
      • add extension points for Endpoint customizations
  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/xml
File size: 12.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> 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:extension>
96                                    </xs:simpleContent>
97                                </xs:complexType>
98                            </xs:element>
99                        </xs:sequence>
100                    </xs:complexType>
101                </xs:element>
102               
103                <!-- Resources -->
104                <xs:element ref="ed:Resources">
105                    <xs:annotation>
106                        <xs:documentation>
107                            <h:p>
108                                A list of top-level resources, that are available
109                                at an Endpoint. An Endpoint MUST
110                                declare at least one top-level resource.
111                            </h:p>
112                        </xs:documentation>
113                    </xs:annotation>
114                </xs:element>
115
116                <!-- extension point -->
117                <xs:any namespace="##other" processContents="skip" minOccurs="0" maxOccurs="unbounded">
118                    <xs:annotation>
119                        <xs:documentation>
120                            <h:p>
121                                Extension point to allow Endpoints to embed custom data in the Endpoint Description.
122                                CLARIN-FCS clients SHOULD ignore any data they do not understand. 
123                            </h:p>
124                        </xs:documentation>
125                    </xs:annotation>
126                </xs:any>
127            </xs:sequence>
128            <xs:attribute name="version" type="xs:nonNegativeInteger" use="required">
129                <xs:annotation>
130                    <xs:documentation>
131                        <h:p>
132                            Version used for Endpoint Description. Endpoints MUST use the value "1".
133                        </h:p>
134                    </xs:documentation>
135                </xs:annotation>
136            </xs:attribute>
137        </xs:complexType>
138    </xs:element>
139
140    <xs:element name="Resources">
141        <xs:annotation>
142            <xs:documentation>
143                <h:p>
144                    A list of resources, that are available
145                    at an Endpoint. An Endpoint MUST
146                    declare at least one resource.
147                </h:p>
148            </xs:documentation>
149        </xs:annotation>
150        <xs:complexType>
151            <xs:sequence>
152                <xs:element ref="ed:Resource" maxOccurs="unbounded"/>
153            </xs:sequence>                           
154        </xs:complexType>
155    </xs:element>
156
157    <xs:element name="Resource">
158        <xs:annotation>
159            <xs:documentation>
160                <h:p>
161                    Detailed description of a resource that is available at an
162                    Endpoint. A resource is a searchable
163                    entity at an Endpoint, e.g. a single corpus.
164                </h:p>
165            </xs:documentation>
166        </xs:annotation>
167        <xs:complexType>
168            <xs:sequence>
169                <xs:element name="Title" type="ed:i18nString" maxOccurs="unbounded">
170                    <xs:annotation>
171                        <xs:documentation>
172                            <h:p>
173                                A human readable title for the resource. An English version is
174                                mandatory.
175                            </h:p>
176                        </xs:documentation>
177                    </xs:annotation>
178                </xs:element>
179               
180                <xs:element name="Description" type="ed:i18nString" minOccurs="0" maxOccurs="unbounded">
181                    <xs:annotation>
182                        <xs:documentation>
183                            <h:p>
184                                An optional human-readable description of the resource. Is should
185                                be at most one sentence. If supplied, an English version is
186                                mandatory.
187                            </h:p>
188                        </xs:documentation>
189                    </xs:annotation>
190                </xs:element>
191               
192                <xs:element name="LandingPageURI" type="xs:anyURI" minOccurs="0">
193                    <xs:annotation>
194                        <xs:documentation>
195                            <h:p>
196                                A link to a website for the resource, e.g. a landing page for a corpus.
197                            </h:p>
198                        </xs:documentation>
199                    </xs:annotation>
200                </xs:element>
201               
202                <xs:element name="Languages">
203                    <xs:annotation>
204                        <xs:documentation>
205                            <h:p>
206                                The (relevant) languages available <h:em>within</h:em> the resource.
207                            </h:p>
208                        </xs:documentation>
209                    </xs:annotation>
210                    <xs:complexType>
211                        <xs:sequence>
212                            <xs:element name="Language" maxOccurs="unbounded">
213                                <xs:annotation>
214                                    <xs:documentation>
215                                        <p>
216                                            A ISO 639-3 three letter language code. This
217                                            element should be repeated for all languages
218                                            (relevant) available <h:em>within</h:em> the resource.
219                                        </p>
220                                    </xs:documentation>
221                                </xs:annotation>
222                                <xs:simpleType>
223                                    <xs:restriction base="xs:string">
224                                        <xs:pattern value="[a-zA-Z]{3}"/>
225                                    </xs:restriction>
226                                </xs:simpleType>
227                            </xs:element>
228                        </xs:sequence>
229                    </xs:complexType>
230                </xs:element>
231
232                <xs:element ref="ed:Resources" minOccurs="0">
233                    <xs:annotation>
234                        <xs:documentation>
235                            <h:p>
236                                If a resource has searchable sub-resources
237                                the Endpoint MUST supply additional finer grained
238                                &lt;Resource&gt; elements. A sub-resource is a
239                                searchable entity within a resource, e.g. a sub-corpus.
240                            </h:p>
241                        </xs:documentation>
242                    </xs:annotation>
243                </xs:element>
244
245                <!-- extension point -->
246                <xs:any namespace="##other" processContents="skip" minOccurs="0" maxOccurs="unbounded">
247                    <xs:annotation>
248                        <xs:documentation>
249                            <h:p>
250                                Extension point to allow Endpoints to embed custom data in the Endpoint Description
251                                for a specific resource. CLARIN-FCS clients SHOULD ignore any data they do not understand. 
252                            </h:p>
253                        </xs:documentation>
254                    </xs:annotation>
255                </xs:any>
256            </xs:sequence>
257            <xs:attribute name="pid" type="xs:anyURI" use="required">
258                <xs:annotation>
259                    <xs:documentation>
260                        <h:p>
261                            The persistent identifier of this resource. This
262                            value MUST be the same as the <h:code>MdSelfLink</h:code>
263                            of the CMDI record describing the collection.
264                        </h:p>
265                    </xs:documentation>
266                </xs:annotation>
267            </xs:attribute>
268        </xs:complexType>
269    </xs:element>
270
271    <xs:simpleType name="mimetypeString">
272        <xs:restriction base="xs:string">
273            <xs:pattern value="\w+/\w([\.\-]{0,1}\w)*(\+\w+){0,1}" />
274        </xs:restriction>
275    </xs:simpleType>
276
277    <xs:complexType name="i18nString">
278        <xs:simpleContent>
279            <xs:extension base="xs:string">
280                <xs:attribute ref="xml:lang" use="required" />
281            </xs:extension>
282        </xs:simpleContent>
283    </xs:complexType>
284</xs:schema>
Note: See TracBrowser for help on using the repository browser.