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

Last change on this file since 4395 was 4395, checked in by oschonef, 10 years ago
  • add new schema and examples for FCS spec proposal
  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/xml
File size: 10.8 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
3    xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" vc:minVersion="1.0"
4    xmlns:ed="http://clarin.eu/fcs/1.0/endpoint-description" elementFormDefault="qualified"
5    xmlns:h="http://www.w3.org/1999/xhtml"
6    targetNamespace="http://clarin.eu/fcs/1.0/endpoint-description" xml:lang="en">
7    <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
8
9    <xs:annotation>
10        <xs:documentation>
11            <h:p>
12                This schema defines the structure of an extension to SRU/CQL
13                used by CLARIN-FCS.
14                </h:p>
15            <h:p>
16                An CLARIN-FCS endpoint MUST provide this
17                information in the <h:code>&lt;extraResponseData&gt;</h:code>
18                element of the result to an <h:em>explain</h:em> operation,
19                if a CLRAIN-FCS client performed the request with the
20                <h:code>x-clarin-fcs-endpoint-description</h:code> extra
21                request parameter with a value of <h:code>true</h:code>
22            </h:p>
23        </xs:documentation>   
24    </xs:annotation>
25   
26    <xs:element name="EndpointDescription">
27        <xs:annotation>
28            <xs:documentation>
29                <h:p>
30                    The root element of the endpoint description extension for
31                    CLARIN-FCS extension.
32                </h:p>
33                <h:p>
34                    An CLARIN-FCS endpoint MUST provide this
35                    information in the <h:code>&lt;extraResponseData&gt;</h:code>
36                    element of the result to an <h:em>explain</h:em> operation,
37                    if a CLRAIN-FCS client performed the request with the
38                    <h:code>x-clarin-fcs-endpoint-description</h:code> extra
39                    request parameter with a value of <h:code>true</h:code>.
40                </h:p>
41            </xs:documentation>
42        </xs:annotation>
43        <xs:complexType>
44            <xs:sequence>
45                <!-- Profile -->
46                <xs:element name="Profile">
47                    <xs:annotation>
48                        <xs:documentation>
49                            <h:p> The CLARIN-FCS profile, that is supported
50                                by an endpoint. </h:p>
51                        </xs:documentation>
52                    </xs:annotation>
53                    <xs:simpleType>
54                        <xs:restriction base="xs:string">
55                            <xs:enumeration value="basic">
56                                <xs:annotation>
57                                    <xs:documentation>
58                                        <h:p> The endpoint supports the
59                                            <h:em>basic</h:em>
60                                            CLARIN-FCS profile. </h:p>
61                                    </xs:documentation>
62                                </xs:annotation>
63                            </xs:enumeration>
64                            <!-- 'extended' is not yet defined -->
65                            <!--
66                            <xs:enumeration value="extended">
67                                <xs:annotation>
68                                    <xs:documentation>
69                                        <h:p> The endpoint supports the
70                                            <h:em>extended</h:em>
71                                            CLARIN-FCS profile. </h:p>
72                                    </xs:documentation>
73                                </xs:annotation>
74                            </xs:enumeration>
75                            -->
76                        </xs:restriction>
77                    </xs:simpleType>
78                </xs:element>
79
80                <xs:element name="SupportedDataViews">
81                    <xs:annotation>
82                        <xs:documentation>
83                            <h:p> A list of DataViews, that are supported
84                                by an endpoint. </h:p>
85                        </xs:documentation>
86                    </xs:annotation>
87                    <xs:complexType>
88                        <xs:sequence>
89                            <xs:element name="SupportedDataView"  maxOccurs="unbounded">
90                                <xs:annotation>
91                                    <xs:documentation>
92                                        The MIME type of a supported DataView.
93                                    </xs:documentation>
94                                </xs:annotation>
95                                <xs:simpleType>
96                                    <xs:restriction base="xs:string">
97                                        <xs:pattern value="\w+/\w([\.\-]{0,1}\w)*(\+\w+){0,1}"/>
98                                    </xs:restriction>
99                                </xs:simpleType>
100                            </xs:element>
101                        </xs:sequence>
102                    </xs:complexType>
103                </xs:element>
104                <!-- Collections -->
105                <xs:element name="Collections">
106                    <xs:annotation>
107                        <xs:documentation>
108                            <h:p>
109                                A list of collections, that are available
110                                at an CLARIN-FCS endpoint. An endpoint MUST
111                                declare at least one collection.
112                            </h:p>
113                        </xs:documentation>
114                    </xs:annotation>
115                    <xs:complexType>
116                        <xs:sequence>
117                            <xs:element ref="ed:Collection" maxOccurs="unbounded"/>
118                        </xs:sequence>                           
119                    </xs:complexType>
120                </xs:element>
121            </xs:sequence>
122        </xs:complexType>
123    </xs:element>
124
125    <xs:element name="Collection">
126        <xs:annotation>
127            <xs:documentation>
128                <h:p>
129                    Detailed description of a collection that is available at an
130                    CLARIN-FCS endpoint. A collection is a searchable
131                    entity at an endpoint, e.g. a single corpus.
132                </h:p>
133            </xs:documentation>
134        </xs:annotation>
135        <xs:complexType>
136            <xs:sequence>
137                <xs:element name="Title" type="ed:i18nString" maxOccurs="unbounded">
138                    <xs:annotation>
139                        <xs:documentation>
140                            <h:p>
141                                A human readable title for the corpus. An English version is
142                                mandatory.
143                            </h:p>
144                        </xs:documentation>
145                    </xs:annotation>
146                </xs:element>
147                <xs:element name="Description" type="ed:i18nString" minOccurs="0" maxOccurs="unbounded">
148                    <xs:annotation>
149                        <xs:documentation>
150                            <h:p>
151                                An optional human-readable description of the collection. Is should
152                                be at most one sentence. If supplied, an English version is
153                                mandatory.
154                            </h:p>
155                        </xs:documentation>
156                    </xs:annotation>
157                </xs:element>
158                <xs:element name="LandingPageURI" type="xs:anyURI" minOccurs="0">
159                    <xs:annotation>
160                        <xs:documentation>
161                            <h:p>
162                                A link to a website for this collection, e.g. a landing page for a corpus.
163                            </h:p>
164                        </xs:documentation>
165                    </xs:annotation>
166                </xs:element>
167                <xs:element name="Languages">
168                    <xs:annotation>
169                        <xs:documentation>
170                            <h:p>
171                                The (relevant) languages available <h:em>within</h:em> the collection.
172                            </h:p>
173                        </xs:documentation>
174                    </xs:annotation>
175                    <xs:complexType>
176                        <xs:sequence>
177                            <xs:element name="Language" maxOccurs="unbounded">
178                                <xs:annotation>
179                                    <xs:documentation>
180                                        <p>
181                                            A ISO 639-3 three letter language code. This
182                                            element should be repeated for all languages
183                                            (relevant) available <h:em>within</h:em> the collection.
184                                        </p>
185                                    </xs:documentation>
186                                </xs:annotation>
187                                <xs:simpleType>
188                                    <xs:restriction base="xs:string">
189                                        <xs:pattern value="[a-zA-Z]{3}"/>
190                                    </xs:restriction>
191                                </xs:simpleType>
192                            </xs:element>
193                        </xs:sequence>
194                    </xs:complexType>
195                </xs:element>
196                <xs:element ref="ed:Collection" minOccurs="0" maxOccurs="unbounded">
197                    <xs:annotation>
198                        <xs:documentation>
199                            <h:p>
200                                If a collection has searchable sub-collections
201                                the endpoint MUST supply additional finer grained
202                                collection elements. A sub-collection is a
203                                searchable entity within a collection, e.g. a sub-corpus.
204                            </h:p>
205                        </xs:documentation>
206                    </xs:annotation>
207                </xs:element>
208            </xs:sequence>
209            <xs:attribute name="pid" type="xs:anyURI" use="required">
210                <xs:annotation>
211                    <xs:documentation>
212                        <h:p>
213                            The persistent identifier of this collection. This
214                            value MUST be the same as the <h:code>MdSelfLink</h:code>
215                            of the CMDI record describing the collection.
216                        </h:p>
217                    </xs:documentation>
218                </xs:annotation>
219            </xs:attribute>
220        </xs:complexType>
221    </xs:element>
222
223    <xs:complexType name="i18nString">
224        <xs:simpleContent>
225            <xs:extension base="xs:string">
226                <xs:attribute ref="xml:lang" use="required" />
227            </xs:extension>
228        </xs:simpleContent>
229    </xs:complexType>
230</xs:schema>
Note: See TracBrowser for help on using the repository browser.