Sophie

Sophie

distrib > Fedora > 13 > x86_64 > media > updates > by-pkgid > fc669c0115c2f74e1d26807f2cb98f7a > files > 45

soprano-apidocs-2.5.2-1.fc13.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::Backend 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.1 -->
<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 class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;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 class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath">
    <ul>
      <li><a class="el" href="namespaceSoprano.html">Soprano</a>      </li>
      <li><a class="el" href="classSoprano_1_1Backend.html">Soprano::Backend</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#related">Related Functions</a>  </div>
  <div class="headertitle">
<h1>Soprano::Backend Class Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Soprano::Backend" --><!-- doxytag: inherits="Soprano::Plugin,Soprano::Error::ErrorCache" -->
<p><a class="el" href="classSoprano_1_1Backend.html" title="Soprano::Backend defines the interface for a Soprano backend plugin.">Soprano::Backend</a> defines the interface for a <a class="el" href="namespaceSoprano.html">Soprano</a> backend plugin.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="backend_8h_source.html">Soprano/Backend</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::Backend:</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_1Backend__inherit__graph.png" border="0" usemap="#Soprano_1_1Backend_inherit__map" alt="Inheritance graph"/></div>
<map name="Soprano_1_1Backend_inherit__map" id="Soprano_1_1Backend_inherit__map">
<area shape="rect" id="node2" href="classSoprano_1_1Plugin.html" title="Base class for all plugins in Soprano." alt="" coords="5,5,120,35"/><area shape="rect" id="node4" href="classSoprano_1_1Error_1_1ErrorCache.html" title="Core class of Soprano&#39;s exception system." alt="" coords="144,5,323,35"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classSoprano_1_1Backend-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">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Backend.html#a05ca606ede08c5ffc4d531c5555f8059">Backend</a> (const <a class="elRef" href="qstring.html">QString</a> &amp;name)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Backend.html#ad7d27aded41bd3c54b935781ff57ec9d">~Backend</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classSoprano_1_1StorageModel.html">StorageModel</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Backend.html#abe4347c68662b53fc2f709b4536febb2">createModel</a> (const <a class="elRef" href="qlist.html">BackendSettings</a> &amp;settings=<a class="elRef" href="qlist.html">BackendSettings</a>()) const =0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Backend.html#aa3e266b5ceec1e72bfadfb3259222179">deleteModelData</a> (const <a class="elRef" href="qlist.html">BackendSettings</a> &amp;settings) const =0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual BackendFeatures&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Backend.html#a6f22f2980fbf21ef43b29d3aa050f479">supportedFeatures</a> () const =0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="elRef" href="qstringlist.html">QStringList</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Backend.html#afc44eff3d43d07fcc4956f9db9fa697c">supportedUserFeatures</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Backend.html#a0fcbf761e52a2797574416b8bf98ddcf">supportsFeatures</a> (BackendFeatures feature, const <a class="elRef" href="qstringlist.html">QStringList</a> &amp;userFeatures=<a class="elRef" href="qstringlist.html">QStringList</a>()) const </td></tr>
<tr><td colspan="2"><h2><a name="related"></a>
Related Functions</h2></td></tr>
<tr><td colspan="2"><p>(Note that these are not member functions.) </p>
<br/><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">SOPRANO_EXPORT <a class="el" href="classSoprano_1_1Model.html">Model</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Backend.html#a66f765cf9fd9aae07f874fdb8867dd1c">createModel</a> (const <a class="elRef" href="qlist.html">BackendSettings</a> &amp;settings=<a class="elRef" href="qlist.html">BackendSettings</a>())</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p><a class="el" href="classSoprano_1_1Backend.html" title="Soprano::Backend defines the interface for a Soprano backend plugin.">Soprano::Backend</a> defines the interface for a <a class="el" href="namespaceSoprano.html">Soprano</a> backend plugin. </p>
<p>The <a class="el" href="classSoprano_1_1Backend.html" title="Soprano::Backend defines the interface for a Soprano backend plugin.">Backend</a> interface defines two important methods: <a class="el" href="classSoprano_1_1Backend.html#abe4347c68662b53fc2f709b4536febb2">createModel()</a> and <a class="el" href="classSoprano_1_1Backend.html#a6f22f2980fbf21ef43b29d3aa050f479">supportedFeatures()</a>. It inherits from <a class="el" href="classSoprano_1_1Error_1_1ErrorCache.html" title="Core class of Soprano&#39;s exception system.">Error::ErrorCache</a> for error handling and subclasses should use <a class="el" href="classSoprano_1_1Error_1_1ErrorCache.html#a65f952db676de0a6a186ea872fca18b8">clearError()</a> and <a class="el" href="classSoprano_1_1Error_1_1ErrorCache.html#afd1a1eccaa2af733601eab1f019a8553">setError()</a> to report the status.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="soprano_writing_plugins.html">Writing Soprano Plugins</a></dd></dl>
<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="backend_8h_source.html#l00256">256</a> of file <a class="el" href="backend_8h_source.html">backend.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a05ca606ede08c5ffc4d531c5555f8059"></a><!-- doxytag: member="Soprano::Backend::Backend" ref="a05ca606ede08c5ffc4d531c5555f8059" args="(const QString &amp;name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Soprano::Backend::Backend </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>name</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

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

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="abe4347c68662b53fc2f709b4536febb2"></a><!-- doxytag: member="Soprano::Backend::createModel" ref="abe4347c68662b53fc2f709b4536febb2" args="(const BackendSettings &amp;settings=BackendSettings()) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classSoprano_1_1StorageModel.html">StorageModel</a>* Soprano::Backend::createModel </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qlist.html">BackendSettings</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>settings</em> = <code><a class="elRef" href="qlist.html">BackendSettings</a>()</code></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Creates a new RDF model with options. The caller takes ownership and has to care about deletion.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>settings</em>&nbsp;</td><td>The settings that should be used to create 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>. <a class="el" href="classSoprano_1_1Backend.html" title="Soprano::Backend defines the interface for a Soprano backend plugin.">Backend</a> implementations should never ignore settings but rather return 0 if an option is not supported. Backends can, however, define their own default settings. Invalid settings should result in an <a class="el" href="namespaceSoprano_1_1Error.html">Error</a> with value <a class="el" href="namespaceSoprano_1_1Error.html#aef1bd25c5b6705951735e0fb5c5ff525a17d888c35ad0ed84994c8902dfeab636">Error::ErrorInvalidArgument</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classSoprano_1_1BackendSetting.html" title="Wraps one setting for Model creation.">BackendSetting</a> </dd></dl>

</div>
</div>
<a class="anchor" id="aa3e266b5ceec1e72bfadfb3259222179"></a><!-- doxytag: member="Soprano::Backend::deleteModelData" ref="aa3e266b5ceec1e72bfadfb3259222179" args="(const BackendSettings &amp;settings) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool Soprano::Backend::deleteModelData </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qlist.html">BackendSettings</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>settings</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Phyically delete all data for a specific model. For most backends this means deleting some files on the hard disk. With others it may mean to delete tables from an SQL database.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>settings</em>&nbsp;</td><td>The settings that were used to create the model which should be deleted. For most backends the <a class="el" href="namespaceSoprano.html#ae82decb95b689a7c1252e735981b7fb2a5aa54bacf690e80973ea89ab1fb735fa">Soprano::BackendOptionStorageDir</a> setting is probably most important. If the settings do not provide enough information to uniquely identify the model to delete, the method should be terminated with an <a class="el" href="namespaceSoprano_1_1Error.html#aef1bd25c5b6705951735e0fb5c5ff525a17d888c35ad0ed84994c8902dfeab636">Error::ErrorInvalidArgument</a> error.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if the data was successfully removed, <code>false</code> otherwise. ErrorCache::lastError() may provide more detailed error information in the latter case.</dd></dl>
<dl class="since"><dt><b>Since:</b></dt><dd>2.1 </dd></dl>

</div>
</div>
<a class="anchor" id="a6f22f2980fbf21ef43b29d3aa050f479"></a><!-- doxytag: member="Soprano::Backend::supportedFeatures" ref="a6f22f2980fbf21ef43b29d3aa050f479" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual BackendFeatures Soprano::Backend::supportedFeatures </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Each backend can support a set of features. Backends without any features do not make much sense. If the features include <a class="el" href="namespaceSoprano.html#a49ee11e018cec1e59fba5bd09a61933fa3dbc12448f8fe7b02df6cfce399f8953">Soprano::BackendFeatureUser</a> additional user features not defined in Backend::BackendFeature can be supported via <a class="el" href="classSoprano_1_1Backend.html#afc44eff3d43d07fcc4956f9db9fa697c">supportedUserFeatures()</a>.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>A combination of <a class="el" href="namespaceSoprano.html#a49ee11e018cec1e59fba5bd09a61933f">Soprano::BackendFeature</a> values. </dd></dl>

</div>
</div>
<a class="anchor" id="afc44eff3d43d07fcc4956f9db9fa697c"></a><!-- doxytag: member="Soprano::Backend::supportedUserFeatures" ref="afc44eff3d43d07fcc4956f9db9fa697c" 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::Backend::supportedUserFeatures </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>A <a class="el" href="classSoprano_1_1Backend.html" title="Soprano::Backend defines the interface for a Soprano backend plugin.">Backend</a> can support additional features that are not defined in Backend::BackendFeature. These user defined features have string identifiers. If a backend supports additional features it has to include <a class="el" href="namespaceSoprano.html#a49ee11e018cec1e59fba5bd09a61933fa3dbc12448f8fe7b02df6cfce399f8953">Soprano::BackendFeatureUser</a> in <a class="el" href="classSoprano_1_1Backend.html#a6f22f2980fbf21ef43b29d3aa050f479">supportedFeatures()</a>.</p>
<p>The default implementation returns an empty list.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the list of supported user features. </dd></dl>

</div>
</div>
<a class="anchor" id="a0fcbf761e52a2797574416b8bf98ddcf"></a><!-- doxytag: member="Soprano::Backend::supportsFeatures" ref="a0fcbf761e52a2797574416b8bf98ddcf" args="(BackendFeatures feature, const QStringList &amp;userFeatures=QStringList()) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Soprano::Backend::supportsFeatures </td>
          <td>(</td>
          <td class="paramtype">BackendFeatures&nbsp;</td>
          <td class="paramname"> <em>feature</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="elRef" href="qstringlist.html">QStringList</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>userFeatures</em> = <code><a class="elRef" href="qstringlist.html">QStringList</a>()</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Check if a backend supports certain features. If feature includes <a class="el" href="namespaceSoprano.html#a49ee11e018cec1e59fba5bd09a61933fa3dbc12448f8fe7b02df6cfce399f8953">Soprano::BackendFeatureUser</a> the list if userFeatures is also compared.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if the backend does support the requested features, <code>false</code> otherwise. </dd></dl>

</div>
</div>
<hr/><h2>Friends And Related Function Documentation</h2>
<a class="anchor" id="a66f765cf9fd9aae07f874fdb8867dd1c"></a><!-- doxytag: member="Soprano::Backend::createModel" ref="a66f765cf9fd9aae07f874fdb8867dd1c" args="(const BackendSettings &amp;settings=BackendSettings())" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SOPRANO_EXPORT <a class="el" href="classSoprano_1_1Model.html">Model</a> * createModel </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qlist.html">BackendSettings</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>settings</em> = <code><a class="elRef" href="qlist.html">BackendSettings</a>()</code></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [related]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Creates a new RDF storage using the backend set via setUsedBackend. The caller takes ownership and has to care about deletion.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>settings</em>&nbsp;</td><td>The settings that should be used to create 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>. <a class="el" href="classSoprano_1_1Backend.html" title="Soprano::Backend defines the interface for a Soprano backend plugin.">Backend</a> implementations should never ignore settings but rather return 0 if an option is not supported. Backends can, however, define their own default settings.</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><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>, <a class="el" href="classSoprano_1_1Backend.html#abe4347c68662b53fc2f709b4536febb2">Backend::createModel</a>, <a class="el" href="classSoprano_1_1BackendSetting.html" title="Wraps one setting for Model creation.">BackendSetting</a> </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/builddir/build/BUILD/soprano-2.5.2/soprano/<a class="el" href="backend_8h_source.html">backend.h</a></li>
<li>/builddir/build/BUILD/soprano-2.5.2/soprano/<a class="el" href="global_8h_source.html">global.h</a></li>
</ul>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Oct 21 2010 for Soprano by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>