Sophie

Sophie

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

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::Util::AsyncQuery 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="namespaceSoprano_1_1Util.html">Util</a>      </li>
      <li><a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html">Soprano::Util::AsyncQuery</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-slots">Public Slots</a> &#124;
<a href="#signals">Signals</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a>  </div>
  <div class="headertitle">
<h1>Soprano::Util::AsyncQuery Class Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Soprano::Util::AsyncQuery" --><!-- doxytag: inherits="QObject,Soprano::Error::ErrorCache" -->
<p>A wrapper around <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.">Soprano::Model</a> which executes a query in a separate thread and allows to iterate the results asyncroneously.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="asyncquery_8h_source.html">Soprano/Util/AsyncQuery</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::Util::AsyncQuery:</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_1Util_1_1AsyncQuery__inherit__graph.png" border="0" usemap="#Soprano_1_1Util_1_1AsyncQuery_inherit__map" alt="Inheritance graph"/></div>
<map name="Soprano_1_1Util_1_1AsyncQuery_inherit__map" id="Soprano_1_1Util_1_1AsyncQuery_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_1Util_1_1AsyncQuery-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-slots"></a>
Public Slots</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#a7ebe297b4bc84f269cbffa270609215f">next</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#a2a878f79d819660a4443875e33a073d0">close</a> ()</td></tr>
<tr><td colspan="2"><h2><a name="signals"></a>
Signals</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#ac402b3e791fb786fb111befb7a1840b9">nextReady</a> (<a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html">Soprano::Util::AsyncQuery</a> *query)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#a223145efbd225f529450eff71145436c">finished</a> (<a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html">Soprano::Util::AsyncQuery</a> *query)</td></tr>
<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_1Util_1_1AsyncQuery.html#adfd0808498d06a892e40ab7909d77f0b">~AsyncQuery</a> ()</td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpd41d8cd98f00b204e9800998ecf8427e"></a> </p>
</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classSoprano_1_1Statement.html">Statement</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#a706219dc4a7e52357d1c63d8df77f173">currentStatement</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classSoprano_1_1BindingSet.html">BindingSet</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#af0fa50653efd3e669348799676f9a65c">currentBindings</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_1Util_1_1AsyncQuery.html#a6ad462c4dd528c0614f42bfa1c549310">boolValue</a> () const </td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpd41d8cd98f00b204e9800998ecf8427e"></a> </p>
</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classSoprano_1_1Node.html">Node</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#a4b20387be10f7b4888bd4fa2ecf57909">binding</a> (const <a class="elRef" href="qstring.html">QString</a> &amp;<a class="elRef" href="qobject.html#name">name</a>) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classSoprano_1_1Node.html">Node</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#a11195c7a29dcc1ba97851df013d66625">binding</a> (int offset) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#a369b503316b1e750a97687169259fb07">bindingCount</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="qstringlist.html">QStringList</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#ac5bb9ecb6e8bcbebfbd1a2d919ecd8a8">bindingNames</a> () const </td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpd41d8cd98f00b204e9800998ecf8427e"></a> </p>
</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#a741b14e7e5ccc73c7ff5d10ddb50942c">isGraph</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_1Util_1_1AsyncQuery.html#a7c4eb1406183bab25bc60ec29a27c69f">isBinding</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_1Util_1_1AsyncQuery.html#af7e6d316bec7d1ea1f92307ac2484429">isBool</a> () const </td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html">AsyncQuery</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#a8e8435248d271ace0cd955108911cab3">executeQuery</a> (<a class="el" href="classSoprano_1_1Model.html">Soprano::Model</a> *model, const <a class="elRef" href="qstring.html">QString</a> &amp;query, <a class="el" href="namespaceSoprano_1_1Query.html#ab568869993a9d6c452c8e5a34d5ac26c">Query::QueryLanguage</a> language, const <a class="elRef" href="qstring.html">QString</a> &amp;userQueryLanguage=<a class="elRef" href="qstring.html">QString</a>())</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>A wrapper around <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.">Soprano::Model</a> which executes a query in a separate thread and allows to iterate the results asyncroneously. </p>
<p>In contrast to <a class="el" href="classSoprano_1_1Util_1_1AsyncModel.html" title="Filter model that allows to perform operations asyncroneously.">AsyncModel</a> everything is asyncroneous, not only the execution of the query itself, but also the iteration.</p>
<p>For executing a query asyncroneously simply use the static <a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#a8e8435248d271ace0cd955108911cab3">executeQuery()</a> method which will return a pointer to the newly created query object.</p>
<p><a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html" title="A wrapper around Soprano::Model which executes a query in a separate thread and allows to iterate the...">AsyncQuery</a> objects will always delete themselves once the end of the iterator is reached and the finished signal has been emitted. This also means that boolean results need to be read in a slot connected to the <a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#a223145efbd225f529450eff71145436c">finished()</a> signal.</p>
<p>Typical usage would be to connect to the <a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#ac402b3e791fb786fb111befb7a1840b9">nextReady()</a> signal, use one of the <a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#a4b20387be10f7b4888bd4fa2ecf57909">binding()</a> methods or <a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#a706219dc4a7e52357d1c63d8df77f173">currentStatement()</a> to get the current value, and then call <a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#a7ebe297b4bc84f269cbffa270609215f">next()</a> in it to trigger async iteration to the next element:</p>
<div class="fragment"><pre class="fragment"> <span class="keywordtype">void</span> MyQueryHandler::slotNextReady( <a class="code" href="classSoprano_1_1Util_1_1AsyncQuery.html" title="A wrapper around Soprano::Model which executes a query in a separate thread and allows to iterate the...">Soprano::Util::AsyncQuery</a>* query ) {
     <span class="comment">// do something with the current value</span>
     addToSomeList( query-&gt;<a class="code" href="classSoprano_1_1Util_1_1AsyncQuery.html#a4b20387be10f7b4888bd4fa2ecf57909">binding</a>(0) );

     <span class="comment">// trigger async iteration to the next element</span>
     query-&gt;<a class="code" href="classSoprano_1_1Util_1_1AsyncQuery.html#a7ebe297b4bc84f269cbffa270609215f">next</a>();
 }
