<!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>SPARQL Views: A Visual SPARQL Query Builder for Drupal</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Digital Enterprise Research Institute, National University of Ireland</institution>
          ,
          <addr-line>Galway</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>Publishing Linked Data on the Web has become much easier with tools such as Drupal. However, consuming that data and presenting it in a meaningful way is still di cult for both Web developers and for Semantic Web practitioners. We demonstrate a module for Drupal which supports visual query building for SPARQL queries and enables meaningful displays of the query result.</p>
      </abstract>
      <kwd-group>
        <kwd>Lin Clark</kwd>
        <kwd>User Interfaces</kwd>
        <kwd>End-user Programming</kwd>
        <kwd>CMS</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>For illustration of the tool and its usefulness, we imagine a research institute Web
site such as http://deri.ie/. The site includes pages for researcher pro les. A
researcher's pro le page pulls the researcher's publication list from an dataset
such as DBLP3. The pro les will be set up and administered by a Webmaster
who is unfamiliar with SPARQL, but knows a small amount of PHP and is
comfortable with HTML.</p>
      <p>We walk through this use case in a video demonstration available at http:
//lin-clark.com/iswc. We give an analysis of the challenges faced in building
such a Web site and our solutions to those challenges below.
3
3.1</p>
    </sec>
    <sec id="sec-2">
      <title>Usability Challenges in Query Building</title>
      <sec id="sec-2-1">
        <title>Figuring out where to start</title>
        <p>
          Inexperienced users are overwhelmed when given too many interaction options
or, even worse, when given a blank slate where they must enter a command
language like SPARQL [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ].
        </p>
        <p>
          Interaction strategy|To assist users in nding where to start, we initially
o er one single point of interaction. We make the assumption that most queries
are centered around predicates, and we use the drag-and-drop predicate list as
the rst means of interaction. We then animate the addition of subject and
object to that predicate in order to guide the user to the next step, using the
strategy of sequential a ordance[
          <xref ref-type="bibr" rid="ref4">4</xref>
          ].
3.2
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>Figuring out which predicates to use in the query</title>
        <p>When accessing an arbitrary endpoint, end users have little support in
understanding what data is contained in the dataset and how it is linked.</p>
        <p>Interaction strategy|The endpoint is queried to determine which
predicates are used in the dataset. Only predicates that are present in the dataset are
displayed. An autocomplete search box allows the user to lter to appropriate
terms.
3.3</p>
      </sec>
      <sec id="sec-2-3">
        <title>Declaring pre x mappings</title>
        <p>Declaring pre x mappings requires knowledge of both syntax and of standards
and inexperienced users can have a hard time nding the appropriate namespace
for a vocabulary.</p>
        <p>Interaction strategy|The pre x declaration is automatically generated
