1rdfproc(1)                  General Commands Manual                 rdfproc(1)
2
3
4

NAME

6       rdfproc - Redland RDF processor utility
7

SYNOPSIS

9       rdfproc [options] store-name command arg...
10

EXAMPLE

12       rdfproc test parse http://planetrdf.com/guide/rss.rdf
13       rdfproc test print
14       rdfproc test serialize ntriples
15

DESCRIPTION

17       The rdfproc utility allows parsing, querying, manipulating and  serial‐
18       izing of RDF content using the Redland RDF library.   The store-name is
19       a  Redland  store name, typically a short identifier.  The arguments to
20       command vary and are explained in section COMMANDS below.
21

OPTIONS

23       rdfproc uses the usual GNU  command  line  syntax,  with  long  options
24       starting  with  two  dashes (`-') if supported by the getopt_long func‐
25       tion.  Otherwise the short options are only available.
26
27       -h, --help
28              Show a summary of the options.
29
30       -c, --contexts
31              Use a store with Redland contexts.
32
33       -n, --new
34              Make a new store, overwriting any existing one.
35
36       -o, --output FORMAT
37              Set the output FORMAT for sequences of triples, such as  from  a
38              search  (find  command)  to  a Redland serializer.  Use -h or -o
39              help to see the full list of supported formats.
40
41       -p, --password
42              Read the storage option 'password' from standard input.   Termi‐
43              nated  by end of line ('\n') or end of file.  This is equivalent
44              to setting it using -t or --storage-options but does not require
45              exposing the password in the argument list.
46
47       -q, --quiet
48              Suppress informational messages (that go to stderr)
49
50       -r, --results FORMAT
51              Set  the  query results syntax format.  Use -h or -r help to see
52              the full list of query result formats.
53
54              The exact list of formats depends on what libraptor(3) was built
55              with but is given correct in the usage message with -h.
56
57       -s, --storage TYPE
58              Set the Redland storage type (default 'hashes').  If environment
59              variable RDFPROC_STORAGE_TYPE is set,  the  storage  type  given
60              here  will  override it.  Use -h or -s help to see the full list
61              of query result formats.
62
63       -t, --storage-options OPTIONS
64              Set options for the  the  Redland  storage,  default  is  "hash-
65              type='bdb',dir='.'"  to match the default storage "hashes".  For
66              storages types such as 'mysql'  that  need  extra  options  this
67              would   typically   be   something  like  "host='hostname',data‐
68              base='dbname',user='abc',password='pass'".  If environment vari‐
69              able  RDFPROC_STORAGE_OPTIONS  is set, the storage options given
70              here will be applied afterwards.
71
72       -v, --version
73              Print the Redland version and exit.
74
75       -V, --verbose
76              Show informational messages on stderr.
77

COMMANDS

79       Where a node is allowed, such as NODE,  SUBJECT,  PREDICATE  or  OBJECT
80       below, simple heuristics are used to guess which are blank node identi‐
81       fiers, URIs or literals (to add a statement with a  literal,  use  add-
82       typed).   If  the  item starts with _: then it is assumed to be a blank
83       node identifier, otherwise if it matches something:// it is assumed  to
84       be  a  URI,  otherwise  it  is a literal.  Literals are only allowed as
85       objects of statements and blank nodes are not allowed as predicates.
86
87       add SUBJECT PREDICATE OBJECT [CONTEXT]
88              Add the given triple to graph, in the optional  Redland  context
89              if the CONTEXT node is given.
90
91
92       add-typed SUBJECT PREDICATE OBJECT OBJECT-LANG OBJECT-URI [CONTEXT]
93              Add  the  triple with the datatyped literal object to the graph,
94              in the optional Redland context if CONTEXT is given.
95
96
97       arc SUBJECT OBJECT
98
99       arcs SUBJECT OBJECT
100              Show one node/all nodes that match triples (SUBJECT, ?, OBJECT)
101
102
103       arcs-in NODE
104              Show all properties of triples with NODE as a subject.
105
106
107       arcs-out NODE
108              Show all properties of triples with NODE as an object.
109
110
111       contains SUBJECT PREDICATE OBJECT
112              Check if the given triple is in the graph.
113
114
115       contexts
116              List all the contexts in the graph (if contexts are enabled).
117
118
119       find SUBJECT|- PREDICATE|- OBJECT|- [CONTEXT]
120              Find matching triples to the given statement where - stands  for
121              a blank that matches any node.  If CONTEXT is given, only search
122              for triples in that context node.
123
124
125       has-arc-in NODE ARC
126              Check that there is a triple with NODE as a subject and ARC as a
127              predicate.
128
129
130       has-arc-out NODE ARC
131              Check  that there is a triple with NODE as a object and ARC as a
132              predicate.
133
134
135       parse URI|FILENAME [SYNTAX| [BASE URI]]
136              Parse syntax at URI into the graph using SYNTAX which can be one
137              of  rdfxml  (RDF/XML,  default),  ntriples, turtle, rss-tag-soup
138              (for all RSS and Atoms), grddl and guess to  use  content  hints
139              and  protocol  information  to  work  it out. (This list changes
140              faster than this manual page) If FILENAME is  a  existing  file,
141              the  appropriate  URI  will  be  generated  for  it.  If parsing
142              returns errors, the return code will be non-0.
143
144
145       parse-stream URI|FILENAME [SYNTAX [BASE URI [CONTEXT]]
146              Streaming parse syntax at URI into the graph using SYNTAX  which
147              can  be  one of rdfxml (RDF/XML, default) or ntriples.  If FILE‐
148              NAME is an existing file, the appropriate URI will be  generated
149              for  it.   If the optional CONTEXT URI is given, the triples are
150              added to that context.  If parsing returns  errors,  the  return
151              code will be non-0.
152
153
154       print  Print the graph triples in a simple format showing context nodes
155              if present.
156
157
158       query NAME|- URI|- QUERY-STRING
159              Run QUERY-STRING query in language NAME returning variable bind‐
160              ings, a boolean or RDF graph depending on the query.  Query lan‐
161              guage can be 'sparql' or 'rdql'.
162
163
164       remove SUBJECT PREDICATE OBJECT [CONTEXT]
165              Remove the given triple graph, in the optional  Redland  context
166              if CONTEXT is given.
167
168
169       remove-context CONTEXT
170              Remove  all  triples  in the graph with the Redland context CON‐
171              TEXT.
172
173
174       serialize [SYNTAX [URI [MIME-TYPE]]]
175              Serializes the graph to a syntax with a particular  ISYNTAX  URI
176              or  Internet Media Type/MIME Type.  The default is RDF/XML (NAME
177              "rdfxml", MIME Type "application/rdf/xml") if none of the  above
178              are given.  Other alternatives are "ntriples" (no MIME Type).
179
180
181       source PREDICATE OBJECT
182
183       sources PREDICATE OBJECT
184              Show  one  node/all  nodes  that  match  triples  (?, PREDICATE,
185              OBJECT)
186
187
188       target SUBJECT PREDICATE
189
190       targets SUBJECT PREDICATE
191              Show one node/all nodes that match triples (SUBJECT,  PREDICATE,
192              ?)
193
194

ENVIRONMENT

196       RDFPROC_STORAGE_OPTIONS  can  be set to provide storage options instead
197       of using the option  -t,  --storage-options  OPTIONS.   When  both  are
198       given, command options are applied last.
199
200       RDFPROC_STORAGE_TYPE  can  be  set to provide a storage type instead of
201       using the option -s, --storage TYPE.  When both are given, the  storage
202       type from the command is used.
203

CONFORMING TO

205       RDF/XML Syntax (Revised), W3C Recommendation, http://www.w3.org/TR/rdf-
206       syntax-grammar/ ⟨http://www.w3.org/TR/rdf-syntax-grammar/
207
208       N-Triples, in RDF Test Cases, Jan Grant and Dave  Beckett  (eds.)   W3C
209       Recommendation,            http://www.w3.org/TR/rdf-testcases/#ntriples
210http://www.w3.org/TR/rdf-testcases/#ntriples⟩
211

SEE ALSO

213       redland(3), libraptor(3), rapper(1)
214

AUTHOR

216       Dave Beckett - http://www.dajobe.org/http://www.dajobe.org/
217
218
219
220                                  2010-08-29                        rdfproc(1)
Impressum