Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > b77dda48f87d4eda8cc559e40c49a652 > files > 1166

python-kde4-doc-4.4.5-0.2mdv2010.2.i586.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!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" lang="en" xml:lang="en">

<head>
  <title>Soprano.Node</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Style-Type" content="text/css" />
  <link rel="stylesheet" type="text/css" href="../common/doxygen.css" />
  <link rel="stylesheet" media="screen" type="text/css" title="KDE Colors" href="../common/kde.css" />
</head>
<body>
<div id="container">
<div id="header">
  <div id="header_top">
    <div>
      <div>
        <img alt ="" src="../common/top-kde.jpg"/>
        KDE 4.4 PyKDE API Reference
      </div>
    </div>
  </div>
  <div id="header_bottom">
    <div id="location">
      <ul>
        <li>KDE's Python API</li>
      </ul>
    </div>

    <div id="menu">
      <ul>
        <li><a href="../modules.html">Overview</a></li>
<li><a href="http://techbase.kde.org/Development/Languages/Python">PyKDE Home</a></li>
<li><a href="http://kde.org/family/">Sitemap</a></li>
<li><a href="http://kde.org/contact/">Contact Us</a></li>
</ul>
    </div>
  </div>
</div>

<div id="body_wrapper">
<div id="body">
<div id="right">
<div class="content">
<div id="main">
<div class="clearer">&nbsp;</div>

<h1>Node Class Reference</h1>
<code>from PyKDE4.soprano import *</code>
<p>


Namespace: Soprano.Node<br />
<h2>Detailed Description</h2>

<p>\class Node node.h Soprano/Node
</p>
<p>
A Node represents one RDF resource.
</p>
<p>
Nodes are the cornerstone of RDF data in %Soprano. Four Nodes form one Statement and a Model
is essentially a set of Statements.
</p>
<p>
A Node can have one of four types: EmptyNode, ResourceNode, LiteralNode, and BlankNode.
Resource nodes are identified through their URI (uri()), literal nodes have a LiteralValue (literal()),
and blank nodes have a string identifier.
</p>
<p>
Empty nodes can be used as wildcards in methods such as Model.listStatements.
</p>
<p>

