<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Linked Data Wrappers atop Yahoo's YQL</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Jon Iturrioz</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Iker Azpeitia</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Oscar Díaz</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Univ. of the Basque Country (EHU/UPV)</institution>
          ,
          <addr-line>Donostia</addr-line>
          ,
          <country country="ES">Spain</country>
        </aff>
      </contrib-group>
      <fpage>20</fpage>
      <lpage>21</lpage>
      <abstract>
        <p>The Yahoo Query Language (YQL) specializes on providing a framework for abstracting developers from the heterogeneity of API requests and its optimization [1]. This specialization is what makes YQL attractive for LDW development. YQL abstracts APIs through the so-called Open Data Tables (ODT). As an example, consider Last.fm. This is a music website that provides information about musical events through an Open API1. ODTs abstract API specifics through a table-like view. Figure 1 shows the ODT for the service lastfm.event.getInfo2. Main tags include &lt;meta&gt; and &lt;bindings&gt;. The former contains descriptive information about the ODT such as author, description or documentation link 3-5). The bindings indicate how YQL operations are mapped into API calls. An entry exists for each operation (e.g. &lt;select&gt;). The sample case illustrates the SELECT case (10-16): &lt;url&gt; accounts for the URL pattern to invoke whereas &lt;inputs&gt; denotes the possible YQL statement input field. Each field (e.g. event) accounts for variables to be instantiated when SELECT is enacted. YQL promotes reuse through ODTs so that the YQL community can tap on someone else's ODT for their own developments. ODTs provide a good starting point for LDWs. This entails a double wrapping: YQL wraps APIs as tables while LDWs wrap tables as linked data. Grounding and lifting concerns are considered during the second wrapping. Back to our running example, this is achieved as follows (see Figure 1). YQL's sampleQuery tag is used to describe the URI pattern (line 6) and the URI grounding (line 7). When a linked wrapper server receives a URI, it identifies the ODT at hand through pattern matching against the registered URIPattern at deployment time. This pattern is attached to the linked wrapper server base URL (e.g. http://www.onekin.org/). The binding (lowering mapping) from URI pattern to ODT input parameters is realized through pattern matching parameters (i.e. line 6 to line 13 {event} binding). YQL's function tag is recast for lifting: each YQL tuple (i.e. oneEventXML) is to be turned into an RDF individual (i.e. oneEventJSONLD ). The lifting function holds &lt;inputs&gt; and &lt;execute&gt;. The former indicates the function's parameters which are set to &lt;pipe&gt;, i.e. holds “a tuple” of the ODT table described à la XML (line 19), and &lt;key&gt; (i.e. to cast the ID for the returned RDF individual) (line 20). As for &lt;execute&gt;, it holds the JavaScript code that obtains JSON-LD out of the XML tuple (line 22-28). Interlinkage is also described here by constructing URIs out of existing parameters, e.g. mo:performer 1 http://www.last.fm/api. 2 Full description at https://github.com/yql/yql-tables/blob/master/lastfm/ lastfm.event.getinfo.xml.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>links to the MusicBrainz resource about the artist (line 27). Noteworthy, this
interlinkage is realized through another LDW.</p>
      <p>Benefits are three-fold. First, LDWs are sheltered from changes in the
underlying APIs. API upgrades are handled at the YQL-table level without impacting
the LDWs built on top. Second, reuse. LDW developers can tap into existing
ODT (1068 at the time of this writing). Third, infrastructure. Yahoo supports
ODT enactment by providing load balancing and graceful performance
degradation. Dereferencing (which implies ODT enactment) then enjoys these pluses. See
it at work by dereferencing http://rdf.onekin.org/lastfm/event/3986264.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1. Yahoo!
          <article-title>Developer Network. Yahoo Query Language (YQL) guide</article-title>
          . https://developer.yahoo.com/yql/guide/.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>