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

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