roqet - Rasqal RDF query utility


   roqet [OPTIONS] <query-URI> [base-URI]
   roqet [OPTIONS]-e query-string [base-URI]
   roqet [OPTIONS]-p sparql-protocol-service-URI [-e query-string ] [base-
   roqet [OPTIONS]-t query results file [base-URI]


   The roqet utility allows querying of RDF content using the  Rasqal  RDF
   query library, printing the results for variable bindings, RDF graph or
   boolean results in a variety of formats.  The query is read from query-
   URI  and  the optional base-URI is used as the base URI of the query if


   roqet uses the  usual  GNU  command  line  syntax,  with  long  options
   starting  with  two  dashes  (`-')  if  supported  by  the  getopt_long
   function.  Otherwise only the short options are available.

   -e, --exec QUERY
          Execute the query  string  in  the  argument  QUERY  instead  of
          reading the query from a URI (when -e / --exec is not given).

   -i, --input LANGUAGE
          Set  the  input query LANGUAGE to one of the supported languages
          which  includes  'sparql'  (SPARQL  Query  Language   for   RDF,
          default),  'sparql11'  and  'laqrs'.  The full list of supported
          languages and subsets is given in the help summary with the -h /
          --help option.

   -p, --protocol SERVICE-URI
          Call  the  SPARQL HTTP protocol SERVICE-URI to execute the query
          instead of executing it inside the Rasqal query engine locally (
          when -e is given, or a query string given)

   -r, --results FORMAT
          Set the query results output FORMAT

          For  variable  bindings,  the  values  of  FORMAT vary upon what
          Rasqal supports but include 'simple' for a  simple  text  format
          (default),  'xml' for the SPARQL Query Results XML format, 'csv'
          for SPARQL CSV, 'tsv' for SPARQL TSV, 'rdfxml' and 'turtle'  for
          RDF  syntax  formats,  and  'json'  for  a  JSON  version of the

          For RDF graph results, the values of FORMAT are  'ntriples'  (N-
          Triples,   default),   'rdfxml-abbrev'   (RDF/XML  Abbreviated),
          'rdfxml' (RDF/XML), 'turtle' (Turtle), 'json' (RDF/JSON resource
          centric),  'json-triples'  (RDF/JSON  triples) or 'rss-1.0' (RSS
          1.0, also an RDF/XML syntax).

          The exact list of formats  depends  on  what  libraptor2(3)  was
          built with but is given correct in the usage message with -h.

   -R, --results-input-format FORMAT
          Set the query results input FORMAT

          This is for use with -t and takes values of 'xml' for the SPARQL
          Query Results XML format,, 'csv'  for  SPARQL  CSV,,  'tsv'  for
          SPARQL TSV, 'turtle' and 'rdfxml' for RDF syntax formats.

   -t, --results-input FILE
          Read query results from FILE


   -c, --count
          Only count the triples and produce no other output.

   -d, --dump-query FORMAT
          Print  the  parsed  query  out  in  a given FORMAT one of 'none'
          (default), 'debug', 'structure' or 'sparql'

   -D, --data URI
          Add RDF data source URI (not a named graph).  If no data sources
          are  given,  the query itself must point to the data such as via
          SPARQL FROM uri statements.

   -E, --ignore-errors
          Do not print error messages and do not exit with a non-0 status.

   -f, --feature NAME(=VALUE)
          Set query feature NAME to the VALUE or  integer  1  if  omitted.
          The known features can be shown with -f help or --feature help.

   -F, --format NAME
          Set  the  data  source  format  name  for subsequent data graphs
          called with -D / --data or -G / --named.  The default if this is
          not  specified  is for the query engine to guess.  The name is a
          Raptor parser name.

   -G, --named URI
          Add RDF data source URI (named graph)

   -h, --help
          Show a summary of the options.

   -n, --dryrun
          Prepare the query but do not execute it.

   -q, --quiet
          No extra information messages.

   -s, --source URI
          Add RDF data source URI (named graph) URI by adding  it  to  the
          list of query data source URIs.  FORMAT to 'simple' (default) or
          'xml' (an experimental XML format)

   -v, --version
          Print the rasqal library version and exit.

   -W, --warnings LEVEL
          Set the warning  LEVEL  in  the  range  0  (do  not  warn  about
          anything)  to 100 (show every warning). The Rasqal default is in
          the middle (50).


          roqet sparql-query-file.rq

   Run a SPARQL query contained in the  local  file  sparql-query-file.rq.
   The data used would be described in FROM statements in the query file.

          roqet -q -i sparql

   Run a SPARQL query that is in the web at URI
   query.rq without an extra messages (quiet, -q).

          roqet -q query-file.rq

   Run an query (default languge SPARQL) from a local  file  query-file.rq
   but  using  base  URI to resolve any relative

          roqet -q -i sparql -r xml

   Run a SPARQL query that is in the web at URI
   query.rq  and format the results in the SPARQL Query Results XML format
   with no extra messages.

          roqet -i sparql -e 'SELECT * WHERE { ?s ?p ?o }' -D stuff.rdf

   Run a SPARQL query given on the command line against data in  the  file
   stuff.rdf.   The  type  of  the  file  will be guessed and likely is of
   format RDF/XML.

          roqet -t result.srx -r html

   Read a  SPARQL  query  results  in  SPARQL  Query  Results  XML  format
   (default) and print it in HTML.

          roqet -t result.ttl -R turtle -r csv

   Read a SPARQL query results in RDF/Turtle format and print it in CSV.


   SPARQL  1.1  Query  Language, Steve Harris and Andy Seaborne (eds), W3C
   Recommendation,   21    March    2013

   SPARQL Query Results XML Format (Second Edition), Sandro Hawke  (Second
   Edition ed), Jeen Broekstra and Dave Beckett (eds), W3C Recommendation,
   21     March      2013.





   Dave Beckett -

                              2013-12-11                          roqet(1)


Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.

Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.

Free Software

Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.

Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.

Free Books

The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.

Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.


Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.

Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.