Sophie

Sophie

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

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: Soprano::Server::ServerCore Class Reference</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><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespaceSoprano.html">Soprano</a>      </li>
      <li class="navelem"><a class="el" href="namespaceSoprano_1_1Server.html">Server</a>      </li>
      <li class="navelem"><a class="el" href="classSoprano_1_1Server_1_1ServerCore.html">ServerCore</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="#pro-methods">Protected Member Functions</a>  </div>
  <div class="headertitle">
<h1>Soprano::Server::ServerCore Class Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Soprano::Server::ServerCore" --><!-- doxytag: inherits="QObject,Soprano::Error::ErrorCache" -->
<p>Central Soprano server class.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="servercore_8h_source.html">Soprano/Server/ServerCore</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png"/> Inheritance diagram for Soprano::Server::ServerCore:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="classSoprano_1_1Server_1_1ServerCore__inherit__graph.png" border="0" usemap="#Soprano_1_1Server_1_1ServerCore_inherit__map" alt="Inheritance graph"/></div>
<map name="Soprano_1_1Server_1_1ServerCore_inherit__map" id="Soprano_1_1Server_1_1ServerCore_inherit__map">
<area shape="rect" id="node2" href="qobject.html" title="QObject" alt="" coords="5,5,75,35"/><area shape="rect" id="node4" href="classSoprano_1_1Error_1_1ErrorCache.html" title="Core class of Soprano&#39;s exception system." alt="" coords="99,5,277,35"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classSoprano_1_1Server_1_1ServerCore-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#a81230e384913040fa554c44eb285016b">ServerCore</a> (<a class="elRef" href="qobject.html">QObject</a> *<a class="elRef" href="qobject.html#parent">parent</a>=0)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#af045415b1c60b04c2e876bedf3a0050d">~ServerCore</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#a56fd9907b22ef695d76b313a5edf97f1">setBackend</a> (const <a class="el" href="classSoprano_1_1Backend.html">Backend</a> *backend)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classSoprano_1_1Backend.html">Backend</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#a98949b99cd52f3ca1160fa955f2c93cc">backend</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#abf224d9b0282d13867247ece2bd606b6">setBackendSettings</a> (const <a class="elRef" href="qlist.html">QList</a>&lt; <a class="el" href="classSoprano_1_1BackendSetting.html">BackendSetting</a> &gt; &amp;settings)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="qlist.html">QList</a>&lt; <a class="el" href="classSoprano_1_1BackendSetting.html">BackendSetting</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#a3ce813e778f40644187992d778d673dd">backendSettings</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#a6a9601fdb7f52f3ed915ae552a55372b">setMaximumConnectionCount</a> (int max)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#a67b98daf6a7cb6355a3424d91120ca74">maximumConnectionCount</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classSoprano_1_1Model.html">Model</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#adbe43a88006beeb94a755a0a33a3f8fc">model</a> (const <a class="elRef" href="qstring.html">QString</a> &amp;<a class="elRef" href="qobject.html#name">name</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#a7344355cbab94fc62dad40b808fa633b">removeModel</a> (const <a class="elRef" href="qstring.html">QString</a> &amp;<a class="elRef" href="qobject.html#name">name</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="elRef" href="qstringlist.html">QStringList</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#a521371334a372d10857b3ef36173c1a5">allModels</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#a8336da875d8ae9f18151b907a4d7ea21">start</a> (const <a class="elRef" href="qstring.html">QString</a> &amp;socketPath=<a class="elRef" href="qstring.html">QString</a>())</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#ac4f1d3911ee454430e754d1cda058fe5">listen</a> (quint16 port=<a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#abe059a2e9ed45ce16b79afb85824b8dd">DEFAULT_PORT</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">quint16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#a2a55428ea5ad4d55da9c43c7835e86a1">serverPort</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#a3024435aa02cdb52e6636cf62f1fc93e">registerAsDBusObject</a> (const <a class="elRef" href="qstring.html">QString</a> &amp;objectPath=<a class="elRef" href="qstring.html">QString</a>())</td></tr>
<tr><td colspan="2"><h2><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const quint16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#abe059a2e9ed45ce16b79afb85824b8dd">DEFAULT_PORT</a></td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classSoprano_1_1Model.html">Model</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#ad9b93356abd5ae55a7d69b6ac61c5732">createModel</a> (const <a class="elRef" href="qlist.html">QList</a>&lt; <a class="el" href="classSoprano_1_1BackendSetting.html">BackendSetting</a> &gt; &amp;settings)</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Central Soprano server class. </p>
<p>The ServerCore provides a Soprano server which maintains a set of named <a class="el" href="classSoprano_1_1Model.html" title="A Model is the central class in Soprano. It is a queryable collection of RDF quadruples, i.e statements.">Model</a> instances that can be accessed by clients over a tcp connection through Server::BackendPlugin.</p>
<p>Creating a server is very simple: Either derive from <a class="el" href="classSoprano_1_1Server_1_1ServerCore.html" title="Central Soprano server class.">ServerCore</a> or create an instance and then call <a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#a8336da875d8ae9f18151b907a4d7ea21">start()</a> to make the server listen for incoming connections.</p>
<div class="fragment"><pre class="fragment"> <a class="code" href="classSoprano_1_1Server_1_1ServerCore.html" title="Central Soprano server class.">Soprano::Server::ServerCore</a> core;
 core.<a class="code" href="classSoprano_1_1Server_1_1ServerCore.html#a8336da875d8ae9f18151b907a4d7ea21">start</a>();
