1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-08 16:12:31 +02:00
audacity/lib-src/redland/docs/html/redland-model.html
2010-01-24 09:19:39 +00:00

2210 lines
114 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>RDF Graph (librdf_model)</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="index.html" title="Redland RDF Library Manual">
<link rel="up" href="reference-manual.html" title="Part II. Reference Manual">
<link rel="prev" href="redland-log.html" title="Logging.">
<link rel="next" href="redland-node.html" title="RDF term (librdf_node)">
<meta name="generator" content="GTK-Doc V1.10 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="redland.html" title="Redland Overview">
<link rel="chapter" href="introduction.html" title="Introduction">
<link rel="part" href="tutorial.html" title="Part I. Tutorial">
<link rel="part" href="reference-manual.html" title="Part II. Reference Manual">
<link rel="chapter" href="objects.html" title="Objects in C">
<link rel="chapter" href="redland-storage-modules.html" title="Storage Modules">
<link rel="index" href="indexes.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="redland-log.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">Redland RDF Library Manual</th>
<td><a accesskey="n" href="redland-node.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="#redland-model.synopsis" class="shortcut">Top</a>
 | 
<a href="#redland-model.description" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="redland-model"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="redland-model.top_of_page"></a>RDF Graph (librdf_model)</span></h2>
<p>RDF Graph (librdf_model) — RDF graph (set of triples) API.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="redland-model.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
typedef <a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a>;
typedef <a class="link" href="redland-model.html#librdf-model-factory" title="librdf_model_factory">librdf_model_factory</a>;
int <a class="link" href="redland-model.html#librdf-model-enumerate" title="librdf_model_enumerate ()">librdf_model_enumerate</a> (<a class="link" href="redland-world.html#librdf-world" title="librdf_world">librdf_world</a> *world,
unsigned int counter,
const char **name,
const char **label);
<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a>* <a class="link" href="redland-model.html#librdf-new-model" title="librdf_new_model ()">librdf_new_model</a> (<a class="link" href="redland-world.html#librdf-world" title="librdf_world">librdf_world</a> *world,
<a class="link" href="redland-storage.html#librdf-storage" title="librdf_storage">librdf_storage</a> *storage,
const char *options_string);
<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a>* <a class="link" href="redland-model.html#librdf-new-model-with-options" title="librdf_new_model_with_options ()">librdf_new_model_with_options</a> (<a class="link" href="redland-world.html#librdf-world" title="librdf_world">librdf_world</a> *world,
<a class="link" href="redland-storage.html#librdf-storage" title="librdf_storage">librdf_storage</a> *storage,
<a class="link" href="redland-hash.html#librdf-hash" title="librdf_hash">librdf_hash</a> *options);
<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a>* <a class="link" href="redland-model.html#librdf-new-model-from-model" title="librdf_new_model_from_model ()">librdf_new_model_from_model</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model);
void <a class="link" href="redland-model.html#librdf-free-model" title="librdf_free_model ()">librdf_free_model</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model);
int <a class="link" href="redland-model.html#librdf-model-size" title="librdf_model_size ()">librdf_model_size</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model);
int <a class="link" href="redland-model.html#librdf-model-add" title="librdf_model_add ()">librdf_model_add</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *subject,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *predicate,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *object);
int <a class="link" href="redland-model.html#librdf-model-add-string-literal-statement" title="librdf_model_add_string_literal_statement ()">librdf_model_add_string_literal_statement</a>
(<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *subject,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *predicate,
unsigned char *literal,
const char *xml_language,
int is_wf_xml);
int <a class="link" href="redland-model.html#librdf-model-add-typed-literal-statement" title="librdf_model_add_typed_literal_statement ()">librdf_model_add_typed_literal_statement</a>
(<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *subject,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *predicate,
unsigned char *literal,
const char *xml_language,
<a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri">librdf_uri</a> *datatype_uri);
int <a class="link" href="redland-model.html#librdf-model-add-statement" title="librdf_model_add_statement ()">librdf_model_add_statement</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement">librdf_statement</a> *statement);
int <a class="link" href="redland-model.html#librdf-model-add-statements" title="librdf_model_add_statements ()">librdf_model_add_statements</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream">librdf_stream</a> *statement_stream);
int <a class="link" href="redland-model.html#librdf-model-remove-statement" title="librdf_model_remove_statement ()">librdf_model_remove_statement</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement">librdf_statement</a> *statement);
int <a class="link" href="redland-model.html#librdf-model-contains-statement" title="librdf_model_contains_statement ()">librdf_model_contains_statement</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement">librdf_statement</a> *statement);
int <a class="link" href="redland-model.html#librdf-model-has-arc-in" title="librdf_model_has_arc_in ()">librdf_model_has_arc_in</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *node,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *property);
int <a class="link" href="redland-model.html#librdf-model-has-arc-out" title="librdf_model_has_arc_out ()">librdf_model_has_arc_out</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *node,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *property);
<a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream">librdf_stream</a>* <a class="link" href="redland-model.html#librdf-model-as-stream" title="librdf_model_as_stream ()">librdf_model_as_stream</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model);
<a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream">librdf_stream</a>* <a class="link" href="redland-model.html#librdf-model-serialise" title="librdf_model_serialise ()">librdf_model_serialise</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model);
<a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream">librdf_stream</a>* <a class="link" href="redland-model.html#librdf-model-find-statements" title="librdf_model_find_statements ()">librdf_model_find_statements</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement">librdf_statement</a> *statement);
#define <a class="link" href="redland-model.html#LIBRDF-MODEL-FIND-OPTION-MATCH-SUBSTRING-LITERAL:CAPS" title="LIBRDF_MODEL_FIND_OPTION_MATCH_SUBSTRING_LITERAL">LIBRDF_MODEL_FIND_OPTION_MATCH_SUBSTRING_LITERAL</a>
<a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream">librdf_stream</a>* <a class="link" href="redland-model.html#librdf-model-find-statements-with-options" title="librdf_model_find_statements_with_options ()">librdf_model_find_statements_with_options</a>
(<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement">librdf_statement</a> *statement,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *context_node,
<a class="link" href="redland-hash.html#librdf-hash" title="librdf_hash">librdf_hash</a> *options);
<a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator">librdf_iterator</a>* <a class="link" href="redland-model.html#librdf-model-get-sources" title="librdf_model_get_sources ()">librdf_model_get_sources</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *arc,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *target);
<a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator">librdf_iterator</a>* <a class="link" href="redland-model.html#librdf-model-get-arcs" title="librdf_model_get_arcs ()">librdf_model_get_arcs</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *source,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *target);
<a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator">librdf_iterator</a>* <a class="link" href="redland-model.html#librdf-model-get-targets" title="librdf_model_get_targets ()">librdf_model_get_targets</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *source,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *arc);
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a>* <a class="link" href="redland-model.html#librdf-model-get-source" title="librdf_model_get_source ()">librdf_model_get_source</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *arc,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *target);
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a>* <a class="link" href="redland-model.html#librdf-model-get-arc" title="librdf_model_get_arc ()">librdf_model_get_arc</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *source,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *target);
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a>* <a class="link" href="redland-model.html#librdf-model-get-target" title="librdf_model_get_target ()">librdf_model_get_target</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *source,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *arc);
<a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator">librdf_iterator</a>* <a class="link" href="redland-model.html#librdf-model-get-arcs-in" title="librdf_model_get_arcs_in ()">librdf_model_get_arcs_in</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *node);
<a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator">librdf_iterator</a>* <a class="link" href="redland-model.html#librdf-model-get-arcs-out" title="librdf_model_get_arcs_out ()">librdf_model_get_arcs_out</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *node);
int <a class="link" href="redland-model.html#librdf-model-add-submodel" title="librdf_model_add_submodel ()">librdf_model_add_submodel</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *sub_model);
int <a class="link" href="redland-model.html#librdf-model-remove-submodel" title="librdf_model_remove_submodel ()">librdf_model_remove_submodel</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *sub_model);
void <a class="link" href="redland-model.html#librdf-model-print" title="librdf_model_print ()">librdf_model_print</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
FILE *fh);
int <a class="link" href="redland-model.html#librdf-model-context-add-statement" title="librdf_model_context_add_statement ()">librdf_model_context_add_statement</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *context,
<a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement">librdf_statement</a> *statement);
int <a class="link" href="redland-model.html#librdf-model-context-add-statements" title="librdf_model_context_add_statements ()">librdf_model_context_add_statements</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *context,
<a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream">librdf_stream</a> *stream);
int <a class="link" href="redland-model.html#librdf-model-context-remove-statement" title="librdf_model_context_remove_statement ()">librdf_model_context_remove_statement</a>
(<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *context,
<a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement">librdf_statement</a> *statement);
int <a class="link" href="redland-model.html#librdf-model-context-remove-statements" title="librdf_model_context_remove_statements ()">librdf_model_context_remove_statements</a>
(<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *context);
<a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream">librdf_stream</a>* <a class="link" href="redland-model.html#librdf-model-context-as-stream" title="librdf_model_context_as_stream ()">librdf_model_context_as_stream</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *context);
<a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream">librdf_stream</a>* <a class="link" href="redland-model.html#librdf-model-context-serialize" title="librdf_model_context_serialize ()">librdf_model_context_serialize</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *context);
int <a class="link" href="redland-model.html#librdf-model-contains-context" title="librdf_model_contains_context ()">librdf_model_contains_context</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *context);
<a class="link" href="redland-query-results.html#librdf-query-results" title="librdf_query_results">librdf_query_results</a>* <a class="link" href="redland-model.html#librdf-model-query-execute" title="librdf_model_query_execute ()">librdf_model_query_execute</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-query.html#librdf-query" title="librdf_query">librdf_query</a> *query);
int <a class="link" href="redland-model.html#librdf-model-sync" title="librdf_model_sync ()">librdf_model_sync</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model);
<a class="link" href="redland-storage.html#librdf-storage" title="librdf_storage">librdf_storage</a>* <a class="link" href="redland-model.html#librdf-model-get-storage" title="librdf_model_get_storage ()">librdf_model_get_storage</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model);
int <a class="link" href="redland-model.html#librdf-model-load" title="librdf_model_load ()">librdf_model_load</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri">librdf_uri</a> *uri,
const char *name,
const char *mime_type,
<a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri">librdf_uri</a> *type_uri);
unsigned char* <a class="link" href="redland-model.html#librdf-model-to-counted-string" title="librdf_model_to_counted_string ()">librdf_model_to_counted_string</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri">librdf_uri</a> *uri,
const char *name,
const char *mime_type,
<a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri">librdf_uri</a> *type_uri,
size_t *string_length_p);
unsigned char* <a class="link" href="redland-model.html#librdf-model-to-string" title="librdf_model_to_string ()">librdf_model_to_string</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri">librdf_uri</a> *uri,
const char *name,
const char *mime_type,
<a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri">librdf_uri</a> *type_uri);
<a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream">librdf_stream</a>* <a class="link" href="redland-model.html#librdf-model-find-statements-in-context" title="librdf_model_find_statements_in_context ()">librdf_model_find_statements_in_context</a>
(<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement">librdf_statement</a> *statement,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *context_node);
<a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator">librdf_iterator</a>* <a class="link" href="redland-model.html#librdf-model-get-contexts" title="librdf_model_get_contexts ()">librdf_model_get_contexts</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model);
#define <a class="link" href="redland-model.html#LIBRDF-MODEL-FEATURE-CONTEXTS:CAPS" title="LIBRDF_MODEL_FEATURE_CONTEXTS">LIBRDF_MODEL_FEATURE_CONTEXTS</a>
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a>* <a class="link" href="redland-model.html#librdf-model-get-feature" title="librdf_model_get_feature ()">librdf_model_get_feature</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri">librdf_uri</a> *feature);
int <a class="link" href="redland-model.html#librdf-model-set-feature" title="librdf_model_set_feature ()">librdf_model_set_feature</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri">librdf_uri</a> *feature,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *value);
int <a class="link" href="redland-model.html#librdf-model-transaction-commit" title="librdf_model_transaction_commit ()">librdf_model_transaction_commit</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model);
void* <a class="link" href="redland-model.html#librdf-model-transaction-get-handle" title="librdf_model_transaction_get_handle ()">librdf_model_transaction_get_handle</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model);
int <a class="link" href="redland-model.html#librdf-model-transaction-rollback" title="librdf_model_transaction_rollback ()">librdf_model_transaction_rollback</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model);
int <a class="link" href="redland-model.html#librdf-model-transaction-start" title="librdf_model_transaction_start ()">librdf_model_transaction_start</a> (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model);
int <a class="link" href="redland-model.html#librdf-model-transaction-start-with-handle" title="librdf_model_transaction_start_with_handle ()">librdf_model_transaction_start_with_handle</a>
(<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
void *handle);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="redland-model.description"></a><h2>Description</h2>
<p>
The main user API class for Redland, providing access to the RDF
graph and the triples in it (<a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a>), storage, parsing,
serializing and querying.
</p>
</div>
<div class="refsect1" lang="en">
<a name="redland-model.details"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="librdf-model"></a><h3>librdf_model</h3>
<pre class="programlisting">typedef struct librdf_model_s librdf_model;
</pre>
<p>
Redland model class.</p>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-factory"></a><h3>librdf_model_factory</h3>
<pre class="programlisting">typedef struct librdf_model_factory_s librdf_model_factory;
</pre>
<p>
Redland model factory class.</p>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-enumerate"></a><h3>librdf_model_enumerate ()</h3>
<pre class="programlisting">int librdf_model_enumerate (<a class="link" href="redland-world.html#librdf-world" title="librdf_world">librdf_world</a> *world,
unsigned int counter,
const char **name,
const char **label);</pre>
<p>
Get information on models.</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>world</code></em> :</span></p></td>
<td> redland world object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>counter</code></em> :</span></p></td>
<td> index into the list of models
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td> pointer to store the name of the model (or NULL)
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td>
<td> pointer to store syntax readable label (or NULL)
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> non 0 on failure of if counter is out of range
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-new-model"></a><h3>librdf_new_model ()</h3>
<pre class="programlisting"><a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a>* librdf_new_model (<a class="link" href="redland-world.html#librdf-world" title="librdf_world">librdf_world</a> *world,
<a class="link" href="redland-storage.html#librdf-storage" title="librdf_storage">librdf_storage</a> *storage,
const char *options_string);</pre>
<p>
Constructor - create a new storage <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object.
</p>
<p>
The options are encoded as described in <code class="function">librdf_hash_from_string()</code>
and can be NULL if none are 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>world</code></em> :</span></p></td>
<td> redland world object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>storage</code></em> :</span></p></td>
<td> <a class="link" href="redland-storage.html#librdf-storage" title="librdf_storage"><span class="type">librdf_storage</span></a> to use
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>options_string</code></em> :</span></p></td>
<td> options to initialise model
</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="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object or NULL on failure
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-new-model-with-options"></a><h3>librdf_new_model_with_options ()</h3>
<pre class="programlisting"><a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a>* librdf_new_model_with_options (<a class="link" href="redland-world.html#librdf-world" title="librdf_world">librdf_world</a> *world,
<a class="link" href="redland-storage.html#librdf-storage" title="librdf_storage">librdf_storage</a> *storage,
<a class="link" href="redland-hash.html#librdf-hash" title="librdf_hash">librdf_hash</a> *options);</pre>
<p>
Constructor - Create a new <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> with storage.
</p>
<p>
Options are presently not 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>world</code></em> :</span></p></td>
<td> redland world object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>storage</code></em> :</span></p></td>
<td> <a class="link" href="redland-storage.html#librdf-storage" title="librdf_storage"><span class="type">librdf_storage</span></a> storage to use
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
<td> <a class="link" href="redland-hash.html#librdf-hash" title="librdf_hash"><span class="type">librdf_hash</span></a> of options to use
</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="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object or NULL on failure
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-new-model-from-model"></a><h3>librdf_new_model_from_model ()</h3>
<pre class="programlisting"><a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a>* librdf_new_model_from_model (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model);</pre>
<p>
Copy constructor - create a new librdf_model from an existing one.
</p>
<p>
Creates a new model as a copy of the existing model in the same
storage context.</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>model</code></em> :</span></p></td>
<td> the existing <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a>
</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="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> or NULL on failure
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-free-model"></a><h3>librdf_free_model ()</h3>
<pre class="programlisting">void librdf_free_model (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model);</pre>
<p>
Destructor - Destroy a <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> 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>model</code></em> :</span></p></td>
<td> <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> model to destroy
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-size"></a><h3>librdf_model_size ()</h3>
<pre class="programlisting">int librdf_model_size (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model);</pre>
<p>
Get the number of statements in the model.
</p>
<p>
WARNING: Not all underlying stores can return the size of the graph
In which case the return value will be 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>model</code></em> :</span></p></td>
<td> <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the number of statements or &lt;0 if not possible
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-add"></a><h3>librdf_model_add ()</h3>
<pre class="programlisting">int librdf_model_add (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *subject,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *predicate,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *object);</pre>
<p>
Create and add a new statement about a resource to the model.
</p>
<p>
After this method, the <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> objects become owned by the model.
All of subject, predicate and object must be non-NULL.</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>model</code></em> :</span></p></td>
<td> model object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>subject</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> of subject
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>predicate</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> of predicate
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> of object (literal or resource)
</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="librdf-model-add-string-literal-statement"></a><h3>librdf_model_add_string_literal_statement ()</h3>
<pre class="programlisting">int librdf_model_add_string_literal_statement
(<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *subject,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *predicate,
unsigned char *literal,
const char *xml_language,
int is_wf_xml);</pre>
<p>
Create and add a new statement about a literal to the model.
</p>
<p>
The language can be set to NULL if not used.
All of subject, predicate and literal must be non-NULL.
</p>
<p>
0.9.12: xml_space argument deleted</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>model</code></em> :</span></p></td>
<td> model object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>subject</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> of subject
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>predicate</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> of predicate
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>literal</code></em> :</span></p></td>
<td> string literal conten
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>xml_language</code></em> :</span></p></td>
<td> language of literal
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>is_wf_xml</code></em> :</span></p></td>
<td> literal is XML
</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="librdf-model-add-typed-literal-statement"></a><h3>librdf_model_add_typed_literal_statement ()</h3>
<pre class="programlisting">int librdf_model_add_typed_literal_statement
(<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *subject,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *predicate,
unsigned char *literal,
const char *xml_language,
<a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri">librdf_uri</a> *datatype_uri);</pre>
<p>
Create and add a new statement about a typed literal to the model.
</p>
<p>
After this method, the <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> subject and predicate become
owned by the model.
</p>
<p>
The language can be set to NULL if not used.
All of subject, predicate and literal must be non-NULL.</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>model</code></em> :</span></p></td>
<td> model object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>subject</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> of subject
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>predicate</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> of predicate
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>literal</code></em> :</span></p></td>
<td> string literal content
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>xml_language</code></em> :</span></p></td>
<td> language of literal
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>datatype_uri</code></em> :</span></p></td>
<td> datatype <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a>
</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="librdf-model-add-statement"></a><h3>librdf_model_add_statement ()</h3>
<pre class="programlisting">int librdf_model_add_statement (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement">librdf_statement</a> *statement);</pre>
<p>
Add a statement to the model.
</p>
<p>
The passed-in statement is copied when added to the model, not
shared with the model. It must be a complete statement - all
of subject, predicate, object parts must be present.
</p>
<p>
Only statements that are legal RDF can be added: URI or blank subject,
URI predicate and URI or blank or literal object (i.e. anything).
</p>
<p>
If the statement already exists in the model, it is not added.
Duplicate statements can be added when used with Redland Contexts
such as with <a class="link" href="redland-model.html#librdf-model-context-add-statement" title="librdf_model_context_add_statement ()"><span class="type">librdf_model_context_add_statement</span></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>model</code></em> :</span></p></td>
<td> model object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>statement</code></em> :</span></p></td>
<td> statement object
</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="librdf-model-add-statements"></a><h3>librdf_model_add_statements ()</h3>
<pre class="programlisting">int librdf_model_add_statements (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream">librdf_stream</a> *statement_stream);</pre>
<p>
Add a stream of statements to the model.
</p>
<p>
If any of the statements are illegal RDF statements they will
be skipped and not added. See <a class="link" href="redland-model.html#librdf-model-add-statement" title="librdf_model_add_statement ()"><span class="type">librdf_model_add_statement</span></a> for the detail.
</p>
<p>
If any of the statements already exists in the store, they are not
added unless Redland contexts are being used. See also
<a class="link" href="redland-model.html#librdf-model-context-add-statements" title="librdf_model_context_add_statements ()"><span class="type">librdf_model_context_add_statements</span></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>model</code></em> :</span></p></td>
<td> model object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>statement_stream</code></em> :</span></p></td>
<td> stream of statements 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="librdf-model-remove-statement"></a><h3>librdf_model_remove_statement ()</h3>
<pre class="programlisting">int librdf_model_remove_statement (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement">librdf_statement</a> *statement);</pre>
<p>
Remove a known statement from the model.
</p>
<p>
It must be a complete statement - all of subject, predicate, object
parts must be present and a legal RDF triple.</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>model</code></em> :</span></p></td>
<td> the model object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>statement</code></em> :</span></p></td>
<td> the statement
</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="librdf-model-contains-statement"></a><h3>librdf_model_contains_statement ()</h3>
<pre class="programlisting">int librdf_model_contains_statement (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement">librdf_statement</a> *statement);</pre>
<p>
Check for a statement in the model.
</p>
<p>
It must be a complete statement - all of subject, predicate,
object parts must be present and a legal RDF triple. Use
librdf_model_find_statements to search for partial statement
matches.
</p>
<p>
WARNING: librdf_model_contains_statement may not work correctly
with stores using contexts. In this case, a search using
librdf_model_find_statements for a non-empty list will
return the correct result.</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>model</code></em> :</span></p></td>
<td> the model object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>statement</code></em> :</span></p></td>
<td> the statement
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> non 0 if the model contains the statement (&gt;0 if the statement is illegal)
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-has-arc-in"></a><h3>librdf_model_has_arc_in ()</h3>
<pre class="programlisting">int librdf_model_has_arc_in (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *node,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *property);</pre>
<p>
Check if a node has a given property pointing to it.</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>model</code></em> :</span></p></td>
<td> <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> resource node
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>property</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> property node
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> non 0 if arc property does point to the resource node
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-has-arc-out"></a><h3>librdf_model_has_arc_out ()</h3>
<pre class="programlisting">int librdf_model_has_arc_out (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *node,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *property);</pre>
<p>
Check if a node has a given property pointing from it.</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>model</code></em> :</span></p></td>
<td> <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> resource node
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>property</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> property node
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> non 0 if arc property does point from the resource node
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-as-stream"></a><h3>librdf_model_as_stream ()</h3>
<pre class="programlisting"><a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream">librdf_stream</a>* librdf_model_as_stream (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model);</pre>
<p>
List the model contents as a stream of 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>model</code></em> :</span></p></td>
<td> the model object
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> or NULL on failure
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-serialise"></a><h3>librdf_model_serialise ()</h3>
<pre class="programlisting"><a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream">librdf_stream</a>* librdf_model_serialise (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model);</pre>
<p>
Serialise the entire model as a stream (DEPRECATED).
</p>
<p>
DEPRECATED to reduce confusion with the librdf_serializer class.
Please use librdf_model_as_stream.</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>model</code></em> :</span></p></td>
<td> the model object
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> or NULL on failure
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-find-statements"></a><h3>librdf_model_find_statements ()</h3>
<pre class="programlisting"><a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream">librdf_stream</a>* librdf_model_find_statements (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement">librdf_statement</a> *statement);</pre>
<p>
Find matching statements in the model.
</p>
<p>
The partial statement is a statement where the subject, predicate
and/or object can take the value NULL which indicates a match with
any value in the model</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>model</code></em> :</span></p></td>
<td> the model object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>statement</code></em> :</span></p></td>
<td> the partial statement to match
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> of statements (can be empty) or NULL
on failure.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="LIBRDF-MODEL-FIND-OPTION-MATCH-SUBSTRING-LITERAL:CAPS"></a><h3>LIBRDF_MODEL_FIND_OPTION_MATCH_SUBSTRING_LITERAL</h3>
<pre class="programlisting">#define LIBRDF_MODEL_FIND_OPTION_MATCH_SUBSTRING_LITERAL "http://feature.librdf.org/model-find-match-substring-literal"
</pre>
<p>
Model find statement option.
</p>
<p>
If set, the find statement uses substring matching.</p>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-find-statements-with-options"></a><h3>librdf_model_find_statements_with_options ()</h3>
<pre class="programlisting"><a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream">librdf_stream</a>* librdf_model_find_statements_with_options
(<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement">librdf_statement</a> *statement,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *context_node,
<a class="link" href="redland-hash.html#librdf-hash" title="librdf_hash">librdf_hash</a> *options);</pre>
<p>
Search the model for matching statements with match options.
</p>
<p>
Searches the model for a (partial) statement as described in
<a class="link" href="redland-statement.html#librdf-statement-match" title="librdf_statement_match ()"><code class="function">librdf_statement_match()</code></a> and returns a <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> of
matching <a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> objects.
</p>
<p>
If options is given then the match is made according to
the given options. If options is NULL, this is equivalent
to librdf_model_find_statements_in_context.</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>model</code></em> :</span></p></td>
<td> <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>statement</code></em> :</span></p></td>
<td> <a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> partial statement to find
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>context_node</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> context node or NULL.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
<td> <a class="link" href="redland-hash.html#librdf-hash" title="librdf_hash"><span class="type">librdf_hash</span></a> of matching options or NULL
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> of matching statements (may be empty) or NULL on failure
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-get-sources"></a><h3>librdf_model_get_sources ()</h3>
<pre class="programlisting"><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator">librdf_iterator</a>* librdf_model_get_sources (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *arc,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *target);</pre>
<p>
Return the sources (subjects) of arc in an RDF graph given arc (predicate) and target (object).
</p>
<p>
Searches the model for arcs matching the given arc and target
and returns a list of the source <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> objects as an iterator</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>model</code></em> :</span></p></td>
<td> <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>arc</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> arc
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> target
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> of <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> objects (may be empty) or NULL on failure
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-get-arcs"></a><h3>librdf_model_get_arcs ()</h3>
<pre class="programlisting"><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator">librdf_iterator</a>* librdf_model_get_arcs (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *source,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *target);</pre>
<p>
Return the arcs (predicates) of an arc in an RDF graph given source (subject) and target (object).
</p>
<p>
Searches the model for arcs matching the given source and target
and returns a list of the arc <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> objects as an iterator</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>model</code></em> :</span></p></td>
<td> <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> source
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> target
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> of <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> objects (may be empty) or NULL on failure
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-get-targets"></a><h3>librdf_model_get_targets ()</h3>
<pre class="programlisting"><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator">librdf_iterator</a>* librdf_model_get_targets (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *source,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *arc);</pre>
<p>
Return the targets (objects) of an arc in an RDF graph given source (subject) and arc (predicate).
</p>
<p>
Searches the model for targets matching the given source and arc
and returns a list of the source <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> objects as an iterator</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>model</code></em> :</span></p></td>
<td> <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> source
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>arc</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> arc
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> of <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> objects (may be empty) or NULL on failure
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-get-source"></a><h3>librdf_model_get_source ()</h3>
<pre class="programlisting"><a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a>* librdf_model_get_source (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *arc,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *target);</pre>
<p>
Return one source (subject) of arc in an RDF graph given arc (predicate) and target (object).
</p>
<p>
Searches the model for arcs matching the given arc and target
and returns one <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> 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>model</code></em> :</span></p></td>
<td> <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>arc</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> arc
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> target
</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="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object or NULL on failure
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-get-arc"></a><h3>librdf_model_get_arc ()</h3>
<pre class="programlisting"><a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a>* librdf_model_get_arc (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *source,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *target);</pre>
<p>
Return one arc (predicate) of an arc in an RDF graph given source (subject) and target (object).
</p>
<p>
Searches the model for arcs matching the given source and target
and returns one <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> 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>model</code></em> :</span></p></td>
<td> <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> source
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> target
</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="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object or NULL on failure
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-get-target"></a><h3>librdf_model_get_target ()</h3>
<pre class="programlisting"><a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a>* librdf_model_get_target (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *source,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *arc);</pre>
<p>
Return one target (object) of an arc in an RDF graph given source (subject) and arc (predicate).
</p>
<p>
Searches the model for targets matching the given source and arc
and returns one <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> 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>model</code></em> :</span></p></td>
<td> <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> source
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>arc</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> arc
</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="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object or NULL on failure
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-get-arcs-in"></a><h3>librdf_model_get_arcs_in ()</h3>
<pre class="programlisting"><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator">librdf_iterator</a>* librdf_model_get_arcs_in (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *node);</pre>
<p>
Return the properties pointing to the given resource.</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>model</code></em> :</span></p></td>
<td> <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> resource node
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> of <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> objects (may be empty) or NULL on failure
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-get-arcs-out"></a><h3>librdf_model_get_arcs_out ()</h3>
<pre class="programlisting"><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator">librdf_iterator</a>* librdf_model_get_arcs_out (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *node);</pre>
<p>
Return the properties pointing from the given resource.</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>model</code></em> :</span></p></td>
<td> <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> resource node
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> of <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> objects (may be empty) or NULL on failure
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-add-submodel"></a><h3>librdf_model_add_submodel ()</h3>
<pre class="programlisting">int librdf_model_add_submodel (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *sub_model);</pre>
<p>
Add a sub-model to the model.
</p>
<p>
FIXME: Not tested</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>model</code></em> :</span></p></td>
<td> the model object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sub_model</code></em> :</span></p></td>
<td> the sub model to add
</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="librdf-model-remove-submodel"></a><h3>librdf_model_remove_submodel ()</h3>
<pre class="programlisting">int librdf_model_remove_submodel (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *sub_model);</pre>
<p>
Remove a sub-model from the model.
</p>
<p>
FIXME: Not tested</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>model</code></em> :</span></p></td>
<td> the model object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sub_model</code></em> :</span></p></td>
<td> the sub model to remove
</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="librdf-model-print"></a><h3>librdf_model_print ()</h3>
<pre class="programlisting">void librdf_model_print (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
FILE *fh);</pre>
<p>
Print the model.
</p>
<p>
This method is for debugging and the format of the output should
not be relied on.</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>model</code></em> :</span></p></td>
<td> the model object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fh</code></em> :</span></p></td>
<td> the FILE stream to print to
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-context-add-statement"></a><h3>librdf_model_context_add_statement ()</h3>
<pre class="programlisting">int librdf_model_context_add_statement (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *context,
<a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement">librdf_statement</a> *statement);</pre>
<p>
Add a statement to a model with a context.
</p>
<p>
It must be a complete statement - all
of subject, predicate, object parts must be present.
</p>
<p>
If <em class="parameter"><code>context</code></em> is NULL, this is equivalent to librdf_model_add_statement</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>model</code></em> :</span></p></td>
<td> <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> context
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>statement</code></em> :</span></p></td>
<td> <a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> statement object
</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="librdf-model-context-add-statements"></a><h3>librdf_model_context_add_statements ()</h3>
<pre class="programlisting">int librdf_model_context_add_statements (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *context,
<a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream">librdf_stream</a> *stream);</pre>
<p>
Add statements to a model with a context.
</p>
<p>
If <em class="parameter"><code>context</code></em> is NULL, this is equivalent to librdf_model_add_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>model</code></em> :</span></p></td>
<td> <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> context
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
<td> <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> stream object
</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="librdf-model-context-remove-statement"></a><h3>librdf_model_context_remove_statement ()</h3>
<pre class="programlisting">int librdf_model_context_remove_statement
(<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *context,
<a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement">librdf_statement</a> *statement);</pre>
<p>
Remove a statement from a model in a context.
</p>
<p>
It must be a complete statement - all of subject, predicate, object
parts must be present.
</p>
<p>
If <em class="parameter"><code>context</code></em> is NULL, this is equivalent to librdf_model_remove_statement</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>model</code></em> :</span></p></td>
<td> <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> context
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>statement</code></em> :</span></p></td>
<td> <a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> statement
</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="librdf-model-context-remove-statements"></a><h3>librdf_model_context_remove_statements ()</h3>
<pre class="programlisting">int librdf_model_context_remove_statements
(<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *context);</pre>
<p>
Remove statements from a model with the given context.</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>model</code></em> :</span></p></td>
<td> <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> context
</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="librdf-model-context-as-stream"></a><h3>librdf_model_context_as_stream ()</h3>
<pre class="programlisting"><a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream">librdf_stream</a>* librdf_model_context_as_stream (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *context);</pre>
<p>
List all statements in a model context.</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>model</code></em> :</span></p></td>
<td> <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> context
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> of statements or NULL on failure
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-context-serialize"></a><h3>librdf_model_context_serialize ()</h3>
<pre class="programlisting"><a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream">librdf_stream</a>* librdf_model_context_serialize (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *context);</pre>
<p>
List all statements in a model context.
</p>
<p>
DEPRECATED to reduce confusion with the librdf_serializer class.
Please use librdf_model_context_as_stream.</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>model</code></em> :</span></p></td>
<td> <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> context
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> of statements or NULL on failure
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-contains-context"></a><h3>librdf_model_contains_context ()</h3>
<pre class="programlisting">int librdf_model_contains_context (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *context);</pre>
<p>
Check for a context in the model.</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>model</code></em> :</span></p></td>
<td> the model object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
<td> the contest
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> non 0 if the model contains the context node
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-query-execute"></a><h3>librdf_model_query_execute ()</h3>
<pre class="programlisting"><a class="link" href="redland-query-results.html#librdf-query-results" title="librdf_query_results">librdf_query_results</a>* librdf_model_query_execute (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-query.html#librdf-query" title="librdf_query">librdf_query</a> *query);</pre>
<p>
Execute a query against the model.
</p>
<p>
Run the given query against the model and return a <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> of
matching <a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> objects</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>model</code></em> :</span></p></td>
<td> <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>query</code></em> :</span></p></td>
<td> <a class="link" href="redland-query.html#librdf-query" title="librdf_query"><span class="type">librdf_query</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="redland-query-results.html#librdf-query-results" title="librdf_query_results"><span class="type">librdf_query_results</span></a> or NULL on failure
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-sync"></a><h3>librdf_model_sync ()</h3>
<pre class="programlisting">int librdf_model_sync (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model);</pre>
<p>
Synchronise the model to the model implementation.</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>model</code></em> :</span></p></td>
<td> <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object
</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="librdf-model-get-storage"></a><h3>librdf_model_get_storage ()</h3>
<pre class="programlisting"><a class="link" href="redland-storage.html#librdf-storage" title="librdf_storage">librdf_storage</a>* librdf_model_get_storage (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model);</pre>
<p>
Return the storage of this model.
</p>
<p>
Note: this can only return one storage, so model implementations
that have multiple <a class="link" href="redland-storage.html#librdf-storage" title="librdf_storage"><span class="type">librdf_storage</span></a> internally may chose not to
implement this.</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>model</code></em> :</span></p></td>
<td> <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="redland-storage.html#librdf-storage" title="librdf_storage"><span class="type">librdf_storage</span></a> or NULL if this has no store
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-load"></a><h3>librdf_model_load ()</h3>
<pre class="programlisting">int librdf_model_load (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri">librdf_uri</a> *uri,
const char *name,
const char *mime_type,
<a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri">librdf_uri</a> *type_uri);</pre>
<p>
Load content from a URI into the model.
</p>
<p>
If the name field is NULL, the library will try to guess
the parser to use from the uri, mime_type and type_uri fields.
This is done via the raptor_guess_parser_name function.</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>model</code></em> :</span></p></td>
<td> <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td> the URI to read the content
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td> the name of the parser (or NULL)
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mime_type</code></em> :</span></p></td>
<td> the MIME type of the syntax (NULL if not used)
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type_uri</code></em> :</span></p></td>
<td> URI identifying the syntax (NULL if not used)
</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="librdf-model-to-counted-string"></a><h3>librdf_model_to_counted_string ()</h3>
<pre class="programlisting">unsigned char* librdf_model_to_counted_string (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri">librdf_uri</a> *uri,
const char *name,
const char *mime_type,
<a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri">librdf_uri</a> *type_uri,
size_t *string_length_p);</pre>
<p>
Write serialized model to a string.
</p>
<p>
If the name field is NULL, the default serializer will be used.
</p>
<p>
Note: the returned string 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>model</code></em> :</span></p></td>
<td> <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td> base URI to use in serializing (or NULL if not used)
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td> the name of the serializer (or NULL for default)
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mime_type</code></em> :</span></p></td>
<td> the MIME type of the syntax (NULL if not used)
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type_uri</code></em> :</span></p></td>
<td> URI identifying the syntax (NULL if not used)
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>string_length_p</code></em> :</span></p></td>
<td> pointer to location to store string length (or NULL)
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> new string or NULL on failure
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-to-string"></a><h3>librdf_model_to_string ()</h3>
<pre class="programlisting">unsigned char* librdf_model_to_string (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri">librdf_uri</a> *uri,
const char *name,
const char *mime_type,
<a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri">librdf_uri</a> *type_uri);</pre>
<p>
Write serialized model to a string.
</p>
<p>
If the name field is NULL, the default serializer will be used.
</p>
<p>
Note: the returned string 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>model</code></em> :</span></p></td>
<td> <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td> base URI to use in serializing (or NULL if not used)
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td> the name of the serializer (or NULL for default)
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mime_type</code></em> :</span></p></td>
<td> the MIME type of the syntax (NULL if not used)
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type_uri</code></em> :</span></p></td>
<td> URI identifying the syntax (NULL if not used)
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> new string or NULL on failure
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-find-statements-in-context"></a><h3>librdf_model_find_statements_in_context ()</h3>
<pre class="programlisting"><a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream">librdf_stream</a>* librdf_model_find_statements_in_context
(<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement">librdf_statement</a> *statement,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *context_node);</pre>
<p>
Search the model for matching statements in a given context.
</p>
<p>
Searches the model for a (partial) statement as described in
<a class="link" href="redland-statement.html#librdf-statement-match" title="librdf_statement_match ()"><code class="function">librdf_statement_match()</code></a> in the given context and returns a
<a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> of matching <a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> objects. If
context is NULL, this is equivalent to librdf_model_find_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>model</code></em> :</span></p></td>
<td> <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>statement</code></em> :</span></p></td>
<td> <a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> partial statement to find
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>context_node</code></em> :</span></p></td>
<td> context <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> (or NULL)
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> of matching statements (may be empty) or NULL on failure
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-get-contexts"></a><h3>librdf_model_get_contexts ()</h3>
<pre class="programlisting"><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator">librdf_iterator</a>* librdf_model_get_contexts (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model);</pre>
<p>
Return the list of contexts in the graph.
</p>
<p>
Returns an iterator of <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> context nodes for each
context in the graph.</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>model</code></em> :</span></p></td>
<td> <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> of context nodes or NULL on failure or if contexts are not supported
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="LIBRDF-MODEL-FEATURE-CONTEXTS:CAPS"></a><h3>LIBRDF_MODEL_FEATURE_CONTEXTS</h3>
<pre class="programlisting">#define LIBRDF_MODEL_FEATURE_CONTEXTS "http://feature.librdf.org/model-contexts"
</pre>
<p>
Model feature contexts.
</p>
<p>
If set, the model has redland contexts.</p>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-get-feature"></a><h3>librdf_model_get_feature ()</h3>
<pre class="programlisting"><a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a>* librdf_model_get_feature (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri">librdf_uri</a> *feature);</pre>
<p>
Get the value of a graph feature .</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>model</code></em> :</span></p></td>
<td> <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>feature</code></em> :</span></p></td>
<td> <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> feature property
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> new <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> feature value or NULL if no such feature
exists or the value is empty.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-set-feature"></a><h3>librdf_model_set_feature ()</h3>
<pre class="programlisting">int librdf_model_set_feature (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
<a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri">librdf_uri</a> *feature,
<a class="link" href="redland-node.html#librdf-node" title="librdf_node">librdf_node</a> *value);</pre>
<p>
Set the value of a graph feature.</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>model</code></em> :</span></p></td>
<td> <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>feature</code></em> :</span></p></td>
<td> <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> feature property
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td> <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> feature property value
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> non 0 on failure (negative if no such feature)
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="librdf-model-transaction-commit"></a><h3>librdf_model_transaction_commit ()</h3>
<pre class="programlisting">int librdf_model_transaction_commit (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model);</pre>
<p>
Commit a transaction.</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>model</code></em> :</span></p></td>
<td> the model object
</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="librdf-model-transaction-get-handle"></a><h3>librdf_model_transaction_get_handle ()</h3>
<pre class="programlisting">void* librdf_model_transaction_get_handle (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model);</pre>
<p>
Get the current transaction handle.</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>model</code></em> :</span></p></td>
<td> the model object
</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="librdf-model-transaction-rollback"></a><h3>librdf_model_transaction_rollback ()</h3>
<pre class="programlisting">int librdf_model_transaction_rollback (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model);</pre>
<p>
Rollback a transaction.</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>model</code></em> :</span></p></td>
<td> the model object
</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="librdf-model-transaction-start"></a><h3>librdf_model_transaction_start ()</h3>
<pre class="programlisting">int librdf_model_transaction_start (<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model);</pre>
<p>
Start a transaction</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>model</code></em> :</span></p></td>
<td> the model object
</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="librdf-model-transaction-start-with-handle"></a><h3>librdf_model_transaction_start_with_handle ()</h3>
<pre class="programlisting">int librdf_model_transaction_start_with_handle
(<a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a> *model,
void *handle);</pre>
<p>
Start a transaction using an existing external transaction 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>model</code></em> :</span></p></td>
<td> the model object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
<td> the transaction object
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> non-0 on failure
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.10</div>
</body>
</html>