</pre></div><dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classSoprano_1_1Util_1_1AsyncModel.html" title="Filter model that allows to perform operations asyncroneously.">Soprano::Util::AsyncModel</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>
<dl class="since"><dt><b>Since:</b></dt><dd>2.4 </dd></dl>

<p>Definition at line <a class="el" href="asyncquery_8h_source.html#l00076">76</a> of file <a class="el" href="asyncquery_8h_source.html">asyncquery.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="adfd0808498d06a892e40ab7909d77f0b"></a><!-- doxytag: member="Soprano::Util::AsyncQuery::~AsyncQuery" ref="adfd0808498d06a892e40ab7909d77f0b" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Soprano::Util::AsyncQuery::~AsyncQuery </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Delete the query. This will cancel an unfinished query. Be aware that normally there is no need to delete the query object as it will auto-delete itself once finished.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#a2a878f79d819660a4443875e33a073d0">close()</a> </dd></dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a706219dc4a7e52357d1c63d8df77f173"></a><!-- doxytag: member="Soprano::Util::AsyncQuery::currentStatement" ref="a706219dc4a7e52357d1c63d8df77f173" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classSoprano_1_1Statement.html">Statement</a> Soprano::Util::AsyncQuery::currentStatement </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Retrieve the current <a class="el" href="classSoprano_1_1Statement.html" title="A Statement instance represents one RDF quadruple.">Statement</a> after nextReady has been emitted. This method does only make sense for graph queries. </p>

</div>
</div>
<a class="anchor" id="af0fa50653efd3e669348799676f9a65c"></a><!-- doxytag: member="Soprano::Util::AsyncQuery::currentBindings" ref="af0fa50653efd3e669348799676f9a65c" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classSoprano_1_1BindingSet.html">BindingSet</a> Soprano::Util::AsyncQuery::currentBindings </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Convenience method that puts all current bindings into one map. This method does only make sense for tuple queries. </p>

</div>
</div>
<a class="anchor" id="a6ad462c4dd528c0614f42bfa1c549310"></a><!-- doxytag: member="Soprano::Util::AsyncQuery::boolValue" ref="a6ad462c4dd528c0614f42bfa1c549310" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Soprano::Util::AsyncQuery::boolValue </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This method does only make sense for boolean queries.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The result of a boolean query (SPARQL ASK).</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#af7e6d316bec7d1ea1f92307ac2484429">isBool()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a4b20387be10f7b4888bd4fa2ecf57909"></a><!-- doxytag: member="Soprano::Util::AsyncQuery::binding" ref="a4b20387be10f7b4888bd4fa2ecf57909" args="(const QString &amp;name) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classSoprano_1_1Node.html">Node</a> Soprano::Util::AsyncQuery::binding </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> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the current binding for a variable.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>The name of the requested variable.</td></tr>
  </table>
  </dd>
