<!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>The SPARQLING system for SPARQL queries over GRAPHOL ontologies</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Sara Di Bartolomeo</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Gianluca Pepe</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Valerio Santarelli</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Domenico Fabio Savo</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>(a) Sapienza Universita` di Roma</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>(b) OBDA Systems</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>In this demo we present the SPARQLING system for SPARQL query building based on the GRAPHOL visual language for ontologies. The characterizing feature of SPARQLING is the idea to preserve and take advantage of the native diagrammatic representation of GRAPHOL ontologies, allowing the user to navigate it, and to construct a graph-based representation of the query over it through a simple point-and-click mechanism. The system then automatically transforms the graphical query into the SPARQL syntax.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>In computer science, an ontology is the formal conceptualization of a domain of interest,
and its purpose it to favor sharing and integration of knowledge among information
systems and to provide an abstract representation of the domain which is understood
and agreed upon by ontology designers and domain experts.</p>
      <p>
        Ontologies commonly are formalized through languages such as Description
Logics [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] (DLs) or the W3C standards RDF(S)1 and OWL 22. Typically however, it is
rare to encounter people in industrial settings who possess the skills to interpret the
logic-based formulas used in such languages. This represents a significant issue in the
adoption of ontologies in these settings, because it creates a bottleneck in the
ontology design phase, where ontology engineers must work with domain experts. To
mitigate this problem, numerous graphical languages for ontologies [
        <xref ref-type="bibr" rid="ref10 ref5 ref7">5, 7, 10</xref>
        ] have been
proposed in recent years, and among the latest of these efforts is GRAPHOL [
        <xref ref-type="bibr" rid="ref11 ref6">6, 11</xref>
        ].
The main features of GRAPHOL are that it presents an entirely graphical syntax based
on Entity-Relationship diagrams, it has a formal DL-based semantics, and is able to
fully capture OWL 2. The effectiveness of GRAPHOL as the language for representing
ontologies has been validated in several recent and ongoing research and instrustrial
projects [
        <xref ref-type="bibr" rid="ref2 ref3">2, 3</xref>
        ].
      </p>
      <p>Ontologies, aside from acting as a conceptualization of a domain, are gaining steam
as a means to access and manage data. In fact, triple stores are now commonly used to</p>
      <sec id="sec-1-1">
        <title>1 http://www.w3.org/TR/rdf-primer-20040210/</title>
      </sec>
      <sec id="sec-1-2">
        <title>2 http://www.w3.org/TR/owl2-primer</title>
        <p>
          manage (Linked) enterprise data [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ], and semantic technologies such as ontologies are
used to manage legacy data stores [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ]. In these settings, the standard query language
for triple stores and ontologies is SPARQL3. SPARQL, while simpler in structure than
traditional query languages such as SQL, still suffers from the same drawback as
traditional ontology languages, i.e., it is not easily understood by people who lack specific
training or background. Going back to the idea of using graphical solutions to support
usability, there have been several proposals for visual SPARQL query building systems
in recent years, from those that allow query formulation in natural language or through
context-sensitive completion mechanisms [
          <xref ref-type="bibr" rid="ref13 ref9">9, 13</xref>
          ], to those that provide support for
constructing graph-based representations of the SPARQL query [
          <xref ref-type="bibr" rid="ref1 ref14 ref8">1, 8, 14</xref>
          ].
        </p>
        <p>
          In this demonstration, we present the latest of these systems, SPARQLING.
SPARQLING is a web application that allows to build SPARQL queries based on the
GRAPHOL language, whose characterizing feature is the idea to preserve and take
advantage of the native diagrammatic representation in GRAPHOL of the ontology.
Through SPARQLING’s interface, the user can navigate the ontology and formulate a
graph-based representation of a SPARQL query over it through a simple point-and-click
mechanism. To illustrate the main features of SPARQLING, we will invite attendees of
the demo to experiment it on the Base Register of Individuals, Families, and
Cohabitation (BRIFC) ontology, developed during a joint project between Sapienza University
of Rome, OBDA Systems, and the Italian National Institute of Statistics (Istat) [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ].
        </p>
        <p>SPARQLING is an open-source project, available on Github4, and is supported by
OBDA Systems5.</p>
      </sec>
      <sec id="sec-1-3">
        <title>3 https://www.w3.org/TR/rdf-sparql-query/</title>
      </sec>
      <sec id="sec-1-4">
        <title>4 https://github.com/picorana/painless_sparql</title>
      </sec>
      <sec id="sec-1-5">
        <title>5 https://www.obdasystems.com/</title>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>The SPARQLING System</title>
      <p>
        SPARQLING is a web-based application for constructing SPARQL queries by exploiting
the GRAPHOL representation of the ontology. The development of SPARQLING
originates in systems for Ontology-based Data Management [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], hence it currently supports
the conjunctive query fragment of SPARQL. As shown in Figure 1, the system interface
is divided in three main sections, which we describe briefly.
      </p>
      <p>The main area contains the GRAPHOL diagrams. Through the tools in this area,
the user can navigate and inspect the ontology along with its documentation. The
GRAPHOL representation allows the user to clearly perceive its structure and content,
facilitating the task of constructing the query over the ontology. Indeed, the mental
process of writing a query is natural when looking at a GRAPHOL diagram because it recalls
the act of tracing a path on it. Through the interaction with the GRAPHOL diagram the
user builds the ontology query, whose visual representation, called query graph is
provided in the second area. This representation has the structure of a graph, to naturally
recall SPARQL’s basic graph patterns, where nodes represent subjects or objects of each
triple pattern, and edges represent predicates. To provide a visual correspondence with
GRAPHOL, the graphical representation of the ontology predicates in the query graph
is the same as in GRAPHOL. The third section shows the SPARQL representation of
the query, which the user can inspect or modify. Each change in the SPARQL query is
immediately mirrored in the query graph, and viceversa, to keep the two versions
constantly aligned. The user can choose to interact with both representations of the query,
or only with one of the two, according to his preference.</p>
      <p>To add a triple to the basic graph pattern of the query, the user double clicks on a
predicate symbol in the GRAPHOL diagram. According to the specific predicate symbol,
the corresponding edge and nodes are automatically added to the query graph. Actions
on specific nodes of the graph are performed through contextual menus that appear by
right clicking on a node.</p>
      <p>The application is developed in JavaScript, using the Cytoscape.js library6 for the
rendering of the GRAPHOL diagram and the query graph, and the cola.js library7 for the
force-directed layout of the query graph.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Application scenario and Demo Section Overview</title>
      <p>
        We demonstrate the SPARQLING system through the Base Register of Individuals,
Families, and Cohabitation (BRIFC) ontology, developed in Graphol during a joint project
between Sapienza University of Rome, OBDA Systems, and the Italian National
Institute of Statistics (Istat) [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>The BRIFC ontology depicts a portion of the domain of the Italian Integrated
System of Statistical Registers of Istat, which acts as the base for Istats production surveys.
The ontology is composed of two modules: the first regarding people, their family
relationships, and their level of education; the second regarding the Italian territory and
citizen residential data. In the project, the ontology was developed in support of the</p>
      <sec id="sec-3-1">
        <title>6 http://js.cytoscape.org/</title>
      </sec>
      <sec id="sec-3-2">
        <title>7 http://ialab.it.monash.edu/webcola/</title>
        <p>adoption of the OBDM approach for data access and quality checking. The
experimentation has confirmed the effectiveness of this approach for these purposes, and of
GRAPHOL as a means of representation of the ontology both in the design phase and
in the deployment phase. Currently, we have given way to the experimentation of the
SPARQLING system as the tool for the production of SPARQL queries in the project.</p>
        <p>During the demo, attendees will interact with the SPARQLING system, inspecting
the GRAPHOL BRFIC ontology and experiencing how the SPARQL query construction
process is simplified through the use of the system interface. We will also show how
SPARQLING can interact with the SPARQL endpoint in the Mastro system8 for OBDM.</p>
      </sec>
      <sec id="sec-3-3">
        <title>8 www.obdasystems.com/mastro</title>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>O.</given-names>
            <surname>Ambrus</surname>
          </string-name>
          ,
          <string-name>
            <surname>K.</surname>
          </string-name>
          <article-title>Mo¨ller, and</article-title>
          <string-name>
            <given-names>S.</given-names>
            <surname>Handschuh</surname>
          </string-name>
          .
          <article-title>Konduit VQB: a Visual Query Builder for SPARQL on the Social Semantic Desktop</article-title>
          .
          <source>In Proc. of VISSW2010</source>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>N.</given-names>
            <surname>Antonioli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Castano</surname>
          </string-name>
          `,
          <string-name>
            <given-names>S.</given-names>
            <surname>Coletta</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Grossi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Lembo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Lenzerini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Poggi</surname>
          </string-name>
          , E. Virardi, and
          <string-name>
            <given-names>P.</given-names>
            <surname>Castracane</surname>
          </string-name>
          .
          <article-title>Ontology-based data management for the italian public debt</article-title>
          .
          <source>In Proc. of FOIS</source>
          <year>2014</year>
          , pages
          <fpage>372</fpage>
          -
          <lpage>385</lpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>R. M. Aracri</surname>
            ,
            <given-names>A. M.</given-names>
          </string-name>
          <string-name>
            <surname>Bianco</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <string-name>
            <surname>Radini</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Scannapieco</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          <string-name>
            <surname>Tosco</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          <string-name>
            <surname>Croce</surname>
            ,
            <given-names>D. F.</given-names>
          </string-name>
          <string-name>
            <surname>Savo</surname>
            , and
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Lenzerini</surname>
          </string-name>
          .
          <article-title>On the Experimental Usage of Ontology-based Data Management for the Italian Integrated System of Statistical Registers: Quality Issues</article-title>
          .
          <source>In Proc. of Q2018</source>
          ,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>F.</given-names>
            <surname>Baader</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Calvanese</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>McGuinness</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Nardi</surname>
          </string-name>
          , and
          <string-name>
            <given-names>P. F.</given-names>
            <surname>Patel-</surname>
          </string-name>
          Schneider, editors.
          <source>The Description Logic Handbook: Theory, Implementation and Applications</source>
          . Cambridge University Press, 2nd edition,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>S.</given-names>
            <surname>Brockmans</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Volz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Eberhart</surname>
          </string-name>
          , and
          <string-name>
            <given-names>P.</given-names>
            <surname>Lo</surname>
          </string-name>
          <article-title>¨ffler. Visual modeling of OWL DL ontologies using UML</article-title>
          .
          <source>In Proc. of ISWC</source>
          <year>2004</year>
          , volume
          <volume>3298</volume>
          <source>of LNCS</source>
          , pages
          <fpage>198</fpage>
          -
          <lpage>213</lpage>
          . Springer,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>M.</given-names>
            <surname>Console</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Lembo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Santarelli</surname>
          </string-name>
          , and
          <string-name>
            <given-names>D. F.</given-names>
            <surname>Savo</surname>
          </string-name>
          . Graphol:
          <article-title>Ontology representation through diagrams</article-title>
          .
          <source>In Proc. of DL</source>
          <year>2014</year>
          , volume
          <volume>1193</volume>
          <source>of CEUR</source>
          , pages
          <fpage>483</fpage>
          -
          <lpage>495</lpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>R.</given-names>
            <surname>Falco</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Gangemi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Peroni</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Shotton</surname>
          </string-name>
          , and
          <string-name>
            <given-names>F.</given-names>
            <surname>Vitali</surname>
          </string-name>
          .
          <article-title>Modelling OWL ontologies with Graffoo</article-title>
          .
          <source>In Proc. of ESWC 2014 (Satellite Events)</source>
          , volume
          <volume>8798</volume>
          <source>of LNCS</source>
          , pages
          <fpage>320</fpage>
          -
          <lpage>325</lpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>F.</given-names>
            <surname>Haag</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Lohmann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Siek</surname>
          </string-name>
          , and
          <string-name>
            <given-names>T.</given-names>
            <surname>Ertl</surname>
          </string-name>
          . QueryVOWL:
          <article-title>Visual composition of SPARQL queries</article-title>
          .
          <source>In Proc. of ISWC</source>
          <year>2015</year>
          , pages
          <fpage>62</fpage>
          -
          <lpage>66</lpage>
          . Springer,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9. E. Kaufmann,
          <string-name>
            <given-names>A.</given-names>
            <surname>Bernstein</surname>
          </string-name>
          , and
          <string-name>
            <given-names>R.</given-names>
            <surname>Zumstein</surname>
          </string-name>
          .
          <article-title>Querix: A natural language interface to query ontologies based on clarification dialogs</article-title>
          .
          <source>In Proc. of ISWC</source>
          <year>2006</year>
          , pages
          <fpage>980</fpage>
          -
          <lpage>981</lpage>
          . Springer,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <given-names>S.</given-names>
            <surname>Krivov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Williams</surname>
          </string-name>
          , and
          <string-name>
            <given-names>F.</given-names>
            <surname>Villa</surname>
          </string-name>
          .
          <article-title>GrOWL: A tool for visualization and editing of OWL ontologies</article-title>
          .
          <source>J. of Web Semantics</source>
          ,
          <volume>5</volume>
          (
          <issue>2</issue>
          ):
          <fpage>54</fpage>
          -
          <lpage>57</lpage>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <given-names>D.</given-names>
            <surname>Lembo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Pantaleone</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Santarelli</surname>
          </string-name>
          , and
          <string-name>
            <given-names>D. F.</given-names>
            <surname>Savo</surname>
          </string-name>
          .
          <article-title>Easy OWL Drawing with the Graphol Visual Ontology Languag</article-title>
          .
          <source>In Proc. of KR</source>
          <year>2016</year>
          , pages
          <fpage>573</fpage>
          -
          <lpage>576</lpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <given-names>M.</given-names>
            <surname>Lenzerini</surname>
          </string-name>
          .
          <article-title>Ontology-based Data Management</article-title>
          .
          <source>In Proc. of CIKM</source>
          <year>2011</year>
          , pages
          <fpage>5</fpage>
          -
          <lpage>6</lpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13. L.
          <string-name>
            <surname>McCarthy</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          <string-name>
            <surname>Vandervalk</surname>
            , and
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Wilkinson. SPARQL Assist</surname>
          </string-name>
          language
          <article-title>-neutral query composer</article-title>
          .
          <source>BMC Bioinformatics</source>
          ,
          <volume>13</volume>
          (
          <issue>1</issue>
          ):
          <fpage>S2</fpage>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <given-names>A.</given-names>
            <surname>Soylu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Giese</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Jimenez-Ruiz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Kharlamov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Zheleznyakov</surname>
          </string-name>
          ,
          <string-name>
            <surname>and I. Horrocks.</surname>
          </string-name>
          <article-title>OptiqueVQS: towards an ontology-based visual query system for big data</article-title>
          .
          <source>In Proc. of MEDES</source>
          <year>2013</year>
          , pages
          <fpage>119</fpage>
          -
          <lpage>126</lpage>
          . ACM,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <given-names>D.</given-names>
            <surname>Wood</surname>
          </string-name>
          .
          <source>Linking enterprise data. Springer Science &amp; Business Media</source>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>