Changeset 4486 for FederatedSearch


Ignore:
Timestamp:
02/10/14 13:39:00 (10 years ago)
Author:
oschonef
Message:
  • some schema tweaks
  • revamped Resource.xsd
  • adjust example
Location:
FederatedSearch
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • FederatedSearch/examples/Example-Resource.xml

    r2429 r4486  
    11<?xml version="1.0" encoding="UTF-8"?>
    22<Resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    3     xsi:schemaLocation="http://clarin.eu/fcs/1.0 ../Resource.xsd
    4                         http://clarin.eu/fcs/1.0/kwic ../Resource-KWIC.xsd"
     3    xsi:schemaLocation="http://clarin.eu/fcs/1.0 ../schema/Resource.xsd
     4                        http://clarin.eu/fcs/1.0/hits ../schema/Resource-HITS.xsd"
    55    xmlns="http://clarin.eu/fcs/1.0"
    66    pid="hdl:4711/00-0000-0000-0000-0000-0">
    7     <DataView type="application/vnd.google-earth.kml+xml"
    8               ref="http://poral.example.org/corpus1/00-0000-0000-0000-0000-0#S0815">
     7    <DataView type="application/x-clarin-fcs-hits+xml"
     8              ref="http://repos.example.org/corpus1/00-0000-0000-0000-0000-0#S0815">
    99        <!--
    1010            NOTE: File formatetted for brevitiy.
    1111                  Indention and formatting should be avoided.
    1212        -->
    13         <kwic:kwic xmlns:kwic="http://clarin.eu/fcs/1.0/kwic">
    14             <kwic:c type="left">
    15                 Und so will ich denn hier auch noch anfÃŒhren, daß ich in diesem
    16                 Elend das neckische GelÃŒbde getan: man solle, wenn ich uns
    17                 erlöst und mich wieder zu Hause sÀhe, von mir niemals wieder
    18                 einen Klagelaut vernehmen ÃŒber den meine freiere Zimmeraussicht
    19                 beschrÀnkenden Nachbargiebel, den ich vielmehr jetzt recht
    20                 sehnlich zu erblicken wÃŒnsche; ferner wollt' ich mich ÃŒber
    21                 Mißbehagen und Langeweile im deutschen Theater nie wieder
    22                 beklagen, wo man doch immer
    23             </kwic:c>
    24             <kwic:kw>
     13        <hits:Result xmlns:hits="http://clarin.eu/fcs/1.0/hits">
     14            Und so will ich denn hier auch noch anfÃŒhren, daß ich in diesem
     15            Elend das neckische GelÃŒbde getan: man solle, wenn ich uns
     16            erlöst und mich wieder zu Hause sÀhe, von mir niemals wieder
     17            einen Klagelaut vernehmen ÃŒber den meine freiere Zimmeraussicht
     18            beschrÀnkenden Nachbargiebel, den ich vielmehr jetzt recht
     19            sehnlich zu erblicken wÃŒnsche; ferner wollt' ich mich ÃŒber
     20            Mißbehagen und Langeweile im deutschen Theater nie wieder
     21            beklagen, wo man doch immer
     22            <hits:Hit>
    2523                Gott
    26             </kwic:kw>
    27             <kwic:c type="right">
    28                 danken könne, unter Dach zu sein, was auch auf der BÃŒhne vorgehe.
    29             </kwic:c>
    30         </kwic:kwic>
     24            </hits:Hit>
     25            danken könne, unter Dach zu sein, was auch auf der BÃŒhne vorgehe.
     26        </hits:Result>
    3127    </DataView>
    3228</Resource>
  • FederatedSearch/schema/Endpoint-Description.xsd

    r4395 r4486  
    11<?xml version="1.0" encoding="UTF-8"?>
    22<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    3     xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" vc:minVersion="1.0"
     3    xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
    44    xmlns:ed="http://clarin.eu/fcs/1.0/endpoint-description" elementFormDefault="qualified"
    55    xmlns:h="http://www.w3.org/1999/xhtml"
    6     targetNamespace="http://clarin.eu/fcs/1.0/endpoint-description" xml:lang="en">
     6    xml:lang="en" vc:minVersion="1.0"
     7    targetNamespace="http://clarin.eu/fcs/1.0/endpoint-description">
    78    <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
    89
  • FederatedSearch/schema/Resource-Hits.xsd

    r4395 r4486  
    11<?xml version="1.0" encoding="UTF-8"?>
    22<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    3     xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" vc:minVersion="1.0"
     3    xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
    44    xmlns:hits="http://clarin.eu/fcs/1.0/hits"
    55    xmlns:h="http://www.w3.org/1999/xhtml"
    6     xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
     6    xml:lang="en" vc:minVersion="1.0"
    77    targetNamespace="http://clarin.eu/fcs/1.0/hits" elementFormDefault="qualified">
    88
  • FederatedSearch/schema/Resource.xsd

    r4485 r4486  
    11<?xml version="1.0" encoding="UTF-8"?>
    22<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">
     3    xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
     4    xmlns:fcs="http://clarin.eu/fcs/1.0"
     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" elementFormDefault="qualified">
    58    <xs:annotation>
    69        <xs:documentation>
    7             <p>
    8                 This XML schema defined the inner structure of a hit within the
     10            <h:p>
     11                This XML schema defines the inner structure of a hit within the
    912                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
     13            </h:p>
     14            <h:p>
     15                Every hit in the result set must be represented as one
     16                <h:code>&lt;sru:record&gt;</h:code> element in the
     17                <h:code>&lt;sru:searchRetrieveResponse;gt;</h:code> response
     18                document.
     19            </h:p>
     20            <h:p>
     21                This schema allows Endpoint to return:
     22            </h:p>
     23            <h:ul>
     24                <h:li>metadata about the matched record, including
     25                    reference to a CMDI record</h:li>
     26                <h:li>separate (metadata) description of full
    2227                    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>
     28                    resource, i.e. an addressable sentence)</h:li>
     29                <h:li>various views on the data delivered (HITS, text-snippet,
     30                    image, individual annotation-layers, ...)</h:li>
     31                <h:li>providing links (either as PID or as
     32                    simple URLs) to any of: Resource, ResourceFragment,
     33                    Metadata (CMDI record), Data Views</h:li>
     34                <h:li>Endpoint specific extensions through an
     35                    extension mechanism</h:li>
     36            </h:ul>
    3037         </xs:documentation>
    3138    </xs:annotation>
     
    3441        <xs:annotation>
    3542            <xs:documentation>
    36                 A one hit in a resource in one or more representations.
     43                <h:p>
     44                    A one hit in a resource in one or more representations.
     45                </h:p>
    3746            </xs:documentation>
    3847        </xs:annotation>
     
    4150    <xs:complexType name="ResourceType">
    4251        <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"/>
     52            <!--
     53              As long as there is no clear use-case, don't allow recursive Resources
     54              <xs:element name="Resource" minOccurs="0" maxOccurs="unbounded" type="fcs:ResourceType"/>
     55            -->
     56            <xs:element name="DataView" type="fcs:DataViewType" minOccurs="0" maxOccurs="unbounded" />
    4557            <xs:element name="ResourceFragment" minOccurs="0" maxOccurs="unbounded">
    4658                <xs:annotation>
    4759                    <xs:documentation>
    48                         <p>
     60                        <h:p>
    4961                            A one hit in a resource in one or more representations.
    50                             Use this instead of a plain &lt;Resource&gt;, if the
     62                            Use this instead of a plain <h:code>&lt;Resource&gt;</h:code>, if the
    5163                            fragment can be addresses directly, e.g. a sentence in
    5264                            a corpus that can be addressed via a PID (with fragment)
    53                             and/or a unique URI.
    54                         </p>
     65                            or a regular URI.
     66                        </h:p>
    5567                    </xs:documentation>
    5668                </xs:annotation>
     
    6375                </xs:complexType>
    6476            </xs:element>
     77            <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
     78                <xs:annotation>
     79                    <xs:documentation>
     80                        <h:p>
     81                            Extension point to allow Endpoints to add custom data to a resource.
     82                            CLARIN-FCS clients SHOULD ignore any data they do not understand. 
     83                        </h:p>
     84                        <h:p>
     85                            This extension mechanism can for example be used to provide hints
     86                            to an (XSLT/XQuery) application that works directly on CLARIN-FCS,
     87                            e.g. to allow it to generate back and forward links to
     88                            navigate in the result set.
     89                        </h:p>
     90                    </xs:documentation>
     91                </xs:annotation>
     92            </xs:any>
    6593        </xs:sequence>
    6694        <xs:attribute name="pid" type="fcs:PidType"/>
     
    7199        <xs:annotation>
    72100            <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>
     101                <h:p>
     102                    A representation of a hit, e.g. a HITS, a Geolocation,
     103                    an image, etc.
     104                </h:p>
     105                <h:p>
     106                    A HITS Data View is mandatory for every hit in the result set.
     107                </h:p>
    79108            </xs:documentation>
    80109        </xs:annotation>
     
    85114            <xs:annotation>
    86115                <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>
     116                    <h:p>
     117                        The type of the content of the Data View as a MIME type.
     118                    </h:p>
     119                    <h:p>
     120                        For the mandatory HITS Data View, use the MIME type
     121                        <h:code>application/x-clarin-fcs-hits+xml</h:code>.
     122                    </h:p>
    91123                </xs:documentation>
    92124            </xs:annotation>
     
    104136        <xs:annotation>
    105137            <xs:documentation>
    106                 <p>
     138                <h:p>
    107139                    A persistent identifier of given entity. This attribute
    108140                    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.
     141                </h:p>
     142                <h:p>
     143                    An Endpoint SHOULD also make the PID available tough the
     144                    <h:code>&lt;sru:recordIdentifier&gt;</h:code> element of
     145                    the <h:code>&lt;sru:record&gt;/</h:code> element.
    112146                    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>
     147                    Metadata, the individual Data View), the Endpoint is MUST
     148                    to put the "most important" (e.g. the primary) PID into the
     149                    <h:code>&lt;sru:recordIdentifier&gt;</h:code> element.
     150                </h:p>
    116151            </xs:documentation>
    117152        </xs:annotation>
     
    122157        <xs:annotation>
    123158            <xs:documentation>
    124                 <p>
    125                     A URI for the given entity, that can be retrieved directly
    126                     (via HTTP or HTTPS).
    127                 </p>
     159                <h:p>
     160                    A regular URI for the given entity, that can be retrieved
     161                    directly (via HTTP or HTTPS).
     162                </h:p>
     163                <h:p>
     164                    This URI may include custom Endpoint specific query strings
     165                    to implement features like hit highlighting.
     166                </h:p>
    128167            </xs:documentation>
    129168        </xs:annotation>
Note: See TracChangeset for help on using the changeset viewer.