<dl class="author" compact><dt><b>Author:</b></dt><dd> Daniele Galdi &lt;daniele.galdi@gmail.com&gt;<br>Sebastian Trueg &lt;trueg@kde.org&gt; </dd></dl>
</p>
<table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="#Type">Type</a>&nbsp;</td><td class="memItemRight" valign="bottom">{&nbsp;EmptyNode, ResourceNode, LiteralNode, BlankNode&nbsp;}</td></tr>
<tr><td colspan="2"><br><h2>Methods</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#Node">__init__</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#Node">__init__</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qurl.html">QUrl</a> uri)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#Node">__init__</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> id)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#Node">__init__</a> (self, <a href="../soprano/Soprano.LiteralValue.html">Soprano.LiteralValue</a> value)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#Node">__init__</a> (self, <a href="../soprano/Soprano.LiteralValue.html">Soprano.LiteralValue</a> value, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> language)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#Node">__init__</a> (self, <a href="../soprano/Soprano.Node.html">Soprano.Node</a> other)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#blankToN3">blankToN3</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> blank)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../soprano/Soprano.Node.html">Soprano.Node</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#createBlankNode">createBlankNode</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> id)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../soprano/Soprano.Node.html">Soprano.Node</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#createEmptyNode">createEmptyNode</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../soprano/Soprano.Node.html">Soprano.Node</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#createLiteralNode">createLiteralNode</a> (self, <a href="../soprano/Soprano.LiteralValue.html">Soprano.LiteralValue</a> value)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../soprano/Soprano.Node.html">Soprano.Node</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#createLiteralNode">createLiteralNode</a> (self, <a href="../soprano/Soprano.LiteralValue.html">Soprano.LiteralValue</a> value, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> language)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../soprano/Soprano.Node.html">Soprano.Node</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#createResourceNode">createResourceNode</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qurl.html">QUrl</a> uri)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qurl.html">QUrl</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#dataType">dataType</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#identifier">identifier</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#isBlank">isBlank</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#isEmpty">isEmpty</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#isLiteral">isLiteral</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#isResource">isResource</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#isValid">isValid</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#language">language</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../soprano/Soprano.LiteralValue.html">Soprano.LiteralValue</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#literal">literal</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#literalToN3">literalToN3</a> (self, <a href="../soprano/Soprano.LiteralValue.html">Soprano.LiteralValue</a> literal)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#matches">matches</a> (self, <a href="../soprano/Soprano.Node.html">Soprano.Node</a> other)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#operator !=">operator !=</a> (self, <a href="../soprano/Soprano.Node.html">Soprano.Node</a> other)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#operator ==">operator ==</a> (self, <a href="../soprano/Soprano.Node.html">Soprano.Node</a> other)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#operator ==">operator ==</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qurl.html">QUrl</a> uri)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#operator ==">operator ==</a> (self, <a href="../soprano/Soprano.LiteralValue.html">Soprano.LiteralValue</a> other)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#resourceToN3">resourceToN3</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qurl.html">QUrl</a> resource)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#toN3">toN3</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#toString">toString</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../soprano/Soprano.Node.html#Type">Soprano.Node.Type</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#type">type</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qurl.html">QUrl</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#uri">uri</a> (self)</td></tr>
</table>
<hr><h2>Method Documentation</h2><a class="anchor" name="Node"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">__init__</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Default costructor.
Creates an empty node.
</p>
<p>
\sa createEmptyNode()
</p></div></div><a class="anchor" name="Node"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">__init__</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qurl.html">QUrl</a>&nbsp;</td>
<td class="paramname"><em>uri</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Creates a resource node.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>uri</em>&nbsp;</td><td> The URI of the node. If empty the type will be ignored
and an empty node will be created.
</td></tr>
</table></dl>
<p> \sa createResourceNode()
</p></div></div><a class="anchor" name="Node"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">__init__</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td>
<td class="paramname"><em>id</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Creates a blank node.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>id</em>&nbsp;</td><td> An identifier for the blank node.
</td></tr>
</table></dl>
<p> \sa createBlankNode()
</p></div></div><a class="anchor" name="Node"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">__init__</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../soprano/Soprano.LiteralValue.html">Soprano.LiteralValue</a>&nbsp;</td>
<td class="paramname"><em>value</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Creates a literal node.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>value</em>&nbsp;</td><td> The value of a node. If empty the node will become
an empty node.
</td></tr>
</table></dl>
<p> \sa createLiteralNode()
</p>
<p>
<dl class="since" compact><dt><b>Since:</b></dt><dd> 2.3
</dd></dl>
</p></div></div><a class="anchor" name="Node"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">__init__</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../soprano/Soprano.LiteralValue.html">Soprano.LiteralValue</a>&nbsp;</td>
<td class="paramname"><em>value</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td>
<td class="paramname"><em>language</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"></div></div><a class="anchor" name="Node"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">__init__</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../soprano/Soprano.Node.html">Soprano.Node</a>&nbsp;</td>
<td class="paramname"><em>other</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Copy constructor.
</p></div></div><a class="anchor" name="blankToN3"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> blankToN3</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td>
<td class="paramname"><em>blank</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Format a blank node identifier as N3 string to be used in SPARQL queries.
</p>
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd> A string representing the blank identifier in N3 encoding or an empty
string for invalid/empty ids.
</dd></dl> </p>
<p>
Example:
<pre class="fragment">
 _:blankNode
