| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 2 | <html> |
| 3 | <head> |
| 4 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 5 | <title>RDF term (librdf_node)</title> |
| 6 | <meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> |
| 7 | <link rel="home" href="index.html" title="Redland RDF Library Manual"> |
| 8 | <link rel="up" href="reference-manual.html" title="Part II. Reference Manual"> |
| 9 | <link rel="prev" href="redland-model.html" title="RDF Graph (librdf_model)"> |
| 10 | <link rel="next" href="redland-parser.html" title="Parsers"> |
| 11 | <meta name="generator" content="GTK-Doc V1.18 (XML mode)"> |
| 12 | <link rel="stylesheet" href="style.css" type="text/css"> |
| 13 | </head> |
| 14 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
| 15 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
| 16 | <tr valign="middle"> |
| 17 | <td><a accesskey="p" href="redland-model.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> |
| 18 | <td><a accesskey="u" href="reference-manual.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> |
| 19 | <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> |
| 20 | <th width="100%" align="center">Redland RDF Library Manual</th> |
| 21 | <td><a accesskey="n" href="redland-parser.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> |
| 22 | </tr> |
| 23 | <tr><td colspan="5" class="shortcuts"> |
| 24 | <a href="#redland-node.synopsis" class="shortcut">Top</a> |
| 25 | | |
| 26 | <a href="#redland-node.description" class="shortcut">Description</a> |
| 27 | </td></tr> |
| 28 | </table> |
| 29 | <div class="refentry"> |
| 30 | <a name="redland-node"></a><div class="titlepage"></div> |
| 31 | <div class="refnamediv"><table width="100%"><tr> |
| 32 | <td valign="top"> |
| 33 | <h2><span class="refentrytitle"><a name="redland-node.top_of_page"></a>RDF term (librdf_node)</span></h2> |
| 34 | <p>RDF term (librdf_node) — RDF triple component</p> |
| 35 | </td> |
| 36 | <td valign="top" align="right"></td> |
| 37 | </tr></table></div> |
| 38 | <div class="refsynopsisdiv"> |
| 39 | <a name="redland-node.synopsis"></a><h2>Synopsis</h2> |
| 40 | <pre class="synopsis"><span class="returnvalue">void</span> <a class="link" href="redland-node.html#librdf-free-node" title="librdf_free_node ()">librdf_free_node</a> (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>); |
| 41 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * <a class="link" href="redland-node.html#librdf-new-node" title="librdf_new_node ()">librdf_new_node</a> (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>); |
| 42 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * <a class="link" href="redland-node.html#librdf-new-node-from-blank-identifier" title="librdf_new_node_from_blank_identifier ()">librdf_new_node_from_blank_identifier</a> |
| 43 | (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 44 | <em class="parameter"><code>const unsigned <span class="type">char</span> *identifier</code></em>); |
| 45 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * <a class="link" href="redland-node.html#librdf-new-node-from-counted-blank-identifier" title="librdf_new_node_from_counted_blank_identifier ()">librdf_new_node_from_counted_blank_identifier</a> |
| 46 | (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 47 | <em class="parameter"><code>const unsigned <span class="type">char</span> *identifier</code></em>, |
| 48 | <em class="parameter"><code><span class="type">size_t</span> identifier_len</code></em>); |
| 49 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * <a class="link" href="redland-node.html#librdf-new-node-from-counted-uri-string" title="librdf_new_node_from_counted_uri_string ()">librdf_new_node_from_counted_uri_string</a> |
| 50 | (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 51 | <em class="parameter"><code>const unsigned <span class="type">char</span> *uri_string</code></em>, |
| 52 | <em class="parameter"><code><span class="type">size_t</span> len</code></em>); |
| 53 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * <a class="link" href="redland-node.html#librdf-new-node-from-literal" title="librdf_new_node_from_literal ()">librdf_new_node_from_literal</a> (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 54 | <em class="parameter"><code>const unsigned <span class="type">char</span> *string</code></em>, |
| 55 | <em class="parameter"><code>const <span class="type">char</span> *xml_language</code></em>, |
| 56 | <em class="parameter"><code><span class="type">int</span> is_wf_xml</code></em>); |
| 57 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * <a class="link" href="redland-node.html#librdf-new-node-from-node" title="librdf_new_node_from_node ()">librdf_new_node_from_node</a> (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>); |
| 58 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * <a class="link" href="redland-node.html#librdf-new-node-from-normalised-uri-string" title="librdf_new_node_from_normalised_uri_string ()">librdf_new_node_from_normalised_uri_string</a> |
| 59 | (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 60 | <em class="parameter"><code>const unsigned <span class="type">char</span> *uri_string</code></em>, |
| 61 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *source_uri</code></em>, |
| 62 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *base_uri</code></em>); |
| 63 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * <a class="link" href="redland-node.html#librdf-new-node-from-typed-counted-literal" title="librdf_new_node_from_typed_counted_literal ()">librdf_new_node_from_typed_counted_literal</a> |
| 64 | (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 65 | <em class="parameter"><code>const unsigned <span class="type">char</span> *value</code></em>, |
| 66 | <em class="parameter"><code><span class="type">size_t</span> value_len</code></em>, |
| 67 | <em class="parameter"><code>const <span class="type">char</span> *xml_language</code></em>, |
| 68 | <em class="parameter"><code><span class="type">size_t</span> xml_language_len</code></em>, |
| 69 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *datatype_uri</code></em>); |
| 70 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * <a class="link" href="redland-node.html#librdf-new-node-from-typed-literal" title="librdf_new_node_from_typed_literal ()">librdf_new_node_from_typed_literal</a> (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 71 | <em class="parameter"><code>const unsigned <span class="type">char</span> *value</code></em>, |
| 72 | <em class="parameter"><code>const <span class="type">char</span> *xml_language</code></em>, |
| 73 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *datatype_uri</code></em>); |
| 74 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * <a class="link" href="redland-node.html#librdf-new-node-from-uri" title="librdf_new_node_from_uri ()">librdf_new_node_from_uri</a> (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 75 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *uri</code></em>); |
| 76 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * <a class="link" href="redland-node.html#librdf-new-node-from-uri-local-name" title="librdf_new_node_from_uri_local_name ()">librdf_new_node_from_uri_local_name</a> (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 77 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *uri</code></em>, |
| 78 | <em class="parameter"><code>const unsigned <span class="type">char</span> *local_name</code></em>); |
| 79 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * <a class="link" href="redland-node.html#librdf-new-node-from-uri-string" title="librdf_new_node_from_uri_string ()">librdf_new_node_from_uri_string</a> (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 80 | <em class="parameter"><code>const unsigned <span class="type">char</span> *uri_string</code></em>); |
| 81 | typedef <a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a>; |
| 82 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * <a class="link" href="redland-node.html#librdf-node-decode" title="librdf_node_decode ()">librdf_node_decode</a> (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 83 | <em class="parameter"><code><span class="type">size_t</span> *size_p</code></em>, |
| 84 | <em class="parameter"><code>unsigned <span class="type">char</span> *buffer</code></em>, |
| 85 | <em class="parameter"><code><span class="type">size_t</span> length</code></em>); |
| 86 | <span class="returnvalue">size_t</span> <a class="link" href="redland-node.html#librdf-node-encode" title="librdf_node_encode ()">librdf_node_encode</a> (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>, |
| 87 | <em class="parameter"><code>unsigned <span class="type">char</span> *buffer</code></em>, |
| 88 | <em class="parameter"><code><span class="type">size_t</span> length</code></em>); |
| 89 | <span class="returnvalue">int</span> <a class="link" href="redland-node.html#librdf-node-equals" title="librdf_node_equals ()">librdf_node_equals</a> (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *first_node</code></em>, |
| 90 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *second_node</code></em>); |
| 91 | unsigned <span class="returnvalue">char</span> * <a class="link" href="redland-node.html#librdf-node-get-blank-identifier" title="librdf_node_get_blank_identifier ()">librdf_node_get_blank_identifier</a> (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>); |
| 92 | unsigned <span class="returnvalue">char</span> * <a class="link" href="redland-node.html#librdf-node-get-counted-blank-identifier" title="librdf_node_get_counted_blank_identifier ()">librdf_node_get_counted_blank_identifier</a> |
| 93 | (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>, |
| 94 | <em class="parameter"><code><span class="type">size_t</span> *len_p</code></em>); |
| 95 | <span class="returnvalue">int</span> <a class="link" href="redland-node.html#librdf-node-get-li-ordinal" title="librdf_node_get_li_ordinal ()">librdf_node_get_li_ordinal</a> (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>); |
| 96 | unsigned <span class="returnvalue">char</span> * <a class="link" href="redland-node.html#librdf-node-get-literal-value" title="librdf_node_get_literal_value ()">librdf_node_get_literal_value</a> (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>); |
| 97 | unsigned <span class="returnvalue">char</span> * <a class="link" href="redland-node.html#librdf-node-get-literal-value-as-counted-string" title="librdf_node_get_literal_value_as_counted_string ()">librdf_node_get_literal_value_as_counted_string</a> |
| 98 | (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>, |
| 99 | <em class="parameter"><code><span class="type">size_t</span> *len_p</code></em>); |
| 100 | <span class="returnvalue">char</span> * <a class="link" href="redland-node.html#librdf-node-get-literal-value-as-latin1" title="librdf_node_get_literal_value_as_latin1 ()">librdf_node_get_literal_value_as_latin1</a> |
| 101 | (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>); |
| 102 | <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="returnvalue">librdf_uri</span></a> * <a class="link" href="redland-node.html#librdf-node-get-literal-value-datatype-uri" title="librdf_node_get_literal_value_datatype_uri ()">librdf_node_get_literal_value_datatype_uri</a> |
| 103 | (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>); |
| 104 | <span class="returnvalue">int</span> <a class="link" href="redland-node.html#librdf-node-get-literal-value-is-wf-xml" title="librdf_node_get_literal_value_is_wf_xml ()">librdf_node_get_literal_value_is_wf_xml</a> |
| 105 | (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>); |
| 106 | <span class="returnvalue">char</span> * <a class="link" href="redland-node.html#librdf-node-get-literal-value-language" title="librdf_node_get_literal_value_language ()">librdf_node_get_literal_value_language</a> |
| 107 | (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>); |
| 108 | <a class="link" href="redland-node.html#librdf-node-type" title="enum librdf_node_type"><span class="returnvalue">librdf_node_type</span></a> <a class="link" href="redland-node.html#librdf-node-get-type" title="librdf_node_get_type ()">librdf_node_get_type</a> (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>); |
| 109 | <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="returnvalue">librdf_uri</span></a> * <a class="link" href="redland-node.html#librdf-node-get-uri" title="librdf_node_get_uri ()">librdf_node_get_uri</a> (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>); |
| 110 | <span class="returnvalue">int</span> <a class="link" href="redland-node.html#librdf-node-is-blank" title="librdf_node_is_blank ()">librdf_node_is_blank</a> (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>); |
| 111 | <span class="returnvalue">int</span> <a class="link" href="redland-node.html#librdf-node-is-literal" title="librdf_node_is_literal ()">librdf_node_is_literal</a> (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>); |
| 112 | <span class="returnvalue">int</span> <a class="link" href="redland-node.html#librdf-node-is-resource" title="librdf_node_is_resource ()">librdf_node_is_resource</a> (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>); |
| 113 | <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="returnvalue">librdf_iterator</span></a> * <a class="link" href="redland-node.html#librdf-node-new-static-node-iterator" title="librdf_node_new_static_node_iterator ()">librdf_node_new_static_node_iterator</a> |
| 114 | (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 115 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> **nodes</code></em>, |
| 116 | <em class="parameter"><code><span class="type">int</span> size</code></em>); |
| 117 | <span class="returnvalue">void</span> <a class="link" href="redland-node.html#librdf-node-print" title="librdf_node_print ()">librdf_node_print</a> (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>, |
| 118 | <em class="parameter"><code><span class="type">FILE</span> *fh</code></em>); |
| 119 | <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="returnvalue">librdf_iterator</span></a> * <a class="link" href="redland-node.html#librdf-node-static-iterator-create" title="librdf_node_static_iterator_create ()">librdf_node_static_iterator_create</a> (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> **nodes</code></em>, |
| 120 | <em class="parameter"><code><span class="type">int</span> size</code></em>); |
| 121 | unsigned <span class="returnvalue">char</span> * <a class="link" href="redland-node.html#librdf-node-to-counted-string" title="librdf_node_to_counted_string ()">librdf_node_to_counted_string</a> (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>, |
| 122 | <em class="parameter"><code><span class="type">size_t</span> *len_p</code></em>); |
| 123 | unsigned <span class="returnvalue">char</span> * <a class="link" href="redland-node.html#librdf-node-to-string" title="librdf_node_to_string ()">librdf_node_to_string</a> (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>); |
| 124 | enum <a class="link" href="redland-node.html#librdf-node-type" title="enum librdf_node_type">librdf_node_type</a>; |
| 125 | <span class="returnvalue">int</span> <a class="link" href="redland-node.html#librdf-node-write" title="librdf_node_write ()">librdf_node_write</a> (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>, |
| 126 | <em class="parameter"><code><span class="type">raptor_iostream</span> *iostr</code></em>); |
| 127 | </pre> |
| 128 | </div> |
| 129 | <div class="refsect1"> |
| 130 | <a name="redland-node.description"></a><h2>Description</h2> |
| 131 | <p> |
| 132 | The (subject, predicate, object) parts of an RDF triple. |
| 133 | </p> |
| 134 | </div> |
| 135 | <div class="refsect1"> |
| 136 | <a name="redland-node.details"></a><h2>Details</h2> |
| 137 | <div class="refsect2"> |
| 138 | <a name="librdf-free-node"></a><h3>librdf_free_node ()</h3> |
| 139 | <pre class="programlisting"><span class="returnvalue">void</span> librdf_free_node (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>);</pre> |
| 140 | <p> |
| 141 | Destructor - destroy an <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object. |
| 142 | </p> |
| 143 | <div class="variablelist"><table border="0"> |
| 144 | <col align="left" valign="top"> |
| 145 | <tbody><tr> |
| 146 | <td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td> |
| 147 | <td> |
| 148 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object</td> |
| 149 | </tr></tbody> |
| 150 | </table></div> |
| 151 | </div> |
| 152 | <hr> |
| 153 | <div class="refsect2"> |
| 154 | <a name="librdf-new-node"></a><h3>librdf_new_node ()</h3> |
| 155 | <pre class="programlisting"><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * librdf_new_node (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>);</pre> |
| 156 | <p> |
| 157 | Constructor - create a new <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object with a private identifier. |
| 158 | </p> |
| 159 | <p> |
| 160 | Calls librdf_new_node_from_blank_identifier(world, NULL) to |
| 161 | construct a new redland blank node identifier and make a |
| 162 | new librdf_node object for it. |
| 163 | </p> |
| 164 | <div class="variablelist"><table border="0"> |
| 165 | <col align="left" valign="top"> |
| 166 | <tbody> |
| 167 | <tr> |
| 168 | <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td> |
| 169 | <td>redland world object</td> |
| 170 | </tr> |
| 171 | <tr> |
| 172 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 173 | <td>a new <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object or NULL on failure</td> |
| 174 | </tr> |
| 175 | </tbody> |
| 176 | </table></div> |
| 177 | </div> |
| 178 | <hr> |
| 179 | <div class="refsect2"> |
| 180 | <a name="librdf-new-node-from-blank-identifier"></a><h3>librdf_new_node_from_blank_identifier ()</h3> |
| 181 | <pre class="programlisting"><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * librdf_new_node_from_blank_identifier |
| 182 | (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 183 | <em class="parameter"><code>const unsigned <span class="type">char</span> *identifier</code></em>);</pre> |
| 184 | <p> |
| 185 | Constructor - create a new blank node <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object from a blank node identifier. |
| 186 | </p> |
| 187 | <p> |
| 188 | If no <em class="parameter"><code>identifier</code></em> string is given (NULL) this creates a new |
| 189 | internal identifier and uses it. |
| 190 | </p> |
| 191 | <div class="variablelist"><table border="0"> |
| 192 | <col align="left" valign="top"> |
| 193 | <tbody> |
| 194 | <tr> |
| 195 | <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td> |
| 196 | <td>redland world object</td> |
| 197 | </tr> |
| 198 | <tr> |
| 199 | <td><p><span class="term"><em class="parameter"><code>identifier</code></em> :</span></p></td> |
| 200 | <td>UTF-8 encoded blank node identifier or NULL</td> |
| 201 | </tr> |
| 202 | <tr> |
| 203 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 204 | <td>new <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object or NULL on failure</td> |
| 205 | </tr> |
| 206 | </tbody> |
| 207 | </table></div> |
| 208 | </div> |
| 209 | <hr> |
| 210 | <div class="refsect2"> |
| 211 | <a name="librdf-new-node-from-counted-blank-identifier"></a><h3>librdf_new_node_from_counted_blank_identifier ()</h3> |
| 212 | <pre class="programlisting"><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * librdf_new_node_from_counted_blank_identifier |
| 213 | (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 214 | <em class="parameter"><code>const unsigned <span class="type">char</span> *identifier</code></em>, |
| 215 | <em class="parameter"><code><span class="type">size_t</span> identifier_len</code></em>);</pre> |
| 216 | <p> |
| 217 | Constructor - create a new blank node <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object from a blank node counted length identifier. |
| 218 | </p> |
| 219 | <p> |
| 220 | If no <em class="parameter"><code>identifier</code></em> string is given (NULL) this creates a new |
| 221 | internal identifier and uses it. |
| 222 | </p> |
| 223 | <div class="variablelist"><table border="0"> |
| 224 | <col align="left" valign="top"> |
| 225 | <tbody> |
| 226 | <tr> |
| 227 | <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td> |
| 228 | <td>redland world object</td> |
| 229 | </tr> |
| 230 | <tr> |
| 231 | <td><p><span class="term"><em class="parameter"><code>identifier</code></em> :</span></p></td> |
| 232 | <td>UTF-8 encoded blank node identifier or NULL</td> |
| 233 | </tr> |
| 234 | <tr> |
| 235 | <td><p><span class="term"><em class="parameter"><code>identifier_len</code></em> :</span></p></td> |
| 236 | <td>length of <em class="parameter"><code>identifier</code></em> |
| 237 | </td> |
| 238 | </tr> |
| 239 | <tr> |
| 240 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 241 | <td>new <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object or NULL on failure</td> |
| 242 | </tr> |
| 243 | </tbody> |
| 244 | </table></div> |
| 245 | </div> |
| 246 | <hr> |
| 247 | <div class="refsect2"> |
| 248 | <a name="librdf-new-node-from-counted-uri-string"></a><h3>librdf_new_node_from_counted_uri_string ()</h3> |
| 249 | <pre class="programlisting"><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * librdf_new_node_from_counted_uri_string |
| 250 | (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 251 | <em class="parameter"><code>const unsigned <span class="type">char</span> *uri_string</code></em>, |
| 252 | <em class="parameter"><code><span class="type">size_t</span> len</code></em>);</pre> |
| 253 | <p> |
| 254 | Constructor - create a new <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object from a counted URI string. |
| 255 | </p> |
| 256 | <div class="variablelist"><table border="0"> |
| 257 | <col align="left" valign="top"> |
| 258 | <tbody> |
| 259 | <tr> |
| 260 | <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td> |
| 261 | <td>redland world object</td> |
| 262 | </tr> |
| 263 | <tr> |
| 264 | <td><p><span class="term"><em class="parameter"><code>uri_string</code></em> :</span></p></td> |
| 265 | <td>string representing a URI</td> |
| 266 | </tr> |
| 267 | <tr> |
| 268 | <td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td> |
| 269 | <td>length of string</td> |
| 270 | </tr> |
| 271 | <tr> |
| 272 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 273 | <td>a new <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object or NULL on failure</td> |
| 274 | </tr> |
| 275 | </tbody> |
| 276 | </table></div> |
| 277 | </div> |
| 278 | <hr> |
| 279 | <div class="refsect2"> |
| 280 | <a name="librdf-new-node-from-literal"></a><h3>librdf_new_node_from_literal ()</h3> |
| 281 | <pre class="programlisting"><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * librdf_new_node_from_literal (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 282 | <em class="parameter"><code>const unsigned <span class="type">char</span> *string</code></em>, |
| 283 | <em class="parameter"><code>const <span class="type">char</span> *xml_language</code></em>, |
| 284 | <em class="parameter"><code><span class="type">int</span> is_wf_xml</code></em>);</pre> |
| 285 | <p> |
| 286 | Constructor - create a new literal <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object. |
| 287 | </p> |
| 288 | <p> |
| 289 | 0.9.12: xml_space argument deleted |
| 290 | </p> |
| 291 | <p> |
| 292 | An <em class="parameter"><code>xml_language</code></em> cannot be used when <em class="parameter"><code>is_wf_xml</code></em> is non-0. If both |
| 293 | are given, NULL is returned. If <em class="parameter"><code>xml_language</code></em> is the empty string, |
| 294 | it is the equivalent to NULL. |
| 295 | </p> |
| 296 | <div class="variablelist"><table border="0"> |
| 297 | <col align="left" valign="top"> |
| 298 | <tbody> |
| 299 | <tr> |
| 300 | <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td> |
| 301 | <td>redland world object</td> |
| 302 | </tr> |
| 303 | <tr> |
| 304 | <td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td> |
| 305 | <td>literal UTF-8 encoded string value</td> |
| 306 | </tr> |
| 307 | <tr> |
| 308 | <td><p><span class="term"><em class="parameter"><code>xml_language</code></em> :</span></p></td> |
| 309 | <td>literal XML language (or NULL, empty string)</td> |
| 310 | </tr> |
| 311 | <tr> |
| 312 | <td><p><span class="term"><em class="parameter"><code>is_wf_xml</code></em> :</span></p></td> |
| 313 | <td>non 0 if literal is XML</td> |
| 314 | </tr> |
| 315 | <tr> |
| 316 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 317 | <td>new <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object or NULL on failure</td> |
| 318 | </tr> |
| 319 | </tbody> |
| 320 | </table></div> |
| 321 | </div> |
| 322 | <hr> |
| 323 | <div class="refsect2"> |
| 324 | <a name="librdf-new-node-from-node"></a><h3>librdf_new_node_from_node ()</h3> |
| 325 | <pre class="programlisting"><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * librdf_new_node_from_node (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>);</pre> |
| 326 | <p> |
| 327 | Copy constructor - create a new librdf_node object from an existing librdf_node object. |
| 328 | </p> |
| 329 | <div class="variablelist"><table border="0"> |
| 330 | <col align="left" valign="top"> |
| 331 | <tbody> |
| 332 | <tr> |
| 333 | <td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td> |
| 334 | <td> |
| 335 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object to copy</td> |
| 336 | </tr> |
| 337 | <tr> |
| 338 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 339 | <td>a new <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object or NULL on failure</td> |
| 340 | </tr> |
| 341 | </tbody> |
| 342 | </table></div> |
| 343 | </div> |
| 344 | <hr> |
| 345 | <div class="refsect2"> |
| 346 | <a name="librdf-new-node-from-normalised-uri-string"></a><h3>librdf_new_node_from_normalised_uri_string ()</h3> |
| 347 | <pre class="programlisting"><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * librdf_new_node_from_normalised_uri_string |
| 348 | (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 349 | <em class="parameter"><code>const unsigned <span class="type">char</span> *uri_string</code></em>, |
| 350 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *source_uri</code></em>, |
| 351 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *base_uri</code></em>);</pre> |
| 352 | <p> |
| 353 | Constructor - create a new <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object from a UTF-8 encoded URI string normalised to a new base URI. |
| 354 | </p> |
| 355 | <div class="variablelist"><table border="0"> |
| 356 | <col align="left" valign="top"> |
| 357 | <tbody> |
| 358 | <tr> |
| 359 | <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td> |
| 360 | <td>redland world object</td> |
| 361 | </tr> |
| 362 | <tr> |
| 363 | <td><p><span class="term"><em class="parameter"><code>uri_string</code></em> :</span></p></td> |
| 364 | <td>UTF-8 encoded string representing a URI</td> |
| 365 | </tr> |
| 366 | <tr> |
| 367 | <td><p><span class="term"><em class="parameter"><code>source_uri</code></em> :</span></p></td> |
| 368 | <td>source URI</td> |
| 369 | </tr> |
| 370 | <tr> |
| 371 | <td><p><span class="term"><em class="parameter"><code>base_uri</code></em> :</span></p></td> |
| 372 | <td>base URI</td> |
| 373 | </tr> |
| 374 | <tr> |
| 375 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 376 | <td>a new <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object or NULL on failure</td> |
| 377 | </tr> |
| 378 | </tbody> |
| 379 | </table></div> |
| 380 | </div> |
| 381 | <hr> |
| 382 | <div class="refsect2"> |
| 383 | <a name="librdf-new-node-from-typed-counted-literal"></a><h3>librdf_new_node_from_typed_counted_literal ()</h3> |
| 384 | <pre class="programlisting"><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * librdf_new_node_from_typed_counted_literal |
| 385 | (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 386 | <em class="parameter"><code>const unsigned <span class="type">char</span> *value</code></em>, |
| 387 | <em class="parameter"><code><span class="type">size_t</span> value_len</code></em>, |
| 388 | <em class="parameter"><code>const <span class="type">char</span> *xml_language</code></em>, |
| 389 | <em class="parameter"><code><span class="type">size_t</span> xml_language_len</code></em>, |
| 390 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *datatype_uri</code></em>);</pre> |
| 391 | <p> |
| 392 | Constructor - create a new typed literal <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object. |
| 393 | </p> |
| 394 | <p> |
| 395 | Takes copies of the passed in <em class="parameter"><code>value</code></em>, <em class="parameter"><code>datatype_uri</code></em> and <em class="parameter"><code>xml_language</code></em>. |
| 396 | </p> |
| 397 | <p> |
| 398 | Only one of <em class="parameter"><code>xml_language</code></em> or <em class="parameter"><code>datatype_uri</code></em> may be given. If both |
| 399 | are given, NULL is returned. If <em class="parameter"><code>xml_language</code></em> is the empty string, |
| 400 | it is the equivalent to NULL. |
| 401 | </p> |
| 402 | <div class="variablelist"><table border="0"> |
| 403 | <col align="left" valign="top"> |
| 404 | <tbody> |
| 405 | <tr> |
| 406 | <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td> |
| 407 | <td>redland world object</td> |
| 408 | </tr> |
| 409 | <tr> |
| 410 | <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td> |
| 411 | <td>literal UTF-8 encoded string value</td> |
| 412 | </tr> |
| 413 | <tr> |
| 414 | <td><p><span class="term"><em class="parameter"><code>value_len</code></em> :</span></p></td> |
| 415 | <td>literal string value length</td> |
| 416 | </tr> |
| 417 | <tr> |
| 418 | <td><p><span class="term"><em class="parameter"><code>xml_language</code></em> :</span></p></td> |
| 419 | <td>literal XML language (or NULL, empty string)</td> |
| 420 | </tr> |
| 421 | <tr> |
| 422 | <td><p><span class="term"><em class="parameter"><code>xml_language_len</code></em> :</span></p></td> |
| 423 | <td>literal XML language length (not used if <em class="parameter"><code>xml_language</code></em> is NULL)</td> |
| 424 | </tr> |
| 425 | <tr> |
| 426 | <td><p><span class="term"><em class="parameter"><code>datatype_uri</code></em> :</span></p></td> |
| 427 | <td>URI of typed literal datatype or NULL</td> |
| 428 | </tr> |
| 429 | <tr> |
| 430 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 431 | <td>new <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object or NULL on failure</td> |
| 432 | </tr> |
| 433 | </tbody> |
| 434 | </table></div> |
| 435 | </div> |
| 436 | <hr> |
| 437 | <div class="refsect2"> |
| 438 | <a name="librdf-new-node-from-typed-literal"></a><h3>librdf_new_node_from_typed_literal ()</h3> |
| 439 | <pre class="programlisting"><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * librdf_new_node_from_typed_literal (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 440 | <em class="parameter"><code>const unsigned <span class="type">char</span> *value</code></em>, |
| 441 | <em class="parameter"><code>const <span class="type">char</span> *xml_language</code></em>, |
| 442 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *datatype_uri</code></em>);</pre> |
| 443 | <p> |
| 444 | Constructor - create a new typed literal <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object. |
| 445 | </p> |
| 446 | <p> |
| 447 | Only one of <em class="parameter"><code>xml_language</code></em> or <em class="parameter"><code>datatype_uri</code></em> may be given. If both |
| 448 | are given, NULL is returned. If <em class="parameter"><code>xml_language</code></em> is the empty string, |
| 449 | it is the equivalent to NULL. |
| 450 | </p> |
| 451 | <div class="variablelist"><table border="0"> |
| 452 | <col align="left" valign="top"> |
| 453 | <tbody> |
| 454 | <tr> |
| 455 | <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td> |
| 456 | <td>redland world object</td> |
| 457 | </tr> |
| 458 | <tr> |
| 459 | <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td> |
| 460 | <td>literal UTF-8 encoded string value</td> |
| 461 | </tr> |
| 462 | <tr> |
| 463 | <td><p><span class="term"><em class="parameter"><code>xml_language</code></em> :</span></p></td> |
| 464 | <td>literal XML language (or NULL, empty string)</td> |
| 465 | </tr> |
| 466 | <tr> |
| 467 | <td><p><span class="term"><em class="parameter"><code>datatype_uri</code></em> :</span></p></td> |
| 468 | <td>URI of typed literal datatype or NULL</td> |
| 469 | </tr> |
| 470 | <tr> |
| 471 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 472 | <td>new <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object or NULL on failure</td> |
| 473 | </tr> |
| 474 | </tbody> |
| 475 | </table></div> |
| 476 | </div> |
| 477 | <hr> |
| 478 | <div class="refsect2"> |
| 479 | <a name="librdf-new-node-from-uri"></a><h3>librdf_new_node_from_uri ()</h3> |
| 480 | <pre class="programlisting"><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * librdf_new_node_from_uri (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 481 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *uri</code></em>);</pre> |
| 482 | <p> |
| 483 | Constructor - create a new resource <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object with a given URI. |
| 484 | </p> |
| 485 | <div class="variablelist"><table border="0"> |
| 486 | <col align="left" valign="top"> |
| 487 | <tbody> |
| 488 | <tr> |
| 489 | <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td> |
| 490 | <td>redland world object</td> |
| 491 | </tr> |
| 492 | <tr> |
| 493 | <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td> |
| 494 | <td> |
| 495 | <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> object</td> |
| 496 | </tr> |
| 497 | <tr> |
| 498 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 499 | <td>a new <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object or NULL on failure</td> |
| 500 | </tr> |
| 501 | </tbody> |
| 502 | </table></div> |
| 503 | </div> |
| 504 | <hr> |
| 505 | <div class="refsect2"> |
| 506 | <a name="librdf-new-node-from-uri-local-name"></a><h3>librdf_new_node_from_uri_local_name ()</h3> |
| 507 | <pre class="programlisting"><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * librdf_new_node_from_uri_local_name (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 508 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *uri</code></em>, |
| 509 | <em class="parameter"><code>const unsigned <span class="type">char</span> *local_name</code></em>);</pre> |
| 510 | <p> |
| 511 | Constructor - create a new resource <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object with a given URI and local name. |
| 512 | </p> |
| 513 | <div class="variablelist"><table border="0"> |
| 514 | <col align="left" valign="top"> |
| 515 | <tbody> |
| 516 | <tr> |
| 517 | <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td> |
| 518 | <td>redland world object</td> |
| 519 | </tr> |
| 520 | <tr> |
| 521 | <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td> |
| 522 | <td> |
| 523 | <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> object</td> |
| 524 | </tr> |
| 525 | <tr> |
| 526 | <td><p><span class="term"><em class="parameter"><code>local_name</code></em> :</span></p></td> |
| 527 | <td>local name to append to URI</td> |
| 528 | </tr> |
| 529 | <tr> |
| 530 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 531 | <td>a new <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object or NULL on failure</td> |
| 532 | </tr> |
| 533 | </tbody> |
| 534 | </table></div> |
| 535 | </div> |
| 536 | <hr> |
| 537 | <div class="refsect2"> |
| 538 | <a name="librdf-new-node-from-uri-string"></a><h3>librdf_new_node_from_uri_string ()</h3> |
| 539 | <pre class="programlisting"><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * librdf_new_node_from_uri_string (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 540 | <em class="parameter"><code>const unsigned <span class="type">char</span> *uri_string</code></em>);</pre> |
| 541 | <p> |
| 542 | Constructor - create a new <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object from a URI string. |
| 543 | </p> |
| 544 | <div class="variablelist"><table border="0"> |
| 545 | <col align="left" valign="top"> |
| 546 | <tbody> |
| 547 | <tr> |
| 548 | <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td> |
| 549 | <td>redland world object</td> |
| 550 | </tr> |
| 551 | <tr> |
| 552 | <td><p><span class="term"><em class="parameter"><code>uri_string</code></em> :</span></p></td> |
| 553 | <td>string representing a URI</td> |
| 554 | </tr> |
| 555 | <tr> |
| 556 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 557 | <td>a new <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object or NULL on failure</td> |
| 558 | </tr> |
| 559 | </tbody> |
| 560 | </table></div> |
| 561 | </div> |
| 562 | <hr> |
| 563 | <div class="refsect2"> |
| 564 | <a name="librdf-node"></a><h3>librdf_node</h3> |
| 565 | <pre class="programlisting">typedef raptor_term librdf_node; |
| 566 | </pre> |
| 567 | <p> |
| 568 | Redland node class. |
| 569 | </p> |
| 570 | </div> |
| 571 | <hr> |
| 572 | <div class="refsect2"> |
| 573 | <a name="librdf-node-decode"></a><h3>librdf_node_decode ()</h3> |
| 574 | <pre class="programlisting"><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * librdf_node_decode (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 575 | <em class="parameter"><code><span class="type">size_t</span> *size_p</code></em>, |
| 576 | <em class="parameter"><code>unsigned <span class="type">char</span> *buffer</code></em>, |
| 577 | <em class="parameter"><code><span class="type">size_t</span> length</code></em>);</pre> |
| 578 | <p> |
| 579 | Deserialise a node from a buffer. |
| 580 | </p> |
| 581 | <p> |
| 582 | Decodes the serialised node (as created by <a class="link" href="redland-node.html#librdf-node-encode" title="librdf_node_encode ()"><code class="function">librdf_node_encode()</code></a> ) |
| 583 | from the given buffer. |
| 584 | </p> |
| 585 | <div class="variablelist"><table border="0"> |
| 586 | <col align="left" valign="top"> |
| 587 | <tbody> |
| 588 | <tr> |
| 589 | <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td> |
| 590 | <td>librdf_world</td> |
| 591 | </tr> |
| 592 | <tr> |
| 593 | <td><p><span class="term"><em class="parameter"><code>size_p</code></em> :</span></p></td> |
| 594 | <td>pointer to bytes used or NULL</td> |
| 595 | </tr> |
| 596 | <tr> |
| 597 | <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
| 598 | <td>the buffer to use</td> |
| 599 | </tr> |
| 600 | <tr> |
| 601 | <td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td> |
| 602 | <td>buffer size</td> |
| 603 | </tr> |
| 604 | <tr> |
| 605 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 606 | <td>new node or NULL on failure (bad encoding, allocation failure)</td> |
| 607 | </tr> |
| 608 | </tbody> |
| 609 | </table></div> |
| 610 | </div> |
| 611 | <hr> |
| 612 | <div class="refsect2"> |
| 613 | <a name="librdf-node-encode"></a><h3>librdf_node_encode ()</h3> |
| 614 | <pre class="programlisting"><span class="returnvalue">size_t</span> librdf_node_encode (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>, |
| 615 | <em class="parameter"><code>unsigned <span class="type">char</span> *buffer</code></em>, |
| 616 | <em class="parameter"><code><span class="type">size_t</span> length</code></em>);</pre> |
| 617 | <p> |
| 618 | Serialise a node into a buffer. |
| 619 | </p> |
| 620 | <p> |
| 621 | Encodes the given node in the buffer, which must be of sufficient |
| 622 | size. If buffer is NULL, no work is done but the size of buffer |
| 623 | required is returned. |
| 624 | </p> |
| 625 | <p> |
| 626 | If the node cannot be encoded due to restrictions of the encoding |
| 627 | format, a redland error is generated |
| 628 | </p> |
| 629 | <div class="variablelist"><table border="0"> |
| 630 | <col align="left" valign="top"> |
| 631 | <tbody> |
| 632 | <tr> |
| 633 | <td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td> |
| 634 | <td>the node to serialise</td> |
| 635 | </tr> |
| 636 | <tr> |
| 637 | <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
| 638 | <td>the buffer to use</td> |
| 639 | </tr> |
| 640 | <tr> |
| 641 | <td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td> |
| 642 | <td>buffer size</td> |
| 643 | </tr> |
| 644 | <tr> |
| 645 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 646 | <td>the number of bytes written or 0 on failure.</td> |
| 647 | </tr> |
| 648 | </tbody> |
| 649 | </table></div> |
| 650 | </div> |
| 651 | <hr> |
| 652 | <div class="refsect2"> |
| 653 | <a name="librdf-node-equals"></a><h3>librdf_node_equals ()</h3> |
| 654 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_node_equals (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *first_node</code></em>, |
| 655 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *second_node</code></em>);</pre> |
| 656 | <p> |
| 657 | Compare two librdf_node objects for equality. |
| 658 | </p> |
| 659 | <p> |
| 660 | Note - for literal nodes, XML language, XML space and well-formness are |
| 661 | presently ignored in the comparison. |
| 662 | </p> |
| 663 | <div class="variablelist"><table border="0"> |
| 664 | <col align="left" valign="top"> |
| 665 | <tbody> |
| 666 | <tr> |
| 667 | <td><p><span class="term"><em class="parameter"><code>first_node</code></em> :</span></p></td> |
| 668 | <td>first <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> node</td> |
| 669 | </tr> |
| 670 | <tr> |
| 671 | <td><p><span class="term"><em class="parameter"><code>second_node</code></em> :</span></p></td> |
| 672 | <td>second <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> node</td> |
| 673 | </tr> |
| 674 | <tr> |
| 675 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 676 | <td>non 0 if nodes are equal. 0 if not-equal or failure</td> |
| 677 | </tr> |
| 678 | </tbody> |
| 679 | </table></div> |
| 680 | </div> |
| 681 | <hr> |
| 682 | <div class="refsect2"> |
| 683 | <a name="librdf-node-get-blank-identifier"></a><h3>librdf_node_get_blank_identifier ()</h3> |
| 684 | <pre class="programlisting">unsigned <span class="returnvalue">char</span> * librdf_node_get_blank_identifier (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>);</pre> |
| 685 | <p> |
| 686 | Get the blank node identifier as a UTF-8 encoded string. |
| 687 | </p> |
| 688 | <div class="variablelist"><table border="0"> |
| 689 | <col align="left" valign="top"> |
| 690 | <tbody> |
| 691 | <tr> |
| 692 | <td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td> |
| 693 | <td>the node object</td> |
| 694 | </tr> |
| 695 | <tr> |
| 696 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 697 | <td>the UTF-8 encoded blank node identifier value or NULL on failure</td> |
| 698 | </tr> |
| 699 | </tbody> |
| 700 | </table></div> |
| 701 | </div> |
| 702 | <hr> |
| 703 | <div class="refsect2"> |
| 704 | <a name="librdf-node-get-counted-blank-identifier"></a><h3>librdf_node_get_counted_blank_identifier ()</h3> |
| 705 | <pre class="programlisting">unsigned <span class="returnvalue">char</span> * librdf_node_get_counted_blank_identifier |
| 706 | (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>, |
| 707 | <em class="parameter"><code><span class="type">size_t</span> *len_p</code></em>);</pre> |
| 708 | <p> |
| 709 | Get the blank node identifier as a counted UTF-8 encoded string. |
| 710 | </p> |
| 711 | <div class="variablelist"><table border="0"> |
| 712 | <col align="left" valign="top"> |
| 713 | <tbody> |
| 714 | <tr> |
| 715 | <td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td> |
| 716 | <td>the node object</td> |
| 717 | </tr> |
| 718 | <tr> |
| 719 | <td><p><span class="term"><em class="parameter"><code>len_p</code></em> :</span></p></td> |
| 720 | <td>pointer to variable to store length (or NULL)</td> |
| 721 | </tr> |
| 722 | <tr> |
| 723 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 724 | <td>the UTF-8 encoded blank node identifier value or NULL on failure</td> |
| 725 | </tr> |
| 726 | </tbody> |
| 727 | </table></div> |
| 728 | </div> |
| 729 | <hr> |
| 730 | <div class="refsect2"> |
| 731 | <a name="librdf-node-get-li-ordinal"></a><h3>librdf_node_get_li_ordinal ()</h3> |
| 732 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_node_get_li_ordinal (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>);</pre> |
| 733 | <p> |
| 734 | Get the node li object ordinal value. |
| 735 | </p> |
| 736 | <div class="variablelist"><table border="0"> |
| 737 | <col align="left" valign="top"> |
| 738 | <tbody> |
| 739 | <tr> |
| 740 | <td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td> |
| 741 | <td>the node object</td> |
| 742 | </tr> |
| 743 | <tr> |
| 744 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 745 | <td>the li ordinal value or < 1 on failure</td> |
| 746 | </tr> |
| 747 | </tbody> |
| 748 | </table></div> |
| 749 | </div> |
| 750 | <hr> |
| 751 | <div class="refsect2"> |
| 752 | <a name="librdf-node-get-literal-value"></a><h3>librdf_node_get_literal_value ()</h3> |
| 753 | <pre class="programlisting">unsigned <span class="returnvalue">char</span> * librdf_node_get_literal_value (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>);</pre> |
| 754 | <p> |
| 755 | Get the literal value of the node as a UTF-8 encoded string. |
| 756 | </p> |
| 757 | <p> |
| 758 | Returns a pointer to the UTF-8 encoded literal value held by the |
| 759 | node, it must be copied if it is wanted to be used by the caller. |
| 760 | </p> |
| 761 | <div class="variablelist"><table border="0"> |
| 762 | <col align="left" valign="top"> |
| 763 | <tbody> |
| 764 | <tr> |
| 765 | <td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td> |
| 766 | <td>the node object</td> |
| 767 | </tr> |
| 768 | <tr> |
| 769 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 770 | <td>the UTF-8 encoded literal string or NULL if node is not a literal</td> |
| 771 | </tr> |
| 772 | </tbody> |
| 773 | </table></div> |
| 774 | </div> |
| 775 | <hr> |
| 776 | <div class="refsect2"> |
| 777 | <a name="librdf-node-get-literal-value-as-counted-string"></a><h3>librdf_node_get_literal_value_as_counted_string ()</h3> |
| 778 | <pre class="programlisting">unsigned <span class="returnvalue">char</span> * librdf_node_get_literal_value_as_counted_string |
| 779 | (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>, |
| 780 | <em class="parameter"><code><span class="type">size_t</span> *len_p</code></em>);</pre> |
| 781 | <p> |
| 782 | Get the literal value of the node as a counted UTF-8 encoded string. |
| 783 | </p> |
| 784 | <p> |
| 785 | Returns a pointer to the UTF-8 encoded literal string value held |
| 786 | by the node, it must be copied if it is wanted to be used by the |
| 787 | caller. |
| 788 | </p> |
| 789 | <div class="variablelist"><table border="0"> |
| 790 | <col align="left" valign="top"> |
| 791 | <tbody> |
| 792 | <tr> |
| 793 | <td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td> |
| 794 | <td>the node object</td> |
| 795 | </tr> |
| 796 | <tr> |
| 797 | <td><p><span class="term"><em class="parameter"><code>len_p</code></em> :</span></p></td> |
| 798 | <td>pointer to location to store the string length (or NULL)</td> |
| 799 | </tr> |
| 800 | <tr> |
| 801 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 802 | <td>the UTF-8 encoded literal string or NULL if node is not a literal</td> |
| 803 | </tr> |
| 804 | </tbody> |
| 805 | </table></div> |
| 806 | </div> |
| 807 | <hr> |
| 808 | <div class="refsect2"> |
| 809 | <a name="librdf-node-get-literal-value-as-latin1"></a><h3>librdf_node_get_literal_value_as_latin1 ()</h3> |
| 810 | <pre class="programlisting"><span class="returnvalue">char</span> * librdf_node_get_literal_value_as_latin1 |
| 811 | (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>);</pre> |
| 812 | <p> |
| 813 | Get the string literal value of the node as ISO Latin-1. |
| 814 | </p> |
| 815 | <p> |
| 816 | Returns a newly allocated string containing the conversion of the |
| 817 | node literal value held by the node into ISO Latin-1. Discards |
| 818 | characters outside the U+0000 to U+00FF range (inclusive). |
| 819 | </p> |
| 820 | <div class="variablelist"><table border="0"> |
| 821 | <col align="left" valign="top"> |
| 822 | <tbody> |
| 823 | <tr> |
| 824 | <td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td> |
| 825 | <td>the node object</td> |
| 826 | </tr> |
| 827 | <tr> |
| 828 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 829 | <td>the Latin-1 literal string or NULL if node is not a literal</td> |
| 830 | </tr> |
| 831 | </tbody> |
| 832 | </table></div> |
| 833 | </div> |
| 834 | <hr> |
| 835 | <div class="refsect2"> |
| 836 | <a name="librdf-node-get-literal-value-datatype-uri"></a><h3>librdf_node_get_literal_value_datatype_uri ()</h3> |
| 837 | <pre class="programlisting"><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="returnvalue">librdf_uri</span></a> * librdf_node_get_literal_value_datatype_uri |
| 838 | (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>);</pre> |
| 839 | <p> |
| 840 | Get the typed literal datatype URI of the literal node. |
| 841 | </p> |
| 842 | <div class="variablelist"><table border="0"> |
| 843 | <col align="left" valign="top"> |
| 844 | <tbody> |
| 845 | <tr> |
| 846 | <td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td> |
| 847 | <td>the node object</td> |
| 848 | </tr> |
| 849 | <tr> |
| 850 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 851 | <td>shared URI of the datatyped literal or NULL if the node is not a literal, or has no datatype URI</td> |
| 852 | </tr> |
| 853 | </tbody> |
| 854 | </table></div> |
| 855 | </div> |
| 856 | <hr> |
| 857 | <div class="refsect2"> |
| 858 | <a name="librdf-node-get-literal-value-is-wf-xml"></a><h3>librdf_node_get_literal_value_is_wf_xml ()</h3> |
| 859 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_node_get_literal_value_is_wf_xml |
| 860 | (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>);</pre> |
| 861 | <p> |
| 862 | Get the XML well-formness property of the node. |
| 863 | </p> |
| 864 | <div class="variablelist"><table border="0"> |
| 865 | <col align="left" valign="top"> |
| 866 | <tbody> |
| 867 | <tr> |
| 868 | <td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td> |
| 869 | <td>the node object</td> |
| 870 | </tr> |
| 871 | <tr> |
| 872 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 873 | <td>0 if the XML literal is NOT well formed XML content, or the node is not a literal</td> |
| 874 | </tr> |
| 875 | </tbody> |
| 876 | </table></div> |
| 877 | </div> |
| 878 | <hr> |
| 879 | <div class="refsect2"> |
| 880 | <a name="librdf-node-get-literal-value-language"></a><h3>librdf_node_get_literal_value_language ()</h3> |
| 881 | <pre class="programlisting"><span class="returnvalue">char</span> * librdf_node_get_literal_value_language |
| 882 | (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>);</pre> |
| 883 | <p> |
| 884 | Get the XML language of the node. |
| 885 | </p> |
| 886 | <p> |
| 887 | Returns a pointer to the literal language value held by the node, |
| 888 | it must be copied if it is wanted to be used by the caller. |
| 889 | Language strings are ASCII, not UTF-8 encoded Unicode. |
| 890 | </p> |
| 891 | <div class="variablelist"><table border="0"> |
| 892 | <col align="left" valign="top"> |
| 893 | <tbody> |
| 894 | <tr> |
| 895 | <td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td> |
| 896 | <td>the node object</td> |
| 897 | </tr> |
| 898 | <tr> |
| 899 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 900 | <td>the XML language string or NULL if node is not a literal |
| 901 | or there is no XML language defined.</td> |
| 902 | </tr> |
| 903 | </tbody> |
| 904 | </table></div> |
| 905 | </div> |
| 906 | <hr> |
| 907 | <div class="refsect2"> |
| 908 | <a name="librdf-node-get-type"></a><h3>librdf_node_get_type ()</h3> |
| 909 | <pre class="programlisting"><a class="link" href="redland-node.html#librdf-node-type" title="enum librdf_node_type"><span class="returnvalue">librdf_node_type</span></a> librdf_node_get_type (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>);</pre> |
| 910 | <p> |
| 911 | Get the type of the node. |
| 912 | </p> |
| 913 | <p> |
| 914 | See also <a class="link" href="redland-node.html#librdf-node-is-resource" title="librdf_node_is_resource ()"><code class="function">librdf_node_is_resource()</code></a>, <a class="link" href="redland-node.html#librdf-node-is-literal" title="librdf_node_is_literal ()"><code class="function">librdf_node_is_literal()</code></a> and |
| 915 | <a class="link" href="redland-node.html#librdf-node-is-blank" title="librdf_node_is_blank ()"><code class="function">librdf_node_is_blank()</code></a> for testing individual types. |
| 916 | </p> |
| 917 | <div class="variablelist"><table border="0"> |
| 918 | <col align="left" valign="top"> |
| 919 | <tbody> |
| 920 | <tr> |
| 921 | <td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td> |
| 922 | <td>the node object</td> |
| 923 | </tr> |
| 924 | <tr> |
| 925 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 926 | <td>the node type</td> |
| 927 | </tr> |
| 928 | </tbody> |
| 929 | </table></div> |
| 930 | </div> |
| 931 | <hr> |
| 932 | <div class="refsect2"> |
| 933 | <a name="librdf-node-get-uri"></a><h3>librdf_node_get_uri ()</h3> |
| 934 | <pre class="programlisting"><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="returnvalue">librdf_uri</span></a> * librdf_node_get_uri (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>);</pre> |
| 935 | <p> |
| 936 | Get the URI for a node object. |
| 937 | </p> |
| 938 | <p> |
| 939 | Returns a pointer to the URI object held by the node, it must be |
| 940 | copied if it is wanted to be used by the caller. |
| 941 | </p> |
| 942 | <div class="variablelist"><table border="0"> |
| 943 | <col align="left" valign="top"> |
| 944 | <tbody> |
| 945 | <tr> |
| 946 | <td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td> |
| 947 | <td>the node object</td> |
| 948 | </tr> |
| 949 | <tr> |
| 950 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 951 | <td>URI object or NULL if node has no URI.</td> |
| 952 | </tr> |
| 953 | </tbody> |
| 954 | </table></div> |
| 955 | </div> |
| 956 | <hr> |
| 957 | <div class="refsect2"> |
| 958 | <a name="librdf-node-is-blank"></a><h3>librdf_node_is_blank ()</h3> |
| 959 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_node_is_blank (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>);</pre> |
| 960 | <p> |
| 961 | Check node is a blank nodeID. |
| 962 | </p> |
| 963 | <div class="variablelist"><table border="0"> |
| 964 | <col align="left" valign="top"> |
| 965 | <tbody> |
| 966 | <tr> |
| 967 | <td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td> |
| 968 | <td>the node object</td> |
| 969 | </tr> |
| 970 | <tr> |
| 971 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 972 | <td>non-zero if the node is a blank nodeID</td> |
| 973 | </tr> |
| 974 | </tbody> |
| 975 | </table></div> |
| 976 | </div> |
| 977 | <hr> |
| 978 | <div class="refsect2"> |
| 979 | <a name="librdf-node-is-literal"></a><h3>librdf_node_is_literal ()</h3> |
| 980 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_node_is_literal (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>);</pre> |
| 981 | <p> |
| 982 | Check node is a literal. |
| 983 | </p> |
| 984 | <div class="variablelist"><table border="0"> |
| 985 | <col align="left" valign="top"> |
| 986 | <tbody> |
| 987 | <tr> |
| 988 | <td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td> |
| 989 | <td>the node object</td> |
| 990 | </tr> |
| 991 | <tr> |
| 992 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 993 | <td>non-zero if the node is a literal</td> |
| 994 | </tr> |
| 995 | </tbody> |
| 996 | </table></div> |
| 997 | </div> |
| 998 | <hr> |
| 999 | <div class="refsect2"> |
| 1000 | <a name="librdf-node-is-resource"></a><h3>librdf_node_is_resource ()</h3> |
| 1001 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_node_is_resource (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>);</pre> |
| 1002 | <p> |
| 1003 | Check node is a resource. |
| 1004 | </p> |
| 1005 | <div class="variablelist"><table border="0"> |
| 1006 | <col align="left" valign="top"> |
| 1007 | <tbody> |
| 1008 | <tr> |
| 1009 | <td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td> |
| 1010 | <td>the node object</td> |
| 1011 | </tr> |
| 1012 | <tr> |
| 1013 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1014 | <td>non-zero if the node is a resource (URI)</td> |
| 1015 | </tr> |
| 1016 | </tbody> |
| 1017 | </table></div> |
| 1018 | </div> |
| 1019 | <hr> |
| 1020 | <div class="refsect2"> |
| 1021 | <a name="librdf-node-new-static-node-iterator"></a><h3>librdf_node_new_static_node_iterator ()</h3> |
| 1022 | <pre class="programlisting"><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="returnvalue">librdf_iterator</span></a> * librdf_node_new_static_node_iterator |
| 1023 | (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 1024 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> **nodes</code></em>, |
| 1025 | <em class="parameter"><code><span class="type">int</span> size</code></em>);</pre> |
| 1026 | <p> |
| 1027 | Create an iterator over an array of nodes. |
| 1028 | </p> |
| 1029 | <p> |
| 1030 | This creates an iterator for an existing static array of librdf_node |
| 1031 | objects. It is mostly intended for testing iterator code. |
| 1032 | </p> |
| 1033 | <div class="variablelist"><table border="0"> |
| 1034 | <col align="left" valign="top"> |
| 1035 | <tbody> |
| 1036 | <tr> |
| 1037 | <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td> |
| 1038 | <td>world object</td> |
| 1039 | </tr> |
| 1040 | <tr> |
| 1041 | <td><p><span class="term"><em class="parameter"><code>nodes</code></em> :</span></p></td> |
| 1042 | <td>static array of <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> objects</td> |
| 1043 | </tr> |
| 1044 | <tr> |
| 1045 | <td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td> |
| 1046 | <td>size of array</td> |
| 1047 | </tr> |
| 1048 | <tr> |
| 1049 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1050 | <td>a <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> serialization of the nodes or NULL on failure</td> |
| 1051 | </tr> |
| 1052 | </tbody> |
| 1053 | </table></div> |
| 1054 | </div> |
| 1055 | <hr> |
| 1056 | <div class="refsect2"> |
| 1057 | <a name="librdf-node-print"></a><h3>librdf_node_print ()</h3> |
| 1058 | <pre class="programlisting"><span class="returnvalue">void</span> librdf_node_print (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>, |
| 1059 | <em class="parameter"><code><span class="type">FILE</span> *fh</code></em>);</pre> |
| 1060 | <p> |
| 1061 | Pretty print the node to a file descriptor. |
| 1062 | </p> |
| 1063 | <p> |
| 1064 | This method is for debugging and the format of the output should |
| 1065 | not be relied on. |
| 1066 | </p> |
| 1067 | <div class="variablelist"><table border="0"> |
| 1068 | <col align="left" valign="top"> |
| 1069 | <tbody> |
| 1070 | <tr> |
| 1071 | <td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td> |
| 1072 | <td>the node</td> |
| 1073 | </tr> |
| 1074 | <tr> |
| 1075 | <td><p><span class="term"><em class="parameter"><code>fh</code></em> :</span></p></td> |
| 1076 | <td>file handle</td> |
| 1077 | </tr> |
| 1078 | </tbody> |
| 1079 | </table></div> |
| 1080 | </div> |
| 1081 | <hr> |
| 1082 | <div class="refsect2"> |
| 1083 | <a name="librdf-node-static-iterator-create"></a><h3>librdf_node_static_iterator_create ()</h3> |
| 1084 | <pre class="programlisting"><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="returnvalue">librdf_iterator</span></a> * librdf_node_static_iterator_create (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> **nodes</code></em>, |
| 1085 | <em class="parameter"><code><span class="type">int</span> size</code></em>);</pre> |
| 1086 | <p> |
| 1087 | Create an iterator over an array of nodes (ALWAYS FAILS) |
| 1088 | </p> |
| 1089 | <p> |
| 1090 | This legacy method used to create an iterator for an existing |
| 1091 | static array of librdf_node objects. It was intended for testing |
| 1092 | iterator code. |
| 1093 | </p> |
| 1094 | <p> |
| 1095 | <em class="parameter"><code>deprecated</code></em>: always returns NULL. Use |
| 1096 | <a class="link" href="redland-node.html#librdf-node-new-static-node-iterator" title="librdf_node_new_static_node_iterator ()"><code class="function">librdf_node_new_static_node_iterator()</code></a> |
| 1097 | </p> |
| 1098 | <div class="variablelist"><table border="0"> |
| 1099 | <col align="left" valign="top"> |
| 1100 | <tbody> |
| 1101 | <tr> |
| 1102 | <td><p><span class="term"><em class="parameter"><code>nodes</code></em> :</span></p></td> |
| 1103 | <td>static array of <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> objects</td> |
| 1104 | </tr> |
| 1105 | <tr> |
| 1106 | <td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td> |
| 1107 | <td>size of array</td> |
| 1108 | </tr> |
| 1109 | <tr> |
| 1110 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1111 | <td>NULL</td> |
| 1112 | </tr> |
| 1113 | </tbody> |
| 1114 | </table></div> |
| 1115 | </div> |
| 1116 | <hr> |
| 1117 | <div class="refsect2"> |
| 1118 | <a name="librdf-node-to-counted-string"></a><h3>librdf_node_to_counted_string ()</h3> |
| 1119 | <pre class="programlisting">unsigned <span class="returnvalue">char</span> * librdf_node_to_counted_string (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>, |
| 1120 | <em class="parameter"><code><span class="type">size_t</span> *len_p</code></em>);</pre> |
| 1121 | <p> |
| 1122 | Format the node as a counted string in a debugging format. |
| 1123 | </p> |
| 1124 | <p> |
| 1125 | Note a new string is allocated which must be freed by the caller. |
| 1126 | </p> |
| 1127 | <p> |
| 1128 | <em class="parameter"><code>Deprecated</code></em>: Use <a class="link" href="redland-node.html#librdf-node-write" title="librdf_node_write ()"><code class="function">librdf_node_write()</code></a> to write to <span class="type">raptor_iostream</span> |
| 1129 | which can be made to write to a string. Use a <a class="link" href="redland-serializer.html#librdf-serializer" title="librdf_serializer"><span class="type">librdf_serializer</span></a> |
| 1130 | to write proper syntax formats. |
| 1131 | </p> |
| 1132 | <div class="variablelist"><table border="0"> |
| 1133 | <col align="left" valign="top"> |
| 1134 | <tbody> |
| 1135 | <tr> |
| 1136 | <td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td> |
| 1137 | <td>the node object</td> |
| 1138 | </tr> |
| 1139 | <tr> |
| 1140 | <td><p><span class="term"><em class="parameter"><code>len_p</code></em> :</span></p></td> |
| 1141 | <td>pointer to location to store length</td> |
| 1142 | </tr> |
| 1143 | <tr> |
| 1144 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1145 | <td>a string value representing the node or NULL on failure</td> |
| 1146 | </tr> |
| 1147 | </tbody> |
| 1148 | </table></div> |
| 1149 | </div> |
| 1150 | <hr> |
| 1151 | <div class="refsect2"> |
| 1152 | <a name="librdf-node-to-string"></a><h3>librdf_node_to_string ()</h3> |
| 1153 | <pre class="programlisting">unsigned <span class="returnvalue">char</span> * librdf_node_to_string (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>);</pre> |
| 1154 | <p> |
| 1155 | Format the node as a string in a debugging format. |
| 1156 | </p> |
| 1157 | <p> |
| 1158 | Note a new string is allocated which must be freed by the caller. |
| 1159 | </p> |
| 1160 | <p> |
| 1161 | <em class="parameter"><code>Deprecated</code></em>: Use <a class="link" href="redland-node.html#librdf-node-write" title="librdf_node_write ()"><code class="function">librdf_node_write()</code></a> to write to <span class="type">raptor_iostream</span> |
| 1162 | which can be made to write to a string. Use a <a class="link" href="redland-serializer.html#librdf-serializer" title="librdf_serializer"><span class="type">librdf_serializer</span></a> |
| 1163 | to write proper syntax formats. |
| 1164 | </p> |
| 1165 | <div class="variablelist"><table border="0"> |
| 1166 | <col align="left" valign="top"> |
| 1167 | <tbody> |
| 1168 | <tr> |
| 1169 | <td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td> |
| 1170 | <td>the node object</td> |
| 1171 | </tr> |
| 1172 | <tr> |
| 1173 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1174 | <td>a string value representing the node or NULL on failure</td> |
| 1175 | </tr> |
| 1176 | </tbody> |
| 1177 | </table></div> |
| 1178 | </div> |
| 1179 | <hr> |
| 1180 | <div class="refsect2"> |
| 1181 | <a name="librdf-node-type"></a><h3>enum librdf_node_type</h3> |
| 1182 | <pre class="programlisting">typedef enum { |
| 1183 | LIBRDF_NODE_TYPE_UNKNOWN = RAPTOR_TERM_TYPE_UNKNOWN, |
| 1184 | LIBRDF_NODE_TYPE_RESOURCE = RAPTOR_TERM_TYPE_URI, |
| 1185 | LIBRDF_NODE_TYPE_LITERAL = RAPTOR_TERM_TYPE_LITERAL, |
| 1186 | LIBRDF_NODE_TYPE_BLANK = RAPTOR_TERM_TYPE_BLANK, |
| 1187 | LIBRDF_NODE_TYPE_LAST = LIBRDF_NODE_TYPE_BLANK |
| 1188 | } librdf_node_type; |
| 1189 | </pre> |
| 1190 | <p> |
| 1191 | Type of a redland node. |
| 1192 | </p> |
| 1193 | <p> |
| 1194 | Better to check this with functions <a class="link" href="redland-node.html#librdf-node-is-resource" title="librdf_node_is_resource ()"><code class="function">librdf_node_is_resource()</code></a>, |
| 1195 | <a class="link" href="redland-node.html#librdf-node-is-literal" title="librdf_node_is_literal ()"><code class="function">librdf_node_is_literal()</code></a> or <a class="link" href="redland-node.html#librdf-node-is-blank" title="librdf_node_is_blank ()"><code class="function">librdf_node_is_blank()</code></a>. |
| 1196 | </p> |
| 1197 | <div class="variablelist"><table border="0"> |
| 1198 | <col align="left" valign="top"> |
| 1199 | <tbody> |
| 1200 | <tr> |
| 1201 | <td><p><a name="LIBRDF-NODE-TYPE-UNKNOWN:CAPS"></a><span class="term"><code class="literal">LIBRDF_NODE_TYPE_UNKNOWN</code></span></p></td> |
| 1202 | <td>Internal |
| 1203 | </td> |
| 1204 | </tr> |
| 1205 | <tr> |
| 1206 | <td><p><a name="LIBRDF-NODE-TYPE-RESOURCE:CAPS"></a><span class="term"><code class="literal">LIBRDF_NODE_TYPE_RESOURCE</code></span></p></td> |
| 1207 | <td>rdf:Resource (& rdf:Property) - has a URI |
| 1208 | </td> |
| 1209 | </tr> |
| 1210 | <tr> |
| 1211 | <td><p><a name="LIBRDF-NODE-TYPE-LITERAL:CAPS"></a><span class="term"><code class="literal">LIBRDF_NODE_TYPE_LITERAL</code></span></p></td> |
| 1212 | <td>rdf:Literal - has an XML string, language, |
| 1213 | XML space |
| 1214 | </td> |
| 1215 | </tr> |
| 1216 | <tr> |
| 1217 | <td><p><a name="LIBRDF-NODE-TYPE-BLANK:CAPS"></a><span class="term"><code class="literal">LIBRDF_NODE_TYPE_BLANK</code></span></p></td> |
| 1218 | <td>blank node has an identifier string. |
| 1219 | </td> |
| 1220 | </tr> |
| 1221 | <tr> |
| 1222 | <td><p><a name="LIBRDF-NODE-TYPE-LAST:CAPS"></a><span class="term"><code class="literal">LIBRDF_NODE_TYPE_LAST</code></span></p></td> |
| 1223 | <td>Internal |
| 1224 | </td> |
| 1225 | </tr> |
| 1226 | </tbody> |
| 1227 | </table></div> |
| 1228 | </div> |
| 1229 | <hr> |
| 1230 | <div class="refsect2"> |
| 1231 | <a name="librdf-node-write"></a><h3>librdf_node_write ()</h3> |
| 1232 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_node_write (<em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>, |
| 1233 | <em class="parameter"><code><span class="type">raptor_iostream</span> *iostr</code></em>);</pre> |
| 1234 | <p> |
| 1235 | Write the node to an iostream in N-Triples format. |
| 1236 | </p> |
| 1237 | <p> |
| 1238 | This method can be used to write a node in a relatively |
| 1239 | readable format. To write more compact formats use a |
| 1240 | serializer to pick a syntax and serialize triples to it. |
| 1241 | </p> |
| 1242 | <div class="variablelist"><table border="0"> |
| 1243 | <col align="left" valign="top"> |
| 1244 | <tbody> |
| 1245 | <tr> |
| 1246 | <td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td> |
| 1247 | <td>the node</td> |
| 1248 | </tr> |
| 1249 | <tr> |
| 1250 | <td><p><span class="term"><em class="parameter"><code>iostr</code></em> :</span></p></td> |
| 1251 | <td>iostream to write to</td> |
| 1252 | </tr> |
| 1253 | <tr> |
| 1254 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1255 | <td>non-0 on failure</td> |
| 1256 | </tr> |
| 1257 | </tbody> |
| 1258 | </table></div> |
| 1259 | </div> |
| 1260 | </div> |
| 1261 | </div> |
| 1262 | <div class="footer"> |
| 1263 | <hr> |
| 1264 | Generated by GTK-Doc V1.18</div> |
| 1265 | </body> |
| 1266 | </html> |