</dl>
<p>This method does only make sense for tuple queries.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The binding for the requested variable or and invalid node if the bindings do not contain the variable. </dd></dl>

</div>
</div>
<a class="anchor" id="a11195c7a29dcc1ba97851df013d66625"></a><!-- doxytag: member="Soprano::Util::AsyncQuery::binding" ref="a11195c7a29dcc1ba97851df013d66625" args="(int offset) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classSoprano_1_1Node.html">Node</a> Soprano::Util::AsyncQuery::binding </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>offset</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the current binding for a variable by index.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>offset</em>&nbsp;</td><td>The index of the requested variable.</td></tr>
  </table>
  </dd>
</dl>
<p>This method does only make sense for tuple queries.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The binding for the requested variable or and invalid node if offset is out of bounds, i.e. bigger or equal to <a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#a369b503316b1e750a97687169259fb07">bindingCount()</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="a369b503316b1e750a97687169259fb07"></a><!-- doxytag: member="Soprano::Util::AsyncQuery::bindingCount" ref="a369b503316b1e750a97687169259fb07" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Soprano::Util::AsyncQuery::bindingCount </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The number of bindings in this query result.</p>
<p>This method does only make sense for tuple queries.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of bindings. </dd></dl>

</div>
</div>
<a class="anchor" id="ac5bb9ecb6e8bcbebfbd1a2d919ecd8a8"></a><!-- doxytag: member="Soprano::Util::AsyncQuery::bindingNames" ref="ac5bb9ecb6e8bcbebfbd1a2d919ecd8a8" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="qstringlist.html">QStringList</a> Soprano::Util::AsyncQuery::bindingNames </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This method does only make sense for tuple queries.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The names of the bound variables in this query result. </dd></dl>

</div>
</div>
<a class="anchor" id="a741b14e7e5ccc73c7ff5d10ddb50942c"></a><!-- doxytag: member="Soprano::Util::AsyncQuery::isGraph" ref="a741b14e7e5ccc73c7ff5d10ddb50942c" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Soprano::Util::AsyncQuery::isGraph </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Check if this is a graph result.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if this result refers to a graph query, i.e. <a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#a706219dc4a7e52357d1c63d8df77f173">currentStatement()</a> returns valid values. </dd></dl>

</div>
</div>
<a class="anchor" id="a7c4eb1406183bab25bc60ec29a27c69f"></a><!-- doxytag: member="Soprano::Util::AsyncQuery::isBinding" ref="a7c4eb1406183bab25bc60ec29a27c69f" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Soprano::Util::AsyncQuery::isBinding </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Check if this is a tuple result.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if this result refers to a tuple query, i.e. <a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#af0fa50653efd3e669348799676f9a65c">currentBindings()</a>, <a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#a4b20387be10f7b4888bd4fa2ecf57909">binding()</a>, <a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#a369b503316b1e750a97687169259fb07">bindingCount()</a>, and <a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#ac5bb9ecb6e8bcbebfbd1a2d919ecd8a8">bindingNames()</a> return valid values. </dd></dl>

</div>
</div>
<a class="anchor" id="af7e6d316bec7d1ea1f92307ac2484429"></a><!-- doxytag: member="Soprano::Util::AsyncQuery::isBool" ref="af7e6d316bec7d1ea1f92307ac2484429" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Soprano::Util::AsyncQuery::isBool </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Check if this is a boolean result.</p>
<p>There is no need to call <a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#a7ebe297b4bc84f269cbffa270609215f">next()</a> for boolean results. However, for internal reasons backends need to always return <code>true</code> for boolean queries.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if this result refers to a boolean query (SPARQL ASK), i.e. <a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#a6ad462c4dd528c0614f42bfa1c549310">boolValue()</a> returns a valid value. </dd></dl>

</div>
</div>
<a class="anchor" id="a7ebe297b4bc84f269cbffa270609215f"></a><!-- doxytag: member="Soprano::Util::AsyncQuery::next" ref="a7ebe297b4bc84f269cbffa270609215f" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Soprano::Util::AsyncQuery::next </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [slot]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Trigger iteration to the next element once the current has been read via one of the <a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#a4b20387be10f7b4888bd4fa2ecf57909">binding()</a> methods or <a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#a706219dc4a7e52357d1c63d8df77f173">currentStatement()</a>. Be aware that this has not to be called for the first element which is emitted automatically. Once the next result has been retrieved the nextReady signal is emitted.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if successful, <code>false</code> if the iteration reached the end. </dd></dl>

