Changes between Version 27 and Version 28 of FCS-Specification-ScrapBook


Ignore:
Timestamp:
02/11/14 11:25:45 (10 years ago)
Author:
oschonef
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FCS-Specification-ScrapBook

    v27 v28  
    133133    XML Media Types, IETF RFC 3023, January 2001, \\
    134134    [http://www.ietf.org/rfc/rfc3023.txt]
     135 KML[=#REF_KML_Spec]::
     136    Keyhole Markup Language (KML), Open Geospatial Consortium, 2008, \\
     137    [http://www.opengeospatial.org/standards/kml]
    135138
    136139== CLARIN-FCS Interface Specification ==
     
    260263All entities of the Hit can be referenced by a persistent identifier and an URI. The complete Resource is referenceable by either the persistent identifier `http://hdl.handle.net/4711/08-15` or the URI `http://repos.example.org/file/text_08_15.html` and the CMDI metadata record in the CMDI Data View is referenceable either by the persistent identifier `http://hdl.handle.net/4711/08-15-1` or the URI `http://repos.example.org/file/08_15_1.cmdi`. The actual hit in the Resource Fragment is also directly referenceable by either the persistent identifier `http://hdl.handle.net/4711/00-15-2` or the URI `http://repos.example.org/file/text_08_15.html#sentence2`.   
    261264
     265Endpoints `MUST` serialize one Resource for each hit, i.e. they `MUST NOT` combine several hits in one Resource. E.g., if a query matches five different sentences within one text (= the resource), the endpoint must serialize five Resource (= one per hit) and embed each within one SRU result (see [#query below]).
     266
    262267
    263268==== Data View ====
    264 A ''Data View'' serves as a container for representing search results within CLARIN-FCS. Data Views are designed to allow for different representations of results, i.e they are deliberately kept open to allow further extensions with more supported data view formats. Each Data View is identified by a MIME type ([#REF_RFC_6838 RFC6838], [#REF_RFC_3023 RFC3023]). If no existing MIME type can be used, implementors `SHOULD` define a properer private mime type. The type if the Data View is recorded in the `@type` attribute if the `<fcs:DataView>` element.
    265 
    266 The following formats are defined as part of the specification:
    267  Generic Hits (HITS)::
    268    Yada ...
    269  Component Metadata (CMDI)::
    270    Yada ...
    271  Images (IMG)::
    272    Yada ...
    273    
     269A ''Data View'' serves as a container for representing search results within CLARIN-FCS. Data Views are designed to allow for different representations of results, i.e. they are deliberately kept open to allow further extensions with more supported data view formats. The content of a Data View is called `payload`. Each Data View is identified by a MIME type ([#REF_RFC_6838 RFC6838], [#REF_RFC_3023 RFC3023]). If no existing MIME type can be used, implementors `SHOULD` define a properer private mime type. The type if the Data View is recorded in the `@type` attribute if the `<fcs:DataView>` element.
     270
     271The content of a Data View can either be deposited ''inline'' or by ''reference''. In the case of ''inline'', the payload of the Data View `MUST` serialized as an XML fragment below the `<fcs:DataView>` element. This method is the preferred methods payloads that can easily serialized in XML. In the case of by ''reference'', the content cannot easily deposited inline, i.e. it is binary content. In this case, the Data View `MUST` include a `@ref` or `@pid` attribute that links location for Clients to download the payload. This location `SHOULD` be ''openly accessible'', i.e. data can be downloaded freely without any need to perform a login.
     272
     273For the ''basic'' profile, the Data Views ''Generic Hits'', ''Component Metadata'', ''Image'' and ''Geolocation'' are defined in this specification. Endpoints `MAY` define custom Data Views, but Clients conforming to the ''basic'' profile `MAY` chose to ignore these.
     274
     275The examples in the following sections ''show only''
     276===== Generic Hits (HITS) =====
     277||=Description         =|| The representation of the hit ||
     278||=MIME type           =|| `application/x-clarin-fcs-hits+xml` ||
     279||=Payload Disposition =|| ''inline'' ||
     280The ''Generic Hits'' Data View contains the serialization of a search result hit.
     281Example (single hit marker):
     282{{{#!xml
     283<Result xmlns="http://clarin.eu/fcs/1.0/hits">
     284    The quick brown <Hit>fox</Hit> jumps over the lazy dog.
     285</Result>
     286}}}
     287Example (multiple hit markers; using XML namespace prefix instead):
     288{{{#!xml
     289<hits:Result xmlns:hits="http://clarin.eu/fcs/1.0/hits">
     290    The quick brown <Hit>fox</Hit> jumps over the lazy dog.
     291</hits:Result>
     292}}}
     293
     294===== Component Metadata (CMDI) =====
     295||=Description         =|| A CMDI metadata record ||
     296||=MIME type           =|| `application/x-cmdi+xml` ||
     297||=Payload Disposition =|| ''inline'' or ''reference'' ||
     298The ''Component Metadata'' Data View allows to embed a CMDI metadata record that ''applicable'' to the specific context into the Endpoint response, e.g. metadata about the resource in which the hit was produced. If this CMDI record is applicable for the entire Resource, is `SHOULD` be put in a `<fcs:DataView>` element below the `<fcs:Resource>` element. If it is applicable to the Resource Fragment, i.e. it contains more specialized metadata than the metadata for the encompassing resource, it `SHOULD` be put in a `<fcs:DataView>` element below the `<fcs:ResourceFragment>` element. Endpoints `SHOULD` provide the payload ''inline'', but Endpoints `MAY` also use the ''reference'' method. If an Endpoint uses the ''reference'' method, the CMDI metadata record `MUST` be downloadable without any restrictions.
     299
     300===== Images (IMG) =====
     301||=Description         =|| An image related to the hit ||
     302||=MIME type           =|| `image/png`, `image/jpeg`, `image/gif`, `image/svg+xml` ||
     303||=Payload Disposition =|| ''reference'' ||
     304
     305The ''Image'' Data View
     306===== Geolocation (GEO) =====
     307||=Description         =|| An geographic location related to the hit ||
     308||=MIME type           =|| `application/vnd.google-earth.kml+xml` ||
     309||=Payload Disposition =|| ''inline'' ||
     310The ''Geolocation'' Data View allows to geolocalize the hit. If `MUST` be encoded using the XML representation of the Keyhole Markup Language (KML)]. The KML fragment `MUST` comply with the [=#REF_KML_Spec KML specification].
     311
     312Example:
     313<kml xmlns="http://www.opengis.net/kml/2.2">
     314  <Placemark>
     315    <name>Simple placemark</name>
     316    <description>Attached to the ground. Intelligently places itself
     317       at the height of the underlying terrain.</description>
     318    <Point>
     319      <coordinates>-122.0822035425683,37.42228990140251,0</coordinates>
     320    </Point>
     321  </Placemark>
     322</kml>
     323
     324
    274325*WIP*
    275326The type of each data view is identified by the {{{type}}} attribute of the {{{<fcs:DataView>}}} element. The value if defined to be a [http://en.wikipedia.org/wiki/MIME_Type MIME type].  The following formats are currently being considered:
     
    287338</fcs:DataView>
    288339}}}
    289   CMDI metadata::
    290     Description: a CMDI metadata record applicable to the specific context, i.e., if contained inside a resource element it should apply to the entire resource, and if contained inside a resource fragment is should apply specifically to the resource fragment (i.e., more specialized than the metadata for the encompassing resource). The minimal XML schema for CMDI records can be found at [source:metadata/trunk/toolkit/xsd/minimal-cmdi.xsd minimal-cmdi.xsd] ([source:metadata/trunk/toolkit/xsd/minimal-cmdi.xsd?format=txt download]). For further information refer to the [http://www.clarin.eu/cmdi Component Metadata] pages. \\
    291     Type: {{{application/x-cmdi+xml}}} \\
    292 
    293   Geolocation (KML)::
    294     Description: A geographic location encoded in the Keyhole Markup Language. Please refer to the [http://www.opengeospatial.org/standards/kml KML standard] for further information and the current KML XML schema. \\
    295     Type: {{{application/vnd.google-earth.kml+xml}}}
    296340
    297341