Sophie

Sophie

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

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::RuleParser 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_1RuleParser.html">RuleParser</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::RuleParser Class Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Soprano::Inference::RuleParser" -->
<p>The <a class="el" href="classSoprano_1_1Inference_1_1RuleParser.html" title="The RuleParser can be used to parse Soprano rule files.">RuleParser</a> can be used to parse Soprano rule files.  
<a href="#_details">More...</a></p>

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

<p><a href="classSoprano_1_1Inference_1_1RuleParser-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_1RuleParser.html#ae6ce793bf173bdb1139ee9ae9c119915">RuleParser</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_1RuleParser.html#a60123da864d75a93a4dfd2c86a1785e9">~RuleParser</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_1Inference_1_1RuleParser.html#ae6f23fe71d7479048f947068dec97018">parseFile</a> (const <a class="elRef" href="qstring.html">QString</a> &amp;path)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classSoprano_1_1Inference_1_1Rule.html">Rule</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Inference_1_1RuleParser.html#abd8b483f0543f2b555eb1352cefd4538">parseRule</a> (const <a class="elRef" href="qstring.html">QString</a> &amp;line)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classSoprano_1_1Inference_1_1RuleSet.html">RuleSet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Inference_1_1RuleParser.html#ab25893752d4f2228b0e3f8a4a2b7d62b">rules</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_1Inference_1_1RuleParser.html#ac8fbcaa0d932a3a96c2a3f574db986c5">addPrefix</a> (const <a class="elRef" href="qstring.html">QString</a> &amp;qname, const <a class="elRef" href="qurl.html">QUrl</a> &amp;uri)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="qhash.html">QHash</a>&lt; <a class="elRef" href="qstring.html">QString</a>, <a class="elRef" href="qurl.html">QUrl</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Inference_1_1RuleParser.html#a6c5803140057aac70ec6b370cc35f7ab">prefixes</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_1Inference_1_1RuleParser.html#af9bf40fd7b4703e47cb6256181e55f55">clear</a> ()</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>The <a class="el" href="classSoprano_1_1Inference_1_1RuleParser.html" title="The RuleParser can be used to parse Soprano rule files.">RuleParser</a> can be used to parse Soprano rule files. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classSoprano_1_1Inference_1_1RuleSet.html#abf32081d84780d16610938b1937cff7a">RuleSet::standardRuleSet()</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="inferenceruleparser_8h_source.html#l00046">46</a> of file <a class="el" href="inferenceruleparser_8h_source.html">inferenceruleparser.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ae6ce793bf173bdb1139ee9ae9c119915"></a><!-- doxytag: member="Soprano::Inference::RuleParser::RuleParser" ref="ae6ce793bf173bdb1139ee9ae9c119915" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Soprano::Inference::RuleParser::RuleParser </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a60123da864d75a93a4dfd2c86a1785e9"></a><!-- doxytag: member="Soprano::Inference::RuleParser::~RuleParser" ref="a60123da864d75a93a4dfd2c86a1785e9" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Soprano::Inference::RuleParser::~RuleParser </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="ae6f23fe71d7479048f947068dec97018"></a><!-- doxytag: member="Soprano::Inference::RuleParser::parseFile" ref="ae6f23fe71d7479048f947068dec97018" args="(const QString &amp;path)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Soprano::Inference::RuleParser::parseFile </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>path</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Parse rules from a file. The parsed rules can be accessed via <a class="el" href="classSoprano_1_1Inference_1_1RuleParser.html#ab25893752d4f2228b0e3f8a4a2b7d62b">rules()</a>.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> on success, <code>false</code> otherwise. </dd></dl>

</div>
</div>
<a class="anchor" id="abd8b483f0543f2b555eb1352cefd4538"></a><!-- doxytag: member="Soprano::Inference::RuleParser::parseRule" ref="abd8b483f0543f2b555eb1352cefd4538" args="(const QString &amp;line)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classSoprano_1_1Inference_1_1Rule.html">Rule</a> Soprano::Inference::RuleParser::parseRule </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>line</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Parse a single rule from a string.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">line</td><td>A single line defining the rule</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The parsed rule in case <code>line</code> is a valid rule line, an invalid rule otherwise. The parsed rule can also be accessed via <a class="el" href="classSoprano_1_1Inference_1_1RuleParser.html#ab25893752d4f2228b0e3f8a4a2b7d62b">rules()</a>.</dd></dl>
<dl class="since"><dt><b>Since:</b></dt><dd>2.3 </dd></dl>

</div>
</div>
<a class="anchor" id="ab25893752d4f2228b0e3f8a4a2b7d62b"></a><!-- doxytag: member="Soprano::Inference::RuleParser::rules" ref="ab25893752d4f2228b0e3f8a4a2b7d62b" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classSoprano_1_1Inference_1_1RuleSet.html">RuleSet</a> Soprano::Inference::RuleParser::rules </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Retrieve the rules parsed in parseFile and parseRule </p>

</div>
</div>
<a class="anchor" id="ac8fbcaa0d932a3a96c2a3f574db986c5"></a><!-- doxytag: member="Soprano::Inference::RuleParser::addPrefix" ref="ac8fbcaa0d932a3a96c2a3f574db986c5" args="(const QString &amp;qname, const QUrl &amp;uri)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Soprano::Inference::RuleParser::addPrefix </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>qname</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="elRef" href="qurl.html">QUrl</a> &amp;&#160;</td>
          <td class="paramname"><em>uri</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Add a prefix to use during rule parsing.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">qname</td><td>The abbreviated name of the prefix </td></tr>
    <tr><td class="paramname">uri</td><td>The namespace to use for the prefix</td></tr>
  </table>
  </dd>
</dl>
<dl class="since"><dt><b>Since:</b></dt><dd>2.3 </dd></dl>

</div>
</div>
<a class="anchor" id="a6c5803140057aac70ec6b370cc35f7ab"></a><!-- doxytag: member="Soprano::Inference::RuleParser::prefixes" ref="a6c5803140057aac70ec6b370cc35f7ab" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="qhash.html">QHash</a>&lt;<a class="elRef" href="qstring.html">QString</a>, <a class="elRef" href="qurl.html">QUrl</a>&gt; Soprano::Inference::RuleParser::prefixes </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Retrieve all prefixes set via addPrefix.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>a <a class="elRef" href="qhash.html">QHash</a> containing of the prefixe qnames and their URIs.</dd></dl>
<dl class="since"><dt><b>Since:</b></dt><dd>2.3 </dd></dl>

</div>
</div>
<a class="anchor" id="af9bf40fd7b4703e47cb6256181e55f55"></a><!-- doxytag: member="Soprano::Inference::RuleParser::clear" ref="af9bf40fd7b4703e47cb6256181e55f55" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Soprano::Inference::RuleParser::clear </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Clear all parsed rules and prefixes.</p>
<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="inferenceruleparser_8h_source.html">inferenceruleparser.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>