sopranocmd --version (return code: 0)
sopranocmd 2.9.4
Copyright (C) 2007-2010 Sebastian Trueg <trueg@kde.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
sopranocmd -h (return code: 0)
sopranocmd 2.9.4
Copyright (C) 2007-2010 Sebastian Trueg <trueg@kde.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
Usage:
sopranocmd --backend <backendname> [--dir <storagedir>] [--port <port>] [--host <host>] [--username <username>] [--password <password>] [--settings <settings>] [--serialization <s>] <command> [<parameters>]
sopranocmd --port <port> [--host <host>] --model <name> [--serialization <s>] <command> [<parameters>]
sopranocmd --socket <socketpath> --model <name> [--serialization <s>] <command> [<parameters>]
sopranocmd --dbus <dbusservice> --model <name> [--serialization <s>] <command> [<parameters>]
sopranocmd --sparql <sparql end point> [--port <port>] [--username <username>] [--password <password>] [--serialization <s>] <command> [<parameters>]
sopranocmd --file <rdf-file> [--serialization <s>] <command> [<parameters>]
--version Print version information.
--help Print this help.
--nrl Enable NRL (Nepomuk) features. This includes the following features:
- Automatic query prefix expansion based on ontologies stored in the model.
- Automatic context creation for imported statements without a predefined context/named
graph. The newly created context will be of type nrl:KnowledgeBase and already have
its creation date set in its very own nrl:GraphMetadata.
- Automatic removal of metadata graphs if using the remove command with the only defined
node being the context.
--foo Enables scriptable output which can be used as input for other commands.
--model <name> The name of the Soprano model to perform the command on.
(only applicable when querying against the Soprano server.)
--backend The backend to use when accessing a storage directly and not via the Soprano server.
Possible backends are:
redland
--settings <s> A list of additional settings to be passed to the backend. Only applicable in combination with
--backend. Settings are key=value pairs separated by semicolon.
--dir <dir> The storage directory. This only applies when specifying the backend. Defaults
to current directory.
--dbus <service> Contact the soprano server through D-Bus running on the specified service.
--port <port> Specify the port the Soprano server is running on.
(only applicable when querying against the Soprano server or a sparql endpoint.)
--host <host> Specify the host the Soprano server is running on (defaults to localhost).
(only applicable when querying against the Soprano server.)
--username <name> Specify the username for the Soprano backend.
(only applicable when using a virtuoso backend or a sparql endpoint.)
--password <word> Specify the password for the Soprano backend.
(only applicable when using a virtuoso backend or a sparql endpoint.)
--socket <path> Specify the path to the local socket the Soprano server is running on.
(only applicable when querying against the Soprano server.)
--sparql <endpoint> Specify the remote Http sparql endpoint to use.
--file <rdf-file> Use an rdf file as input.
--serialization <s> The serialization used for commands 'export' and 'import'. Defaults to 'application/x-nquads'.
(can also be used to change the output format of construct and describe queries.)
(be aware that Soprano can understand simple string identifiers such as 'trig' or 'n-triples'.
There is no need to know the exact mimetype.)
--querylang <lang> The query language used for query commands. Defaults to 'SPARQL'
Hint: sopranocmd automatically adds prefix definitions for standard namespaces such as RDF,
RDFS, NRL, etc. if used in a SPARQL query with the --nrl parameter.
--graphselect <variablelist>
This parameter allows one to emulate construct queries using a select query. This has the advantage that one
can construct statements including the context/named graph which is not supported by SPARQL construct.
<variablelist> contains the four variables bould to subject, predicate, object, and context in that order.
It is a list separated by semicolon. Example: --graphselect 's;p;o;g'
<command> The command to perform.
- 'add': Add a new statement. The parameters are a list of 3 or 4 nodes as defined below.
- 'remove': Remove one or more statements. The parameters are a list of up to 4 nodes which define
'rm' the statement pattern to apply. Each statement matching the pattern will be removed.
When used in combination with the --nrl parameter metadata graphs are removed automatically
if only a context is provided as pattern.
- 'rmgraph': Remove a complete graph/context. One can specify a list of graphs/contexts to remove.
When used in combination with the --nrl parameter metadata graphs are removed automatically.
- 'list': List statements. As with 'remove' the parameters are a list of up to 4 nodes.
- 'monitor': Monitor a remote model. sopranocmd will continue listing added and removed statements
matching the statement pattern specified via the parameters until it is stopped. Be aware
that some backends do not report every removed statement but only the remove pattern.
- 'query': Execute a query on the model and print the results. The parameter is the actual query to perform.
- 'import': Import a set of statements into the model. The parameter is a local filename to read the
statements to import from. If the option --nrl is given imported statements are added to a new
context/named graph if they do not have one already.
- 'export': Export a set of statements to a file. The parameters are an optional SPARQL construct query
which selects the statements to export (if not specified all statements are exported) and a local
filename to write the exported statements to.
<parameters> The parameters to the command as specified above.
Nodes are defined in an N-Triples-like notation:
- Resource nodes are defined in angle brackets.
Example: <http://www.test.org#A>
- Blank nodes are defined as "_:" followed by their identifier.
Example: _:a
- Literal nodes are defined as a combination of their string value and their datatype URI
or as a simple literal string:
Examples: "Hello World"^^<http://www.w3.org/2001/XMLSchema#string>
42 (evaluates to a literal of type integer)
0.7 (evaluates to a literal of type double)
Hello (evaluates to a literal of type string)
"Hello" (evaluates to a plain literal)
"Hallo"@de (evaluates to a plain literal)
- An empty string evaluates to an empy node ("" does the trick)
No model name specified.