</pre></div><p>Optionally <a class="el" href="classSoprano_1_1Server_1_1ServerCore.html" title="Central Soprano server class.">ServerCore</a> can be configured using normal <a class="el" href="classSoprano_1_1BackendSetting.html" title="Wraps one setting for Model creation.">BackendSetting</a> settings through <a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#abf224d9b0282d13867247ece2bd606b6">setBackendSettings()</a>.</p>
<p>Be aware the ServerCode supports multiple ways of communication. <a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#a8336da875d8ae9f18151b907a4d7ea21">start()</a> opens a TCP socket to accept new connections, <a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#a3024435aa02cdb52e6636cf62f1fc93e">registerAsDBusObject()</a> registers a DBus interface on the DBus session bus. Both ways of communication can be used simultaneously.</p>
<p><a class="el" href="classSoprano_1_1Server_1_1ServerCore.html" title="Central Soprano server class.">ServerCore</a> will spawn a new thread for each incoming TCP or local socket connection. In addition the D-Bus interface is running in its own thread. The maximum number of threads that are spawned can be set via <a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#a6a9601fdb7f52f3ed915ae552a55372b">setMaximumConnectionCount()</a>. By default there is no restriction on the maximum thread count to keep backwards compatibility.</p>
<dl class="author"><dt><b>Author:</b></dt><dd>Sebastian Trueg &lt;<a href="mailto:trueg@kde.org">trueg@kde.org</a>&gt; </dd></dl>

