Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 5b6c31d6428e1f6ea754ea6f7b1aed6e > files > 786

soprano-apidocs-2.6.0-2.fc14.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"/>
<title>Soprano: Virtuoso Storage Backend</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.3 -->
<script type="text/javascript">
function hasClass(ele,cls) {
  return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)'));
}

function addClass(ele,cls) {
  if (!this.hasClass(ele,cls)) ele.className += " "+cls;
}

function removeClass(ele,cls) {
  if (hasClass(ele,cls)) {
    var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)');
    ele.className=ele.className.replace(reg,' ');
  }
}

function toggleVisibility(linkObj) {
 var base = linkObj.getAttribute('id');
 var summary = document.getElementById(base + '-summary');
 var content = document.getElementById(base + '-content');
 var trigger = document.getElementById(base + '-trigger');
 if ( hasClass(linkObj,'closed') ) {
   summary.style.display = 'none';
   content.style.display = 'block';
   trigger.src = 'open.png';
   removeClass(linkObj,'closed');
   addClass(linkObj,'opened');
 } else if ( hasClass(linkObj,'opened') ) {
   summary.style.display = 'block';
   content.style.display = 'none';
   trigger.src = 'closed.png';
   removeClass(linkObj,'opened');
   addClass(linkObj,'closed');
 }
 return false;
}
</script>
<div id="top">
<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.6.0</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <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 id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="index.html">Soprano (aka QRDF) - A modular RDF storage framework</a>      </li>
      <li class="navelem"><a class="el" href="soprano_storage.html">RDF Storage</a>      </li>
      <li class="navelem"><a class="el" href="soprano_backends.html">Soprano Backends</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<h1>Virtuoso Storage Backend </h1>  </div>
</div>
<div class="contents">
<div class="textblock"><p>The Virtuoso storage backend provides access to Virtuoso servers. It can connect to already running servers as well as spawn its own local instance. The Virtuoso server is accessed via ODBC through the client library <a href="http://www.iodbc.org/">iODBC</a>. Currently no other client libraries are supported (which also means that this backend can only be used on systems that have libiODBC which excludes Windows).</p>
<p>The name of the backend is <code>virtuosobackend</code>. Thus, to use it one simply has to load it as follows:</p>
<div class="fragment"><pre class="fragment"> <span class="keyword">const</span> <a class="code" href="classSoprano_1_1Backend.html" title="Soprano::Backend defines the interface for a Soprano backend plugin.">Soprano::Backend</a>* virtBack = <a class="code" href="classSoprano_1_1PluginManager.html#a922c00336d39542a289e9b82a39e25b2">Soprano::PluginManager::instance</a>()-&gt;discoverBackendByName(<span class="stringliteral">&quot;virtuosobackend&quot;</span>);
</pre></div><h2><a class="anchor" id="soprano_backend_vituoso_settings"></a>
Supported Settings</h2>
<p>The Virtuoso backend supports the following settings which can be passed to <a class="el" href="classSoprano_1_1Backend.html#abe4347c68662b53fc2f709b4536febb2">Soprano::Backend::createModel</a>:</p>
<ul>
<li><code>indexes</code> - A comma separated list of quadruple indexes to be used (Example: '<code>spog</code>,<code>posg</code>,<code>opsg'</code>). If not specified, the indexes are not changed, ie. the Virtuoso defaults are used.</li>
<li><code>fulltextindex</code> - Enable or disable the full text index which allows to perform full text queries on string literals embedded in SPARQL queries. For more information see the documentation on <a href="http://docs.openlinksw.com/virtuoso/rdfsparql.html#sparqlextensions">Virtuoso SPARQL extensions</a>.<ul>
<li><code>none</code> - disable the index</li>
<li><code>sync</code> - enable syncroneous updates of the index (the index is always in sync. This might give a performace penalty)</li>
<li><code>N</code> - The interval in minutes after which the index will be updated.</li>
</ul>
</li>
<li><code>NumberOfBuffers</code> - The number of buffers (8k in size) to be used by Virtuoso. Defaults to 2000.</li>
<li><code>ServerThreads</code> - The number of server threads. Defaults to 100.</li>
<li><code>CheckpointInterval</code> - The interval in minutes at which Virtuoso will automatically make a database checkpoint. Defaults to 60.</li>
<li><code>MinAutoCheckpointSize</code> - The minimum size of the Virtuoso transaction log. An automatic checkpoint will not be made if there is less than MinAutoCheckpointSize bytes in the current transaction log. Defaults to 4000000.</li>
<li><code>forcedstart</code> - A boolean property which when set will result in the backend killing any Virtuoso instance accessing the data in the storage dir before starting its own instance. This option is ignored when connecting to an already running Virtuoso server.</li>
<li><code>QueryTimeout</code> - The maximum time any query may take in milliseconds. See <a href="http://docs.openlinksw.com/virtuoso/anytimequeries.html">Virtuoso Anytime Queries</a> for details.</li>
</ul>
<p>The settings above are user settings and have to be provided using <a class="el" href="namespaceSoprano.html#ae82decb95b689a7c1252e735981b7fb2a4ed220736d4c1563ae0186b79ca1e68d">Soprano::BackendOptionUser</a>:</p>
<div class="fragment"><pre class="fragment"> <a class="codeRef" href="qlist.html">Soprano::BackendSettings</a> settings;
 <span class="comment">// configure the used indexes</span>
 settings &lt;&lt; <a class="code" href="classSoprano_1_1BackendSetting.html" title="Wraps one setting for Model creation.">Soprano::BackendSetting</a>( <span class="stringliteral">&quot;indexes&quot;</span>, <span class="stringliteral">&quot;spog,posg,opsg&quot;</span> );

 <span class="comment">// set the full text index to be updated every 10 minutes</span>
 settings &lt;&lt; <a class="code" href="classSoprano_1_1BackendSetting.html" title="Wraps one setting for Model creation.">Soprano::BackendSetting</a>( <span class="stringliteral">&quot;fulltextindex&quot;</span>, <span class="stringliteral">&quot;10&quot;</span> );
