1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-18 09:00:07 +02:00
audacity/lib-src/libraptor/docs/html/raptor-section-parser.html
2010-01-24 09:19:39 +00:00

1321 lines
63 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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.73.2">
<link rel="start" href="index.html" title="Raptor RDF Syntax Parsing and Serializing Library Manual">
<link rel="up" href="reference-manual.html" title="Part II. Raptor Reference Manual">
<link rel="prev" href="raptor-section-locator.html" title="Locator">
<link rel="next" href="raptor-section-sax2.html" title="SAX2">
<meta name="generator" content="GTK-Doc V1.10 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="introduction.html" title="Raptor Overview">
<link rel="part" href="tutorial.html" title="Part I. Raptor Tutorial">
<link rel="chapter" href="tutorial-initialising-finishing.html" title="Initialising and Finishing using the Library">
<link rel="chapter" href="tutorial-querying-functionality.html" title="Listing built-in functionality">
<link rel="chapter" href="tutorial-parsing.html" title="Parsing syntaxes to RDF Triples">
<link rel="chapter" href="tutorial-serializing.html" title="Serializing RDF triples to a syntax">
<link rel="part" href="reference-manual.html" title="Part II. Raptor Reference Manual">
<link rel="chapter" href="raptor-parsers.html" title="Parsers in Raptor (syntax to triples)">
<link rel="chapter" href="raptor-serializers.html" title="Serializers in Raptor (triples to syntax)">
<link rel="index" href="ix01.html" title="Index">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="raptor-section-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 Parsing and Serializing Library Manual</th>
<td><a accesskey="n" href="raptor-section-sax2.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#raptor-section-parser.synopsis" class="shortcut">Top</a>
 | 
