<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>URI</title> <meta name="generator" content="DocBook XSL Stylesheets V1.75.2"> <link rel="home" href="index.html" title="Raptor RDF Syntax Parsing and Serializing Library Manual"> <link rel="up" href="reference-manual.html" title="Part II. Raptor Reference Manual"> <link rel="prev" href="raptor-section-uri-factory.html" title="URI Factory"> <link rel="next" href="raptor-section-www.html" title="WWW"> <meta name="generator" content="GTK-Doc V1.13 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> <link rel="chapter" href="introduction.html" title="Raptor Overview"> <link rel="part" href="tutorial.html" title="Part I. Raptor Tutorial"> <link rel="chapter" href="tutorial-initialising-finishing.html" title="Initialising and Finishing using the Library"> <link rel="chapter" href="tutorial-querying-functionality.html" title="Listing built-in functionality"> <link rel="chapter" href="tutorial-parsing.html" title="Parsing syntaxes to RDF Triples"> <link rel="chapter" href="tutorial-serializing.html" title="Serializing RDF triples to a syntax"> <link rel="part" href="reference-manual.html" title="Part II. Raptor Reference Manual"> <link rel="chapter" href="raptor-parsers.html" title="Parsers in Raptor (syntax to triples)"> <link rel="chapter" href="raptor-serializers.html" title="Serializers in Raptor (triples to syntax)"> <link rel="index" href="ix01.html" title="Index"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> <tr valign="middle"> <td><a accesskey="p" href="raptor-section-uri-factory.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> <td><a accesskey="u" href="reference-manual.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> <th width="100%" align="center">Raptor RDF Syntax Parsing and Serializing Library Manual</th> <td><a accesskey="n" href="raptor-section-www.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> </tr> <tr><td colspan="5" class="shortcuts"> <a href="#raptor-section-uri.synopsis" class="shortcut">Top</a> | <a href="#raptor-section-uri.description" class="shortcut">Description</a> </td></tr> </table> <div class="refentry" title="URI"> <a name="raptor-section-uri"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2><span class="refentrytitle"><a name="raptor-section-uri.top_of_page"></a>URI</span></h2> <p>URI — URI class and relative URI computation</p> </td> <td valign="top" align="right"></td> </tr></table></div> <div class="refsynopsisdiv" title="Synopsis"> <a name="raptor-section-uri.synopsis"></a><h2>Synopsis</h2> <pre class="synopsis">typedef <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri">raptor_uri</a>; <a class="link" href="raptor-section-uri.html#raptor-uri-handler" title="raptor_uri_handler">raptor_uri_handler</a>; <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a>* <a class="link" href="raptor-section-uri.html#raptor-new-uri" title="raptor_new_uri ()">raptor_new_uri</a> (unsigned <span class="returnvalue">char</span> *uri_string); <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a>* <a class="link" href="raptor-section-uri.html#raptor-new-uri-from-uri-local-name" title="raptor_new_uri_from_uri_local_name ()">raptor_new_uri_from_uri_local_name</a> (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *uri, unsigned <span class="returnvalue">char</span> *local_name); <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a>* <a class="link" href="raptor-section-uri.html#raptor-new-uri-relative-to-base" title="raptor_new_uri_relative_to_base ()">raptor_new_uri_relative_to_base</a> (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *base_uri, unsigned <span class="returnvalue">char</span> *uri_string); <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a>* <a class="link" href="raptor-section-uri.html#raptor-new-uri-from-id" title="raptor_new_uri_from_id ()">raptor_new_uri_from_id</a> (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *base_uri, unsigned <span class="returnvalue">char</span> *id); <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a>* <a class="link" href="raptor-section-uri.html#raptor-new-uri-for-rdf-concept" title="raptor_new_uri_for_rdf_concept ()">raptor_new_uri_for_rdf_concept</a> (const <span class="returnvalue">char</span> *name); <span class="returnvalue">void</span> <a class="link" href="raptor-section-uri.html#raptor-free-uri" title="raptor_free_uri ()">raptor_free_uri</a> (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *uri); <span class="returnvalue">int</span> <a class="link" href="raptor-section-uri.html#raptor-uri-compare" title="raptor_uri_compare ()">raptor_uri_compare</a> (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *uri1, <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *uri2); <span class="returnvalue">int</span> <a class="link" href="raptor-section-uri.html#raptor-uri-equals" title="raptor_uri_equals ()">raptor_uri_equals</a> (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *uri1, <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *uri2); <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a>* <a class="link" href="raptor-section-uri.html#raptor-uri-copy" title="raptor_uri_copy ()">raptor_uri_copy</a> (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *uri); unsigned <span class="returnvalue">char</span>* <a class="link" href="raptor-section-uri.html#raptor-uri-as-string" title="raptor_uri_as_string ()">raptor_uri_as_string</a> (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *uri); unsigned <span class="returnvalue">char</span>* <a class="link" href="raptor-section-uri.html#raptor-uri-as-counted-string" title="raptor_uri_as_counted_string ()">raptor_uri_as_counted_string</a> (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *uri, <span class="returnvalue">size_t</span> *len_p); <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a>* <a class="link" href="raptor-section-uri.html#raptor-new-uri-for-xmlbase" title="raptor_new_uri_for_xmlbase ()">raptor_new_uri_for_xmlbase</a> (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *old_uri); <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a>* <a class="link" href="raptor-section-uri.html#raptor-new-uri-for-retrieval" title="raptor_new_uri_for_retrieval ()">raptor_new_uri_for_retrieval</a> (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *old_uri); <span class="returnvalue">void</span> <a class="link" href="raptor-section-uri.html#raptor-uri-resolve-uri-reference" title="raptor_uri_resolve_uri_reference ()">raptor_uri_resolve_uri_reference</a> (unsigned <span class="returnvalue">char</span> *base_uri, unsigned <span class="returnvalue">char</span> *reference_uri, unsigned <span class="returnvalue">char</span> *buffer, <span class="returnvalue">size_t</span> length); unsigned <span class="returnvalue">char</span> * <a class="link" href="raptor-section-uri.html#raptor-uri-filename-to-uri-string" title="raptor_uri_filename_to_uri_string ()">raptor_uri_filename_to_uri_string</a> (const <span class="returnvalue">char</span> *filename); <span class="returnvalue">char</span> * <a class="link" href="raptor-section-uri.html#raptor-uri-uri-string-to-filename" title="raptor_uri_uri_string_to_filename ()">raptor_uri_uri_string_to_filename</a> (unsigned <span class="returnvalue">char</span> *uri_string); <span class="returnvalue">char</span> * <a class="link" href="raptor-section-uri.html#raptor-uri-uri-string-to-filename-fragment" title="raptor_uri_uri_string_to_filename_fragment ()">raptor_uri_uri_string_to_filename_fragment</a> (unsigned <span class="returnvalue">char</span> *uri_string, unsigned <span class="returnvalue">char</span> **fragment_p); <span class="returnvalue">int</span> <a class="link" href="raptor-section-uri.html#raptor-uri-uri-string-is-file-uri" title="raptor_uri_uri_string_is_file_uri ()">raptor_uri_uri_string_is_file_uri</a> (unsigned <span class="returnvalue">char</span> *uri_string); <span class="returnvalue">int</span> <a class="link" href="raptor-section-uri.html#raptor-uri-is-file-uri" title="raptor_uri_is_file_uri ()">raptor_uri_is_file_uri</a> (unsigned <span class="returnvalue">char</span> *uri_string); unsigned <span class="returnvalue">char</span>* <a class="link" href="raptor-section-uri.html#raptor-uri-to-relative-counted-uri-string" title="raptor_uri_to_relative_counted_uri_string ()">raptor_uri_to_relative_counted_uri_string</a> (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *base_uri, <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *reference_uri, <span class="returnvalue">size_t</span> *length_p); unsigned <span class="returnvalue">char</span>* <a class="link" href="raptor-section-uri.html#raptor-uri-to-relative-uri-string" title="raptor_uri_to_relative_uri_string ()">raptor_uri_to_relative_uri_string</a> (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *base_uri, <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *reference_uri); <span class="returnvalue">void</span> <a class="link" href="raptor-section-uri.html#raptor-uri-print" title="raptor_uri_print ()">raptor_uri_print</a> (const <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *uri, <span class="returnvalue">FILE</span> *stream); unsigned <span class="returnvalue">char</span>* <a class="link" href="raptor-section-uri.html#raptor-uri-to-counted-string" title="raptor_uri_to_counted_string ()">raptor_uri_to_counted_string</a> (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *uri, <span class="returnvalue">size_t</span> *len_p); unsigned <span class="returnvalue">char</span>* <a class="link" href="raptor-section-uri.html#raptor-uri-to-string" title="raptor_uri_to_string ()">raptor_uri_to_string</a> (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *uri); <span class="returnvalue">void</span> <a class="link" href="raptor-section-uri.html#raptor-uri-set-handler" title="raptor_uri_set_handler ()">raptor_uri_set_handler</a> (const <a class="link" href="raptor-section-uri.html#raptor-uri-handler" title="raptor_uri_handler"><span class="returnvalue">raptor_uri_handler</span></a> *handler, <span class="returnvalue">void</span> *context); <span class="returnvalue">void</span> <a class="link" href="raptor-section-uri.html#raptor-uri-get-handler" title="raptor_uri_get_handler ()">raptor_uri_get_handler</a> (const <a class="link" href="raptor-section-uri.html#raptor-uri-handler" title="raptor_uri_handler"><span class="returnvalue">raptor_uri_handler</span></a> **handler, <span class="returnvalue">void</span> **context); <span class="returnvalue">int</span> <a class="link" href="raptor-section-uri.html#raptor-iostream-write-uri" title="raptor_iostream_write_uri ()">raptor_iostream_write_uri</a> (<a class="link" href="raptor-section-iostream.html#raptor-iostream" title="raptor_iostream"><span class="returnvalue">raptor_iostream</span></a> *iostr, <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *uri); </pre> </div> <div class="refsect1" title="Description"> <a name="raptor-section-uri.description"></a><h2>Description</h2> <p> A class for absolute URIs used inside raptor and relative URI computation utility functions used inside the main Redland <a href="/usr/share/gtk-doc/html/redland/redland-uri.html#librdf-uri"><span class="type">librdf_uri</span></a> class. Only absolute URIs are provided, with no current access to internals of URIs such as URI scheme, path, authority. </p> </div> <div class="refsect1" title="Details"> <a name="raptor-section-uri.details"></a><h2>Details</h2> <div class="refsect2" title="raptor_uri"> <a name="raptor-uri"></a><h3>raptor_uri</h3> <pre class="programlisting">raptor_uri* raptor_uri; </pre> <p> Raptor URI Class.</p> </div> <hr> <div class="refsect2" title="raptor_uri_handler"> <a name="raptor-uri-handler"></a><h3>raptor_uri_handler</h3> <pre class="programlisting">typedef struct { /* constructors - URI Interface V1 */ raptor_new_uri_func new_uri; raptor_new_uri_from_uri_local_name_func new_uri_from_uri_local_name; raptor_new_uri_relative_to_base_func new_uri_relative_to_base; raptor_new_uri_for_rdf_concept_func new_uri_for_rdf_concept; /* destructor - URI Interface V1 */ raptor_free_uri_func free_uri; /* methods - URI Interface V1 */ raptor_uri_equals_func uri_equals; raptor_uri_copy_func uri_copy; /* well, copy constructor */ raptor_uri_as_string_func uri_as_string; raptor_uri_as_counted_string_func uri_as_counted_string; int initialised; /* methods - URI Interface V2 */ raptor_uri_compare_func uri_compare; } raptor_uri_handler; </pre> <p> URI implementation handler structure.</p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><p><span class="term"><a class="link" href="raptor-section-uri-factory.html#raptor-new-uri-func" title="raptor_new_uri_func ()"><span class="type">raptor_new_uri_func</span></a> <em class="structfield"><code><a name="raptor-uri-handler.new-uri"></a>new_uri</code></em>;</span></p></td> <td> function for <a class="link" href="raptor-section-uri.html#raptor-new-uri" title="raptor_new_uri ()"><code class="function">raptor_new_uri()</code></a> </td> </tr> <tr> <td><p><span class="term"><a class="link" href="raptor-section-uri-factory.html#raptor-new-uri-from-uri-local-name-func" title="raptor_new_uri_from_uri_local_name_func ()"><span class="type">raptor_new_uri_from_uri_local_name_func</span></a> <em class="structfield"><code><a name="raptor-uri-handler.new-uri-from-uri-local-name"></a>new_uri_from_uri_local_name</code></em>;</span></p></td> <td> function for <a class="link" href="raptor-section-uri.html#raptor-new-uri-from-uri-local-name" title="raptor_new_uri_from_uri_local_name ()"><code class="function">raptor_new_uri_from_uri_local_name()</code></a> </td> </tr> <tr> <td><p><span class="term"><a class="link" href="raptor-section-uri-factory.html#raptor-new-uri-relative-to-base-func" title="raptor_new_uri_relative_to_base_func ()"><span class="type">raptor_new_uri_relative_to_base_func</span></a> <em class="structfield"><code><a name="raptor-uri-handler.new-uri-relative-to-base"></a>new_uri_relative_to_base</code></em>;</span></p></td> <td> function for <a class="link" href="raptor-section-uri.html#raptor-new-uri-relative-to-base" title="raptor_new_uri_relative_to_base ()"><code class="function">raptor_new_uri_relative_to_base()</code></a> </td> </tr> <tr> <td><p><span class="term"><a class="link" href="raptor-section-uri-factory.html#raptor-new-uri-for-rdf-concept-func" title="raptor_new_uri_for_rdf_concept_func ()"><span class="type">raptor_new_uri_for_rdf_concept_func</span></a> <em class="structfield"><code><a name="raptor-uri-handler.new-uri-for-rdf-concept"></a>new_uri_for_rdf_concept</code></em>;</span></p></td> <td> function for <a class="link" href="raptor-section-uri.html#raptor-new-uri-for-rdf-concept" title="raptor_new_uri_for_rdf_concept ()"><code class="function">raptor_new_uri_for_rdf_concept()</code></a> </td> </tr> <tr> <td><p><span class="term"><a class="link" href="raptor-section-uri-factory.html#raptor-free-uri-func" title="raptor_free_uri_func ()"><span class="type">raptor_free_uri_func</span></a> <em class="structfield"><code><a name="raptor-uri-handler.free-uri"></a>free_uri</code></em>;</span></p></td> <td> function for <a class="link" href="raptor-section-uri.html#raptor-free-uri" title="raptor_free_uri ()"><code class="function">raptor_free_uri()</code></a> </td> </tr> <tr> <td><p><span class="term"><a class="link" href="raptor-section-uri-factory.html#raptor-uri-equals-func" title="raptor_uri_equals_func ()"><span class="type">raptor_uri_equals_func</span></a> <em class="structfield"><code><a name="raptor-uri-handler.uri-equals"></a>uri_equals</code></em>;</span></p></td> <td> function for <a class="link" href="raptor-section-uri.html#raptor-uri-equals" title="raptor_uri_equals ()"><code class="function">raptor_uri_equals()</code></a> </td> </tr> <tr> <td><p><span class="term"><a class="link" href="raptor-section-uri-factory.html#raptor-uri-copy-func" title="raptor_uri_copy_func ()"><span class="type">raptor_uri_copy_func</span></a> <em class="structfield"><code><a name="raptor-uri-handler.uri-copy"></a>uri_copy</code></em>;</span></p></td> <td> function for <a class="link" href="raptor-section-uri.html#raptor-uri-copy" title="raptor_uri_copy ()"><code class="function">raptor_uri_copy()</code></a> </td> </tr> <tr> <td><p><span class="term"><span class="type">raptor_uri_as_string_func</span> <em class="structfield"><code><a name="raptor-uri-handler.uri-as-string"></a>uri_as_string</code></em>;</span></p></td> <td> function for <a class="link" href="raptor-section-uri.html#raptor-uri-as-string" title="raptor_uri_as_string ()"><code class="function">raptor_uri_as_string()</code></a> </td> </tr> <tr> <td><p><span class="term"><span class="type">raptor_uri_as_counted_string_func</span> <em class="structfield"><code><a name="raptor-uri-handler.uri-as-counted-string"></a>uri_as_counted_string</code></em>;</span></p></td> <td> function for <a class="link" href="raptor-section-uri.html#raptor-uri-as-counted-string" title="raptor_uri_as_counted_string ()"><code class="function">raptor_uri_as_counted_string()</code></a> </td> </tr> <tr> <td><p><span class="term"><span class="type">int</span> <em class="structfield"><code><a name="raptor-uri-handler.initialised"></a>initialised</code></em>;</span></p></td> <td> API version - set to API version implemented: 1..2 </td> </tr> <tr> <td><p><span class="term"><a class="link" href="raptor-section-uri-factory.html#raptor-uri-compare-func" title="raptor_uri_compare_func ()"><span class="type">raptor_uri_compare_func</span></a> <em class="structfield"><code><a name="raptor-uri-handler.uri-compare"></a>uri_compare</code></em>;</span></p></td> <td> function for <a class="link" href="raptor-section-uri.html#raptor-uri-compare" title="raptor_uri_compare ()"><code class="function">raptor_uri_compare()</code></a> </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" title="raptor_new_uri ()"> <a name="raptor-new-uri"></a><h3>raptor_new_uri ()</h3> <pre class="programlisting"><a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a>* raptor_new_uri (unsigned <span class="returnvalue">char</span> *uri_string);</pre> <p> Constructor - create a raptor URI from a UTF-8 encoded Unicode string. </p> <p> <a class="link" href="raptor-section-world.html#raptor-init" title="raptor_init ()"><code class="function">raptor_init()</code></a> MUST have been called before calling this function. Use <code class="function">raptor_new_uri_v2()</code> if using raptor_world APIs.</p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><p><span class="term"><em class="parameter"><code>uri_string</code></em> :</span></p></td> <td> URI string. </td> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> <td> a new <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> object or NULL on failure. </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" title="raptor_new_uri_from_uri_local_name ()"> <a name="raptor-new-uri-from-uri-local-name"></a><h3>raptor_new_uri_from_uri_local_name ()</h3> <pre class="programlisting"><a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a>* raptor_new_uri_from_uri_local_name (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *uri, unsigned <span class="returnvalue">char</span> *local_name);</pre> <p> Constructor - create a raptor URI from an existing URI and a local name. </p> <p> Creates a new URI from the concatenation of the <em class="parameter"><code>local_name</code></em> to the <em class="parameter"><code>uri</code></em>. This is NOT relative URI resolution, which is done by the <a class="link" href="raptor-section-uri.html#raptor-new-uri-relative-to-base" title="raptor_new_uri_relative_to_base ()"><code class="function">raptor_new_uri_relative_to_base()</code></a> constructor. </p> <p> <a class="link" href="raptor-section-world.html#raptor-init" title="raptor_init ()"><code class="function">raptor_init()</code></a> MUST have been called before calling this function. Use <code class="function">raptor_new_uri_from_uri_local_name_v2()</code> if using raptor_world APIs.</p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td> <td> existing <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> </td> </tr> <tr> <td><p><span class="term"><em class="parameter"><code>local_name</code></em> :</span></p></td> <td> local name </td> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> <td> a new <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> object or NULL on failure. </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" title="raptor_new_uri_relative_to_base ()"> <a name="raptor-new-uri-relative-to-base"></a><h3>raptor_new_uri_relative_to_base ()</h3> <pre class="programlisting"><a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a>* raptor_new_uri_relative_to_base (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *base_uri, unsigned <span class="returnvalue">char</span> *uri_string);</pre> <p> Constructor - create a raptor URI from a base URI and a relative URI string. </p> <p> <a class="link" href="raptor-section-world.html#raptor-init" title="raptor_init ()"><code class="function">raptor_init()</code></a> MUST have been called before calling this function. Use <code class="function">raptor_new_uri_relative_to_base_v2()</code> if using raptor_world APIs.</p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><p><span class="term"><em class="parameter"><code>base_uri</code></em> :</span></p></td> <td> existing base URI </td> </tr> <tr> <td><p><span class="term"><em class="parameter"><code>uri_string</code></em> :</span></p></td> <td> relative URI string </td> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> <td> a new <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> object or NULL on failure. </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" title="raptor_new_uri_from_id ()"> <a name="raptor-new-uri-from-id"></a><h3>raptor_new_uri_from_id ()</h3> <pre class="programlisting"><a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a>* raptor_new_uri_from_id (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *base_uri, unsigned <span class="returnvalue">char</span> *id);</pre> <p> Constructor - create a new URI from a base URI and RDF ID. </p> <p> This creates a URI equivalent to concatenating <em class="parameter"><code>base_uri</code></em> with ## and <em class="parameter"><code>id</code></em>. </p> <p> <a class="link" href="raptor-section-world.html#raptor-init" title="raptor_init ()"><code class="function">raptor_init()</code></a> MUST have been called before calling this function. Use <code class="function">raptor_new_uri_from_id_v2()</code> if using raptor_world APIs.</p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><p><span class="term"><em class="parameter"><code>base_uri</code></em> :</span></p></td> <td> existing base URI </td> </tr> <tr> <td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td> <td> RDF ID </td> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> <td> a new <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> object or NULL on failure. </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" title="raptor_new_uri_for_rdf_concept ()"> <a name="raptor-new-uri-for-rdf-concept"></a><h3>raptor_new_uri_for_rdf_concept ()</h3> <pre class="programlisting"><a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a>* raptor_new_uri_for_rdf_concept (const <span class="returnvalue">char</span> *name);</pre> <p> Constructor - create a raptor URI for the RDF namespace concept name. </p> <p> Example: u=raptor_new_uri_for_rdf_concept("value") creates a new URI for the rdf:value term. </p> <p> <a class="link" href="raptor-section-world.html#raptor-init" title="raptor_init ()"><code class="function">raptor_init()</code></a> MUST have been called before calling this function. Use <code class="function">raptor_new_uri_for_rdf_concept_v2()</code> if using raptor_world APIs.</p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td> <td> RDF namespace concept </td> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> <td> a new <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> object or NULL on failure </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" title="raptor_free_uri ()"> <a name="raptor-free-uri"></a><h3>raptor_free_uri ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> raptor_free_uri (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *uri);</pre> <p> <a class="link" href="raptor-section-world.html#raptor-init" title="raptor_init ()"><code class="function">raptor_init()</code></a> MUST have been called before calling this function. Use <code class="function">raptor_free_uri_v2()</code> if using raptor_world APIs. </p> <p> Destructor - destroy a <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> object</p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody><tr> <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td> <td> URI to destroy </td> </tr></tbody> </table></div> </div> <hr> <div class="refsect2" title="raptor_uri_compare ()"> <a name="raptor-uri-compare"></a><h3>raptor_uri_compare ()</h3> <pre class="programlisting"><span class="returnvalue">int</span> raptor_uri_compare (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *uri1, <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *uri2);</pre> <p> Compare two URIs, ala strcmp. </p> <p> A NULL URI is always less than (never equal to) a non-NULL URI. </p> <p> <a class="link" href="raptor-section-world.html#raptor-init" title="raptor_init ()"><code class="function">raptor_init()</code></a> MUST have been called before calling this function. Use <code class="function">raptor_uri_compare_v2()</code> if using raptor_world APIs.</p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><p><span class="term"><em class="parameter"><code>uri1</code></em> :</span></p></td> <td> URI 1 (may be NULL) </td> </tr> <tr> <td><p><span class="term"><em class="parameter"><code>uri2</code></em> :</span></p></td> <td> URI 2 (may be NULL) </td> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> <td> -1 if uri1 < uri2, 0 if equal, 1 if uri1 > uri2 </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" title="raptor_uri_equals ()"> <a name="raptor-uri-equals"></a><h3>raptor_uri_equals ()</h3> <pre class="programlisting"><span class="returnvalue">int</span> raptor_uri_equals (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *uri1, <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *uri2);</pre> <p> Check if two URIs are equal. </p> <p> A NULL URI is not equal to a non-NULL URI. </p> <p> <a class="link" href="raptor-section-world.html#raptor-init" title="raptor_init ()"><code class="function">raptor_init()</code></a> MUST have been called before calling this function. Use <code class="function">raptor_uri_equals_v2()</code> if using raptor_world APIs.</p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><p><span class="term"><em class="parameter"><code>uri1</code></em> :</span></p></td> <td> URI 1 (may be NULL) </td> </tr> <tr> <td><p><span class="term"><em class="parameter"><code>uri2</code></em> :</span></p></td> <td> URI 2 (may be NULL) </td> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> <td> non-0 if the URIs are equal </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" title="raptor_uri_copy ()"> <a name="raptor-uri-copy"></a><h3>raptor_uri_copy ()</h3> <pre class="programlisting"><a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a>* raptor_uri_copy (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *uri);</pre> <p> Constructor - get a copy of a URI. </p> <p> <a class="link" href="raptor-section-world.html#raptor-init" title="raptor_init ()"><code class="function">raptor_init()</code></a> MUST have been called before calling this function. Use <code class="function">raptor_uri_copy_v2()</code> if using raptor_world APIs.</p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td> <td> URI object </td> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> <td> a new <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> object or NULL on failure </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" title="raptor_uri_as_string ()"> <a name="raptor-uri-as-string"></a><h3>raptor_uri_as_string ()</h3> <pre class="programlisting">unsigned <span class="returnvalue">char</span>* raptor_uri_as_string (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *uri);</pre> <p> Get a string representation of a URI. </p> <p> Returns a shared pointer to a string representation of <em class="parameter"><code>uri</code></em>. This string is shared and must not be freed, otherwise see use the <a class="link" href="raptor-section-uri.html#raptor-uri-to-string" title="raptor_uri_to_string ()"><code class="function">raptor_uri_to_string()</code></a> or <a class="link" href="raptor-section-uri.html#raptor-uri-to-counted-string" title="raptor_uri_to_counted_string ()"><code class="function">raptor_uri_to_counted_string()</code></a> methods. </p> <p> <a class="link" href="raptor-section-world.html#raptor-init" title="raptor_init ()"><code class="function">raptor_init()</code></a> MUST have been called before calling this function. Use <code class="function">raptor_uri_as_string_v2()</code> if using raptor_world APIs.</p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td> <td> <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> object </td> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> <td> shared string representation of URI </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" title="raptor_uri_as_counted_string ()"> <a name="raptor-uri-as-counted-string"></a><h3>raptor_uri_as_counted_string ()</h3> <pre class="programlisting">unsigned <span class="returnvalue">char</span>* raptor_uri_as_counted_string (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *uri, <span class="returnvalue">size_t</span> *len_p);</pre> <p> Get a string representation of a URI with count. </p> <p> Returns a shared pointer to a string representation of <em class="parameter"><code>uri</code></em> along with the length of the string in <em class="parameter"><code>len_p</code></em>, if not NULL. This string is shared and must not be freed, otherwise see use the <a class="link" href="raptor-section-uri.html#raptor-uri-to-string" title="raptor_uri_to_string ()"><code class="function">raptor_uri_to_string()</code></a> or <a class="link" href="raptor-section-uri.html#raptor-uri-to-counted-string" title="raptor_uri_to_counted_string ()"><code class="function">raptor_uri_to_counted_string()</code></a> methods. </p> <p> <a class="link" href="raptor-section-world.html#raptor-init" title="raptor_init ()"><code class="function">raptor_init()</code></a> MUST have been called before calling this function. Use <code class="function">raptor_uri_as_counted_string_v2()</code> if using raptor_world APIs.</p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td> <td> URI object </td> </tr> <tr> <td><p><span class="term"><em class="parameter"><code>len_p</code></em> :</span></p></td> <td> address of length variable or NULL </td> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> <td> shared string representation of URI </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" title="raptor_new_uri_for_xmlbase ()"> <a name="raptor-new-uri-for-xmlbase"></a><h3>raptor_new_uri_for_xmlbase ()</h3> <pre class="programlisting"><a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a>* raptor_new_uri_for_xmlbase (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *old_uri);</pre> <p> Constructor - create a URI suitable for use as an XML Base. </p> <p> Takes an existing URI and ensures it has a path (default /) and has no fragment or query arguments - XML base does not use these. </p> <p> <a class="link" href="raptor-section-world.html#raptor-init" title="raptor_init ()"><code class="function">raptor_init()</code></a> MUST have been called before calling this function. Use <code class="function">raptor_new_uri_for_xmlbase_v2()</code> if using raptor_world APIs.</p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><p><span class="term"><em class="parameter"><code>old_uri</code></em> :</span></p></td> <td> URI to transform </td> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> <td> new <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> object or NULL on failure. </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" title="raptor_new_uri_for_retrieval ()"> <a name="raptor-new-uri-for-retrieval"></a><h3>raptor_new_uri_for_retrieval ()</h3> <pre class="programlisting"><a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a>* raptor_new_uri_for_retrieval (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *old_uri);</pre> <p> Constructor - create a URI suitable for retrieval. </p> <p> Takes an existing URI and ensures it has a path (default /) and has no fragment - URI retrieval does not use the fragment part. </p> <p> <a class="link" href="raptor-section-world.html#raptor-init" title="raptor_init ()"><code class="function">raptor_init()</code></a> MUST have been called before calling this function. Use <code class="function">raptor_new_uri_for_retrieval_v2()</code> if using raptor_world APIs.</p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><p><span class="term"><em class="parameter"><code>old_uri</code></em> :</span></p></td> <td> URI to transform </td> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> <td> new <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> object or NULL on failure. </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" title="raptor_uri_resolve_uri_reference ()"> <a name="raptor-uri-resolve-uri-reference"></a><h3>raptor_uri_resolve_uri_reference ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> raptor_uri_resolve_uri_reference (unsigned <span class="returnvalue">char</span> *base_uri, unsigned <span class="returnvalue">char</span> *reference_uri, unsigned <span class="returnvalue">char</span> *buffer, <span class="returnvalue">size_t</span> length);</pre> <p> Resolve a URI to a base URI.</p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><p><span class="term"><em class="parameter"><code>base_uri</code></em> :</span></p></td> <td> Base URI string </td> </tr> <tr> <td><p><span class="term"><em class="parameter"><code>reference_uri</code></em> :</span></p></td> <td> Reference URI string </td> </tr> <tr> <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> <td> Destination buffer URI </td> </tr> <tr> <td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td> <td> Length of destination buffer </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" title="raptor_uri_filename_to_uri_string ()"> <a name="raptor-uri-filename-to-uri-string"></a><h3>raptor_uri_filename_to_uri_string ()</h3> <pre class="programlisting">unsigned <span class="returnvalue">char</span> * raptor_uri_filename_to_uri_string (const <span class="returnvalue">char</span> *filename);</pre> <p> Converts a filename to a file: URI. </p> <p> Handles the OS-specific escaping on turning filenames into URIs and returns a new buffer that the caller must <code class="function">free()</code>. Turns a space in the filname into <code class="literal">20</code> and '%' into <code class="literal">25</code>.</p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td> <td> The filename to convert </td> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> <td> A newly allocated string with the URI or NULL on failure </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" title="raptor_uri_uri_string_to_filename ()"> <a name="raptor-uri-uri-string-to-filename"></a><h3>raptor_uri_uri_string_to_filename ()</h3> <pre class="programlisting"><span class="returnvalue">char</span> * raptor_uri_uri_string_to_filename (unsigned <span class="returnvalue">char</span> *uri_string);</pre> <p> Convert a file: URI to a filename. </p> <p> Handles the OS-specific file: URIs to filename mappings. Returns a new buffer containing the filename that the caller must free.</p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><p><span class="term"><em class="parameter"><code>uri_string</code></em> :</span></p></td> <td> The file: URI to convert </td> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> <td> A newly allocated string with the filename or NULL on failure </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" title="raptor_uri_uri_string_to_filename_fragment ()"> <a name="raptor-uri-uri-string-to-filename-fragment"></a><h3>raptor_uri_uri_string_to_filename_fragment ()</h3> <pre class="programlisting"><span class="returnvalue">char</span> * raptor_uri_uri_string_to_filename_fragment (unsigned <span class="returnvalue">char</span> *uri_string, unsigned <span class="returnvalue">char</span> **fragment_p);</pre> <p> Convert a file: URI to a filename and fragment. </p> <p> Handles the OS-specific file: URIs to filename mappings. Returns a new buffer containing the filename that the caller must free. </p> <p> If <em class="parameter"><code>fragment_p</code></em> is given, a new string containing the URI fragment is returned, or NULL if none is present</p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><p><span class="term"><em class="parameter"><code>uri_string</code></em> :</span></p></td> <td> The file: URI to convert </td> </tr> <tr> <td><p><span class="term"><em class="parameter"><code>fragment_p</code></em> :</span></p></td> <td> Address of pointer to store any URI fragment or NULL </td> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> <td> A newly allocated string with the filename or NULL on failure </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" title="raptor_uri_uri_string_is_file_uri ()"> <a name="raptor-uri-uri-string-is-file-uri"></a><h3>raptor_uri_uri_string_is_file_uri ()</h3> <pre class="programlisting"><span class="returnvalue">int</span> raptor_uri_uri_string_is_file_uri (unsigned <span class="returnvalue">char</span> *uri_string);</pre> <p> Check if a URI string is a file: URI.</p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><p><span class="term"><em class="parameter"><code>uri_string</code></em> :</span></p></td> <td> The URI string to check </td> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> <td> Non zero if URI string is a file: URI </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" title="raptor_uri_is_file_uri ()"> <a name="raptor-uri-is-file-uri"></a><h3>raptor_uri_is_file_uri ()</h3> <pre class="programlisting"><span class="returnvalue">int</span> raptor_uri_is_file_uri (unsigned <span class="returnvalue">char</span> *uri_string);</pre> <div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;"> <h3 class="title">Warning</h3> <p><code class="literal">raptor_uri_is_file_uri</code> is deprecated and should not be used in newly-written code.</p> </div> <p> Check if a URI string is a file: URI. </p> <p> <em class="parameter"><code>deprecated</code></em>: use <a class="link" href="raptor-section-uri.html#raptor-uri-uri-string-is-file-uri" title="raptor_uri_uri_string_is_file_uri ()"><code class="function">raptor_uri_uri_string_is_file_uri()</code></a> instead</p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><p><span class="term"><em class="parameter"><code>uri_string</code></em> :</span></p></td> <td> The URI string to check </td> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> <td> Non zero if URI string is a file: URI </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" title="raptor_uri_to_relative_counted_uri_string ()"> <a name="raptor-uri-to-relative-counted-uri-string"></a><h3>raptor_uri_to_relative_counted_uri_string ()</h3> <pre class="programlisting">unsigned <span class="returnvalue">char</span>* raptor_uri_to_relative_counted_uri_string (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *base_uri, <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *reference_uri, <span class="returnvalue">size_t</span> *length_p);</pre> <p> Get the counted relative URI string of a URI against a base URI. </p> <p> <a class="link" href="raptor-section-world.html#raptor-init" title="raptor_init ()"><code class="function">raptor_init()</code></a> MUST have been called before calling this function. Use <code class="function">raptor_uri_to_relative_counted_uri_string_v2()</code> if using raptor_world APIs.</p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><p><span class="term"><em class="parameter"><code>base_uri</code></em> :</span></p></td> <td> The base absolute URI to resolve against (or NULL) </td> </tr> <tr> <td><p><span class="term"><em class="parameter"><code>reference_uri</code></em> :</span></p></td> <td> The reference absolute URI to use </td> </tr> <tr> <td><p><span class="term"><em class="parameter"><code>length_p</code></em> :</span></p></td> <td> Location to store the length of the relative URI string or NULL </td> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> <td> A newly allocated relative URI string or NULL on failure </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" title="raptor_uri_to_relative_uri_string ()"> <a name="raptor-uri-to-relative-uri-string"></a><h3>raptor_uri_to_relative_uri_string ()</h3> <pre class="programlisting">unsigned <span class="returnvalue">char</span>* raptor_uri_to_relative_uri_string (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *base_uri, <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *reference_uri);</pre> <p> Get the relative URI string of a URI against a base URI. </p> <p> <a class="link" href="raptor-section-world.html#raptor-init" title="raptor_init ()"><code class="function">raptor_init()</code></a> MUST have been called before calling this function. Use <code class="function">raptor_uri_to_relative_uri_string_v2()</code> if using raptor_world APIs.</p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><p><span class="term"><em class="parameter"><code>base_uri</code></em> :</span></p></td> <td> The base absolute URI to resolve against </td> </tr> <tr> <td><p><span class="term"><em class="parameter"><code>reference_uri</code></em> :</span></p></td> <td> The reference absolute URI to use </td> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> <td> A newly allocated relative URI string or NULL on failure </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" title="raptor_uri_print ()"> <a name="raptor-uri-print"></a><h3>raptor_uri_print ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> raptor_uri_print (const <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *uri, <span class="returnvalue">FILE</span> *stream);</pre> <p> Print a URI to a file handle. </p> <p> <a class="link" href="raptor-section-world.html#raptor-init" title="raptor_init ()"><code class="function">raptor_init()</code></a> MUST have been called before calling this function. Use <code class="function">raptor_uri_print_v2()</code> if using raptor_world APIs.</p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td> <td> URI to print </td> </tr> <tr> <td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td> <td> The file handle to print to </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" title="raptor_uri_to_counted_string ()"> <a name="raptor-uri-to-counted-string"></a><h3>raptor_uri_to_counted_string ()</h3> <pre class="programlisting">unsigned <span class="returnvalue">char</span>* raptor_uri_to_counted_string (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *uri, <span class="returnvalue">size_t</span> *len_p);</pre> <p> Get a new counted string for a URI. </p> <p> If <em class="parameter"><code>len_p</code></em> is not NULL, the length of the string is stored in it. </p> <p> The memory allocated must be freed by the caller and <a class="link" href="raptor-section-memory.html#raptor-free-memory" title="raptor_free_memory ()"><code class="function">raptor_free_memory()</code></a> should be used for best portability. </p> <p> <a class="link" href="raptor-section-world.html#raptor-init" title="raptor_init ()"><code class="function">raptor_init()</code></a> MUST have been called before calling this function. Use <code class="function">raptor_uri_to_counted_string_v2()</code> if using raptor_world APIs.</p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td> <td> <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> object </td> </tr> <tr> <td><p><span class="term"><em class="parameter"><code>len_p</code></em> :</span></p></td> <td> Pointer to length (or NULL) </td> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> <td> new string or NULL on failure </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" title="raptor_uri_to_string ()"> <a name="raptor-uri-to-string"></a><h3>raptor_uri_to_string ()</h3> <pre class="programlisting">unsigned <span class="returnvalue">char</span>* raptor_uri_to_string (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *uri);</pre> <p> Get a new string for a URI. </p> <p> The memory allocated must be freed by the caller and <a class="link" href="raptor-section-memory.html#raptor-free-memory" title="raptor_free_memory ()"><code class="function">raptor_free_memory()</code></a> should be used for best portability. </p> <p> <a class="link" href="raptor-section-world.html#raptor-init" title="raptor_init ()"><code class="function">raptor_init()</code></a> MUST have been called before calling this function. Use <code class="function">raptor_uri_to_string_v2()</code> if using raptor_world APIs.</p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td> <td> <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> object </td> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> <td> new string or NULL on failure </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" title="raptor_uri_set_handler ()"> <a name="raptor-uri-set-handler"></a><h3>raptor_uri_set_handler ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> raptor_uri_set_handler (const <a class="link" href="raptor-section-uri.html#raptor-uri-handler" title="raptor_uri_handler"><span class="returnvalue">raptor_uri_handler</span></a> *handler, <span class="returnvalue">void</span> *context);</pre> <p> Change the URI class implementation to the functions provided by the </p> <p> The URI interface in <em class="parameter"><code>handler->initialised</code></em> should be either 1 or 2 (if raptor_uri_compare_func is implemented). </p> <p> <a class="link" href="raptor-section-world.html#raptor-init" title="raptor_init ()"><code class="function">raptor_init()</code></a> MUST have been called before calling this function. Use <code class="function">raptor_uri_set_handler_v2()</code> if using raptor_world APIs.</p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><p><span class="term"><em class="parameter"><code>handler</code></em> :</span></p></td> <td> URI handler structure </td> </tr> <tr> <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td> <td> URI handler context </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" title="raptor_uri_get_handler ()"> <a name="raptor-uri-get-handler"></a><h3>raptor_uri_get_handler ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> raptor_uri_get_handler (const <a class="link" href="raptor-section-uri.html#raptor-uri-handler" title="raptor_uri_handler"><span class="returnvalue">raptor_uri_handler</span></a> **handler, <span class="returnvalue">void</span> **context);</pre> <p> Return the current raptor URI class implementation <em class="parameter"><code>handler</code></em> and <em class="parameter"><code>context</code></em> </p> <p> <a class="link" href="raptor-section-world.html#raptor-init" title="raptor_init ()"><code class="function">raptor_init()</code></a> MUST have been called before calling this function. Use <code class="function">raptor_uri_get_handler_v2()</code> if using raptor_world APIs.</p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><p><span class="term"><em class="parameter"><code>handler</code></em> :</span></p></td> <td> URI handler to return </td> </tr> <tr> <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td> <td> URI context to return </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" title="raptor_iostream_write_uri ()"> <a name="raptor-iostream-write-uri"></a><h3>raptor_iostream_write_uri ()</h3> <pre class="programlisting"><span class="returnvalue">int</span> raptor_iostream_write_uri (<a class="link" href="raptor-section-iostream.html#raptor-iostream" title="raptor_iostream"><span class="returnvalue">raptor_iostream</span></a> *iostr, <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *uri);</pre> <p> Write a raptor URI to the iostream. </p> <p> <a class="link" href="raptor-section-world.html#raptor-init" title="raptor_init ()"><code class="function">raptor_init()</code></a> MUST have been called before calling this function. Use <code class="function">raptor_iostream_write_uri_v2()</code> if using raptor_world APIs.</p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><p><span class="term"><em class="parameter"><code>iostr</code></em> :</span></p></td> <td> raptor iostream </td> </tr> <tr> <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td> <td> URI </td> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> <td> non-0 on failure </td> </tr> </tbody> </table></div> </div> </div> </div> <div class="footer"> <hr> Generated by GTK-Doc V1.13</div> </body> </html>