Soprano Server Protocol

Warning:
The protocol described on this page is used internally by the Soprano TCP and local socket server and client. Normally there is no need to deal with it except if you want to write a client or server in another programming language.
The server protocol is quite simple and is based on a set of commands and binary serializations for data types. It has been optimized for speed and nothing else so it always tries to comunicate as little data as possible.

Commands

Commands are identified by unsigned 16bit integer values (native bit order). Issuing a command is done by sending the command number followed by the command parameters.

The following table lists the available commands.

CommandCodeParametersReturn valuesDescription
Create model0x1name (string), settings (List of Soprano::BackendSetting)model ID (unsigned 32bit int)Retrieve the ID for a model (if the model does not yet exist, it is craeted.
FIXME...

Types

The default implementation of the protocol uses QDataStream. Thus, all basic types are encoded as QDataStream does it.

Soprano::Node

A Soprano node starts with the node type encoded as unsigned 8bit. For the possible values see Soprano::Node::Type. If it is a literal node (Soprano::Node::LiteralNode) after the type follow the literal value (Soprano::LiteralValue) and the language (string). If it is a resource (Soprano::Node::ResourceNode) or blank node (Soprano::Node::BlankNode) after the type follows the URI of the node (URI). If it is an empty node, nothing follows the type.

Soprano::Statement

A Soprano statement is encoded simply by encoding the subject, predicate, object, and context node in that order.

Soprano::LiteralValue

A Soprano literal value is encoded as a QVariant: The type of the data (unsigned 32bit) followed by a null flag (8bit) and the data of the specified type.

Soprano::BindingSet

FIXME...

Generated on Tue Jul 22 17:39:33 2008 for Soprano by  doxygen 1.5.6