Your IP : 216.73.216.48


Current Path : /usr/doc/raptor2-2.0.15/html/
Upload File :
Current File : //usr/doc/raptor2-2.0.15/html/raptor2-section-parser.html

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Parser</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="Raptor RDF Syntax Library Manual">
<link rel="up" href="reference-manual.html" title="Part II. Raptor Reference Manual">
<link rel="prev" href="raptor2-section-locator.html" title="Locator">
<link rel="next" href="raptor2-section-sax2.html" title="SAX2">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</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="raptor2-section-locator.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 Library Manual</th>
<td><a accesskey="n" href="raptor2-section-sax2.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#raptor2-section-parser.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#raptor2-section-parser.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="raptor2-section-parser"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="raptor2-section-parser.top_of_page"></a>Parser</span></h2>
<p>Parser — RDF parsers - from a syntax to RDF triples</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="raptor2-section-parser.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">typedef             <a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a>;
<a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="returnvalue">raptor_parser</span></a> *     <a class="link" href="raptor2-section-parser.html#raptor-new-parser" title="raptor_new_parser ()">raptor_new_parser</a>                   (<em class="parameter"><code><a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="type">raptor_world</span></a> *world</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);
<a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="returnvalue">raptor_parser</span></a> *     <a class="link" href="raptor2-section-parser.html#raptor-new-parser-for-content" title="raptor_new_parser_for_content ()">raptor_new_parser_for_content</a>       (<em class="parameter"><code><a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="type">raptor_world</span></a> *world</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *uri</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *mime_type</code></em>,
                                                         <em class="parameter"><code>const unsigned <span class="type">char</span> *buffer</code></em>,
                                                         <em class="parameter"><code><span class="type">size_t</span> len</code></em>,
                                                         <em class="parameter"><code>const unsigned <span class="type">char</span> *identifier</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="raptor2-section-parser.html#raptor-free-parser" title="raptor_free_parser ()">raptor_free_parser</a>                  (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *parser</code></em>);
<span class="returnvalue">void</span>                (<a class="link" href="raptor2-section-parser.html#raptor-graph-mark-handler" title="raptor_graph_mark_handler ()">*raptor_graph_mark_handler</a>)        (<em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *graph</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> flags</code></em>);
<span class="returnvalue">void</span>                (<a class="link" href="raptor2-section-parser.html#raptor-namespace-handler" title="raptor_namespace_handler ()">*raptor_namespace_handler</a>)         (<em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-xml-namespace.html#raptor-namespace" title="raptor_namespace"><span class="type">raptor_namespace</span></a> *nspace</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="raptor2-section-parser.html#raptor-parser-set-statement-handler" title="raptor_parser_set_statement_handler ()">raptor_parser_set_statement_handler</a> (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *parser</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-general.html#raptor-statement-handler" title="raptor_statement_handler ()"><span class="type">raptor_statement_handler</span></a> handler</code></em>);
enum                <a class="link" href="raptor2-section-parser.html#raptor-graph-mark-flags" title="enum raptor_graph_mark_flags">raptor_graph_mark_flags</a>;
<span class="returnvalue">void</span>                <a class="link" href="raptor2-section-parser.html#raptor-parser-set-graph-mark-handler" title="raptor_parser_set_graph_mark_handler ()">raptor_parser_set_graph_mark_handler</a>
                                                        (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *parser</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-graph-mark-handler" title="raptor_graph_mark_handler ()"><span class="type">raptor_graph_mark_handler</span></a> handler</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="raptor2-section-parser.html#raptor-parser-set-namespace-handler" title="raptor_parser_set_namespace_handler ()">raptor_parser_set_namespace_handler</a> (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *parser</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-namespace-handler" title="raptor_namespace_handler ()"><span class="type">raptor_namespace_handler</span></a> handler</code></em>);
const <a class="link" href="raptor2-section-general.html#raptor-syntax-description" title="raptor_syntax_description"><span class="returnvalue">raptor_syntax_description</span></a> * <a class="link" href="raptor2-section-parser.html#raptor-parser-get-description" title="raptor_parser_get_description ()">raptor_parser_get_description</a>
                                                        (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>);
<a class="link" href="raptor2-section-locator.html#raptor-locator" title="raptor_locator"><span class="returnvalue">raptor_locator</span></a> *    <a class="link" href="raptor2-section-parser.html#raptor-parser-get-locator" title="raptor_parser_get_locator ()">raptor_parser_get_locator</a>           (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="raptor2-section-parser.html#raptor-parser-parse-abort" title="raptor_parser_parse_abort ()">raptor_parser_parse_abort</a>           (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="raptor2-section-parser.html#raptor-parser-parse-chunk" title="raptor_parser_parse_chunk ()">raptor_parser_parse_chunk</a>           (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>,
                                                         <em class="parameter"><code>const unsigned <span class="type">char</span> *buffer</code></em>,
                                                         <em class="parameter"><code><span class="type">size_t</span> len</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> is_end</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="raptor2-section-parser.html#raptor-parser-parse-file" title="raptor_parser_parse_file ()">raptor_parser_parse_file</a>            (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *uri</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *base_uri</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="raptor2-section-parser.html#raptor-parser-parse-file-stream" title="raptor_parser_parse_file_stream ()">raptor_parser_parse_file_stream</a>     (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>,
                                                         <em class="parameter"><code><span class="type">FILE</span> *stream</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *base_uri</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="raptor2-section-parser.html#raptor-parser-parse-iostream" title="raptor_parser_parse_iostream ()">raptor_parser_parse_iostream</a>        (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-iostream.html#raptor-iostream" title="raptor_iostream"><span class="type">raptor_iostream</span></a> *iostr</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *base_uri</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="raptor2-section-parser.html#raptor-parser-parse-start" title="raptor_parser_parse_start ()">raptor_parser_parse_start</a>           (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *uri</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="raptor2-section-parser.html#raptor-parser-parse-uri" title="raptor_parser_parse_uri ()">raptor_parser_parse_uri</a>             (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *uri</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *base_uri</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="raptor2-section-parser.html#raptor-parser-parse-uri-with-connection" title="raptor_parser_parse_uri_with_connection ()">raptor_parser_parse_uri_with_connection</a>
                                                        (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *uri</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *base_uri</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *connection</code></em>);
<a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *        <a class="link" href="raptor2-section-parser.html#raptor-parser-get-graph" title="raptor_parser_get_graph ()">raptor_parser_get_graph</a>             (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>);
const <span class="returnvalue">char</span> *        <a class="link" href="raptor2-section-parser.html#raptor-parser-get-name" title="raptor_parser_get_name ()">raptor_parser_get_name</a>              (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="raptor2-section-parser.html#raptor-parser-set-option" title="raptor_parser_set_option ()">raptor_parser_set_option</a>            (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *parser</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-option.html#raptor-option" title="enum raptor_option"><span class="type">raptor_option</span></a> option</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *string</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> integer</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="raptor2-section-parser.html#raptor-parser-get-option" title="raptor_parser_get_option ()">raptor_parser_get_option</a>            (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *parser</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-option.html#raptor-option" title="enum raptor_option"><span class="type">raptor_option</span></a> option</code></em>,
                                                         <em class="parameter"><code><span class="type">char</span> **string_p</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> *integer_p</code></em>);
const <span class="returnvalue">char</span> *        <a class="link" href="raptor2-section-parser.html#raptor-parser-get-accept-header" title="raptor_parser_get_accept_header ()">raptor_parser_get_accept_header</a>     (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="raptor2-section-parser.html#raptor-parser-set-uri-filter" title="raptor_parser_set_uri_filter ()">raptor_parser_set_uri_filter</a>        (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *parser</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-www.html#raptor-uri-filter-func" title="raptor_uri_filter_func ()"><span class="type">raptor_uri_filter_func</span></a> filter</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>);
<a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="returnvalue">raptor_world</span></a> *      <a class="link" href="raptor2-section-parser.html#raptor-parser-get-world" title="raptor_parser_get_world ()">raptor_parser_get_world</a>             (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="raptor2-section-parser.description"></a><h2>Description</h2>
<p>
The parsing class that allows creating a parser for reading from a
particular syntax (or can guess and use contextual information) that
will on demand generate RDF triples to a handler function, as chunks
of syntax data are passed into the parser.  Parsing can be done from
strings in memory, files or from URIs on the web.
</p>
<p>
There are also methods to deal with handling errors, warnings and
returned triples as well as setting options (features) that can
adjust how parsing is performed.
</p>
</div>
<div class="refsect1">
<a name="raptor2-section-parser.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="raptor-parser"></a><h3>raptor_parser</h3>
<pre class="programlisting">raptor_parser* raptor_parser;
</pre>
<p>
Raptor Parser class
</p>
</div>
<hr>
<div class="refsect2">
<a name="raptor-new-parser"></a><h3>raptor_new_parser ()</h3>
<pre class="programlisting"><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="returnvalue">raptor_parser</span></a> *     raptor_new_parser                   (<em class="parameter"><code><a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="type">raptor_world</span></a> *world</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
<p>
Constructor - create a new raptor_parser object.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td>
<td>world object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>the parser name or NULL for default parser</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="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> object or NULL on failure</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-new-parser-for-content"></a><h3>raptor_new_parser_for_content ()</h3>
<pre class="programlisting"><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="returnvalue">raptor_parser</span></a> *     raptor_new_parser_for_content       (<em class="parameter"><code><a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="type">raptor_world</span></a> *world</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *uri</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *mime_type</code></em>,
                                                         <em class="parameter"><code>const unsigned <span class="type">char</span> *buffer</code></em>,
                                                         <em class="parameter"><code><span class="type">size_t</span> len</code></em>,
                                                         <em class="parameter"><code>const unsigned <span class="type">char</span> *identifier</code></em>);</pre>
<p>
Constructor - create a new raptor_parser.
</p>
<p>
Uses <a class="link" href="raptor2-section-world.html#raptor-world-guess-parser-name" title="raptor_world_guess_parser_name ()"><code class="function">raptor_world_guess_parser_name()</code></a> to find a parser by scoring
recognition of the syntax by a block of characters, the content
identifier or a mime type.  The content identifier is typically a
filename or URI or some other identifier.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td>
<td>world object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>URI identifying the syntax (or NULL)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mime_type</code></em> :</span></p></td>
<td>mime type identifying the content (or NULL)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>buffer of content to guess (or NULL)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>length of buffer</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>identifier</code></em> :</span></p></td>
<td>identifier of content (or NULL)</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="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> object or NULL on failure</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-free-parser"></a><h3>raptor_free_parser ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                raptor_free_parser                  (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *parser</code></em>);</pre>
<p>
Destructor - destroy a raptor_parser object.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>parser</code></em> :</span></p></td>
<td>
<a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> object</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-graph-mark-handler"></a><h3>raptor_graph_mark_handler ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*raptor_graph_mark_handler)        (<em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *graph</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> flags</code></em>);</pre>
<p>
Graph start/end mark handler function.
</p>
<p>
Records start and end of graphs happening in a stream of generated
<a class="link" href="raptor2-section-triples.html#raptor-statement" title="raptor_statement"><span class="type">raptor_statement</span></a> via the statement handler.  The callback starts a
graph when <em class="parameter"><code>flags</code></em> has <a class="link" href="raptor2-section-parser.html#RAPTOR-GRAPH-MARK-START:CAPS"><span class="type">RAPTOR_GRAPH_MARK_START</span></a> bit set.
</p>
<p>
The start and ends may be either declared in the syntax via some
keyword or mechanism such as TRiG {} syntax when <em class="parameter"><code>flags</code></em> has bit
<a class="link" href="raptor2-section-parser.html#RAPTOR-GRAPH-MARK-DECLARED:CAPS"><span class="type">RAPTOR_GRAPH_MARK_DECLARED</span></a> set, or be implied by the start/end of
the data in other syntaxes, and the bit will be unset.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>graph</code></em> :</span></p></td>
<td>graph to report, NULL for the default graph</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td>bitmask of <a class="link" href="raptor2-section-parser.html#raptor-graph-mark-flags" title="enum raptor_graph_mark_flags"><span class="type">raptor_graph_mark_flags</span></a> flags</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-namespace-handler"></a><h3>raptor_namespace_handler ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*raptor_namespace_handler)         (<em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-xml-namespace.html#raptor-namespace" title="raptor_namespace"><span class="type">raptor_namespace</span></a> *nspace</code></em>);</pre>
<p>
XML Namespace declaration reporting handler set by 
<a class="link" href="raptor2-section-parser.html#raptor-parser-set-namespace-handler" title="raptor_parser_set_namespace_handler ()"><code class="function">raptor_parser_set_namespace_handler()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>nspace</code></em> :</span></p></td>
<td>
<a class="link" href="raptor2-section-xml-namespace.html#raptor-namespace" title="raptor_namespace"><span class="type">raptor_namespace</span></a> declared</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-set-statement-handler"></a><h3>raptor_parser_set_statement_handler ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                raptor_parser_set_statement_handler (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *parser</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-general.html#raptor-statement-handler" title="raptor_statement_handler ()"><span class="type">raptor_statement_handler</span></a> handler</code></em>);</pre>
<p>
Set the statement handler function for the parser.
</p>
<p>
Use this to set the function to receive statements as the parsing
proceeds. The statement argument to <em class="parameter"><code>handler</code></em> is shared and must be
copied by the caller with <a class="link" href="raptor2-section-triples.html#raptor-statement-copy" title="raptor_statement_copy ()"><code class="function">raptor_statement_copy()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>parser</code></em> :</span></p></td>
<td>
<a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> parser object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data pointer for callback</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>handler</code></em> :</span></p></td>
<td>new statement callback function</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-graph-mark-flags"></a><h3>enum raptor_graph_mark_flags</h3>
<pre class="programlisting">typedef enum {
  RAPTOR_GRAPH_MARK_START = 1,
  RAPTOR_GRAPH_MARK_DECLARED = 2
} raptor_graph_mark_flags;
</pre>
<p>
Graph mark handler bitmask flags
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="RAPTOR-GRAPH-MARK-START:CAPS"></a><span class="term"><code class="literal">RAPTOR_GRAPH_MARK_START</code></span></p></td>
<td>mark is start of graph (otherwise is end)
</td>
</tr>
<tr>
<td><p><a name="RAPTOR-GRAPH-MARK-DECLARED:CAPS"></a><span class="term"><code class="literal">RAPTOR_GRAPH_MARK_DECLARED</code></span></p></td>
<td>mark was declared in syntax rather than implict
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-set-graph-mark-handler"></a><h3>raptor_parser_set_graph_mark_handler ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                raptor_parser_set_graph_mark_handler
                                                        (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *parser</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-graph-mark-handler" title="raptor_graph_mark_handler ()"><span class="type">raptor_graph_mark_handler</span></a> handler</code></em>);</pre>
<p>
Set the graph mark handler function for the parser.
</p>
<p>
See <a class="link" href="raptor2-section-parser.html#raptor-graph-mark-handler" title="raptor_graph_mark_handler ()"><span class="type">raptor_graph_mark_handler</span></a> and <a class="link" href="raptor2-section-parser.html#raptor-graph-mark-flags" title="enum raptor_graph_mark_flags"><span class="type">raptor_graph_mark_flags</span></a> for
the marks that may be returned by the handler.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>parser</code></em> :</span></p></td>
<td>
<a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> parser object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data pointer for callback</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>handler</code></em> :</span></p></td>
<td>new graph callback function</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-set-namespace-handler"></a><h3>raptor_parser_set_namespace_handler ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                raptor_parser_set_namespace_handler (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *parser</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-namespace-handler" title="raptor_namespace_handler ()"><span class="type">raptor_namespace_handler</span></a> handler</code></em>);</pre>
<p>
Set the namespace handler function for the parser.
</p>
<p>
When a prefix/namespace is seen in a parser, call the given
<em class="parameter"><code>handler</code></em> with the prefix string and the <a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> namespace URI.
Either can be NULL for the default prefix or default namespace.
</p>
<p>
The handler function does not deal with duplicates so any
namespace may be declared multiple times.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>parser</code></em> :</span></p></td>
<td>
<a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> parser object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data pointer for callback</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>handler</code></em> :</span></p></td>
<td>new namespace callback function</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-get-description"></a><h3>raptor_parser_get_description ()</h3>
<pre class="programlisting">const <a class="link" href="raptor2-section-general.html#raptor-syntax-description" title="raptor_syntax_description"><span class="returnvalue">raptor_syntax_description</span></a> * raptor_parser_get_description
                                                        (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>);</pre>
<p>
Get description of the syntaxes of the parser.
</p>
<p>
The returned description is static and lives as long as the raptor
library (raptor world).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>rdf_parser</code></em> :</span></p></td>
<td>
<a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> parser object</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>description of syntax</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-get-locator"></a><h3>raptor_parser_get_locator ()</h3>
<pre class="programlisting"><a class="link" href="raptor2-section-locator.html#raptor-locator" title="raptor_locator"><span class="returnvalue">raptor_locator</span></a> *    raptor_parser_get_locator           (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>);</pre>
<p>
Get the current raptor locator object.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>rdf_parser</code></em> :</span></p></td>
<td>raptor parser</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>raptor locator</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-parse-abort"></a><h3>raptor_parser_parse_abort ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                raptor_parser_parse_abort           (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>);</pre>
<p>
Abort an ongoing parsing.
</p>
<p>
Causes any ongoing generation of statements by a parser to be
terminated and the parser to return controlto the application
as soon as draining any existing buffers.
</p>
<p>
Most useful inside <a class="link" href="raptor2-section-parser.html#raptor-parser-parse-file" title="raptor_parser_parse_file ()"><code class="function">raptor_parser_parse_file()</code></a> or
<a class="link" href="raptor2-section-parser.html#raptor-parser-parse-uri" title="raptor_parser_parse_uri ()"><code class="function">raptor_parser_parse_uri()</code></a> when the Raptor library is directing the
parsing and when one of the callback handlers such as as set by
<a class="link" href="raptor2-section-parser.html#raptor-parser-set-statement-handler" title="raptor_parser_set_statement_handler ()"><code class="function">raptor_parser_set_statement_handler()</code></a> requires to return to the main
application code.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>rdf_parser</code></em> :</span></p></td>
<td>
<a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> parser object</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-parse-chunk"></a><h3>raptor_parser_parse_chunk ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 raptor_parser_parse_chunk           (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>,
                                                         <em class="parameter"><code>const unsigned <span class="type">char</span> *buffer</code></em>,
                                                         <em class="parameter"><code><span class="type">size_t</span> len</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> is_end</code></em>);</pre>
<p>
Parse a block of content into triples.
</p>
<p>
This method can only be called after <a class="link" href="raptor2-section-parser.html#raptor-parser-parse-start" title="raptor_parser_parse_start ()"><code class="function">raptor_parser_parse_start()</code></a> has
initialised the parser.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>rdf_parser</code></em> :</span></p></td>
<td>RDF parser</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>content to parse</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>length of buffer</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>is_end</code></em> :</span></p></td>
<td>non-0 if this is the end of the content (such as EOF)</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>
<hr>
<div class="refsect2">
<a name="raptor-parser-parse-file"></a><h3>raptor_parser_parse_file ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 raptor_parser_parse_file            (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *uri</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *base_uri</code></em>);</pre>
<p>
Parse RDF content at a file URI.
</p>
<p>
If <em class="parameter"><code>uri</code></em> is NULL (source is stdin), then the <em class="parameter"><code>base_uri</code></em> is required.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>rdf_parser</code></em> :</span></p></td>
<td>parser</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>URI of RDF content or NULL to read from standard input</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>base_uri</code></em> :</span></p></td>
<td>the base URI to use (or NULL if the same)</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>
<hr>
<div class="refsect2">
<a name="raptor-parser-parse-file-stream"></a><h3>raptor_parser_parse_file_stream ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 raptor_parser_parse_file_stream     (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>,
                                                         <em class="parameter"><code><span class="type">FILE</span> *stream</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *base_uri</code></em>);</pre>
<p>
Parse RDF content from a FILE*.
</p>
<p>
After draining the FILE* stream (EOF), fclose is not called on it.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>rdf_parser</code></em> :</span></p></td>
<td>parser</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
<td>FILE* of RDF content</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
<td>filename of content or NULL if it has no name</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>base_uri</code></em> :</span></p></td>
<td>the base URI to use</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>
<hr>
<div class="refsect2">
<a name="raptor-parser-parse-iostream"></a><h3>raptor_parser_parse_iostream ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 raptor_parser_parse_iostream        (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-iostream.html#raptor-iostream" title="raptor_iostream"><span class="type">raptor_iostream</span></a> *iostr</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *base_uri</code></em>);</pre>
<p>
Parse content from an iostream
</p>
<p>
If the parser requires a base URI and <em class="parameter"><code>base_uri</code></em> is NULL, an error
will be generated and the function will fail.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>rdf_parser</code></em> :</span></p></td>
<td>parser</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iostr</code></em> :</span></p></td>
<td>iostream to read from</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>base_uri</code></em> :</span></p></td>
<td>the base URI to use (or NULL)</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>non 0 on failure, &lt;0 if a required base URI was missing</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-parse-start"></a><h3>raptor_parser_parse_start ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 raptor_parser_parse_start           (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *uri</code></em>);</pre>
<p>
Start a parse of content with base URI.
</p>
<p>
Parsers that need a base URI can be identified using a syntax
description returned by <a class="link" href="raptor2-section-world.html#raptor-world-get-parser-description" title="raptor_world_get_parser_description ()"><code class="function">raptor_world_get_parser_description()</code></a>
statically or <a class="link" href="raptor2-section-parser.html#raptor-parser-get-description" title="raptor_parser_get_description ()"><code class="function">raptor_parser_get_description()</code></a> on a constructed
parser.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>rdf_parser</code></em> :</span></p></td>
<td>RDF parser</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>base URI or may be NULL if no base URI is required</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>non-0 on failure, &lt;0 if a required base URI was missing</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-parse-uri"></a><h3>raptor_parser_parse_uri ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 raptor_parser_parse_uri             (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *uri</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *base_uri</code></em>);</pre>
<p>
Parse the RDF content at URI.
</p>
<p>
Sends an HTTP Accept: header whent the URI is of the HTTP protocol,
see <a class="link" href="raptor2-section-parser.html#raptor-parser-parse-uri-with-connection" title="raptor_parser_parse_uri_with_connection ()"><code class="function">raptor_parser_parse_uri_with_connection()</code></a> for details including
how the <em class="parameter"><code>base_uri</code></em> is used.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>rdf_parser</code></em> :</span></p></td>
<td>parser</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>URI of RDF content</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>base_uri</code></em> :</span></p></td>
<td>the base URI to use (or NULL if the same)</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>
<hr>
<div class="refsect2">
<a name="raptor-parser-parse-uri-with-connection"></a><h3>raptor_parser_parse_uri_with_connection ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 raptor_parser_parse_uri_with_connection
                                                        (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *uri</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *base_uri</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *connection</code></em>);</pre>
<p>
Parse RDF content at URI using existing WWW connection.
</p>
<p>
If <em class="parameter"><code>base_uri</code></em> is not given and during resolution of the URI, a
protocol redirection occurs, the final resolved URI will be
used as the base URI.  If redirection does not occur, the
base URI will be <em class="parameter"><code>uri</code></em>.
</p>
<p>
If <em class="parameter"><code>base_uri</code></em> is given, it overrides the process above.
</p>
<p>
When <em class="parameter"><code>connection</code></em> is NULL and a MIME Type exists for the parser
type, this type is sent in an HTTP Accept: header in the form
Accept: MIME-TYPE along with a wildcard of 0.1 quality, so MIME-TYPE is
prefered rather than the sole answer.  The latter part may not be
necessary but should ensure an HTTP 200 response.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>rdf_parser</code></em> :</span></p></td>
<td>parser</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>URI of RDF content</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>base_uri</code></em> :</span></p></td>
<td>the base URI to use (or NULL if the same)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>connection object pointer or NULL to create a new one</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>
<hr>
<div class="refsect2">
<a name="raptor-parser-get-graph"></a><h3>raptor_parser_get_graph ()</h3>
<pre class="programlisting"><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *        raptor_parser_get_graph             (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>);</pre>
<p>
Get the current graph for the parser
</p>
<p>
The returned URI is owned by the caller and must be freed with
<a class="link" href="raptor2-section-uri.html#raptor-free-uri" title="raptor_free_uri ()"><code class="function">raptor_free_uri()</code></a>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>rdf_parser</code></em> :</span></p></td>
<td>parser</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>raptor_uri* graph name or NULL for the default graph</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-get-name"></a><h3>raptor_parser_get_name ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *        raptor_parser_get_name              (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>);</pre>
<p>
Get the name of a parser.
</p>
<p>
Use <a class="link" href="raptor2-section-parser.html#raptor-parser-get-description" title="raptor_parser_get_description ()"><code class="function">raptor_parser_get_description()</code></a> to get the alternate names and
aliases as well as other descriptive values.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>rdf_parser</code></em> :</span></p></td>
<td>
<a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> parser object</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the short name for the parser.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-set-option"></a><h3>raptor_parser_set_option ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 raptor_parser_set_option            (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *parser</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-option.html#raptor-option" title="enum raptor_option"><span class="type">raptor_option</span></a> option</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *string</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> integer</code></em>);</pre>
<p>
Set parser option.
</p>
<p>
If <em class="parameter"><code>string</code></em> is not NULL and the option type is numeric, the string
value is converted to an integer and used in preference to <em class="parameter"><code>integer</code></em>.
</p>
<p>
If <em class="parameter"><code>string</code></em> is NULL and the option type is not numeric, an error is
returned.
</p>
<p>
The <em class="parameter"><code>string</code></em> values used are copied.
</p>
<p>
The allowed options are available via
<a class="link" href="raptor2-section-option.html#raptor-world-get-option-description" title="raptor_world_get_option_description ()"><code class="function">raptor_world_get_option_description()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>parser</code></em> :</span></p></td>
<td>
<a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> parser object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>option</code></em> :</span></p></td>
<td>option to set from enumerated <a class="link" href="raptor2-section-option.html#raptor-option" title="enum raptor_option"><span class="type">raptor_option</span></a> values</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
<td>string option value (or NULL)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>integer</code></em> :</span></p></td>
<td>integer option value</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>non 0 on failure or if the option is unknown</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-get-option"></a><h3>raptor_parser_get_option ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 raptor_parser_get_option            (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *parser</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-option.html#raptor-option" title="enum raptor_option"><span class="type">raptor_option</span></a> option</code></em>,
                                                         <em class="parameter"><code><span class="type">char</span> **string_p</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> *integer_p</code></em>);</pre>
<p>
Get parser option.
</p>
<p>
Any string value returned in *<em class="parameter"><code>string_p</code></em> is shared and must
be copied by the caller.
</p>
<p>
The allowed options are available via
<a class="link" href="raptor2-section-option.html#raptor-world-get-option-description" title="raptor_world_get_option_description ()"><code class="function">raptor_world_get_option_description()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>parser</code></em> :</span></p></td>
<td>
<a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> parser object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>option</code></em> :</span></p></td>
<td>option to get value</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>string_p</code></em> :</span></p></td>
<td>pointer to where to store string value</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>integer_p</code></em> :</span></p></td>
<td>pointer to where to store integer value</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>option value or &lt; 0 for an illegal option</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-get-accept-header"></a><h3>raptor_parser_get_accept_header ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *        raptor_parser_get_accept_header     (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>);</pre>
<p>
Get an HTTP Accept value for the parser.
</p>
<p>
The returned string must be freed by the caller such as with
<a class="link" href="raptor2-section-memory.html#raptor-free-memory" title="raptor_free_memory ()"><code class="function">raptor_free_memory()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>rdf_parser</code></em> :</span></p></td>
<td>parser</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new Accept: header string or NULL on failure</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-set-uri-filter"></a><h3>raptor_parser_set_uri_filter ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                raptor_parser_set_uri_filter        (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *parser</code></em>,
                                                         <em class="parameter"><code><a class="link" href="raptor2-section-www.html#raptor-uri-filter-func" title="raptor_uri_filter_func ()"><span class="type">raptor_uri_filter_func</span></a> filter</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>);</pre>
<p>
Set URI filter function for WWW retrieval.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>parser</code></em> :</span></p></td>
<td>parser object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>filter</code></em> :</span></p></td>
<td>URI filter function</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>User data to pass to filter function</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-get-world"></a><h3>raptor_parser_get_world ()</h3>
<pre class="programlisting"><a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="returnvalue">raptor_world</span></a> *      raptor_parser_get_world             (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>);</pre>
<p>
Get the <a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="type">raptor_world</span></a> object associated with a parser.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>rdf_parser</code></em> :</span></p></td>
<td>parser</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>raptor_world* pointer</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>