</pre></div><p>The following setting is required for starting a local instance of Virtuoso:</p>
<ul>
<li><a class="el" href="namespaceSoprano.html#ae82decb95b689a7c1252e735981b7fb2a5aa54bacf690e80973ea89ab1fb735fa">Soprano::BackendOptionStorageDir</a> - Set the storage folder to use when spawning a local instance of Virtuoso. This can not be combined with any of the settings above.</li>
</ul>
<p>The following settings need to be provided to access an already running Virtuoso server:</p>
<ul>
<li><a class="el" href="namespaceSoprano.html#ae82decb95b689a7c1252e735981b7fb2ac066245a73967fd616b292e3c3b3ac50">Soprano::BackendOptionHost</a> - Set the host the Virtuoso server is running on. </li>
<li><a class="el" href="namespaceSoprano.html#ae82decb95b689a7c1252e735981b7fb2a182adb06aa4060ce5aa0377c0a5d7f01">Soprano::BackendOptionPort</a> - Set the port the Virtuoso server is running on. </li>
<li><a class="el" href="namespaceSoprano.html#ae82decb95b689a7c1252e735981b7fb2a0e694a8e32c49693cf90287ae5f78c9b">Soprano::BackendOptionUsername</a> - Set the user name to connect to the Virtuoso server. </li>
<li><a class="el" href="namespaceSoprano.html#ae82decb95b689a7c1252e735981b7fb2af132153b0d59edd9b5115c6b40998c94">Soprano::BackendOptionPassword</a> - Set the password to connect to the Virtuoso server.</li>
</ul>
<h2><a class="anchor" id="soprano_backend_vituoso_specialities"></a>
Virtuoso Specialities</h2>
<p>Since Virtuoso is an SQL server and, thus, does store all RDF data in SQL tables it has some characteristics that are worth mentioning:</p>
<h3><a class="anchor" id="soprano_virtuoso_empty_graph"></a>
The Empty Graph</h3>
<p>Virtuoso/SPAURL has no notion of the empty/default graph. Thus, by default, it is not possible to add statements to the empty/default graph. The Soprano backend works around this problem by introducing a special named graph which is used internally to store triples that belong to the default/empty graph.</p>
<p>This means that a conversion needs to take place whenever the empty graph or the special graph are encountered. This introduces a slight performance penalty. In the future an option might be introduced to disable this behaviour.</p>
<h3><a class="anchor" id="soprano_virtuoso_types"></a>
SQL Types</h3>
<p>Virtuoso, being an SQL server, does not have specific types for boolean, decimal and others. They are all represented as SQL integer values.</p>
<p>The backend does solve this issue for boolean values only by introducing a fake datatype for boolean literals. This is converted internally so the user of the backend will never notice it. The only exception may be queries that contain filters. More input is needed here. </p>
</div></div>
<hr class="footer"/><address class="footer"><small>Generated on Fri Mar 11 2011 for Soprano by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>