=Paper=
{{Paper
|id=Vol-2721/paper594
|storemode=property
|title=SPANG: A SPARQL client with templating, one-liner functionality, and API
|pdfUrl=https://ceur-ws.org/Vol-2721/paper594.pdf
|volume=Vol-2721
|authors=Hirokazu Chiba
|dblpUrl=https://dblp.org/rec/conf/semweb/Chiba20
}}
==SPANG: A SPARQL client with templating, one-liner functionality, and API==
https://ceur-ws.org/Vol-2721/paper594.pdf
SPANG: A SPARQL Client with Templates,
One-Liners, and Application Programming
Interfaces
Hirokazu Chiba
Database Center for Life Science, Chiba 277-0871, Japan
chiba@dbcls.rois.ac.jp
Abstract. SPARQL is a key component of the Semantic Web, and its
reusability of is crucial for maximizing productivity on the Semantic
Web. While an increasing number of datasets have been published in the
Resource Description Framework (RDF) and the SPARQL standard al-
lows for an interoperable framework for querying the RDF datasets, the
reuse of SPARQL queries remains limited. Herein, we present SPANG,
a framework used to facilitate the reuse of SPARQL queries by using a
template engine, one-liner functionalities, and application programming
interfaces. We demonstrate its use for making SPARQL queries more
reusable; assign a set of metadata for annotating a SPARQL query, which
enables the identification of the SPARQL query and provides useful infor-
mation for the query; parameterize SPARQL queries, which makes each
query reusable under different settings; assign a URI for each query; and
construct a server for providing the indices of SPARQL queries. SPANG
makes SPARQL queries more reusable in the local system or across the
Web and facilitate the construction of an eco-system wherein SPARQL
queries are shared to maximize the productivity of Semantic Web de-
velopers and users. SPANG is available at https://spang.dbcls.jp/.
Keywords: SPARQL · template engine · query library · one-liner · API
1 Introduction
An increasing number of datasets have been published in the Resource Descrip-
tion Framework (RDF). SPARQL is the standardized interface to RDF and con-
tributes to the effective reuse of distributed RDF data. Although eco-systems
have been developed for developing SPARQL queries, writing SPARQL codes
is often a burden for Semantic Web developers and users. SPARQL queries
have been written in many projects and are the result of developers’ efforts.
The value of the SPARQL queries accumulated thus far can be maximized by
reusing SPARQL queries. For the effective construction of Semantic Web appli-
cations, the reuse of such queries is invaluable. However, owing to the limitation
Copyright c 2020 for this paper by its author. Use permitted under Creative Com-
mons License Attribution 4.0 International (CC BY 4.0).
Usage: spang2 [options] [par1=val1 par2=val2 ...]
Options:
-e, --endpoint target SPARQL endpoint
-o, --outfmt tsv, json, n-triples (nt), turtle (ttl), rdf/xml (rdfxml), n3, xml, html
-a, --abbr abbreviate results using predefined prefixes
-v, --vars variable names are included in output (in the case of tsv format)
-S, --subject shortcut for specifying subject
-P, --predicate shortcut for specifying predicate
-O, --object