rdfproc(1)

NAME
rdfproc - Redland RDF processor utility

SYNOPSIS
rdfproc [options] store command arg...

EXAMPLE
rdfproc test parse http://ilrt.org/discovery/rdf/resources/rss.rdf
rdfproc test print
rdfproc test serialize ntriples

DESCRIPTION
The rdfproc utility allows parsing, querying, manipulating and serializing of RDF content using the Redland RDF library. The store is a Redland store name, typically a short identifier. The arguments to command vary and are explained in section COMMANDS below.

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

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

-c, --contexts
    Use a store with Redland contexts.

-v, --version
    Print the Redland version and exit.

COMMANDS
Where a node is allowed, such as NODE, SUBJECT, PREDICATE or OBJECT below, simple heuristics are used to guess which are URIs or literals (to add a statement with a literal, use add-typed). No Blank Node identifiers are supported.

add SUBJECT PREDICATE OBJECT [CONTEXT]
    Add the given triple to graph, in the optional Redland context if the CONTEXT node is given.

add-typed SUBJECT PREDICATE OBJECT OBJECT-LANG OBJECT-URI [CONTEXT]
    Add the triple with the datatyped literal object to the graph, in the optional Redland context if CONTEXT is given.

arc SUBJECT OBJECT

arcs SUBJECT OBJECT
    Show one node/all nodes that match triples (SUBJECT, ?, OBJECT)

arcs-in NODE
    Show all properties of triples with NODE as a subject.

arcs-out NODE
    Show all properties of triples with NODE as an object.

contains SUBJECT PREDICATE OBJECT
    Check if the given triple is in the graph.

find SUBJECT|- PREDICATE|- OBJECT|-
    Find matching triples to the given statement where - stands for a blank that matches any node.

has-arc-in NODE ARC
    Check that there is a triple with NODE as a subject and ARC as a predicate.

has-arc-out NODE ARC
    Check that there is a triple with NODE as a object and ARC as a predicate.

parse URI [SYNTAX| [BASE URI]]
    Parse syntax at URI intothe graph using SYNTAX which can be one of rdfxml (RDF/XML, default) or ntriples.

parse-stream URI [SYNTAX [BASE URI]]
    Streaming parse syntax at URI into the graph using SYNTAX which can be one of rdfxml (RDF/XML, default) or ntriples.

print
    Print the graph triples in a simple format showing context nodes if present.

remove SUBJECT PREDICATE OBJECT [CONTEXT]
    Remove the given triple graph, in the optional Redland context if CONTEXT is given.

serialize [SYNTAX [URI [MIME-TYPE]]]
    Serializes the graph to a syntax with a particular ISYNTAX URI or Internet Media Type/MIME Type. The default is RDF/XML (NAME "rdfxml", MIME Type "application/rdf/xml") if none of the above are given. Other alternatives are "ntriples" (no MIME Type).

source PREDICATE OBJECT

sources PREDICATE OBJECT
    Show one node/all nodes that match triples (?, PREDICATE, OBJECT)

target SUBJECT PREDICATE

targets SUBJECT PREDICATE
    Show one node/all nodes that match triples (SUBJECT, PREDICATE, ?)

CONFORMING TO
RDF/XML Syntax (Revised), W3C Working Draft (work in progress), http://www.w3.org/TR/rdf-syntax-grammar/ (http://www.w3.org/TR/rdf-syntax-grammar/) N-Triples, W3C Working Draft (work in progress), http://www.w3.org/TR/rdf-testcases/#ntriples (http://www.w3.org/TR/rdf-testcases/#ntriples)

SEE ALSO
redland(3)

AUTHOR
Dave Beckett - http://purl.org/net/dajobe/ (http://purl.org/net/dajobe/)
Institute for Learning and Research Technology (ILRT) http://www.ilrt.bristol.ac.uk/
University of Bristol http://www.bristol.ac.uk/