rdfproc

Process and query RDF data stores

TLDR

Query RDF store
$ rdfproc [store] query sparql - "[SELECT * WHERE { ?s ?p ?o }]"
Parse RDF file
$ rdfproc [store] parse [file.rdf]
Serialize to format
$ rdfproc [store] serialize ntriples
Add statement
$ rdfproc [store] add [subject] [predicate] [object]
Print all statements
$ rdfproc [store] print

SYNOPSIS

rdfproc [options] store command [args]

DESCRIPTION

rdfproc is a command-line utility for processing RDF data using the Redland RDF library. It can parse, store, query, and serialize RDF data.

PARAMETERS

parse file

Parse and load RDF file.
query lang uri query
Execute query.
serialize format
Output in format.
print
Print all statements.
add s p o
Add triple.
remove s p o
Remove triple.

EXAMPLES

$ # Create store and parse file
rdfproc mystore parse data.rdf

# SPARQL query
rdfproc mystore query sparql - "SELECT * WHERE { ?s ?p ?o } LIMIT 10"

# Serialize as N-Triples
rdfproc mystore serialize ntriples

# Add triple
rdfproc mystore add "http://example.org/s" "http://example.org/p" "value"

# Print all
rdfproc mystore print

FORMATS

$ rdfxml   - RDF/XML
ntriples - N-Triples
turtle   - Turtle

INSTALL

sudo apt install redland-utils
sudo dnf install redland
sudo pacman -S redland
sudo apk add redland
sudo zypper install redland
brew install redland
nix profile install nixpkgs#redland

CAVEATS

Part of Redland RDF libraries. Stores are persistent by default. Use - for stdin/stdout.

HISTORY

rdfproc is part of Redland RDF Libraries by Dave Beckett, providing RDF processing since 2000.

SEE ALSO

rapper(1), roqet(1), redland(3)