diff options
Diffstat (limited to 'docs/html/raptor2-section-parser.html')
-rw-r--r-- | docs/html/raptor2-section-parser.html | 1286 |
1 files changed, 1286 insertions, 0 deletions
diff --git a/docs/html/raptor2-section-parser.html b/docs/html/raptor2-section-parser.html new file mode 100644 index 0000000..141d70e --- /dev/null +++ b/docs/html/raptor2-section-parser.html @@ -0,0 +1,1286 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>section-parser: Raptor RDF Syntax Library Manual</title> +<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"> +<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="section-locator"> +<link rel="next" href="raptor2-section-sax2.html" title="section-sax2"> +<meta name="generator" content="GTK-Doc V1.33.1 (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="5"><tr valign="middle"> +<td width="100%" align="left" class="shortcuts"> +<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> + <a href="#raptor2-section-parser.description" class="shortcut">Description</a></span> +</td> +<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> +<td><a accesskey="u" href="reference-manual.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> +<td><a accesskey="p" href="raptor2-section-locator.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> +<td><a accesskey="n" href="raptor2-section-sax2.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></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>section-parser</span></h2> +<p>section-parser</p> +</td> +<td class="gallery_image" valign="top" align="right"></td> +</tr></table></div> +<div class="refsect1"> +<a name="raptor2-section-parser.functions"></a><h2>Functions</h2> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="functions_proto_type"> +<col class="functions_proto_name"> +</colgroup> +<tbody> +<tr> +<td class="function_type"> +<a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="returnvalue">raptor_parser</span></a> * +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-parser.html#raptor-new-parser" title="raptor_new_parser ()">raptor_new_parser</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="returnvalue">raptor_parser</span></a> * +</td> +<td class="function_name"> +<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> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-parser.html#raptor-free-parser" title="raptor_free_parser ()">raptor_free_parser</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="raptor2-section-parser.html#raptor-graph-mark-handler" title="raptor_graph_mark_handler ()">*raptor_graph_mark_handler</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="raptor2-section-parser.html#raptor-namespace-handler" title="raptor_namespace_handler ()">*raptor_namespace_handler</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<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> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<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> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<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> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">const <a class="link" href="raptor2-section-general.html#raptor-syntax-description" title="raptor_syntax_description"><span class="returnvalue">raptor_syntax_description</span></a> * +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-parser.html#raptor-parser-get-description" title="raptor_parser_get_description ()">raptor_parser_get_description</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<a class="link" href="raptor2-section-locator.html#raptor-locator" title="raptor_locator"><span class="returnvalue">raptor_locator</span></a> * +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-parser.html#raptor-parser-get-locator" title="raptor_parser_get_locator ()">raptor_parser_get_locator</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-parser.html#raptor-parser-parse-abort" title="raptor_parser_parse_abort ()">raptor_parser_parse_abort</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-parser.html#raptor-parser-parse-chunk" title="raptor_parser_parse_chunk ()">raptor_parser_parse_chunk</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-parser.html#raptor-parser-parse-file" title="raptor_parser_parse_file ()">raptor_parser_parse_file</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<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> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-parser.html#raptor-parser-parse-iostream" title="raptor_parser_parse_iostream ()">raptor_parser_parse_iostream</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-parser.html#raptor-parser-parse-start" title="raptor_parser_parse_start ()">raptor_parser_parse_start</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-parser.html#raptor-parser-parse-uri" title="raptor_parser_parse_uri ()">raptor_parser_parse_uri</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<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> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> * +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-parser.html#raptor-parser-get-graph" title="raptor_parser_get_graph ()">raptor_parser_get_graph</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">const <span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-parser.html#raptor-parser-get-name" title="raptor_parser_get_name ()">raptor_parser_get_name</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-parser.html#raptor-parser-set-option" title="raptor_parser_set_option ()">raptor_parser_set_option</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-parser.html#raptor-parser-get-option" title="raptor_parser_get_option ()">raptor_parser_get_option</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">const <span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<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> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<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> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="returnvalue">raptor_world</span></a> * +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-parser.html#raptor-parser-get-world" title="raptor_parser_get_world ()">raptor_parser_get_world</a> <span class="c_punctuation">()</span> +</td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect1"> +<a name="raptor2-section-parser.other"></a><h2>Types and Values</h2> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="other_proto_type"> +<col class="other_proto_name"> +</colgroup> +<tbody> +<tr> +<td class="typedef_keyword">typedef</td> +<td class="function_name"><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="raptor2-section-parser.html#raptor-graph-mark-flags" title="enum raptor_graph_mark_flags">raptor_graph_mark_flags</a></td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect1"> +<a name="raptor2-section-parser.description"></a><h2>Description</h2> +</div> +<div class="refsect1"> +<a name="raptor2-section-parser.functions_details"></a><h2>Functions</h2> +<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="refsect3"> +<a name="raptor-new-parser.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>world</p></td> +<td class="parameter_description"><p>world object</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>name</p></td> +<td class="parameter_description"><p>the parser name or NULL for default parser</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-new-parser.returns"></a><h4>Returns</h4> +<p> 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</p> +</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 <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="refsect3"> +<a name="raptor-new-parser-for-content.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>world</p></td> +<td class="parameter_description"><p>world object</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>uri</p></td> +<td class="parameter_description"><p>URI identifying the syntax (or NULL)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>mime_type</p></td> +<td class="parameter_description"><p>mime type identifying the content (or NULL)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>buffer</p></td> +<td class="parameter_description"><p>buffer of content to guess (or NULL)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>len</p></td> +<td class="parameter_description"><p>length of buffer</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>identifier</p></td> +<td class="parameter_description"><p>identifier of content (or NULL)</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-new-parser-for-content.returns"></a><h4>Returns</h4> +<p> 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</p> +</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="refsect3"> +<a name="raptor-free-parser.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>parser</p></td> +<td class="parameter_description"><p><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> object</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</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> +<span class="c_punctuation">(</span>*raptor_graph_mark_handler<span class="c_punctuation">)</span> (<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="refsect3"> +<a name="raptor-graph-mark-handler.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>user_data</p></td> +<td class="parameter_description"><p>user data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>graph</p></td> +<td class="parameter_description"><p>graph to report, NULL for the default graph</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>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</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</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> +<span class="c_punctuation">(</span>*raptor_namespace_handler<span class="c_punctuation">)</span> (<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="refsect3"> +<a name="raptor-namespace-handler.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>user_data</p></td> +<td class="parameter_description"><p>user data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>nspace</p></td> +<td class="parameter_description"><p><a class="link" href="raptor2-section-xml-namespace.html#raptor-namespace" title="raptor_namespace"><span class="type">raptor_namespace</span></a> declared</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</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="refsect3"> +<a name="raptor-parser-set-statement-handler.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>parser</p></td> +<td class="parameter_description"><p><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> parser object</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>user_data</p></td> +<td class="parameter_description"><p>user data pointer for callback</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>handler</p></td> +<td class="parameter_description"><p>new statement callback function</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</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="refsect3"> +<a name="raptor-parser-set-graph-mark-handler.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>parser</p></td> +<td class="parameter_description"><p><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> parser object</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>user_data</p></td> +<td class="parameter_description"><p>user data pointer for callback</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>handler</p></td> +<td class="parameter_description"><p>new graph callback function</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</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="refsect3"> +<a name="raptor-parser-set-namespace-handler.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>parser</p></td> +<td class="parameter_description"><p><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> parser object</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>user_data</p></td> +<td class="parameter_description"><p>user data pointer for callback</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>handler</p></td> +<td class="parameter_description"><p>new namespace callback function</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</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="refsect3"> +<a name="raptor-parser-get-description.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>rdf_parser</p></td> +<td class="parameter_description"><p><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> parser object</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-parser-get-description.returns"></a><h4>Returns</h4> +<p> description of syntax</p> +</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="refsect3"> +<a name="raptor-parser-get-locator.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>rdf_parser</p></td> +<td class="parameter_description"><p>raptor parser</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-parser-get-locator.returns"></a><h4>Returns</h4> +<p> raptor locator</p> +</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="refsect3"> +<a name="raptor-parser-parse-abort.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>rdf_parser</p></td> +<td class="parameter_description"><p><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> parser object</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</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 <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="refsect3"> +<a name="raptor-parser-parse-chunk.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>rdf_parser</p></td> +<td class="parameter_description"><p>RDF parser</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>buffer</p></td> +<td class="parameter_description"><p>content to parse</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>len</p></td> +<td class="parameter_description"><p>length of buffer</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>is_end</p></td> +<td class="parameter_description"><p>non-0 if this is the end of the content (such as EOF)</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-parser-parse-chunk.returns"></a><h4>Returns</h4> +<p> non-0 on failure.</p> +</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="refsect3"> +<a name="raptor-parser-parse-file.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>rdf_parser</p></td> +<td class="parameter_description"><p>parser</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>uri</p></td> +<td class="parameter_description"><p>URI of RDF content or NULL to read from standard input</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>base_uri</p></td> +<td class="parameter_description"><p>the base URI to use (or NULL if the same)</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-parser-parse-file.returns"></a><h4>Returns</h4> +<p> non 0 on failure</p> +</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="refsect3"> +<a name="raptor-parser-parse-file-stream.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>rdf_parser</p></td> +<td class="parameter_description"><p>parser</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>stream</p></td> +<td class="parameter_description"><p>FILE* of RDF content</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>filename</p></td> +<td class="parameter_description"><p>filename of content or NULL if it has no name</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>base_uri</p></td> +<td class="parameter_description"><p>the base URI to use</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-parser-parse-file-stream.returns"></a><h4>Returns</h4> +<p> non 0 on failure</p> +</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="refsect3"> +<a name="raptor-parser-parse-iostream.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>rdf_parser</p></td> +<td class="parameter_description"><p>parser</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>iostr</p></td> +<td class="parameter_description"><p>iostream to read from</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>base_uri</p></td> +<td class="parameter_description"><p>the base URI to use (or NULL)</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-parser-parse-iostream.returns"></a><h4>Returns</h4> +<p> non 0 on failure, <0 if a required base URI was missing</p> +</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="refsect3"> +<a name="raptor-parser-parse-start.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>rdf_parser</p></td> +<td class="parameter_description"><p>RDF parser</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>uri</p></td> +<td class="parameter_description"><p>base URI or may be NULL if no base URI is required</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-parser-parse-start.returns"></a><h4>Returns</h4> +<p> non-0 on failure, <0 if a required base URI was missing</p> +</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="refsect3"> +<a name="raptor-parser-parse-uri.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>rdf_parser</p></td> +<td class="parameter_description"><p>parser</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>uri</p></td> +<td class="parameter_description"><p>URI of RDF content</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>base_uri</p></td> +<td class="parameter_description"><p>the base URI to use (or NULL if the same)</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-parser-parse-uri.returns"></a><h4>Returns</h4> +<p> non 0 on failure</p> +</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="refsect3"> +<a name="raptor-parser-parse-uri-with-connection.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>rdf_parser</p></td> +<td class="parameter_description"><p>parser</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>uri</p></td> +<td class="parameter_description"><p>URI of RDF content</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>base_uri</p></td> +<td class="parameter_description"><p>the base URI to use (or NULL if the same)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>connection</p></td> +<td class="parameter_description"><p>connection object pointer or NULL to create a new one</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-parser-parse-uri-with-connection.returns"></a><h4>Returns</h4> +<p> non 0 on failure</p> +</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="refsect3"> +<a name="raptor-parser-get-graph.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>rdf_parser</p></td> +<td class="parameter_description"><p>parser</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-parser-get-graph.returns"></a><h4>Returns</h4> +<p> raptor_uri* graph name or NULL for the default graph</p> +</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="refsect3"> +<a name="raptor-parser-get-name.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>rdf_parser</p></td> +<td class="parameter_description"><p><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> parser object</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-parser-get-name.returns"></a><h4>Returns</h4> +<p> the short name for the parser.</p> +</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="refsect3"> +<a name="raptor-parser-set-option.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>parser</p></td> +<td class="parameter_description"><p><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> parser object</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>option</p></td> +<td class="parameter_description"><p>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</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>string</p></td> +<td class="parameter_description"><p>string option value (or NULL)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>integer</p></td> +<td class="parameter_description"><p>integer option value</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-parser-set-option.returns"></a><h4>Returns</h4> +<p> non 0 on failure or if the option is unknown</p> +</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="refsect3"> +<a name="raptor-parser-get-option.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>parser</p></td> +<td class="parameter_description"><p><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> parser object</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>option</p></td> +<td class="parameter_description"><p>option to get value</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>string_p</p></td> +<td class="parameter_description"><p>pointer to where to store string value</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>integer_p</p></td> +<td class="parameter_description"><p>pointer to where to store integer value</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-parser-get-option.returns"></a><h4>Returns</h4> +<p> option value or < 0 for an illegal option</p> +</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="refsect3"> +<a name="raptor-parser-get-accept-header.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>rdf_parser</p></td> +<td class="parameter_description"><p>parser</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-parser-get-accept-header.returns"></a><h4>Returns</h4> +<p> a new Accept: header string or NULL on failure</p> +</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="refsect3"> +<a name="raptor-parser-set-uri-filter.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>parser</p></td> +<td class="parameter_description"><p>parser object</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>filter</p></td> +<td class="parameter_description"><p>URI filter function</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>user_data</p></td> +<td class="parameter_description"><p>User data to pass to filter function</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</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="refsect3"> +<a name="raptor-parser-get-world.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>rdf_parser</p></td> +<td class="parameter_description"><p>parser</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-parser-get-world.returns"></a><h4>Returns</h4> +<p> raptor_world* pointer</p> +</div> +</div> +</div> +<div class="refsect1"> +<a name="raptor2-section-parser.other_details"></a><h2>Types and Values</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-graph-mark-flags"></a><h3>enum raptor_graph_mark_flags</h3> +<p>Graph mark handler bitmask flags</p> +<div class="refsect3"> +<a name="raptor-graph-mark-flags.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="RAPTOR-GRAPH-MARK-START:CAPS"></a>RAPTOR_GRAPH_MARK_START</p></td> +<td class="enum_member_description"> +<p>mark is start of graph (otherwise is end)</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="RAPTOR-GRAPH-MARK-DECLARED:CAPS"></a>RAPTOR_GRAPH_MARK_DECLARED</p></td> +<td class="enum_member_description"> +<p>mark was declared in syntax rather than implict</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +</div> +</div> +<div class="footer"> +<hr>Generated by GTK-Doc V1.33.1</div> +</body> +</html>
\ No newline at end of file |