for the user from the predicates that are used. If a namespace mapping is not
available in the system (which uses pre x.cc as it's source), then the full URI is
used in the predicate display and the query.
3 http://dblp.l3s.de/d2r/sparql</p>
        <p>SPARQL Views: A Visual SPARQL Query Builder for Drupal</p>
      </sec>
      <sec id="sec-2-4">
        <title>Understanding the logical structure of queries</title>
        <p>While conjunction and disjunction based logic is ubiquitous in everyday life and
is thus intuitive to a large degree, the syntax of SPARQL obscures that logic for
the inexperienced user.</p>
        <p>
          Interaction strategy|Where SPARQL syntax requires mental
computation of the logic, visual representation of queries allows perceptual inference of
the underlying logic[
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]. We provide a visualization which makes the triple based
logical patterns clear and o ers a ordances that re ect the possibilities of the
graph structure. We currently only support basic conjunctive queries as these
are the easiest to conceptualize[
          <xref ref-type="bibr" rid="ref6">6</xref>
          ], but are looking at ways to visually express
other patterns.
4
4.1
5
5.1
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Usability Challenges in Result Display</title>
      <sec id="sec-3-1">
        <title>Displaying results in multiple display formats</title>
        <p>SPARQL results are not useful in their raw format, but need to have tailored
displays in order for the pattern of information within the data to be
communicated. Semantic Web practitioners often create bespoke systems for this display,
leading to duplication of e ort within the Semantic Web community.</p>
        <p>Interaction strategy|We integrated the query building tool with a widely
deployed Drupal module, Views. This module o ers a pluggable system for
displaying query results. Switching from an HTML table view, to a Google API
chart view, to a JavaScript Exhibit of the data is easy to do through the Views
user interface. Because SV is integrated with this pluggable system, any style
and display plugins that the Drupal community develops to display various kinds
of data can also style SPARQL results.
4.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>Using context to rewrite the query</title>
        <p>Information is most useful if it is tailored to the page where it is displayed. For
instance, in the use case above, when a visitor visits a faculty member's pro le,
the query should return only publications authored by that faculty member.</p>
        <p>Interaction strategy|We provide support for Drupal's Token API. This
allows users to easily register tokens|small placeholder variables|and use these
in their queries. The token is then evaluated at page load, so context, such as
which user's pro le is being viewed, can be assessed when creating the query.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Future Work</title>
      <sec id="sec-4-1">
        <title>Predicate Preprocessing and Ranking</title>
        <p>We currently use a DISTINCT query to get the predicates from a dataset. For
certain endpoints, such as the one at http://dbpedia.org/sparql, this query
will timeout and not return results. We plan to create a Web service that can
extract predicates from crawls preprocess the predicates for di erent endpoints.
This service could provide additional data, such as the predicate de nition and
a ranking based on predicate usage within the dataset.
5.2</p>
      </sec>
      <sec id="sec-4-2">
        <title>Dataset Selection</title>
        <p>A barrier we have not addressed in the current work is the selection of
appropriate datasets. We plan to create tools to guide users in nding an appropriate
dataset.
5.3</p>
      </sec>
      <sec id="sec-4-3">
        <title>Federated Queries</title>
        <p>Currently, there can only be one endpoint or dataset de ned per view. However,
one of the most exciting potentials of the Semantic Web is to mix data from
multiple sources and we plan to explore how this can be supported in SV.
5.4</p>
      </sec>
      <sec id="sec-4-4">
        <title>Evaluation</title>
        <p>We believe that it is possible to support and encourage the user's increasing
understanding of SPARQL by lowering the barrier to entry and focusing on
learnability. We plan to evaluate this assertion, to see whether interaction with
SPARQL Views increases the acceptance of SPARQL and the understanding of
the syntax itself, enabling users to incrementally improve their understanding of
the query language.</p>
        <p>Acknowledgments. This work was funded by Google Summer of Code, LOD
Around-The-Clock (LATC) ICT-256975, and by Science Foundation Ireland
under Grant No. SFI/08/CE/I1380 (Lion-2). Thank you to Drupal contributors
Daniel Wehner and Laura Scott for their guidance and feedback.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>Tiziana</given-names>
            <surname>Catarci</surname>
          </string-name>
          , Maria F. Costabile, Stefano Levialdi, and
          <string-name>
            <given-names>Carlo</given-names>
            <surname>Batini</surname>
          </string-name>
          .
          <source>Visual query systems for databases: A survey</source>
          ,
          <year>1995</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>Stephane</given-names>
            <surname>Corlosquet</surname>
          </string-name>
          , Renaud Delbru, Tim Clark, Axel Polleres, and
          <string-name>
            <given-names>Stefan</given-names>
            <surname>Decker</surname>
          </string-name>
          .
          <article-title>Produce and consume linked data with drupal! In The Semantic Web - ISWC</article-title>
          <year>2009</year>
          , volume
          <volume>5823</volume>
          of Lecture Notes in Computer Science, pages
          <volume>763</volume>
          {
          <fpage>778</fpage>
          . Springer Berlin / Heidelberg,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>Markus</given-names>
            <surname>Kro</surname>
          </string-name>
          <article-title>tzsch, Denny Vrandecic, and Max Volkel. Semantic mediawiki</article-title>
          .
          <source>In The Semantic Web - ISWC</source>
          <year>2006</year>
          , volume
          <volume>4273</volume>
          of Lecture Notes in Computer Science, pages
          <volume>935</volume>
          {
          <fpage>942</fpage>
          . Springer Berlin / Heidelberg,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>Joanna</given-names>
            <surname>Mcgrenere</surname>
          </string-name>
          .
          <article-title>A ordances: Clarifying and evolving a concept</article-title>
          .
          <source>In Proceedings of Graphics Interface 2000</source>
          , pages
          <fpage>179</fpage>
          {
          <fpage>186</fpage>
          ,
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Donald</surname>
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Norman</surname>
          </string-name>
          .
          <source>The Design of Everyday Things. Basic Books</source>
          , New York,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Vladimir</surname>
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Sloutsky</surname>
            and
            <given-names>Yevgeniya</given-names>
          </string-name>
          <string-name>
            <surname>Goldvarg</surname>
          </string-name>
          .
          <article-title>Mental representation of logical connectives</article-title>
          .
          <source>The Quarterly Journal of Experimental Psychology</source>
          ,
          <source>57A(4):</source>
          <volume>636</volume>
          {
          <fpage>665</fpage>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>