</pre>
</p>
<p>
\sa toN3
</p>
<p>
<dl class="since" compact><dt><b>Since:</b></dt><dd> 2.3
</dd></dl>
</p></div></div><a class="anchor" name="createBlankNode"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="../soprano/Soprano.Node.html">Soprano.Node</a> createBlankNode</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td>
<td class="paramname"><em>id</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Convenience method to create a blank node.
Using this method instead of the constructor
may result in better readable code.
</p>
<p>
If you need to create a new blank node which is not
used in the model yet and, thus, has a unique identifier
see Model.createBlankNode().
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>id</em>&nbsp;</td><td> An identifier for the blank node.
</td></tr>
</table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> A blank node or an empty Node if the specified
identifier was empty.
</dd></dl>
</p></div></div><a class="anchor" name="createEmptyNode"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="../soprano/Soprano.Node.html">Soprano.Node</a> createEmptyNode</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Convenience method to create an empty node.
Using this method instead of the default constructor
may result in better readable code.
</p>
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd> An empty Node.
</dd></dl>
</p></div></div><a class="anchor" name="createLiteralNode"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="../soprano/Soprano.Node.html">Soprano.Node</a> createLiteralNode</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../soprano/Soprano.LiteralValue.html">Soprano.LiteralValue</a>&nbsp;</td>
<td class="paramname"><em>value</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Convenience method to create a literal node.
Using this method instead of the constructor
may result in better readable code.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>value</em>&nbsp;</td><td> The value of a node. If empty the node will become
an empty node.
</td></tr> </table></dl>
<p> </p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>language</em>&nbsp;</td><td> The language of the literal value.
</td></tr>
</table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> A literal node or an empty node if the specified value
was empty.
</dd></dl> </p>
<p>
<dl class="deprecated" compact><dt><b>Deprecated:</b></dt><dd> Use Soprano.Node.createLiteralNode( const LiteralValue&amp; ) and
Soprano.LiteralValue.createPlainLiteral( const QString&amp;, const LanguageTag&amp; )
</dd></dl>
</p></div></div><a class="anchor" name="createLiteralNode"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="../soprano/Soprano.Node.html">Soprano.Node</a> createLiteralNode</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../soprano/Soprano.LiteralValue.html">Soprano.LiteralValue</a>&nbsp;</td>
<td class="paramname"><em>value</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td>
<td class="paramname"><em>language</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Convenience method to create a literal node.
Using this method instead of the constructor
may result in better readable code.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>value</em>&nbsp;</td><td> The value of a node. If empty the node will become
an empty node.
</td></tr> </table></dl>
<p> </p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>language</em>&nbsp;</td><td> The language of the literal value.
</td></tr>
</table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> A literal node or an empty node if the specified value
was empty.
</dd></dl> </p>
<p>
<dl class="deprecated" compact><dt><b>Deprecated:</b></dt><dd> Use Soprano.Node.createLiteralNode( const LiteralValue&amp; ) and
Soprano.LiteralValue.createPlainLiteral( const QString&amp;, const LanguageTag&amp; )
</dd></dl>
</p></div></div><a class="anchor" name="createResourceNode"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="../soprano/Soprano.Node.html">Soprano.Node</a> createResourceNode</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qurl.html">QUrl</a>&nbsp;</td>
<td class="paramname"><em>uri</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Convenience method to create a resource node.
Using this method instead of the constructor
may result in better readable code.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>uri</em>&nbsp;</td><td> The URI of the node. If empty the type will be ignored
and an empty node will be created.
</td></tr>
</table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> A resource Node or an empty Node if the specified URI is empty.
</dd></dl>
</p></div></div><a class="anchor" name="dataType"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qurl.html">QUrl</a> dataType</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> The datatype URI of a literal node, i.e. the XML schema type
or an empty value if the node is not a LiteralNode.
</dd></dl> \sa LiteralValue.dataTypeUri
</p></div></div><a class="anchor" name="identifier"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> identifier</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Retrieve a blank node's identifier.
<dl class="return" compact><dt><b>Returns:</b></dt><dd> The node's identifier if it is a BlankNode, a null
string otherwise.
</dd></dl>
</p></div></div><a class="anchor" name="isBlank"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">bool isBlank</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> <b>true</b> if the node is a BlankNode (anonymous).
</dd></dl>
</p></div></div><a class="anchor" name="isEmpty"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">bool isEmpty</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> <b>true</b> if the node is empty.
</dd></dl>
</p></div></div><a class="anchor" name="isLiteral"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">bool isLiteral</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> <b>true</b> if the node is a LiteralNode.
</dd></dl>
</p></div></div><a class="anchor" name="isResource"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">bool isResource</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> <b>true</b> if the node is a ResourceNode.
</dd></dl>
</p></div></div><a class="anchor" name="isValid"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">bool isValid</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> <b>true</b> if the node is a ResourceNode, LiteralNode or BlankNode.
</dd></dl>
</p></div></div><a class="anchor" name="language"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> language</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Each literal value can have an associated language, thus each property
can be stored for different languages. An empty language refers to the
default language.
</p>
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd> A string representing the language of the literal value
or an empty string if the node is not a literal.
</dd></dl> </p>
<p>
<dl class="deprecated" compact><dt><b>Deprecated:</b></dt><dd> Language exists on the Soprano.LiteralValue. Use Soprano.Node.literal() and
Soprano.LiteralValue.language().
</dd></dl>
</p></div></div><a class="anchor" name="literal"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="../soprano/Soprano.LiteralValue.html">Soprano.LiteralValue</a> literal</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> The literal value if the node is a LiteralNode.
An null QString otherwise.
</dd></dl>
</p></div></div><a class="anchor" name="literalToN3"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> literalToN3</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../soprano/Soprano.LiteralValue.html">Soprano.LiteralValue</a>&nbsp;</td>
<td class="paramname"><em>literal</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Format a literal value as N3 string to be used in SPARQL queries.
</p>
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd> A string representing the literal in N3 encoding or an empty
string for invalid literals.
</dd></dl> </p>
<p>
Examples:
<pre class="fragment">
 "Hello World"^^&lt;http://www.w3.org/2001/XMLSchema#string&gt;
 "09-08-1977T17:42.234Z"^^&lt;http://www.w3.org/2001/XMLSchema#dateTime&gt;
