The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>URI Factory</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.71.0">
<link rel="start" href="index.html" title="Raptor RDF Syntax Parsing and Serializing Library Manual">
<link rel="up" href="reference-manual.html" title="Part&#160;II.&#160;Raptor Reference Manual">
<link rel="prev" href="raptor-section-unicode.html" title="Unicode">
<link rel="next" href="raptor-section-uri.html" title="URI">
<meta name="generator" content="GTK-Doc V1.7 (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&#160;I.&#160;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&#160;II.&#160;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-unicode.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-uri.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2613529" class="shortcut">Top</a>
                  &#160;|&#160;
                  <a href="#id2628788" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="raptor-section-uri-factory"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id2613529"></a><span class="refentrytitle">URI Factory</span>
</h2>
<p>URI Factory &#8212; Provide an implementation for the URI class.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">



<a href="raptor-section-uri.html#raptor-uri">raptor_uri</a>* (<a href="raptor-section-uri-factory.html#raptor-new-uri-func">*raptor_new_uri_func</a>)          (void *context,
                                             unsigned char *uri_string);
<a href="raptor-section-uri.html#raptor-uri">raptor_uri</a>* (<a href="raptor-section-uri-factory.html#raptor-new-uri-from-uri-local-name-func">*raptor_new_uri_from_uri_local_name_func</a>)
                                            (void *context,
                                             <a href="raptor-section-uri.html#raptor-uri">raptor_uri</a> *uri,
                                             unsigned char *local_name);
<a href="raptor-section-uri.html#raptor-uri">raptor_uri</a>* (<a href="raptor-section-uri-factory.html#raptor-new-uri-relative-to-base-func">*raptor_new_uri_relative_to_base_func</a>)
                                            (void *context,
                                             <a href="raptor-section-uri.html#raptor-uri">raptor_uri</a> *base_uri,
                                             unsigned char *uri_string);
<a href="raptor-section-uri.html#raptor-uri">raptor_uri</a>* (<a href="raptor-section-uri-factory.html#raptor-new-uri-for-rdf-concept-func">*raptor_new_uri_for_rdf_concept_func</a>)
                                            (void *context,
                                             const char *name);
void        (<a href="raptor-section-uri-factory.html#raptor-free-uri-func">*raptor_free_uri_func</a>)         (void *context,
                                             <a href="raptor-section-uri.html#raptor-uri">raptor_uri</a> *uri);
int         (<a href="raptor-section-uri-factory.html#raptor-uri-equals-func">*raptor_uri_equals_func</a>)       (void *context,
                                             <a href="raptor-section-uri.html#raptor-uri">raptor_uri</a> *uri1,
                                             <a href="raptor-section-uri.html#raptor-uri">raptor_uri</a> *uri2);
<a href="raptor-section-uri.html#raptor-uri">raptor_uri</a>* (<a href="raptor-section-uri-factory.html#raptor-uri-copy-func">*raptor_uri_copy_func</a>)         (void *context,
                                             <a href="raptor-section-uri.html#raptor-uri">raptor_uri</a> *uri);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2628788"></a><h2>Description</h2>
<p>
A factory that allows registering an implementation for the URI
class to override the simple internal one (<a href="raptor-section-uri.html#raptor-uri"><span class="type">raptor_uri</span></a> are char*).
Normally used by redland to replace <a href="raptor-section-uri.html#raptor-uri"><span class="type">raptor_uri</span></a> with <a
href="/usr/share/gtk-doc/html/redland/redland-uri.html#librdf-uri"
><span class="type">librdf_uri</span></a>
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2627046"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2627057"></a><h3>
<a name="raptor-new-uri-func"></a>raptor_new_uri_func ()</h3>
<a class="indexterm" name="id2627069"></a><pre class="programlisting"><a href="raptor-section-uri.html#raptor-uri">raptor_uri</a>* (*raptor_new_uri_func)          (void *context,
                                             unsigned char *uri_string);</pre>
<p>
Handler function for implementing <a href="raptor-section-uri.html#raptor-new-uri"><code class="function">raptor_new_uri()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
<td> URI context data
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>uri_string</code></em>&#160;:</span></td>
<td> URI string
</td>
</tr>
<tr>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> new URI object or NULL on failure
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2627159"></a><h3>
<a name="raptor-new-uri-from-uri-local-name-func"></a>raptor_new_uri_from_uri_local_name_func ()</h3>
<a class="indexterm" name="id2627172"></a><pre class="programlisting"><a href="raptor-section-uri.html#raptor-uri">raptor_uri</a>* (*raptor_new_uri_from_uri_local_name_func)
                                            (void *context,
                                             <a href="raptor-section-uri.html#raptor-uri">raptor_uri</a> *uri,
                                             unsigned char *local_name);</pre>
