| 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>URI</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-unicode.html" title="Unicode"> |
| 10 | <link rel="next" href="redland-changes.html" title="API Changes"> |
| 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-unicode.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-changes.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-uri.synopsis" class="shortcut">Top</a> |
| 25 | | |
| 26 | <a href="#redland-uri.description" class="shortcut">Description</a> |
| 27 | </td></tr> |
| 28 | </table> |
| 29 | <div class="refentry"> |
| 30 | <a name="redland-uri"></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-uri.top_of_page"></a>URI</span></h2> |
| 34 | <p>URI — URI class</p> |
| 35 | </td> |
| 36 | <td valign="top" align="right"></td> |
| 37 | </tr></table></div> |
| 38 | <div class="refsynopsisdiv"> |
| 39 | <a name="redland-uri.synopsis"></a><h2>Synopsis</h2> |
| 40 | <pre class="synopsis">typedef <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri">librdf_uri</a>; |
| 41 | <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="returnvalue">librdf_uri</span></a> * <a class="link" href="redland-uri.html#librdf-new-uri" title="librdf_new_uri ()">librdf_new_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>, |
| 42 | <em class="parameter"><code>const unsigned <span class="type">char</span> *uri_string</code></em>); |
| 43 | <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="returnvalue">librdf_uri</span></a> * <a class="link" href="redland-uri.html#librdf-new-uri2" title="librdf_new_uri2 ()">librdf_new_uri2</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>, |
| 44 | <em class="parameter"><code>const unsigned <span class="type">char</span> *uri_string</code></em>, |
| 45 | <em class="parameter"><code><span class="type">size_t</span> length</code></em>); |
| 46 | <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="returnvalue">librdf_uri</span></a> * <a class="link" href="redland-uri.html#librdf-new-uri-from-uri" title="librdf_new_uri_from_uri ()">librdf_new_uri_from_uri</a> (<em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *old_uri</code></em>); |
| 47 | <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="returnvalue">librdf_uri</span></a> * <a class="link" href="redland-uri.html#librdf-new-uri-from-uri-local-name" title="librdf_new_uri_from_uri_local_name ()">librdf_new_uri_from_uri_local_name</a> (<em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *old_uri</code></em>, |
| 48 | <em class="parameter"><code>const unsigned <span class="type">char</span> *local_name</code></em>); |
| 49 | <span class="returnvalue">void</span> <a class="link" href="redland-uri.html#librdf-free-uri" title="librdf_free_uri ()">librdf_free_uri</a> (<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>); |
| 50 | unsigned <span class="returnvalue">char</span> * <a class="link" href="redland-uri.html#librdf-uri-as-string" title="librdf_uri_as_string ()">librdf_uri_as_string</a> (<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>); |
| 51 | unsigned <span class="returnvalue">char</span> * <a class="link" href="redland-uri.html#librdf-uri-as-counted-string" title="librdf_uri_as_counted_string ()">librdf_uri_as_counted_string</a> (<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>, |
| 52 | <em class="parameter"><code><span class="type">size_t</span> *len_p</code></em>); |
| 53 | <span class="returnvalue">void</span> <a class="link" href="redland-uri.html#librdf-uri-print" title="librdf_uri_print ()">librdf_uri_print</a> (<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>, |
| 54 | <em class="parameter"><code><span class="type">FILE</span> *fh</code></em>); |
| 55 | unsigned <span class="returnvalue">char</span> * <a class="link" href="redland-uri.html#librdf-uri-to-string" title="librdf_uri_to_string ()">librdf_uri_to_string</a> (<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>); |
| 56 | unsigned <span class="returnvalue">char</span> * <a class="link" href="redland-uri.html#librdf-uri-to-counted-string" title="librdf_uri_to_counted_string ()">librdf_uri_to_counted_string</a> (<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>, |
| 57 | <em class="parameter"><code><span class="type">size_t</span> *len_p</code></em>); |
| 58 | <span class="returnvalue">int</span> <a class="link" href="redland-uri.html#librdf-uri-equals" title="librdf_uri_equals ()">librdf_uri_equals</a> (<em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *first_uri</code></em>, |
| 59 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *second_uri</code></em>); |
| 60 | <span class="returnvalue">int</span> <a class="link" href="redland-uri.html#librdf-uri-is-file-uri" title="librdf_uri_is_file_uri ()">librdf_uri_is_file_uri</a> (<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>); |
| 61 | const <span class="returnvalue">char</span> * <a class="link" href="redland-uri.html#librdf-uri-to-filename" title="librdf_uri_to_filename ()">librdf_uri_to_filename</a> (<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>); |
| 62 | <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="returnvalue">librdf_uri</span></a> * <a class="link" href="redland-uri.html#librdf-new-uri-normalised-to-base" title="librdf_new_uri_normalised_to_base ()">librdf_new_uri_normalised_to_base</a> (<em class="parameter"><code>const unsigned <span class="type">char</span> *uri_string</code></em>, |
| 63 | <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>, |
| 64 | <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>); |
| 65 | <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="returnvalue">librdf_uri</span></a> * <a class="link" href="redland-uri.html#librdf-new-uri-relative-to-base" title="librdf_new_uri_relative_to_base ()">librdf_new_uri_relative_to_base</a> (<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>, |
| 66 | <em class="parameter"><code>const unsigned <span class="type">char</span> *uri_string</code></em>); |
| 67 | <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="returnvalue">librdf_uri</span></a> * <a class="link" href="redland-uri.html#librdf-new-uri-from-filename" title="librdf_new_uri_from_filename ()">librdf_new_uri_from_filename</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>, |
| 68 | <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>); |
| 69 | <span class="returnvalue">int</span> <a class="link" href="redland-uri.html#librdf-uri-compare" title="librdf_uri_compare ()">librdf_uri_compare</a> (<em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *uri1</code></em>, |
| 70 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *uri2</code></em>); |
| 71 | <span class="returnvalue">int</span> (<a class="link" href="redland-uri.html#librdf-uri-filter-func" title="librdf_uri_filter_func ()">*librdf_uri_filter_func</a>) (<em class="parameter"><code><span class="type">void</span> *user_data</code></em>, |
| 72 | <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>); |
| 73 | </pre> |
| 74 | </div> |
| 75 | <div class="refsect1"> |
| 76 | <a name="redland-uri.description"></a><h2>Description</h2> |
| 77 | <p> |
| 78 | A class for absolute URIs and relative URI computation utility |
| 79 | functions. Only absolute URIs are provided, with no current access |
| 80 | to internals of URIs such as URI scheme, path, authority. Relative |
| 81 | URIs can be generated against some base or turned to and from local |
| 82 | filenames. |
| 83 | </p> |
| 84 | </div> |
| 85 | <div class="refsect1"> |
| 86 | <a name="redland-uri.details"></a><h2>Details</h2> |
| 87 | <div class="refsect2"> |
| 88 | <a name="librdf-uri"></a><h3>librdf_uri</h3> |
| 89 | <pre class="programlisting">typedef struct raptor_uri_s librdf_uri; |
| 90 | </pre> |
| 91 | <p> |
| 92 | Redland URI class. |
| 93 | </p> |
| 94 | </div> |
| 95 | <hr> |
| 96 | <div class="refsect2"> |
| 97 | <a name="librdf-new-uri"></a><h3>librdf_new_uri ()</h3> |
| 98 | <pre class="programlisting"><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="returnvalue">librdf_uri</span></a> * librdf_new_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>, |
| 99 | <em class="parameter"><code>const unsigned <span class="type">char</span> *uri_string</code></em>);</pre> |
| 100 | <p> |
| 101 | Constructor - create a new <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> object from a URI string. |
| 102 | </p> |
| 103 | <p> |
| 104 | A new URI is constructed from a copy of the string. If the |
| 105 | string is a NULL pointer or empty (0 length) then the result is NULL. |
| 106 | </p> |
| 107 | <div class="variablelist"><table border="0"> |
| 108 | <col align="left" valign="top"> |
| 109 | <tbody> |
| 110 | <tr> |
| 111 | <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td> |
| 112 | <td>redland world object</td> |
| 113 | </tr> |
| 114 | <tr> |
| 115 | <td><p><span class="term"><em class="parameter"><code>uri_string</code></em> :</span></p></td> |
| 116 | <td>URI in string form</td> |
| 117 | </tr> |
| 118 | <tr> |
| 119 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 120 | <td>a new <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> object or NULL on failure</td> |
| 121 | </tr> |
| 122 | </tbody> |
| 123 | </table></div> |
| 124 | </div> |
| 125 | <hr> |
| 126 | <div class="refsect2"> |
| 127 | <a name="librdf-new-uri2"></a><h3>librdf_new_uri2 ()</h3> |
| 128 | <pre class="programlisting"><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="returnvalue">librdf_uri</span></a> * librdf_new_uri2 (<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>, |
| 129 | <em class="parameter"><code>const unsigned <span class="type">char</span> *uri_string</code></em>, |
| 130 | <em class="parameter"><code><span class="type">size_t</span> length</code></em>);</pre> |
| 131 | <p> |
| 132 | Constructor - create a new <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> object from a counted URI string. |
| 133 | </p> |
| 134 | <p> |
| 135 | A new URI is constructed from a copy of the string. If the string |
| 136 | is a NULL pointer or 0 length or empty (first byte is 0) then the |
| 137 | result is NULL. |
| 138 | </p> |
| 139 | <div class="variablelist"><table border="0"> |
| 140 | <col align="left" valign="top"> |
| 141 | <tbody> |
| 142 | <tr> |
| 143 | <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td> |
| 144 | <td>redland world object</td> |
| 145 | </tr> |
| 146 | <tr> |
| 147 | <td><p><span class="term"><em class="parameter"><code>uri_string</code></em> :</span></p></td> |
| 148 | <td>URI in string form</td> |
| 149 | </tr> |
| 150 | <tr> |
| 151 | <td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td> |
| 152 | <td>length of string</td> |
| 153 | </tr> |
| 154 | <tr> |
| 155 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 156 | <td>a new <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> object or NULL on failure</td> |
| 157 | </tr> |
| 158 | </tbody> |
| 159 | </table></div> |
| 160 | </div> |
| 161 | <hr> |
| 162 | <div class="refsect2"> |
| 163 | <a name="librdf-new-uri-from-uri"></a><h3>librdf_new_uri_from_uri ()</h3> |
| 164 | <pre class="programlisting"><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="returnvalue">librdf_uri</span></a> * librdf_new_uri_from_uri (<em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *old_uri</code></em>);</pre> |
| 165 | <p> |
| 166 | Copy constructor - create a new librdf_uri object from an existing librdf_uri object. |
| 167 | </p> |
| 168 | <div class="variablelist"><table border="0"> |
| 169 | <col align="left" valign="top"> |
| 170 | <tbody> |
| 171 | <tr> |
| 172 | <td><p><span class="term"><em class="parameter"><code>old_uri</code></em> :</span></p></td> |
| 173 | <td> |
| 174 | <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> object</td> |
| 175 | </tr> |
| 176 | <tr> |
| 177 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 178 | <td>a new <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> object or NULL on failure</td> |
| 179 | </tr> |
| 180 | </tbody> |
| 181 | </table></div> |
| 182 | </div> |
| 183 | <hr> |
| 184 | <div class="refsect2"> |
| 185 | <a name="librdf-new-uri-from-uri-local-name"></a><h3>librdf_new_uri_from_uri_local_name ()</h3> |
| 186 | <pre class="programlisting"><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="returnvalue">librdf_uri</span></a> * librdf_new_uri_from_uri_local_name (<em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *old_uri</code></em>, |
| 187 | <em class="parameter"><code>const unsigned <span class="type">char</span> *local_name</code></em>);</pre> |
| 188 | <p> |
| 189 | Copy constructor - create a new librdf_uri object from an existing librdf_uri object and a local name. |
| 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>old_uri</code></em> :</span></p></td> |
| 196 | <td> |
| 197 | <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> object</td> |
| 198 | </tr> |
| 199 | <tr> |
| 200 | <td><p><span class="term"><em class="parameter"><code>local_name</code></em> :</span></p></td> |
| 201 | <td>local name to append to URI</td> |
| 202 | </tr> |
| 203 | <tr> |
| 204 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 205 | <td>a new <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> object or NULL on failure</td> |
| 206 | </tr> |
| 207 | </tbody> |
| 208 | </table></div> |
| 209 | </div> |
| 210 | <hr> |
| 211 | <div class="refsect2"> |
| 212 | <a name="librdf-free-uri"></a><h3>librdf_free_uri ()</h3> |
| 213 | <pre class="programlisting"><span class="returnvalue">void</span> librdf_free_uri (<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> |
| 214 | <p> |
| 215 | Destructor - destroy a <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> object. |
| 216 | </p> |
| 217 | <div class="variablelist"><table border="0"> |
| 218 | <col align="left" valign="top"> |
| 219 | <tbody><tr> |
| 220 | <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td> |
| 221 | <td> |
| 222 | <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> object</td> |
| 223 | </tr></tbody> |
| 224 | </table></div> |
| 225 | </div> |
| 226 | <hr> |
| 227 | <div class="refsect2"> |
| 228 | <a name="librdf-uri-as-string"></a><h3>librdf_uri_as_string ()</h3> |
| 229 | <pre class="programlisting">unsigned <span class="returnvalue">char</span> * librdf_uri_as_string (<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> |
| 230 | <p> |
| 231 | Get a pointer to the string representation of the URI. |
| 232 | </p> |
| 233 | <p> |
| 234 | Returns a shared pointer to the URI string representation. |
| 235 | Note: does not allocate a new string so the caller must not free it. |
| 236 | </p> |
| 237 | <div class="variablelist"><table border="0"> |
| 238 | <col align="left" valign="top"> |
| 239 | <tbody> |
| 240 | <tr> |
| 241 | <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td> |
| 242 | <td> |
| 243 | <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> object</td> |
| 244 | </tr> |
| 245 | <tr> |
| 246 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 247 | <td>string representation of URI</td> |
| 248 | </tr> |
| 249 | </tbody> |
| 250 | </table></div> |
| 251 | </div> |
| 252 | <hr> |
| 253 | <div class="refsect2"> |
| 254 | <a name="librdf-uri-as-counted-string"></a><h3>librdf_uri_as_counted_string ()</h3> |
| 255 | <pre class="programlisting">unsigned <span class="returnvalue">char</span> * librdf_uri_as_counted_string (<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>, |
| 256 | <em class="parameter"><code><span class="type">size_t</span> *len_p</code></em>);</pre> |
| 257 | <p> |
| 258 | Get a pointer to the string representation of the URI with length. |
| 259 | </p> |
| 260 | <p> |
| 261 | Returns a shared pointer to the URI string representation. |
| 262 | Note: does not allocate a new string so the caller must not free it. |
| 263 | </p> |
| 264 | <div class="variablelist"><table border="0"> |
| 265 | <col align="left" valign="top"> |
| 266 | <tbody> |
| 267 | <tr> |
| 268 | <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td> |
| 269 | <td> |
| 270 | <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> object</td> |
| 271 | </tr> |
| 272 | <tr> |
| 273 | <td><p><span class="term"><em class="parameter"><code>len_p</code></em> :</span></p></td> |
| 274 | <td>pointer to location to store length</td> |
| 275 | </tr> |
| 276 | <tr> |
| 277 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 278 | <td>string representation of URI</td> |
| 279 | </tr> |
| 280 | </tbody> |
| 281 | </table></div> |
| 282 | </div> |
| 283 | <hr> |
| 284 | <div class="refsect2"> |
| 285 | <a name="librdf-uri-print"></a><h3>librdf_uri_print ()</h3> |
| 286 | <pre class="programlisting"><span class="returnvalue">void</span> librdf_uri_print (<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>, |
| 287 | <em class="parameter"><code><span class="type">FILE</span> *fh</code></em>);</pre> |
| 288 | <p> |
| 289 | Print the URI to the given file handle. |
| 290 | </p> |
| 291 | <div class="variablelist"><table border="0"> |
| 292 | <col align="left" valign="top"> |
| 293 | <tbody> |
| 294 | <tr> |
| 295 | <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td> |
| 296 | <td> |
| 297 | <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> object</td> |
| 298 | </tr> |
| 299 | <tr> |
| 300 | <td><p><span class="term"><em class="parameter"><code>fh</code></em> :</span></p></td> |
| 301 | <td>file handle</td> |
| 302 | </tr> |
| 303 | </tbody> |
| 304 | </table></div> |
| 305 | </div> |
| 306 | <hr> |
| 307 | <div class="refsect2"> |
| 308 | <a name="librdf-uri-to-string"></a><h3>librdf_uri_to_string ()</h3> |
| 309 | <pre class="programlisting">unsigned <span class="returnvalue">char</span> * librdf_uri_to_string (<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> |
| 310 | <p> |
| 311 | Format the URI as a string. |
| 312 | </p> |
| 313 | <p> |
| 314 | Note: this method allocates a new string since this is a _to_ method |
| 315 | and the caller must free the resulting memory. |
| 316 | </p> |
| 317 | <div class="variablelist"><table border="0"> |
| 318 | <col align="left" valign="top"> |
| 319 | <tbody> |
| 320 | <tr> |
| 321 | <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td> |
| 322 | <td> |
| 323 | <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> object</td> |
| 324 | </tr> |
| 325 | <tr> |
| 326 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 327 | <td>string representation of the URI or NULL on failure</td> |
| 328 | </tr> |
| 329 | </tbody> |
| 330 | </table></div> |
| 331 | </div> |
| 332 | <hr> |
| 333 | <div class="refsect2"> |
| 334 | <a name="librdf-uri-to-counted-string"></a><h3>librdf_uri_to_counted_string ()</h3> |
| 335 | <pre class="programlisting">unsigned <span class="returnvalue">char</span> * librdf_uri_to_counted_string (<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>, |
| 336 | <em class="parameter"><code><span class="type">size_t</span> *len_p</code></em>);</pre> |
| 337 | <p> |
| 338 | Format the URI as a counted string. |
| 339 | </p> |
| 340 | <p> |
| 341 | Note: this method allocates a new string since this is a _to_ method |
| 342 | and the caller must free the resulting memory. |
| 343 | </p> |
| 344 | <div class="variablelist"><table border="0"> |
| 345 | <col align="left" valign="top"> |
| 346 | <tbody> |
| 347 | <tr> |
| 348 | <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td> |
| 349 | <td> |
| 350 | <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> object</td> |
| 351 | </tr> |
| 352 | <tr> |
| 353 | <td><p><span class="term"><em class="parameter"><code>len_p</code></em> :</span></p></td> |
| 354 | <td>pointer to location to store length</td> |
| 355 | </tr> |
| 356 | <tr> |
| 357 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 358 | <td>string representation of the URI or NULL on failure</td> |
| 359 | </tr> |
| 360 | </tbody> |
| 361 | </table></div> |
| 362 | </div> |
| 363 | <hr> |
| 364 | <div class="refsect2"> |
| 365 | <a name="librdf-uri-equals"></a><h3>librdf_uri_equals ()</h3> |
| 366 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_uri_equals (<em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *first_uri</code></em>, |
| 367 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *second_uri</code></em>);</pre> |
| 368 | <p> |
| 369 | Compare two librdf_uri objects for equality. |
| 370 | </p> |
| 371 | <div class="variablelist"><table border="0"> |
| 372 | <col align="left" valign="top"> |
| 373 | <tbody> |
| 374 | <tr> |
| 375 | <td><p><span class="term"><em class="parameter"><code>first_uri</code></em> :</span></p></td> |
| 376 | <td> |
| 377 | <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> object 1</td> |
| 378 | </tr> |
| 379 | <tr> |
| 380 | <td><p><span class="term"><em class="parameter"><code>second_uri</code></em> :</span></p></td> |
| 381 | <td> |
| 382 | <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> object 2</td> |
| 383 | </tr> |
| 384 | <tr> |
| 385 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 386 | <td>non 0 if the objects are equal</td> |
| 387 | </tr> |
| 388 | </tbody> |
| 389 | </table></div> |
| 390 | </div> |
| 391 | <hr> |
| 392 | <div class="refsect2"> |
| 393 | <a name="librdf-uri-is-file-uri"></a><h3>librdf_uri_is_file_uri ()</h3> |
| 394 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_uri_is_file_uri (<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> |
| 395 | <p> |
| 396 | Test if a URI points to a filename. |
| 397 | </p> |
| 398 | <div class="variablelist"><table border="0"> |
| 399 | <col align="left" valign="top"> |
| 400 | <tbody> |
| 401 | <tr> |
| 402 | <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td> |
| 403 | <td> |
| 404 | <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> object</td> |
| 405 | </tr> |
| 406 | <tr> |
| 407 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 408 | <td>Non zero if the URI points to a file</td> |
| 409 | </tr> |
| 410 | </tbody> |
| 411 | </table></div> |
| 412 | </div> |
| 413 | <hr> |
| 414 | <div class="refsect2"> |
| 415 | <a name="librdf-uri-to-filename"></a><h3>librdf_uri_to_filename ()</h3> |
| 416 | <pre class="programlisting">const <span class="returnvalue">char</span> * librdf_uri_to_filename (<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> |
| 417 | <p> |
| 418 | Return pointer to filename of URI. |
| 419 | </p> |
| 420 | <p> |
| 421 | Returns a pointer to a newly allocated buffer that |
| 422 | the caller must free. This will fail if the URI |
| 423 | is not a file: URI. This can be checked with <a class="link" href="redland-uri.html#librdf-uri-is-file-uri" title="librdf_uri_is_file_uri ()"><span class="type">librdf_uri_is_file_uri</span></a> |
| 424 | </p> |
| 425 | <div class="variablelist"><table border="0"> |
| 426 | <col align="left" valign="top"> |
| 427 | <tbody> |
| 428 | <tr> |
| 429 | <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td> |
| 430 | <td> |
| 431 | <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> object</td> |
| 432 | </tr> |
| 433 | <tr> |
| 434 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 435 | <td>pointer to filename or NULL on failure</td> |
| 436 | </tr> |
| 437 | </tbody> |
| 438 | </table></div> |
| 439 | </div> |
| 440 | <hr> |
| 441 | <div class="refsect2"> |
| 442 | <a name="librdf-new-uri-normalised-to-base"></a><h3>librdf_new_uri_normalised_to_base ()</h3> |
| 443 | <pre class="programlisting"><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="returnvalue">librdf_uri</span></a> * librdf_new_uri_normalised_to_base (<em class="parameter"><code>const unsigned <span class="type">char</span> *uri_string</code></em>, |
| 444 | <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>, |
| 445 | <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> |
| 446 | <p> |
| 447 | Constructor - create a new <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> object from a URI string stripped of the source URI, made relative to the base URI. |
| 448 | </p> |
| 449 | <div class="variablelist"><table border="0"> |
| 450 | <col align="left" valign="top"> |
| 451 | <tbody> |
| 452 | <tr> |
| 453 | <td><p><span class="term"><em class="parameter"><code>uri_string</code></em> :</span></p></td> |
| 454 | <td>URI in string form</td> |
| 455 | </tr> |
| 456 | <tr> |
| 457 | <td><p><span class="term"><em class="parameter"><code>source_uri</code></em> :</span></p></td> |
| 458 | <td>source URI to remove</td> |
| 459 | </tr> |
| 460 | <tr> |
| 461 | <td><p><span class="term"><em class="parameter"><code>base_uri</code></em> :</span></p></td> |
| 462 | <td>base URI to add</td> |
| 463 | </tr> |
| 464 | <tr> |
| 465 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 466 | <td>a new <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> object or NULL on failure</td> |
| 467 | </tr> |
| 468 | </tbody> |
| 469 | </table></div> |
| 470 | </div> |
| 471 | <hr> |
| 472 | <div class="refsect2"> |
| 473 | <a name="librdf-new-uri-relative-to-base"></a><h3>librdf_new_uri_relative_to_base ()</h3> |
| 474 | <pre class="programlisting"><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="returnvalue">librdf_uri</span></a> * librdf_new_uri_relative_to_base (<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>, |
| 475 | <em class="parameter"><code>const unsigned <span class="type">char</span> *uri_string</code></em>);</pre> |
| 476 | <p> |
| 477 | Constructor - create a new <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> object from a URI string relative to a base URI. |
| 478 | </p> |
| 479 | <p> |
| 480 | An empty uri_string or NULL is equivalent to |
| 481 | librdf_new_uri_from_uri(base_uri) |
| 482 | </p> |
| 483 | <div class="variablelist"><table border="0"> |
| 484 | <col align="left" valign="top"> |
| 485 | <tbody> |
| 486 | <tr> |
| 487 | <td><p><span class="term"><em class="parameter"><code>base_uri</code></em> :</span></p></td> |
| 488 | <td>absolute base URI</td> |
| 489 | </tr> |
| 490 | <tr> |
| 491 | <td><p><span class="term"><em class="parameter"><code>uri_string</code></em> :</span></p></td> |
| 492 | <td>relative URI string</td> |
| 493 | </tr> |
| 494 | <tr> |
| 495 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 496 | <td>a new <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> object or NULL on failure</td> |
| 497 | </tr> |
| 498 | </tbody> |
| 499 | </table></div> |
| 500 | </div> |
| 501 | <hr> |
| 502 | <div class="refsect2"> |
| 503 | <a name="librdf-new-uri-from-filename"></a><h3>librdf_new_uri_from_filename ()</h3> |
| 504 | <pre class="programlisting"><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="returnvalue">librdf_uri</span></a> * librdf_new_uri_from_filename (<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>, |
| 505 | <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>);</pre> |
| 506 | <p> |
| 507 | Constructor - create a new <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> object from a filename. |
| 508 | </p> |
| 509 | <div class="variablelist"><table border="0"> |
| 510 | <col align="left" valign="top"> |
| 511 | <tbody> |
| 512 | <tr> |
| 513 | <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td> |
| 514 | <td>Redland <a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> object</td> |
| 515 | </tr> |
| 516 | <tr> |
| 517 | <td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td> |
| 518 | <td>filename</td> |
| 519 | </tr> |
| 520 | <tr> |
| 521 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 522 | <td>a new <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> object or NULL on failure</td> |
| 523 | </tr> |
| 524 | </tbody> |
| 525 | </table></div> |
| 526 | </div> |
| 527 | <hr> |
| 528 | <div class="refsect2"> |
| 529 | <a name="librdf-uri-compare"></a><h3>librdf_uri_compare ()</h3> |
| 530 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_uri_compare (<em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *uri1</code></em>, |
| 531 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *uri2</code></em>);</pre> |
| 532 | <p> |
| 533 | Compare two librdf_uri objects lexicographically. |
| 534 | </p> |
| 535 | <p> |
| 536 | A NULL URI is always less than (never equal to) a non-NULL URI. |
| 537 | </p> |
| 538 | <div class="variablelist"><table border="0"> |
| 539 | <col align="left" valign="top"> |
| 540 | <tbody> |
| 541 | <tr> |
| 542 | <td><p><span class="term"><em class="parameter"><code>uri1</code></em> :</span></p></td> |
| 543 | <td> |
| 544 | <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> object 1 or NULL</td> |
| 545 | </tr> |
| 546 | <tr> |
| 547 | <td><p><span class="term"><em class="parameter"><code>uri2</code></em> :</span></p></td> |
| 548 | <td> |
| 549 | <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> object 2 or NULL</td> |
| 550 | </tr> |
| 551 | <tr> |
| 552 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 553 | <td><0 if <em class="parameter"><code>uri1</code></em> is less than <em class="parameter"><code>uri2</code></em>, 0 if equal, >0 if <em class="parameter"><code>uri1</code></em> is greater than <em class="parameter"><code>uri2</code></em> |
| 554 | </td> |
| 555 | </tr> |
| 556 | </tbody> |
| 557 | </table></div> |
| 558 | </div> |
| 559 | <hr> |
| 560 | <div class="refsect2"> |
| 561 | <a name="librdf-uri-filter-func"></a><h3>librdf_uri_filter_func ()</h3> |
| 562 | <pre class="programlisting"><span class="returnvalue">int</span> (*librdf_uri_filter_func) (<em class="parameter"><code><span class="type">void</span> *user_data</code></em>, |
| 563 | <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> |
| 564 | <p> |
| 565 | Callback function for <a class="link" href="redland-parser.html#librdf-parser-set-uri-filter" title="librdf_parser_set_uri_filter ()"><code class="function">librdf_parser_set_uri_filter()</code></a> |
| 566 | </p> |
| 567 | <div class="variablelist"><table border="0"> |
| 568 | <col align="left" valign="top"> |
| 569 | <tbody> |
| 570 | <tr> |
| 571 | <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td> |
| 572 | <td>user data</td> |
| 573 | </tr> |
| 574 | <tr> |
| 575 | <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td> |
| 576 | <td> |
| 577 | <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> URI to check</td> |
| 578 | </tr> |
| 579 | <tr> |
| 580 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 581 | <td>non-0 to filter the URI</td> |
| 582 | </tr> |
| 583 | </tbody> |
| 584 | </table></div> |
| 585 | </div> |
| 586 | </div> |
| 587 | </div> |
| 588 | <div class="footer"> |
| 589 | <hr> |
| 590 | Generated by GTK-Doc V1.18</div> |
| 591 | </body> |
| 592 | </html> |