</pre>
</p>
<p>
\sa toN3
</p>
<p>
<dl class="since" compact><dt><b>Since:</b></dt><dd> 2.3
</dd></dl>
</p></div></div><a class="anchor" name="matches"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">bool matches</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../soprano/Soprano.Node.html">Soprano.Node</a>&nbsp;</td>
<td class="paramname"><em>other</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Match this node against template node <b>other.</b> The only difference
to operator== is that empty nodes are matched as wildcards,
i.e. they match any other node.
</p>
<p>
Be aware that the following is NOT always true since only <b>other</b>
is treated a a wildcard:
</p>
<p>
<pre class="fragment">
 // NOT always true:
 a.matches(b) == b.matches(a)
</pre>
</p>
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd> <b>true</b> if this node matches other, <b>false</b> if not.
</dd></dl> </p>
<p>
\sa Statement.matches
</p></div></div><a class="anchor" name="operator !="></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">bool operator !=</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../soprano/Soprano.Node.html">Soprano.Node</a>&nbsp;</td>
<td class="paramname"><em>other</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Comparision operator.
<dl class="return" compact><dt><b>Returns:</b></dt><dd> <b>true</b> if this node and <b>other</b> differ.
</dd></dl>
</p></div></div><a class="anchor" name="operator =="></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">bool operator ==</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../soprano/Soprano.Node.html">Soprano.Node</a>&nbsp;</td>
<td class="paramname"><em>other</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Comparision operator.
<dl class="return" compact><dt><b>Returns:</b></dt><dd> <b>true</b> if this node is a LiteralNode and
has literal value <b>other.</b>
</dd></dl>
</p></div></div><a class="anchor" name="operator =="></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">bool operator ==</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qurl.html">QUrl</a>&nbsp;</td>
<td class="paramname"><em>uri</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Comparision operator.
<dl class="return" compact><dt><b>Returns:</b></dt><dd> <b>true</b> if this node is a LiteralNode and
has literal value <b>other.</b>
</dd></dl>
</p></div></div><a class="anchor" name="operator =="></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">bool operator ==</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../soprano/Soprano.LiteralValue.html">Soprano.LiteralValue</a>&nbsp;</td>
<td class="paramname"><em>other</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Comparision operator.
<dl class="return" compact><dt><b>Returns:</b></dt><dd> <b>true</b> if this node is a LiteralNode and
has literal value <b>other.</b>
</dd></dl>
</p></div></div><a class="anchor" name="resourceToN3"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> resourceToN3</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qurl.html">QUrl</a>&nbsp;</td>
<td class="paramname"><em>resource</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Format a resource URI as N3 string to be used in SPARQL queries.
</p>
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd> A string representing the resource in N3 encoding or an empty
string for invalid URIs.
</dd></dl> </p>
<p>
Example:
<pre class="fragment">
 &lt;http://soprano.sourceforce.net/&gt;