<p>
Handler function for implementing <a href="raptor-section-uri.html#raptor-new-uri-from-uri-local-name"><code class="function">raptor_new_uri_from_uri_local_name()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
<td> URI context data
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>uri</code></em>&#160;:</span></td>
<td> URI object
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>local_name</code></em>&#160;:</span></td>
<td> local name string
</td>
</tr>
<tr>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> new URI object or NULL on failure
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2627474"></a><h3>
<a name="raptor-new-uri-relative-to-base-func"></a>raptor_new_uri_relative_to_base_func ()</h3>
<a class="indexterm" name="id2627488"></a><pre class="programlisting"><a href="raptor-section-uri.html#raptor-uri">raptor_uri</a>* (*raptor_new_uri_relative_to_base_func)
                                            (void *context,
                                             <a href="raptor-section-uri.html#raptor-uri">raptor_uri</a> *base_uri,
                                             unsigned char *uri_string);</pre>
<p>
Handler function for implementing <a href="raptor-section-uri.html#raptor-new-uri-relative-to-base"><code class="function">raptor_new_uri_relative_to_base()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
<td> URI context data
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>base_uri</code></em>&#160;:</span></td>
<td> base URI object
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>uri_string</code></em>&#160;:</span></td>
<td> relative URI string
</td>
</tr>
<tr>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> new URI object or NULL on failure
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2627600"></a><h3>
<a name="raptor-new-uri-for-rdf-concept-func"></a>raptor_new_uri_for_rdf_concept_func ()</h3>
<a class="indexterm" name="id2627612"></a><pre class="programlisting"><a href="raptor-section-uri.html#raptor-uri">raptor_uri</a>* (*raptor_new_uri_for_rdf_concept_func)
                                            (void *context,
                                             const char *name);</pre>
<p>
Handler function for implementing <a href="raptor-section-uri.html#raptor-new-uri-for-rdf-concept"><code class="function">raptor_new_uri_for_rdf_concept()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
<td> URI context data
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>name</code></em>&#160;:</span></td>
<td> RDF term
</td>
</tr>
<tr>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> new URI object or NULL on failure
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2627702"></a><h3>
<a name="raptor-free-uri-func"></a>raptor_free_uri_func ()</h3>
<a class="indexterm" name="id2627713"></a><pre class="programlisting">void        (*raptor_free_uri_func)         (void *context,
                                             <a href="raptor-section-uri.html#raptor-uri">raptor_uri</a> *uri);</pre>
<p>
Handler function for implementing <a href="raptor-section-uri.html#raptor-free-uri"><code class="function">raptor_free_uri()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
<td> URI context data
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>uri</code></em>&#160;:</span></td>
<td> URI object
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2627793"></a><h3>
<a name="raptor-uri-equals-func"></a>raptor_uri_equals_func ()</h3>
<a class="indexterm" name="id2627804"></a><pre class="programlisting">int         (*raptor_uri_equals_func)       (void *context,
                                             <a href="raptor-section-uri.html#raptor-uri">raptor_uri</a> *uri1,
                                             <a href="raptor-section-uri.html#raptor-uri">raptor_uri</a> *uri2);</pre>
<p>
Handler function for implementing <a href="raptor-section-uri.html#raptor-uri-equals"><code class="function">raptor_uri_equals()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
<td> URI context data
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>uri1</code></em>&#160;:</span></td>
<td> URI object 1
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>uri2</code></em>&#160;:</span></td>
<td> URI object 2
</td>
</tr>
<tr>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> non-0 if the URIs are equal
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2627916"></a><h3>
<a name="raptor-uri-copy-func"></a>raptor_uri_copy_func ()</h3>
<a class="indexterm" name="id2627927"></a><pre class="programlisting"><a href="raptor-section-uri.html#raptor-uri">raptor_uri</a>* (*raptor_uri_copy_func)         (void *context,
                                             <a href="raptor-section-uri.html#raptor-uri">raptor_uri</a> *uri);</pre>
<p>
Handler function for implementing <a href="raptor-section-uri.html#raptor-uri-copy"><code class="function">raptor_uri_copy()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
<td> URI context data
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>uri</code></em>&#160;:</span></td>
<td> URI object
</td>
</tr>
<tr>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> new URI object or NULL on failure
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</body>
</html>