<p>Definition at line <a class="el" href="servercore_8h_source.html#l00074">74</a> of file <a class="el" href="servercore_8h_source.html">servercore.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a81230e384913040fa554c44eb285016b"></a><!-- doxytag: member="Soprano::Server::ServerCore::ServerCore" ref="a81230e384913040fa554c44eb285016b" args="(QObject *parent=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Soprano::Server::ServerCore::ServerCore </td>
          <td>(</td>
          <td class="paramtype"><a class="elRef" href="qobject.html">QObject</a> *&#160;</td>
          <td class="paramname"><em>parent</em> = <code>0</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="af045415b1c60b04c2e876bedf3a0050d"></a><!-- doxytag: member="Soprano::Server::ServerCore::~ServerCore" ref="af045415b1c60b04c2e876bedf3a0050d" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual Soprano::Server::ServerCore::~ServerCore </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a56fd9907b22ef695d76b313a5edf97f1"></a><!-- doxytag: member="Soprano::Server::ServerCore::setBackend" ref="a56fd9907b22ef695d76b313a5edf97f1" args="(const Backend *backend)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Soprano::Server::ServerCore::setBackend </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classSoprano_1_1Backend.html">Backend</a> *&#160;</td>
          <td class="paramname"><em>backend</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Set the <a class="el" href="classSoprano_1_1Backend.html" title="Soprano::Backend defines the interface for a Soprano backend plugin.">Backend</a> used in the <a class="el" href="namespaceSoprano_1_1Server.html">Server</a> to create Models. </p>

</div>
</div>
<a class="anchor" id="a98949b99cd52f3ca1160fa955f2c93cc"></a><!-- doxytag: member="Soprano::Server::ServerCore::backend" ref="a98949b99cd52f3ca1160fa955f2c93cc" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classSoprano_1_1Backend.html">Backend</a>* Soprano::Server::ServerCore::backend </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The <a class="el" href="classSoprano_1_1Backend.html" title="Soprano::Backend defines the interface for a Soprano backend plugin.">Backend</a> used by the <a class="el" href="namespaceSoprano_1_1Server.html">Server</a> to create <a class="el" href="classSoprano_1_1Model.html" title="A Model is the central class in Soprano. It is a queryable collection of RDF quadruples, i.e statements.">Model</a> instances. </p>

</div>
</div>
<a class="anchor" id="abf224d9b0282d13867247ece2bd606b6"></a><!-- doxytag: member="Soprano::Server::ServerCore::setBackendSettings" ref="abf224d9b0282d13867247ece2bd606b6" args="(const QList&lt; BackendSetting &gt; &amp;settings)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Soprano::Server::ServerCore::setBackendSettings </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qlist.html">QList</a>&lt; <a class="el" href="classSoprano_1_1BackendSetting.html">BackendSetting</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>settings</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Set the settings that are to be used by <a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#ad9b93356abd5ae55a7d69b6ac61c5732">createModel()</a> to create new <a class="el" href="classSoprano_1_1Model.html" title="A Model is the central class in Soprano. It is a queryable collection of RDF quadruples, i.e statements.">Model</a> instances. Be aware that <a class="el" href="namespaceSoprano.html#ae82decb95b689a7c1252e735981b7fb2a5aa54bacf690e80973ea89ab1fb735fa">Soprano::BackendOptionStorageDir</a> will be changed to include a subdir which is the Model's name.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">settings</td><td>The settings to use for new Models. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a3ce813e778f40644187992d778d673dd"></a><!-- doxytag: member="Soprano::Server::ServerCore::backendSettings" ref="a3ce813e778f40644187992d778d673dd" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="qlist.html">QList</a>&lt;<a class="el" href="classSoprano_1_1BackendSetting.html">BackendSetting</a>&gt; Soprano::Server::ServerCore::backendSettings </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Retrieve the backend settings configured via <a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#abf224d9b0282d13867247ece2bd606b6">setBackendSettings()</a>.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>A list of <a class="el" href="classSoprano_1_1BackendSetting.html" title="Wraps one setting for Model creation.">BackendSetting</a> objects. </dd></dl>

</div>
</div>
<a class="anchor" id="a6a9601fdb7f52f3ed915ae552a55372b"></a><!-- doxytag: member="Soprano::Server::ServerCore::setMaximumConnectionCount" ref="a6a9601fdb7f52f3ed915ae552a55372b" args="(int max)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Soprano::Server::ServerCore::setMaximumConnectionCount </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>max</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Set the maximum number of TCP and local socket connections. If the max is reached new incoming connections are refused.</p>
<p>This makes sense to restrict the number of threads the server spawns.</p>
<p>A typical usage would be to server a max number of clients via a local socket connection and let the rest share the one D-Bus interface.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">max</td><td>The maximum number of connections. Using a value of 0 means no restriction.</td></tr>
  </table>
  </dd>
</dl>
<dl class="since"><dt><b>Since:</b></dt><dd>2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a67b98daf6a7cb6355a3424d91120ca74"></a><!-- doxytag: member="Soprano::Server::ServerCore::maximumConnectionCount" ref="a67b98daf6a7cb6355a3424d91120ca74" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Soprano::Server::ServerCore::maximumConnectionCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The maximum number of incoming connections that are served.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The maxium number of connections the server will handle or 0 if there is no restriction.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#a6a9601fdb7f52f3ed915ae552a55372b">setMaximumConnectionCount</a>.</dd></dl>
<dl class="since"><dt><b>Since:</b></dt><dd>2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="adbe43a88006beeb94a755a0a33a3f8fc"></a><!-- doxytag: member="Soprano::Server::ServerCore::model" ref="adbe43a88006beeb94a755a0a33a3f8fc" args="(const QString &amp;name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classSoprano_1_1Model.html">Model</a>* Soprano::Server::ServerCore::model </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get or create <a class="el" href="classSoprano_1_1Model.html" title="A Model is the central class in Soprano. It is a queryable collection of RDF quadruples, i.e statements.">Model</a> with the specific name. The default implementation will use <a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#ad9b93356abd5ae55a7d69b6ac61c5732">createModel()</a> to create a new <a class="el" href="classSoprano_1_1Model.html" title="A Model is the central class in Soprano. It is a queryable collection of RDF quadruples, i.e statements.">Model</a> if none with the specified name exists and protect it against deadlocks with a <a class="el" href="classSoprano_1_1Util_1_1AsyncModel.html" title="Filter model that allows to perform operations asyncroneously.">Util::AsyncModel</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>The name of the requested <a class="el" href="classSoprano_1_1Model.html" title="A Model is the central class in Soprano. It is a queryable collection of RDF quadruples, i.e statements.">Model</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a7344355cbab94fc62dad40b808fa633b"></a><!-- doxytag: member="Soprano::Server::ServerCore::removeModel" ref="a7344355cbab94fc62dad40b808fa633b" args="(const QString &amp;name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Soprano::Server::ServerCore::removeModel </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Remove a model and delete all data in it. Use with care.</p>
<p>Be aware that the <a class="el" href="classSoprano_1_1Model.html" title="A Model is the central class in Soprano. It is a queryable collection of RDF quadruples, i.e statements.">Model</a> instance will also be deleted.</p>
<p>Should be reimplemented if <a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#adbe43a88006beeb94a755a0a33a3f8fc">model()</a> is reimplemented.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>The name of the requested <a class="el" href="classSoprano_1_1Model.html" title="A Model is the central class in Soprano. It is a queryable collection of RDF quadruples, i.e statements.">Model</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="warning"><dt><b>Warning:</b></dt><dd>This is not the same as deleting the <a class="el" href="classSoprano_1_1Model.html" title="A Model is the central class in Soprano. It is a queryable collection of RDF quadruples, i.e statements.">Model</a> instance. It will also delete all the data on the harddisk. </dd></dl>

</div>
</div>
<a class="anchor" id="a521371334a372d10857b3ef36173c1a5"></a><!-- doxytag: member="Soprano::Server::ServerCore::allModels" ref="a521371334a372d10857b3ef36173c1a5" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="elRef" href="qstringlist.html">QStringList</a> Soprano::Server::ServerCore::allModels </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Retrieve all models that have been loaded.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>A list of <a class="el" href="classSoprano_1_1Model.html" title="A Model is the central class in Soprano. It is a queryable collection of RDF quadruples, i.e statements.">Model</a> names. </dd></dl>

</div>
</div>
<a class="anchor" id="a8336da875d8ae9f18151b907a4d7ea21"></a><!-- doxytag: member="Soprano::Server::ServerCore::start" ref="a8336da875d8ae9f18151b907a4d7ea21" args="(const QString &amp;socketPath=QString())" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Soprano::Server::ServerCore::start </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>socketPath</em> = <code><a class="elRef" href="qstring.html">QString</a>()</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Start the core on a local socket. On Windows this is a named pipe and on Unix this this is a local domain socket.</p>
<p>Use <a class="el" href="classSoprano_1_1Client_1_1LocalSocketClient.html" title="Creates a connection to the Soprano server through a local socket interface.">Client::LocalSocketClient</a> to connect.</p>
<dl class="warning"><dt><b>Warning:</b></dt><dd>Via the local socket connection signals are not supported.</dd></dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if the local socket could be successfully opened. <code>false</code> on error. See ErrorCache::lastError() for details. </dd></dl>

</div>
</div>
<a class="anchor" id="ac4f1d3911ee454430e754d1cda058fe5"></a><!-- doxytag: member="Soprano::Server::ServerCore::listen" ref="ac4f1d3911ee454430e754d1cda058fe5" args="(quint16 port=DEFAULT_PORT)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Soprano::Server::ServerCore::listen </td>
          <td>(</td>
          <td class="paramtype">quint16&#160;</td>
          <td class="paramname"><em>port</em> = <code><a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#abe059a2e9ed45ce16b79afb85824b8dd">DEFAULT_PORT</a></code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Start the <a class="el" href="namespaceSoprano_1_1Server.html">Server</a>. Calling this method will make the <a class="el" href="namespaceSoprano_1_1Server.html">Server</a> listen on the specified port for incoming client connections.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">port</td><td>The port to listen on for client connections.</td></tr>
  </table>
  </dd>
</dl>
<p>Use <a class="el" href="classSoprano_1_1Client_1_1TcpClient.html" title="Creates a connection to the Soprano server through a TCP connection.">Client::TcpClient</a> to connect.</p>
<dl class="warning"><dt><b>Warning:</b></dt><dd>Via the TCP connection signals are not supported. Thus, the models created by it will not emit signals such as <a class="el" href="classSoprano_1_1Model.html#a3e2595166caac3621fd4268e46049adf">Model::statementAdded</a>. Also no permission handling or any kind of security is implemented at the moment. Thus, if a server is running and is listening on a port, it is open to connections from any client on any computer in the network.</dd></dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if the server was successfully started, <code>false</code> otherwise. </dd></dl>

</div>
</div>
<a class="anchor" id="a2a55428ea5ad4d55da9c43c7835e86a1"></a><!-- doxytag: member="Soprano::Server::ServerCore::serverPort" ref="a2a55428ea5ad4d55da9c43c7835e86a1" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">quint16 Soprano::Server::ServerCore::serverPort </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>The port this server is listening on or 0 if listen has not been called successfully.</dd></dl>
<dl class="since"><dt><b>Since:</b></dt><dd>2.1 </dd></dl>

</div>
</div>
<a class="anchor" id="a3024435aa02cdb52e6636cf62f1fc93e"></a><!-- doxytag: member="Soprano::Server::ServerCore::registerAsDBusObject" ref="a3024435aa02cdb52e6636cf62f1fc93e" args="(const QString &amp;objectPath=QString())" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Soprano::Server::ServerCore::registerAsDBusObject </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>objectPath</em> = <code><a class="elRef" href="qstring.html">QString</a>()</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Register the <a class="el" href="classSoprano_1_1Server_1_1ServerCore.html" title="Central Soprano server class.">ServerCore</a> as a DBus object. The process needs to be registered as a DBus service before (<a class="elRef" href="qdbusconnection.html#registerService">QDBusConnection::registerService()</a>).</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">objectPath</td><td>The DBus object path to register the server as. If empty the default path will be used (/org/soprano/Server).</td></tr>
  </table>
  </dd>
</dl>
<p>Use <a class="el" href="classSoprano_1_1Client_1_1DBusClient.html" title="Core class to handle a connection to a Soprano server through the DBus interface.">Client::DBusClient</a> to connect.</p>
<p>In case <a class="el" href="namespaceSoprano.html">Soprano</a> is compiled without D-Bus support this method does nothing.</p>
<p>D-Bus clients will be served in a separate thread. </p>

</div>
</div>
<a class="anchor" id="ad9b93356abd5ae55a7d69b6ac61c5732"></a><!-- doxytag: member="Soprano::Server::ServerCore::createModel" ref="ad9b93356abd5ae55a7d69b6ac61c5732" args="(const QList&lt; BackendSetting &gt; &amp;settings)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classSoprano_1_1Model.html">Model</a>* Soprano::Server::ServerCore::createModel </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qlist.html">QList</a>&lt; <a class="el" href="classSoprano_1_1BackendSetting.html">BackendSetting</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>settings</em></td><td>)</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Create a new <a class="el" href="classSoprano_1_1Model.html" title="A Model is the central class in Soprano. It is a queryable collection of RDF quadruples, i.e statements.">Model</a>. The default implementation uses the configured <a class="el" href="classSoprano_1_1Backend.html" title="Soprano::Backend defines the interface for a Soprano backend plugin.">Backend</a> with the configured settings to create a new <a class="el" href="classSoprano_1_1Model.html" title="A Model is the central class in Soprano. It is a queryable collection of RDF quadruples, i.e statements.">Model</a>. This method can be reimplemented to create specialized <a class="el" href="classSoprano_1_1Model.html" title="A Model is the central class in Soprano. It is a queryable collection of RDF quadruples, i.e statements.">Model</a>, for example in combination with some <a class="el" href="classSoprano_1_1FilterModel.html" title="A FilterModel is a virtual model that wraps another Model.">FilterModel</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">settings</td><td>The settings to use (a reimplementation may choose to ignore the settings.)</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A newly create <a class="el" href="classSoprano_1_1Model.html" title="A Model is the central class in Soprano. It is a queryable collection of RDF quadruples, i.e statements.">Model</a>. </dd></dl>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="abe059a2e9ed45ce16b79afb85824b8dd"></a><!-- doxytag: member="Soprano::Server::ServerCore::DEFAULT_PORT" ref="abe059a2e9ed45ce16b79afb85824b8dd" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const quint16 <a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#abe059a2e9ed45ce16b79afb85824b8dd">Soprano::Server::ServerCore::DEFAULT_PORT</a><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The default Soprano server port: 5000 </p>

<p>Definition at line <a class="el" href="servercore_8h_source.html#l00085">85</a> of file <a class="el" href="servercore_8h_source.html">servercore.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>/builddir/build/BUILD/soprano-2.6.0/server/<a class="el" href="servercore_8h_source.html">servercore.h</a></li>
</ul>
</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>