<!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>OWL-based form generation and structured data acquisition</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Rafael S. Gon c¸alves</string-name>
          <email>rafaelsg@stanford.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Csongor I. Nyulas</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Samson W. Tu</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Mark A. Musen</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Stanford Center for Biomedical Informatics Research Stanford University</institution>
          ,
          <addr-line>Stanford, California</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2015</year>
      </pub-date>
      <fpage>2</fpage>
      <lpage>3</lpage>
      <abstract>
        <p>We present a tool that is capable of generating Web forms from (question and answer) descriptions encoded in an OWL ontology. Unlike a regular form, the input fields of the generated form are associated with ontology concepts, and so the form is a means to acquire data to populate the ontology. The structure of this data is given by the modeling of questions and answers in the ontology, which makes the system flexible to different needs and goals. The tool is open-source, and freely distributed as a Web application.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>SYSTEM DESCRIPTION</title>
      <p>
        The Web Ontology Language (OWL) [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], being based on
description logics (DL) [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], is not as amenable for structured
data acquisition as a frame-based language; Prote´ge´-Frames used
definitions of classes in an ontology to generate
knowledgeacquisition forms, which could be used to acquire instances of the
classes [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. This is not as straightforward with OWL, since class
definitions are collections of axioms.
      </p>
      <p>
        We describe a system that we implemented to: (a) generate Web
forms from logical descriptions of questions and answers in an
OWL ontology, and (b) acquire data from generated forms that is
structured according to concepts in the ontology. We implemented
our form generation and data acquisition tool mostly in Java, using
the OWL API v4.0.1 [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].1 The automatically-generated front-end of
the form involves HTML, CSS and JavaScript. The source code of
the tool is publicly available on GitHub.2
      </p>
      <p>The inputs required from users in order to use this tool are:
firstly, an OWL representation of the form structures (questions,
sections, etc), and descriptions of the meaning of those structures
(that is, whether the answer should be a string, integer, an OWL
individual, etc.). We provide with our system a so-called datamodel
ontology that users should extend in order to model their form(s),
that is, user-defined questions should be inferred to be instances of
datamodel:Question. Secondly, the view specification that is given
by an XML file specifying user-interface aspects; for example, the
organization of questions into sections, the order of questions, and
more advanced options discussed further on. So, in order to use our
software, a user will have to model questions and their descriptions
in OWL, and then specify the layout and behavior of the resulting
form in XML.</p>
      <p>The tool takes as input the mentioned user-defined XML
configuration (which should contain a pointer to the ontology
specifying the content of the form, as well as pointers to imported
ontologies), generates a Web form, and then parses and outputs
imports: contains ontology child elements, which have an
attribute iri, giving the IRI of the imported ontology
output: contains the following child elements
file: defines, via a title attribute, the title of the form.
Optionally, a path can be specified within the file element
where the HTML form file should be serialized
cssStyle: the CSS style class to be used in the output HTML
bindings: defines mappings to ontology entities, such as what data
property is used to state the text of a question, or section headings
form: defines the layout and behaviors of the form</p>
      <p>More detailed implementation and configuration details can be
found in the GitHub project wiki.</p>
    </sec>
    <sec id="sec-2">
      <title>FEATURE SUMMARY</title>
      <p>We briefly present the features of our system below.</p>
      <p>Question triggering: a question can encode a key-value
pair where the key is “showSubquestionsForAnswer” (or
“hideSubquestionsForAnswer”) and the value is an IRI, which
informs the view that when the answer corresponding to that
IRI is selected, the question’s subquestions should appear (or
disappear, respectively).</p>
      <p>Question types: the allowed question types in the generated form
correspond to the HTML input-element types, with the addition
of a pre-styled element: “checkbox-horizontal”. By default
checkbox inputs will be laid out vertically, hence the addition of
the horizontal option.</p>
      <p>Option ordering: answer options for a question can be given by
an OWL enumeration, and our tool will order these options
alphabetically by default. However, one may want to customize
this order, perhaps to shift only one element or to re-order
the whole set manually. This can be done in the definition of
questions by inserting a key-value pair “orderOption” with the
value being the desired order w.r.t. the default one. That is, if we
want the (alphabetically-ordered) first element to appear last, we
would have a value “*;1”, which states: put the first element last,
and everything else as it was.</p>
      <p>Repeated question lists: each question list can be repeated a
specified number of times, for example, in order to collect details
of multiple family members.</p>
      <p>Inline question lists: questions within “inline” question lists can
be laid out horizontally rather than vertically (the default), by
specifying the type of question list as “inline”.</p>
    </sec>
    <sec id="sec-3">
      <title>FUTURE PLANS</title>
      <p>In the future we plan to make our software more versatile with
the usage of XML Schema datatypes that are part of the OWL 2
specification datatype map. Another one of our goals is to design
and implement a mechanism to facilitate the specification of forms,
for instance, an interface to produce the required XML file.</p>
    </sec>
    <sec id="sec-4">
      <title>ACKNOWLEDGMENTS</title>
      <p>This work is supported in part by contract W81XWH-13-2-0010
from the U.S. Department of Defense, and grants GM086587 and
GM103316 from the U.S. National Institutes of Health (NIH).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Eriksson</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Puerta</surname>
            ,
            <given-names>A. R.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Musen</surname>
            ,
            <given-names>M. A.</given-names>
          </string-name>
          (
          <year>1994</year>
          ).
          <article-title>Generation of knowledge-acquisition tools from domain ontologies</article-title>
          .
          <source>Int. J. of Human-Computer Studies</source>
          ,
          <volume>41</volume>
          ,
          <fpage>425</fpage>
          -
          <lpage>453</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Horridge</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Bechhofer</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          (
          <year>2009</year>
          ).
          <article-title>The OWL API: A Java API for working with OWL 2 ontologies</article-title>
          .
          <source>In Proc. of OWLED-09.</source>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Horrocks</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kutz</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Sattler</surname>
            ,
            <given-names>U.</given-names>
          </string-name>
          (
          <year>2006</year>
          ).
          <article-title>The even more irresistible SROIQ</article-title>
          .
          <source>In Proc. of KR-06.</source>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Motik</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Patel-Schneider</surname>
            ,
            <given-names>P. F.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Parsia</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          (
          <year>2009</year>
          ).
          <article-title>OWL 2 Web Ontology Language: Structural specification and functionalstyle syntax</article-title>
          .
          <source>W3C recommendation.</source>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>