Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > 56137fc01613c3216d40d3968a193ec8 > files > 895

soprano-apidocs-2.9.4-2.fc18.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>Soprano: Soprano Server Protocol</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Soprano
   &#160;<span id="projectnumber">2.9.4</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title"><a class="el" href="namespaceSoprano.html">Soprano</a> Server Protocol </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><dl class="section warning"><dt>Warning</dt><dd>The protocol described on this page is used internally by the <a class="el" href="namespaceSoprano.html">Soprano</a> 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.</dd></dl>
<p>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.</p>
<h1><a class="anchor" id="soprano_server_protocol_commands"></a>
Commands</h1>
<p>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.</p>
<p>The following table lists the available commands.</p>
<table class="doxtable">
<tr>
<th>Command</th><th>Code</th><th>Parameters</th><th>Return values</th><th>Description </th></tr>
<tr>
<td>Create model</td><td>0x1</td><td>name (string), settings (List of <a class="el" href="classSoprano_1_1BackendSetting.html" title="Wraps one setting for Model creation.">Soprano::BackendSetting</a>)</td><td>model ID (unsigned 32bit int)</td><td>Retrieve the ID for a model (if the model does not yet exist, it is craeted. </td></tr>
<tr>
<td>FIXME... </td></tr>
</table>
<h1><a class="anchor" id="soprano_server_protocol_types"></a>
Types</h1>
<p>The default implementation of the protocol uses <a class="elRef" doxygen="qt4.tag:/usr/share/doc/qt4/html/" href="/usr/share/doc/qt4/html/qdatastream.html">QDataStream</a>. Thus, all basic types are encoded as <a class="elRef" doxygen="qt4.tag:/usr/share/doc/qt4/html/" href="/usr/share/doc/qt4/html/qdatastream.html">QDataStream</a> does it.</p>
<h2><a class="anchor" id="soprano_server_protocol_types_node"></a>
Soprano::Node</h2>
<p>A Soprano node starts with the node type encoded as unsigned 8bit. For the possible values see <a class="el" href="classSoprano_1_1Node.html#ac63f6890978f00f3da8da427f4c5d16c">Soprano::Node::Type</a>. If it is a literal node (<a class="el" href="classSoprano_1_1Node.html#ac63f6890978f00f3da8da427f4c5d16ca59d7743a9f37cdd4c84df3b4076371e8">Soprano::Node::LiteralNode</a>) after the type follow the literal value (<a class="el" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">Soprano::LiteralValue</a>) and the language (string). If it is a resource (<a class="el" href="classSoprano_1_1Node.html#ac63f6890978f00f3da8da427f4c5d16ca757bb91571717c2d447da4b66ba63283">Soprano::Node::ResourceNode</a>) or blank node (<a class="el" href="classSoprano_1_1Node.html#ac63f6890978f00f3da8da427f4c5d16caf093a8a3ad76f0b25ede1c9971990827">Soprano::Node::BlankNode</a>) after the type follows the URI of the node (URI). If it is an empty node, nothing follows the type.</p>
<h2><a class="anchor" id="soprano_server_protocol_types_statement"></a>
Soprano::Statement</h2>
<p>A Soprano statement is encoded simply by encoding the subject, predicate, object, and context node in that order.</p>
<h2><a class="anchor" id="soprano_server_protocol_types_literalvalue"></a>
Soprano::LiteralValue</h2>
<p>A Soprano literal value is encoded as a <a class="elRef" doxygen="qt4.tag:/usr/share/doc/qt4/html/" href="/usr/share/doc/qt4/html/qvariant.html">QVariant</a>: The type of the data (unsigned 32bit) followed by a null flag (8bit) and the data of the specified type.</p>
<h2><a class="anchor" id="soprano_server_protocol_types_bindingset"></a>
Soprano::BindingSet</h2>
<p>FIXME... </p>
</div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.3.1
</small></address>
</body>
</html>