</div>
</div>
<a class="anchor" id="a2a878f79d819660a4443875e33a073d0"></a><!-- doxytag: member="Soprano::Util::AsyncQuery::close" ref="a2a878f79d819660a4443875e33a073d0" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Soprano::Util::AsyncQuery::close </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [slot]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Closes the query. This will cancel the query if it is not finished yet. Afterwards the query will delete itself. It has the same effect as deleting the query object manually.</p>
<p><a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#a223145efbd225f529450eff71145436c">finished()</a> will always be emitted in case the query was not finished yet. </p>

</div>
</div>
<a class="anchor" id="ac402b3e791fb786fb111befb7a1840b9"></a><!-- doxytag: member="Soprano::Util::AsyncQuery::nextReady" ref="ac402b3e791fb786fb111befb7a1840b9" args="(Soprano::Util::AsyncQuery *query)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Soprano::Util::AsyncQuery::nextReady </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html">Soprano::Util::AsyncQuery</a> *&nbsp;</td>
          <td class="paramname"> <em>query</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [signal]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Emitted once the next value is ready when iterating the result via <a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#a7ebe297b4bc84f269cbffa270609215f">next()</a>. Will be emitted automatically for the first element. The last call in a connected slot should be <a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#a7ebe297b4bc84f269cbffa270609215f">next()</a> to trigger iteration to the next element.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>query</em>&nbsp;</td><td>The query itself for convinience. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a223145efbd225f529450eff71145436c"></a><!-- doxytag: member="Soprano::Util::AsyncQuery::finished" ref="a223145efbd225f529450eff71145436c" args="(Soprano::Util::AsyncQuery *query)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Soprano::Util::AsyncQuery::finished </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html">Soprano::Util::AsyncQuery</a> *&nbsp;</td>
          <td class="paramname"> <em>query</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [signal]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Emitted once the last element has been read and the internal iterator is finished after the last call to <a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html#a7ebe297b4bc84f269cbffa270609215f">next()</a> or if the result of a boolean query is available.</p>
<p>Once this signals has been emitted the query will delete itself. In a slot connected to this signal ErrorCache::lastError() can be used to retrieve information about the success of the query.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>query</em>&nbsp;</td><td>The query itself for convinience. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a8e8435248d271ace0cd955108911cab3"></a><!-- doxytag: member="Soprano::Util::AsyncQuery::executeQuery" ref="a8e8435248d271ace0cd955108911cab3" args="(Soprano::Model *model, const QString &amp;query, Query::QueryLanguage language, const QString &amp;userQueryLanguage=QString())" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html">AsyncQuery</a>* Soprano::Util::AsyncQuery::executeQuery </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classSoprano_1_1Model.html">Soprano::Model</a> *&nbsp;</td>
          <td class="paramname"> <em>model</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>query</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceSoprano_1_1Query.html#ab568869993a9d6c452c8e5a34d5ac26c">Query::QueryLanguage</a>&nbsp;</td>
          <td class="paramname"> <em>language</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>userQueryLanguage</em> = <code><a class="elRef" href="qstring.html">QString</a>()</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Create a new query object.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>model</em>&nbsp;</td><td>The model to execute the query on. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>query</em>&nbsp;</td><td>The query to evaluate. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>language</em>&nbsp;</td><td>The query language used to encode <code>query</code>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>userQueryLanguage</em>&nbsp;</td><td>If <code>language</code> equals <a class="el" href="namespaceSoprano_1_1Query.html#ab568869993a9d6c452c8e5a34d5ac26cac6b6f6a34d2d09221941d9a0ac522633">Query::QueryLanguageUser</a> userQueryLanguage defines the language to use.</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classSoprano_1_1Model.html#a5157ca3996dea1e7a46947d41e530c51">Model::executeQuery</a></dd></dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A new <a class="el" href="classSoprano_1_1Util_1_1AsyncQuery.html" title="A wrapper around Soprano::Model which executes a query in a separate thread and allows to iterate the...">AsyncQuery</a> instance which is ready to be used or 0 if <code>model</code> is 0. The query will delete itself once it is finished. It can also be deleted at any point in time to cancel the query. </dd></dl>

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