1roqet(1) General Commands Manual roqet(1)
2
3
4
6 roqet - Rasqal RDF query utility
7
9 roqet [OPTIONS] <query-URI> [base-URI]
10 roqet [OPTIONS]-e query-string [base-URI]
11 roqet [OPTIONS]-p sparql-protocol-service-URI query-URI [base-URI]
12 roqet [OPTIONS]-p sparql-protocol-service-URI [-e query-string ] [base-
13 URI]
14 roqet [OPTIONS]-t query results file [base-URI]
15
17 The roqet utility allows querying of RDF content using the Rasqal RDF
18 query library, printing the results for variable bindings, RDF graph or
19 boolean results in a variety of formats. The query is read from query-
20 URI and the optional base-URI is used as the base URI of the query if
21 present.
22
24 roqet uses the usual GNU command line syntax, with long options start‐
25 ing with two dashes (`-') if supported by the getopt_long function.
26 Otherwise only the short options are available.
27
28 -e, --exec QUERY
29 Execute the query string in the argument QUERY instead of read‐
30 ing the query from a URI (when -e / --exec is not given).
31
32 -i, --input LANGUAGE
33 Set the input query LANGUAGE to one of the supported languages
34 which includes 'sparql' (SPARQL Query Language for RDF,
35 default), 'sparql11' and 'laqrs'. The full list of supported
36 languages and subsets is given in the help summary with the -h /
37 --help option.
38
39 -p, --protocol SERVICE-URI
40 Call the SPARQL HTTP protocol SERVICE-URI to execute the query
41 instead of executing it inside the Rasqal query engine locally (
42 when -e is given, or a query string given)
43
44 -r, --results FORMAT
45 Set the query results output FORMAT
46
47 For variable bindings, the values of FORMAT vary upon what
48 Rasqal supports but include 'simple' for a simple text format
49 (default), 'xml' for the SPARQL Query Results XML format, 'csv'
50 for SPARQL CSV, 'tsv' for SPARQL TSV, 'rdfxml' and 'turtle' for
51 RDF syntax formats, and 'json' for a JSON version of the
52 results.
53
54 For RDF graph results, the values of FORMAT are 'ntriples' (N-
55 Triples, default), 'rdfxml-abbrev' (RDF/XML Abbreviated),
56 'rdfxml' (RDF/XML), 'turtle' (Turtle), 'json' (RDF/JSON resource
57 centric), 'json-triples' (RDF/JSON triples) or 'rss-1.0' (RSS
58 1.0, also an RDF/XML syntax).
59
60 The exact list of formats depends on what libraptor2(3) was
61 built with but is given correct in the usage message with -h.
62
63 -R, --results-input-format FORMAT
64 Set the query results input FORMAT
65
66 This is for use with -t and takes values of 'xml' for the SPARQL
67 Query Results XML format,, 'csv' for SPARQL CSV,, 'tsv' for
68 SPARQL TSV, 'turtle' and 'rdfxml' for RDF syntax formats.
69
70 -t, --results-input FILE
71 Read query results from FILE
72
74 -c, --count
75 Only count the triples and produce no other output.
76
77 -d, --dump-query FORMAT
78 Print the parsed query out in a given FORMAT one of 'none'
79 (default), 'debug', 'structure' or 'sparql'
80
81 -D, --data URI
82 Add RDF data source URI (not a named graph). If no data sources
83 are given, the query itself must point to the data such as via
84 SPARQL FROM uri statements.
85
86 -E, --ignore-errors
87 Do not print error messages and do not exit with a non-0 status.
88
89 -f, --feature NAME(=VALUE)
90 Set query feature NAME to the VALUE or integer 1 if omitted.
91 The known features can be shown with -f help or --feature help.
92
93 -F, --format NAME
94 Set the data source format name for subsequent data graphs
95 called with -D / --data or -G / --named. The default if this is
96 not specified is for the query engine to guess. The name is a
97 Raptor parser name.
98
99 -G, --named URI
100 Add RDF data source URI (named graph)
101
102 -h, --help
103 Show a summary of the options.
104
105 -n, --dryrun
106 Prepare the query but do not execute it.
107
108 -q, --quiet
109 No extra information messages.
110
111 -s, --source URI
112 Add RDF data source URI (named graph) URI by adding it to the
113 list of query data source URIs. FORMAT to 'simple' (default) or
114 'xml' (an experimental XML format)
115
116 -v, --version
117 Print the rasqal library version and exit.
118
119 -W, --warnings LEVEL
120 Set the warning LEVEL in the range 0 (do not warn about any‐
121 thing) to 100 (show every warning). The Rasqal default is in the
122 middle (50).
123
125 roqet sparql-query-file.rq
126
127 Run a SPARQL query contained in the local file sparql-query-file.rq.
128 The data used would be described in FROM statements in the query file.
129
130 roqet -q -i sparql http://example.org/sparql-query.rq
131
132 Run a SPARQL query that is in the web at URI http://example.org/sparql-
133 query.rq without an extra messages (quiet, -q).
134
135 roqet -q query-file.rq http://example.org/base/
136
137 Run an query (default languge SPARQL) from a local file query-file.rq
138 but using base URI http://example.org/base/ to resolve any relative
139 URIs.
140
141 roqet -q -i sparql -r xml http://example.org/sparql-query.rq
142
143 Run a SPARQL query that is in the web at URI http://example.org/sparql-
144 query.rq and format the results in the SPARQL Query Results XML format
145 with no extra messages.
146
147 roqet -i sparql -e 'SELECT * WHERE { ?s ?p ?o }' -D stuff.rdf
148
149 Run a SPARQL query given on the command line against data in the file
150 stuff.rdf. The type of the file will be guessed and likely is of for‐
151 mat RDF/XML.
152
153 roqet -t result.srx -r html
154
155 Read a SPARQL query results in SPARQL Query Results XML format
156 (default) and print it in HTML.
157
158 roqet -t result.ttl -R turtle -r csv
159
160 Read a SPARQL query results in RDF/Turtle format and print it in CSV.
161
163 SPARQL 1.1 Query Language, Steve Harris and Andy Seaborne (eds), W3C
164 Recommendation, 21 March 2013 http://www.w3.org/TR/2013/REC-
165 sparql11-query-20130321/ ⟨http://www.w3.org/TR/2013/REC-
166 sparql11-query-20130321/⟩
167
168 SPARQL Query Results XML Format (Second Edition), Sandro Hawke (Second
169 Edition ed), Jeen Broekstra and Dave Beckett (eds), W3C Recommendation,
170 21 March 2013. http://www.w3.org/TR/2013/REC-rdf-sparql-
171 XMLres-20130321/ ⟨http://www.w3.org/TR/2013/REC-rdf-sparql-
172 XMLres-20130321/⟩
173
175 librasqal(3),[22mlibraptor(3)
176
179 Dave Beckett - http://www.dajobe.org/ ⟨http://www.dajobe.org/⟩
180
181
182
183 2013-12-11 roqet(1)