<a href="#raptor-section-parser.description" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="raptor-section-parser"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="raptor-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="raptor-section-parser.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
typedef <a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a>;
<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a>* <a class="link" href="raptor-section-parser.html#raptor-new-parser" title="raptor_new_parser ()">raptor_new_parser</a> (const char *name);
<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a>* <a class="link" href="raptor-section-parser.html#raptor-new-parser-for-content" title="raptor_new_parser_for_content ()">raptor_new_parser_for_content</a> (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri">raptor_uri</a> *uri,
const char *mime_type,
unsigned char *buffer,
size_t len,
unsigned char *identifier);
int <a class="link" href="raptor-section-parser.html#raptor-start-parse" title="raptor_start_parse ()">raptor_start_parse</a> (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser,
<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri">raptor_uri</a> *uri);
void <a class="link" href="raptor-section-parser.html#raptor-free-parser" title="raptor_free_parser ()">raptor_free_parser</a> (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *parser);
void <a class="link" href="raptor-section-parser.html#raptor-set-fatal-error-handler" title="raptor_set_fatal_error_handler ()">raptor_set_fatal_error_handler</a> (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *parser,
void *user_data,
<a class="link" href="raptor-section-general.html#raptor-message-handler" title="raptor_message_handler ()">raptor_message_handler</a> handler);
void <a class="link" href="raptor-section-parser.html#raptor-set-error-handler" title="raptor_set_error_handler ()">raptor_set_error_handler</a> (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *parser,
void *user_data,
<a class="link" href="raptor-section-general.html#raptor-message-handler" title="raptor_message_handler ()">raptor_message_handler</a> handler);
void <a class="link" href="raptor-section-parser.html#raptor-set-warning-handler" title="raptor_set_warning_handler ()">raptor_set_warning_handler</a> (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *parser,
void *user_data,
<a class="link" href="raptor-section-general.html#raptor-message-handler" title="raptor_message_handler ()">raptor_message_handler</a> handler);
void <a class="link" href="raptor-section-parser.html#raptor-set-statement-handler" title="raptor_set_statement_handler ()">raptor_set_statement_handler</a> (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *parser,
void *user_data,
<a class="link" href="raptor-section-general.html#raptor-statement-handler" title="raptor_statement_handler ()">raptor_statement_handler</a> handler);
void <a class="link" href="raptor-section-parser.html#raptor-set-generate-id-handler" title="raptor_set_generate_id_handler ()">raptor_set_generate_id_handler</a> (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *parser,
void *user_data,
raptor_generate_id_handler handler);
void (<a class="link" href="raptor-section-parser.html#raptor-graph-handler" title="raptor_graph_handler ()">*raptor_graph_handler</a>) (void *user_data,
<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri">raptor_uri</a> *graph);
void <a class="link" href="raptor-section-parser.html#raptor-set-graph-handler" title="raptor_set_graph_handler ()">raptor_set_graph_handler</a> (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *parser,
void *user_data,
<a class="link" href="raptor-section-parser.html#raptor-graph-handler" title="raptor_graph_handler ()">raptor_graph_handler</a> handler);
void (<a class="link" href="raptor-section-parser.html#raptor-namespace-handler" title="raptor_namespace_handler ()">*raptor_namespace_handler</a>) (void *user_data,
<a class="link" href="raptor-section-xml-namespace.html#raptor-namespace" title="raptor_namespace">raptor_namespace</a> *nspace);
void <a class="link" href="raptor-section-parser.html#raptor-set-namespace-handler" title="raptor_set_namespace_handler ()">raptor_set_namespace_handler</a> (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *parser,
void *user_data,
<a class="link" href="raptor-section-parser.html#raptor-namespace-handler" title="raptor_namespace_handler ()">raptor_namespace_handler</a> handler);
<a class="link" href="raptor-section-locator.html#raptor-locator" title="raptor_locator">raptor_locator</a>* <a class="link" href="raptor-section-parser.html#raptor-get-locator" title="raptor_get_locator ()">raptor_get_locator</a> (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser);
void <a class="link" href="raptor-section-parser.html#raptor-set-default-generate-id-parameters" title="raptor_set_default_generate_id_parameters ()">raptor_set_default_generate_id_parameters</a>
(<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser,
char *prefix,
int base);
int <a class="link" href="raptor-section-parser.html#raptor-parse-chunk" title="raptor_parse_chunk ()">raptor_parse_chunk</a> (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser,
unsigned char *buffer,
size_t len,
int is_end);
int <a class="link" href="raptor-section-parser.html#raptor-parse-file-stream" title="raptor_parse_file_stream ()">raptor_parse_file_stream</a> (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser,
FILE *stream,
const char *filename,
<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri">raptor_uri</a> *base_uri);
int <a class="link" href="raptor-section-parser.html#raptor-parse-file" title="raptor_parse_file ()">raptor_parse_file</a> (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser,
<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri">raptor_uri</a> *uri,
<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri">raptor_uri</a> *base_uri);
int <a class="link" href="raptor-section-parser.html#raptor-parse-uri" title="raptor_parse_uri ()">raptor_parse_uri</a> (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser,
<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri">raptor_uri</a> *uri,
<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri">raptor_uri</a> *base_uri);
int <a class="link" href="raptor-section-parser.html#raptor-parse-uri-with-connection" title="raptor_parse_uri_with_connection ()">raptor_parse_uri_with_connection</a> (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser,
<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri">raptor_uri</a> *uri,
<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri">raptor_uri</a> *base_uri,
void *connection);
void <a class="link" href="raptor-section-parser.html#raptor-parse-abort" title="raptor_parse_abort ()">raptor_parse_abort</a> (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser);
const char* <a class="link" href="raptor-section-parser.html#raptor-get-name" title="raptor_get_name ()">raptor_get_name</a> (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser);
const char* <a class="link" href="raptor-section-parser.html#raptor-get-label" title="raptor_get_label ()">raptor_get_label</a> (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser);
const char* <a class="link" href="raptor-section-parser.html#raptor-get-mime-type" title="raptor_get_mime_type ()">raptor_get_mime_type</a> (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser);
int <a class="link" href="raptor-section-parser.html#raptor-get-need-base-uri" title="raptor_get_need_base_uri ()">raptor_get_need_base_uri</a> (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser);
int <a class="link" href="raptor-section-parser.html#raptor-set-feature" title="raptor_set_feature ()">raptor_set_feature</a> (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *parser,
<a class="link" href="raptor-section-feature.html#raptor-feature" title="enum raptor_feature">raptor_feature</a> feature,
int value);
int <a class="link" href="raptor-section-parser.html#raptor-parser-set-feature-string" title="raptor_parser_set_feature_string ()">raptor_parser_set_feature_string</a> (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *parser,
<a class="link" href="raptor-section-feature.html#raptor-feature" title="enum raptor_feature">raptor_feature</a> feature,
unsigned char *value);
int <a class="link" href="raptor-section-parser.html#raptor-get-feature" title="raptor_get_feature ()">raptor_get_feature</a> (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *parser,
<a class="link" href="raptor-section-feature.html#raptor-feature" title="enum raptor_feature">raptor_feature</a> feature);
const unsigned char* <a class="link" href="raptor-section-parser.html#raptor-parser-get-feature-string" title="raptor_parser_get_feature_string ()">raptor_parser_get_feature_string</a> (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *parser,
<a class="link" href="raptor-section-feature.html#raptor-feature" title="enum raptor_feature">raptor_feature</a> feature);
void <a class="link" href="raptor-section-parser.html#raptor-set-parser-strict" title="raptor_set_parser_strict ()">raptor_set_parser_strict</a> (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser,
int is_strict);
const char* <a class="link" href="raptor-section-parser.html#raptor-parser-get-accept-header" title="raptor_parser_get_accept_header ()">raptor_parser_get_accept_header</a> (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser);
void <a class="link" href="raptor-section-parser.html#raptor-parser-set-uri-filter" title="raptor_parser_set_uri_filter ()">raptor_parser_set_uri_filter</a> (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *parser,
<a class="link" href="raptor-section-www.html#raptor-uri-filter-func" title="raptor_uri_filter_func ()">raptor_uri_filter_func</a> filter,
void *user_data);
unsigned char* <a class="link" href="raptor-section-parser.html#raptor-parser-generate-id" title="raptor_parser_generate_id ()">raptor_parser_generate_id</a> (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser,
<a class="link" href="raptor-section-triples.html#raptor-genid-type" title="enum raptor_genid_type">raptor_genid_type</a> type);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="raptor-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" lang="en">
<a name="raptor-section-parser.details"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="raptor-parser"></a><h3>raptor_parser</h3>
<pre class="programlisting">raptor_parser* raptor_parser;
</pre>
<p>
Raptor Parser class</p>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="raptor-new-parser"></a><h3>raptor_new_parser ()</h3>
<pre class="programlisting"><a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a>* raptor_new_parser (const char *name);</pre>
<p>
Constructor - create a new raptor_parser object.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td> the parser name
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a new <a class="link" href="raptor-section-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" lang="en">
<a name="raptor-new-parser-for-content"></a><h3>raptor_new_parser_for_content ()</h3>
<pre class="programlisting"><a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a>* raptor_new_parser_for_content (<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri">raptor_uri</a> *uri,
const char *mime_type,
unsigned char *buffer,
size_t len,
unsigned char *identifier);</pre>
<p>
Constructor - create a new raptor_parser.
</p>
<p>
Uses <a class="link" href="raptor-section-general.html#raptor-guess-parser-name" title="raptor_guess_parser_name ()"><code class="function">raptor_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>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td> URI 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="raptor-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" lang="en">
<a name="raptor-start-parse"></a><h3>raptor_start_parse ()</h3>
<pre class="programlisting">int raptor_start_parse (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser,
<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri">raptor_uri</a> *uri);</pre>
<p>
Start a parse of content with base URI.
</p>
<p>
Parsers that need a base URI can be tested with <a class="link" href="raptor-section-parser.html#raptor-get-need-base-uri" title="raptor_get_need_base_uri ()"><code class="function">raptor_get_need_base_uri()</code></a>.</p>
<p>
</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" lang="en">
<a name="raptor-free-parser"></a><h3>raptor_free_parser ()</h3>
<pre class="programlisting">void raptor_free_parser (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *parser);</pre>
<p>
Destructor - destroy a raptor_parser object.</p>
<p>
</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="raptor-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" lang="en">
<a name="raptor-set-fatal-error-handler"></a><h3>raptor_set_fatal_error_handler ()</h3>
<pre class="programlisting">void raptor_set_fatal_error_handler (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *parser,
void *user_data,
<a class="link" href="raptor-section-general.html#raptor-message-handler" title="raptor_message_handler ()">raptor_message_handler</a> handler);</pre>
<p>
Set the parser error handling function.
</p>
<p>
The function will receive callbacks when the parser fails.</p>
<p>
</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> the parser
</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 function
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>handler</code></em> :</span></p></td>
<td> pointer to the function
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="raptor-set-error-handler"></a><h3>raptor_set_error_handler ()</h3>
<pre class="programlisting">void raptor_set_error_handler (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *parser,
void *user_data,
<a class="link" href="raptor-section-general.html#raptor-message-handler" title="raptor_message_handler ()">raptor_message_handler</a> handler);</pre>
<p>
Set the parser error handling function.
</p>
<p>
The function will receive callbacks when the parser fails.</p>
<p>
</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> the parser
</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 function
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>handler</code></em> :</span></p></td>
<td> pointer to the function
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="raptor-set-warning-handler"></a><h3>raptor_set_warning_handler ()</h3>
<pre class="programlisting">void raptor_set_warning_handler (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *parser,
void *user_data,
<a class="link" href="raptor-section-general.html#raptor-message-handler" title="raptor_message_handler ()">raptor_message_handler</a> handler);</pre>
<p>
Set the parser warning handling function.
</p>
<p>
The function will receive callbacks when the parser gives a warning.</p>
<p>
</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> the parser
</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 function
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>handler</code></em> :</span></p></td>
<td> pointer to the function
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="raptor-set-statement-handler"></a><h3>raptor_set_statement_handler ()</h3>
<pre class="programlisting">void raptor_set_statement_handler (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *parser,
void *user_data,
<a class="link" href="raptor-section-general.html#raptor-statement-handler" title="raptor_statement_handler ()">raptor_statement_handler</a> handler);</pre>
<p>
Set the statement handler function for the parser.</p>
<p>
</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="raptor-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" lang="en">
<a name="raptor-set-generate-id-handler"></a><h3>raptor_set_generate_id_handler ()</h3>
<pre class="programlisting">void raptor_set_generate_id_handler (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *parser,
void *user_data,
raptor_generate_id_handler handler);</pre>
<p>
Set the generate ID handler function for the parser.
</p>
<p>
Sets the function to generate IDs for the parser. The handler is
called with the <em class="parameter"><code>user_data</code></em> parameter and an ID type of either
RAPTOR_GENID_TYPE_BNODEID or RAPTOR_GENID_TYPE_BAGID (latter is deprecated).
</p>
<p>
The final argument of the callback method is user_bnodeid, the value of
the rdf:nodeID attribute that the user provided if any (or NULL).
It can either be returned directly as the generated value when present or
modified. The passed in value must be <code class="function">free()</code>d if it is not used.
</p>
<p>
If handler is NULL, the default method is used</p>
<p>
</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="raptor-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> generate ID callback function
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="raptor-graph-handler"></a><h3>raptor_graph_handler ()</h3>
<pre class="programlisting">void (*raptor_graph_handler) (void *user_data,
<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri">raptor_uri</a> *graph);</pre>
<p>
Named graph reporting handler function. Due to historic reasons the named graph
API is separated from the statement handler. A graph is reported after all its
statements.</p>
<p>
</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, 0 for the default graph
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="raptor-set-graph-handler"></a><h3>raptor_set_graph_handler ()</h3>
<pre class="programlisting">void raptor_set_graph_handler (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *parser,
void *user_data,
<a class="link" href="raptor-section-parser.html#raptor-graph-handler" title="raptor_graph_handler ()">raptor_graph_handler</a> handler);</pre>
<p>
Set the graph handler function for the parser.</p>
<p>
</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="raptor-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" lang="en">
<a name="raptor-namespace-handler"></a><h3>raptor_namespace_handler ()</h3>
<pre class="programlisting">void (*raptor_namespace_handler) (void *user_data,
<a class="link" href="raptor-section-xml-namespace.html#raptor-namespace" title="raptor_namespace">raptor_namespace</a> *nspace);</pre>
<p>
XML Namespace declaration reporting handler set by
<a class="link" href="raptor-section-parser.html#raptor-set-namespace-handler" title="raptor_set_namespace_handler ()"><code class="function">raptor_set_namespace_handler()</code></a>.</p>
<p>
</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="raptor-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" lang="en">
<a name="raptor-set-namespace-handler"></a><h3>raptor_set_namespace_handler ()</h3>
<pre class="programlisting">void raptor_set_namespace_handler (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *parser,
void *user_data,
<a class="link" href="raptor-section-parser.html#raptor-namespace-handler" title="raptor_namespace_handler ()">raptor_namespace_handler</a> handler);</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="raptor-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>
<p>
</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="raptor-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" lang="en">
<a name="raptor-get-locator"></a><h3>raptor_get_locator ()</h3>
<pre class="programlisting"><a class="link" href="raptor-section-locator.html#raptor-locator" title="raptor_locator">raptor_locator</a>* raptor_get_locator (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser);</pre>
<p>
Get the current raptor locator object.</p>
<p>
</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" lang="en">
<a name="raptor-set-default-generate-id-parameters"></a><h3>raptor_set_default_generate_id_parameters ()</h3>
<pre class="programlisting">void raptor_set_default_generate_id_parameters
(<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser,
char *prefix,
int base);</pre>
<p>
Set default ID generation parameters.
</p>
<p>
Sets the parameters for the default algorithm used to generate IDs.
The default algorithm uses both <em class="parameter"><code>prefix</code></em> and <em class="parameter"><code>base</code></em> to generate a new
identifier. The exact identifier generated is not guaranteed to
be a strict concatenation of <em class="parameter"><code>prefix</code></em> and <em class="parameter"><code>base</code></em> but will use both
parts. The <em class="parameter"><code>prefix</code></em> parameter is copied to generate an ID.
</p>
<p>
For finer control of the generated identifiers, use
<code class="function">raptor_set_default_generate_id_handler()</code>.
</p>
<p>
If <em class="parameter"><code>prefix</code></em> is NULL, the default prefix is used (currently "genid")
If <em class="parameter"><code>base</code></em> is less than 1, it is initialised to 1.</p>
<p>
</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="raptor-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>prefix</code></em> :</span></p></td>
<td> prefix string
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>base</code></em> :</span></p></td>
<td> integer base identifier
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="raptor-parse-chunk"></a><h3>raptor_parse_chunk ()</h3>
<pre class="programlisting">int raptor_parse_chunk (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser,
unsigned char *buffer,
size_t len,
int is_end);</pre>
<p>
Parse a block of content into triples.
</p>
<p>
This method can only be called after raptor_start_parse has
initialised the parser.</p>
<p>
</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" lang="en">
<a name="raptor-parse-file-stream"></a><h3>raptor_parse_file_stream ()</h3>
<pre class="programlisting">int raptor_parse_file_stream (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser,
FILE *stream,
const char *filename,
<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri">raptor_uri</a> *base_uri);</pre>
<p>
Parse RDF content from a FILE*.
</p>
<p>
After draining the stream, fclose is not called on it internally.</p>
<p>
</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" lang="en">
<a name="raptor-parse-file"></a><h3>raptor_parse_file ()</h3>
<pre class="programlisting">int raptor_parse_file (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser,
<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri">raptor_uri</a> *uri,
<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri">raptor_uri</a> *base_uri);</pre>
<p>
Parse RDF content at a file URI.
</p>
<p>
If uri is NULL (source is stdin), then the base_uri is required.</p>
<p>
</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" lang="en">
<a name="raptor-parse-uri"></a><h3>raptor_parse_uri ()</h3>
<pre class="programlisting">int raptor_parse_uri (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser,
<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri">raptor_uri</a> *uri,
<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri">raptor_uri</a> *base_uri);</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="raptor-section-parser.html#raptor-parse-uri-with-connection" title="raptor_parse_uri_with_connection ()"><code class="function">raptor_parse_uri_with_connection()</code></a> for details including
how the <em class="parameter"><code>base_uri</code></em> is used.</p>
<p>
</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" lang="en">
<a name="raptor-parse-uri-with-connection"></a><h3>raptor_parse_uri_with_connection ()</h3>
<pre class="programlisting">int raptor_parse_uri_with_connection (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser,
<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri">raptor_uri</a> *uri,
<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri">raptor_uri</a> *base_uri,
void *connection);</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 - such as returned by raptor_get_mime_type(parser) - 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>
<p>
</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" lang="en">
<a name="raptor-parse-abort"></a><h3>raptor_parse_abort ()</h3>
<pre class="programlisting">void raptor_parse_abort (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser);</pre>
<p>
Abort an ongoing parse.
</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 raptor_parse_file or raptor_parse_uri when
the Raptor library is directing the parsing and when one of the
callback handlers such as as set by raptor_set_statement_handler
requires to return to the main application code.</p>
<p>
</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="raptor-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" lang="en">
<a name="raptor-get-name"></a><h3>raptor_get_name ()</h3>
<pre class="programlisting">const char* raptor_get_name (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser);</pre>
<p>
Get the name of a parser.</p>
<p>
</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="raptor-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" lang="en">
<a name="raptor-get-label"></a><h3>raptor_get_label ()</h3>
<pre class="programlisting">const char* raptor_get_label (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser);</pre>
<p>
Get a descriptive label of a parser.</p>
<p>
</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="raptor-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> a readable label for the parser.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="raptor-get-mime-type"></a><h3>raptor_get_mime_type ()</h3>
<pre class="programlisting">const char* raptor_get_mime_type (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser);</pre>
<p>
Return MIME type for the parser.</p>
<p>
</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="raptor-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> MIME type or NULL if none available
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="raptor-get-need-base-uri"></a><h3>raptor_get_need_base_uri ()</h3>
<pre class="programlisting">int raptor_get_need_base_uri (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser);</pre>
<p>
Get a boolean whether this parser needs a base URI to start parsing.</p>
<p>
</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="raptor-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> non-0 if this parser needs a base URI
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="raptor-set-feature"></a><h3>raptor_set_feature ()</h3>
<pre class="programlisting">int raptor_set_feature (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *parser,
<a class="link" href="raptor-section-feature.html#raptor-feature" title="enum raptor_feature">raptor_feature</a> feature,
int value);</pre>
<p>
Set various parser features.
</p>
<p>
The allowed features are available via <a class="link" href="raptor-section-feature.html#raptor-features-enumerate" title="raptor_features_enumerate ()"><code class="function">raptor_features_enumerate()</code></a>.</p>
<p>
</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="raptor-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>feature</code></em> :</span></p></td>
<td> feature to set from enumerated <a class="link" href="raptor-section-feature.html#raptor-feature" title="enum raptor_feature"><span class="type">raptor_feature</span></a> values
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td> integer feature value (0 or larger)
</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 feature is unknown
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="raptor-parser-set-feature-string"></a><h3>raptor_parser_set_feature_string ()</h3>
<pre class="programlisting">int raptor_parser_set_feature_string (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *parser,
<a class="link" href="raptor-section-feature.html#raptor-feature" title="enum raptor_feature">raptor_feature</a> feature,
unsigned char *value);</pre>
<p>
Set parser features with string values.
</p>
<p>
The allowed features are available via <a class="link" href="raptor-section-feature.html#raptor-features-enumerate" title="raptor_features_enumerate ()"><code class="function">raptor_features_enumerate()</code></a>.
If the feature type is integer, the value is interpreted as an integer.</p>
<p>
</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="raptor-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>feature</code></em> :</span></p></td>
<td> feature to set from enumerated <a class="link" href="raptor-section-feature.html#raptor-feature" title="enum raptor_feature"><span class="type">raptor_feature</span></a> values
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td> feature 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 feature is unknown
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="raptor-get-feature"></a><h3>raptor_get_feature ()</h3>
<pre class="programlisting">int raptor_get_feature (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *parser,
<a class="link" href="raptor-section-feature.html#raptor-feature" title="enum raptor_feature">raptor_feature</a> feature);</pre>
<p>
Get various parser features.
</p>
<p>
The allowed features are available via <a class="link" href="raptor-section-feature.html#raptor-features-enumerate" title="raptor_features_enumerate ()"><code class="function">raptor_features_enumerate()</code></a>.
</p>
<p>
Note: no feature value is negative</p>
<p>
</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="raptor-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>feature</code></em> :</span></p></td>
<td> feature to get value
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> feature value or &lt; 0 for an illegal feature
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="raptor-parser-get-feature-string"></a><h3>raptor_parser_get_feature_string ()</h3>
<pre class="programlisting">const unsigned char* raptor_parser_get_feature_string (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *parser,
<a class="link" href="raptor-section-feature.html#raptor-feature" title="enum raptor_feature">raptor_feature</a> feature);</pre>
<p>
Get parser features with string values.
</p>
<p>
The allowed features are available via <a class="link" href="raptor-section-feature.html#raptor-features-enumerate" title="raptor_features_enumerate ()"><code class="function">raptor_features_enumerate()</code></a>.
If a string is returned, it must be freed by the caller.</p>
<p>
</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="raptor-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>feature</code></em> :</span></p></td>
<td> feature to get value
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> feature value or NULL for an illegal feature or no value
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="raptor-set-parser-strict"></a><h3>raptor_set_parser_strict ()</h3>
<pre class="programlisting">void raptor_set_parser_strict (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser,
int is_strict);</pre>
<p>
Set parser to strict / lax mode.</p>
<p>
</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="raptor-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>is_strict</code></em> :</span></p></td>
<td> Non 0 for strict parsing
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="raptor-parser-get-accept-header"></a><h3>raptor_parser_get_accept_header ()</h3>
<pre class="programlisting">const char* raptor_parser_get_accept_header (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser);</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="raptor-section-memory.html#raptor-free-memory" title="raptor_free_memory ()"><code class="function">raptor_free_memory()</code></a>.</p>
<p>
</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" lang="en">
<a name="raptor-parser-set-uri-filter"></a><h3>raptor_parser_set_uri_filter ()</h3>
<pre class="programlisting">void raptor_parser_set_uri_filter (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *parser,
<a class="link" href="raptor-section-www.html#raptor-uri-filter-func" title="raptor_uri_filter_func ()">raptor_uri_filter_func</a> filter,
void *user_data);</pre>
<p>
Set URI filter function for WWW retrieval.</p>
<p>
</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" lang="en">
<a name="raptor-parser-generate-id"></a><h3>raptor_parser_generate_id ()</h3>
<pre class="programlisting">unsigned char* raptor_parser_generate_id (<a class="link" href="raptor-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a> *rdf_parser,
<a class="link" href="raptor-section-triples.html#raptor-genid-type" title="enum raptor_genid_type">raptor_genid_type</a> type);</pre>
<p>
Generate an ID for a parser
</p>
<p>
Type can be either RAPTOR_GENID_TYPE_BNODEID or
RAPTOR_GENID_TYPE_BAGID</p>
<p>
</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="raptor-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>type</code></em> :</span></p></td>
<td> Type of ID to generate
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> newly allocated generated ID or NULL on failure
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.10</div>
</body>
</html>