Sophie

Sophie

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

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::Inference::NodePattern 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_1Inference.html">Inference</a>      </li>
      <li class="navelem"><a class="el" href="classSoprano_1_1Inference_1_1NodePattern.html">NodePattern</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<h1>Soprano::Inference::NodePattern Class Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Soprano::Inference::NodePattern" -->
<p>Smallest building block of an inference <a class="el" href="classSoprano_1_1Inference_1_1Rule.html" title="A rule used by the InferenceModel to generate inferenced statements.">Rule</a>.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="nodepattern_8h_source.html">Soprano/Inference/NodePattern</a>&gt;</code></p>

<p><a href="classSoprano_1_1Inference_1_1NodePattern-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_1Inference_1_1NodePattern.html#a088e2abd1f4824b016c0d1f0541324ec">NodePattern</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Inference_1_1NodePattern.html#acf065bcfad160ebbaf631e6aa06d855e">NodePattern</a> (const <a class="el" href="classSoprano_1_1Node.html">Node</a> &amp;)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Inference_1_1NodePattern.html#acf431289fe100348c5a4ad2b98030ff5">NodePattern</a> (const <a class="elRef" href="qstring.html">QString</a> &amp;varname)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Inference_1_1NodePattern.html#ae400726066517216c11d42364a9d133c">NodePattern</a> (const <a class="el" href="classSoprano_1_1Inference_1_1NodePattern.html">NodePattern</a> &amp;)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Inference_1_1NodePattern.html#a1d9c9122d2b4c0f0b70a4601213c0c08">~NodePattern</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classSoprano_1_1Inference_1_1NodePattern.html">NodePattern</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Inference_1_1NodePattern.html#a60fa4c1bc634ceb865b37ed2e5561610">operator=</a> (const <a class="el" href="classSoprano_1_1Inference_1_1NodePattern.html">NodePattern</a> &amp;)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Inference_1_1NodePattern.html#aeb0f9b1d2cf2d6b370927e6f9e34bded">isVariable</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classSoprano_1_1Node.html">Node</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Inference_1_1NodePattern.html#af05275ec3b6209a60cbad846a23e4b89">resource</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="qstring.html">QString</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Inference_1_1NodePattern.html#a053b3b3850c5a7094d7a1dc57ec8c402">variableName</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_1Inference_1_1NodePattern.html#a30df98ea2a179213f77f7f15f515848d">match</a> (const <a class="el" href="classSoprano_1_1Node.html">Node</a> &amp;node) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="qstring.html">QString</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Inference_1_1NodePattern.html#adccc7bad9bb7aede4e385e0c1f0b6b0f">createSparqlNodePattern</a> (const <a class="el" href="classSoprano_1_1BindingSet.html">BindingSet</a> &amp;bindings) 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_1Inference_1_1NodePattern.html#ab4d21d47f37bd4744a0e070a73491e4f">isValid</a> () const </td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Smallest building block of an inference <a class="el" href="classSoprano_1_1Inference_1_1Rule.html" title="A rule used by the InferenceModel to generate inferenced statements.">Rule</a>. </p>
<p>There are two types of <a class="el" href="classSoprano_1_1Inference_1_1NodePattern.html" title="Smallest building block of an inference Rule.">NodePattern</a>: </p>
<ul>
<li>Simple nodes that wrap around an instance or <a class="el" href="classSoprano_1_1Node.html" title="A Node represents one RDF resource.">Node</a> and only match against that particular node. </li>
<li>Variable nodes that match against every <a class="el" href="classSoprano_1_1Node.html" title="A Node represents one RDF resource.">Node</a> and have a name.</li>
</ul>
<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="nodepattern_8h_source.html#l00049">49</a> of file <a class="el" href="nodepattern_8h_source.html">nodepattern.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a088e2abd1f4824b016c0d1f0541324ec"></a><!-- doxytag: member="Soprano::Inference::NodePattern::NodePattern" ref="a088e2abd1f4824b016c0d1f0541324ec" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Soprano::Inference::NodePattern::NodePattern </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="acf065bcfad160ebbaf631e6aa06d855e"></a><!-- doxytag: member="Soprano::Inference::NodePattern::NodePattern" ref="acf065bcfad160ebbaf631e6aa06d855e" args="(const Node &amp;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Soprano::Inference::NodePattern::NodePattern </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classSoprano_1_1Node.html">Node</a> &amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="acf431289fe100348c5a4ad2b98030ff5"></a><!-- doxytag: member="Soprano::Inference::NodePattern::NodePattern" ref="acf431289fe100348c5a4ad2b98030ff5" args="(const QString &amp;varname)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Soprano::Inference::NodePattern::NodePattern </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>varname</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ae400726066517216c11d42364a9d133c"></a><!-- doxytag: member="Soprano::Inference::NodePattern::NodePattern" ref="ae400726066517216c11d42364a9d133c" args="(const NodePattern &amp;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Soprano::Inference::NodePattern::NodePattern </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classSoprano_1_1Inference_1_1NodePattern.html">NodePattern</a> &amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a1d9c9122d2b4c0f0b70a4601213c0c08"></a><!-- doxytag: member="Soprano::Inference::NodePattern::~NodePattern" ref="a1d9c9122d2b4c0f0b70a4601213c0c08" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Soprano::Inference::NodePattern::~NodePattern </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a60fa4c1bc634ceb865b37ed2e5561610"></a><!-- doxytag: member="Soprano::Inference::NodePattern::operator=" ref="a60fa4c1bc634ceb865b37ed2e5561610" args="(const NodePattern &amp;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classSoprano_1_1Inference_1_1NodePattern.html">NodePattern</a>&amp; Soprano::Inference::NodePattern::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classSoprano_1_1Inference_1_1NodePattern.html">NodePattern</a> &amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="aeb0f9b1d2cf2d6b370927e6f9e34bded"></a><!-- doxytag: member="Soprano::Inference::NodePattern::isVariable" ref="aeb0f9b1d2cf2d6b370927e6f9e34bded" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Soprano::Inference::NodePattern::isVariable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="af05275ec3b6209a60cbad846a23e4b89"></a><!-- doxytag: member="Soprano::Inference::NodePattern::resource" ref="af05275ec3b6209a60cbad846a23e4b89" args="() 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::Inference::NodePattern::resource </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 associated resource of an invalid <a class="el" href="classSoprano_1_1Node.html" title="A Node represents one RDF resource.">Node</a> if this is a variable. </dd></dl>

</div>
</div>
<a class="anchor" id="a053b3b3850c5a7094d7a1dc57ec8c402"></a><!-- doxytag: member="Soprano::Inference::NodePattern::variableName" ref="a053b3b3850c5a7094d7a1dc57ec8c402" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="qstring.html">QString</a> Soprano::Inference::NodePattern::variableName </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 name of the variable or an empty string if this is not a variable. </dd></dl>

</div>
</div>
<a class="anchor" id="a30df98ea2a179213f77f7f15f515848d"></a><!-- doxytag: member="Soprano::Inference::NodePattern::match" ref="a30df98ea2a179213f77f7f15f515848d" args="(const Node &amp;node) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Soprano::Inference::NodePattern::match </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classSoprano_1_1Node.html">Node</a> &amp;&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Match a <a class="el" href="classSoprano_1_1Node.html" title="A Node represents one RDF resource.">Node</a> against this pattern. Variables will match any <a class="el" href="classSoprano_1_1Node.html" title="A Node represents one RDF resource.">Node</a> while specific node patterns will only match that one particular <a class="el" href="classSoprano_1_1Node.html" title="A Node represents one RDF resource.">Node</a>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if node mathes this pattern. </dd></dl>

</div>
</div>
<a class="anchor" id="adccc7bad9bb7aede4e385e0c1f0b6b0f"></a><!-- doxytag: member="Soprano::Inference::NodePattern::createSparqlNodePattern" ref="adccc7bad9bb7aede4e385e0c1f0b6b0f" args="(const BindingSet &amp;bindings) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="qstring.html">QString</a> Soprano::Inference::NodePattern::createSparqlNodePattern </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classSoprano_1_1BindingSet.html">BindingSet</a> &amp;&#160;</td>
          <td class="paramname"><em>bindings</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ab4d21d47f37bd4744a0e070a73491e4f"></a><!-- doxytag: member="Soprano::Inference::NodePattern::isValid" ref="ab4d21d47f37bd4744a0e070a73491e4f" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Soprano::Inference::NodePattern::isValid </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><code>true</code> if the pattern is valid.</dd></dl>
<dl class="since"><dt><b>Since:</b></dt><dd>2.3 </dd></dl>

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