</pre>
</p>
<p>
\sa toN3
</p>
<p>
<dl class="since" compact><dt><b>Since:</b></dt><dd> 2.3
</dd></dl>
</p></div></div><a class="anchor" name="toN3"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> toN3</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Convert a Node into N3 notation to be used in SPARQL graph patterns.
</p>
<p>
Examples:
<pre class="fragment">
 &lt;http://soprano.sourceforce.net/&gt;
 "Hello World"^^&lt;http://www.w3.org/2001/XMLSchema#string&gt;
 "09-08-1977T17:42.234Z"^^&lt;http://www.w3.org/2001/XMLSchema#dateTime&gt;
 _:blankNode
</pre>
</p>
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd> A string representing the node in N3 encoding or an empty
string for invalid nodes.
</dd></dl> </p>
<p>
\sa toString()
</p>
<p>
<dl class="since" compact><dt><b>Since:</b></dt><dd> 2.2
</dd></dl>
</p></div></div><a class="anchor" name="toString"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> toString</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Converts the Node to a string.
</p>
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd> A String representation of the Node, suitable for storage,
not really suitable for user readable strings.
</dd></dl> </p>
<p>
\sa LiteralValue.toString(), QUrl.toString(), toN3()
</p></div></div><a class="anchor" name="type"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="../soprano/Soprano.Node.html#Type">Soprano.Node.Type</a> type</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> The node type.
</dd></dl>
</p></div></div><a class="anchor" name="uri"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qurl.html">QUrl</a> uri</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> The URI if the node is a ResourceNode.
An null QUrl otherwise.
</dd></dl>
</p></div></div><hr><h2>Enumeration Documentation</h2><a class="anchor" name="Type"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr><td class="memname">Type</td>
</tr>
</table>
</div>
<div class="memdoc"><dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0"><tr><td valign="top"><em>EmptyNode</em>&nbsp;=&nbsp;0</td><td><tr><td valign="top"><em>ResourceNode</em>&nbsp;=&nbsp;1</td><td><tr><td valign="top"><em>LiteralNode</em>&nbsp;=&nbsp;2</td><td><tr><td valign="top"><em>BlankNode</em>&nbsp;=&nbsp;3</td><td></table>
</dl>
</div></div><p>
</div>
</div>
</div>

<div id="left">

<div class="menu_box">
<div class="nav_list">
<ul>
<li><a href="../allclasses.html">Full Index</a></li>
</ul>
</div>

<a name="cp-menu" /><div class="menutitle"><div>
  <h2 id="cp-menu-project">Modules</h2>
</div></div>
<div class="nav_list">
<ul><li><a href="../akonadi/index.html">akonadi</a></li>
<li><a href="../dnssd/index.html">dnssd</a></li>
<li><a href="../kdecore/index.html">kdecore</a></li>
<li><a href="../kdeui/index.html">kdeui</a></li>
<li><a href="../khtml/index.html">khtml</a></li>
<li><a href="../kio/index.html">kio</a></li>
<li><a href="../knewstuff/index.html">knewstuff</a></li>
<li><a href="../kparts/index.html">kparts</a></li>
<li><a href="../kutils/index.html">kutils</a></li>
<li><a href="../nepomuk/index.html">nepomuk</a></li>
<li><a href="../phonon/index.html">phonon</a></li>
<li><a href="../plasma/index.html">plasma</a></li>
<li><a href="../polkitqt/index.html">polkitqt</a></li>
<li><a href="../solid/index.html">solid</a></li>
<li><a href="../soprano/index.html">soprano</a></li>
</ul></div></div>

</div>

</div>
  <div class="clearer"/>
</div>

<div id="end_body"></div>
</div>
<div id="footer"><div id="footer_text">
This documentation is maintained by <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;simon&#64;simonzone&#46;com">Simon Edwards</a>.<br />
        KDE<sup>&#174;</sup> and <a href="../images/kde_gear_black.png">the K Desktop Environment<sup>&#174;</sup> logo</a> are registered trademarks of <a href="http://ev.kde.org/" title="Homepage of the KDE non-profit Organization">KDE e.V.</a> |
        <a href="http://www.kde.org/contact/impressum.php">Legal</a>
    </div></div>
</body>
</html>