source: FederatedSearch/Resource.xsd

Last change on this file was 2453, checked in by oschonef, 11 years ago
  • use CLARIN-FCS instead of CLARIN FCS
File size: 5.8 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
3    xmlns:fcs="http://clarin.eu/fcs/1.0" xmlns="http://www.w3.org/1999/xhtml"
4    targetNamespace="http://clarin.eu/fcs/1.0" elementFormDefault="qualified" xml:lang="en">
5    <xs:annotation>
6        <xs:documentation>
7            <p>
8                This XML schema defined the inner structure of a hit within the
9                search result in the CLARIN federated content search (CLARIN-FCS).
10            </p>
11            <p>
12                Every hit in the result set must be represented at one
13                &lt;sru:record&gt; in the &lt;sru:searchRetrieveResponse;gt;.
14            </p>
15            <p>
16                It allows endpoint to return:
17            </p>
18            <ul>
19                <li>metadata about the matched record, including
20                    reference to a CMDI record</li>
21                <li>separate (metadata) description of full
22                    Resource and ResourceFragment (matching part of the
23                    resource, i.e. an addressable sentence)</li>
24                <li>providing metadata and content</li>
25                <li>various views on the data delivered (KWIC, text-snippet,
26                    image, individual annotation-layers, ...)</li>
27                <li>providing links (either as PID or as simple URLs) to any of:
28                    Resource, ResourceFragment, Metadata (CMDI record), DataViews</li>
29            </ul>
30         </xs:documentation>
31    </xs:annotation>
32
33    <xs:element name="Resource" type="fcs:ResourceType">
34        <xs:annotation>
35            <xs:documentation>
36                A one hit in a resource in one or more representations.
37            </xs:documentation>
38        </xs:annotation>
39    </xs:element>
40
41    <xs:complexType name="ResourceType">
42        <xs:sequence>
43            <xs:element name="Resource" minOccurs="0" maxOccurs="unbounded" type="fcs:ResourceType"/>
44            <xs:element name="DataView" minOccurs="0" maxOccurs="unbounded" type="fcs:DataViewType"/>
45            <xs:element name="ResourceFragment" minOccurs="0" maxOccurs="unbounded">
46                <xs:annotation>
47                    <xs:documentation>
48                        <p>
49                            A one hit in a resource in one or more representations.
50                            Use this instead of a plain &lt;Resource&gt;, if the
51                            fragment can be addresses directly, e.g. a sentence in
52                            a corpus that can be addressed via a PID (with fragment)
53                            and/or a unique URI.
54                        </p>
55                    </xs:documentation>
56                </xs:annotation>
57                <xs:complexType>
58                    <xs:sequence>
59                        <xs:element maxOccurs="unbounded" minOccurs="0" name="DataView" type="fcs:DataViewType"/>
60                    </xs:sequence>
61                    <xs:attribute name="pid" type="fcs:PidType"/>
62                    <xs:attribute name="ref" type="fcs:ReferenceType"/>
63                </xs:complexType>
64            </xs:element>
65        </xs:sequence>
66        <xs:attribute name="pid" type="fcs:PidType"/>
67        <xs:attribute name="ref" type="fcs:ReferenceType"/>
68    </xs:complexType>
69
70    <xs:complexType name="DataViewType">
71        <xs:annotation>
72            <xs:documentation>
73                <p>
74                    A representation of a hit, e.g. a KWIC, a geo location, an image, etc.
75                </p>
76                <p>
77                    A KWIC DataView is mandatory.
78                </p>
79            </xs:documentation>
80        </xs:annotation>
81        <xs:sequence>
82            <xs:any namespace="##other" processContents="strict"/>
83        </xs:sequence>
84        <xs:attribute name="type" use="required">
85            <xs:annotation>
86                <xs:documentation>
87                    <p>
88                        The type of the content of the DataView as a MIME type.
89                        For the mandatory KWIC view, use "application/x-clarin-fcs-kwic+xml".
90                    </p>
91                </xs:documentation>
92            </xs:annotation>
93            <xs:simpleType>
94                <xs:restriction base="xs:string">
95                    <xs:pattern value="\w+/\w([\.\-]{0,1}\w)*(\+\w+){0,1}"/>
96                </xs:restriction>
97            </xs:simpleType>
98        </xs:attribute>
99        <xs:attribute name="pid" type="fcs:PidType"/>
100        <xs:attribute name="ref" type="fcs:ReferenceType"/>
101    </xs:complexType>
102
103    <xs:simpleType name="PidType">
104        <xs:annotation>
105            <xs:documentation>
106                <p>
107                    A persistent identifier of given entity. This attribute
108                    should be used, if a PID is available for the given entity.
109                </p>
110                <p>
111                    An FCS endpoint should also &lt;sru:record&gt;/&lt;sru:recordIdentifier&gt; element.
112                    If more PIDs are available for one record (i.e. Resource,
113                    Metadata, DataView), the endpoint is supposed to put the
114                    "most important" (e.g. the primary) PID into &lt;sru:recordIdentifier&gt;
115                </p>
116            </xs:documentation>
117        </xs:annotation>
118        <xs:restriction base="xs:anyURI"/>
119    </xs:simpleType>
120
121    <xs:simpleType name="ReferenceType">
122        <xs:annotation>
123            <xs:documentation>
124                <p>
125                    A URI for the given entity, that can be retrieved directly
126                    (via HTTP or HTTPS).
127                </p>
128            </xs:documentation>
129        </xs:annotation>
130        <xs:restriction base="xs:anyURI"/>
131    </xs:simpleType>
132</xs:schema>
Note: See TracBrowser for help on using the repository browser.