| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 2 | <html> |
| 3 | <head> |
| 4 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 5 | <title>RDF Graph (librdf_model)</title> |
| 6 | <meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> |
| 7 | <link rel="home" href="index.html" title="Redland RDF Library Manual"> |
| 8 | <link rel="up" href="reference-manual.html" title="Part II. Reference Manual"> |
| 9 | <link rel="prev" href="redland-log.html" title="Logging"> |
| 10 | <link rel="next" href="redland-node.html" title="RDF term (librdf_node)"> |
| 11 | <meta name="generator" content="GTK-Doc V1.18 (XML mode)"> |
| 12 | <link rel="stylesheet" href="style.css" type="text/css"> |
| 13 | </head> |
| 14 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
| 15 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
| 16 | <tr valign="middle"> |
| 17 | <td><a accesskey="p" href="redland-log.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> |
| 18 | <td><a accesskey="u" href="reference-manual.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> |
| 19 | <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> |
| 20 | <th width="100%" align="center">Redland RDF Library Manual</th> |
| 21 | <td><a accesskey="n" href="redland-node.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> |
| 22 | </tr> |
| 23 | <tr><td colspan="5" class="shortcuts"> |
| 24 | <a href="#redland-model.synopsis" class="shortcut">Top</a> |
| 25 | | |
| 26 | <a href="#redland-model.description" class="shortcut">Description</a> |
| 27 | </td></tr> |
| 28 | </table> |
| 29 | <div class="refentry"> |
| 30 | <a name="redland-model"></a><div class="titlepage"></div> |
| 31 | <div class="refnamediv"><table width="100%"><tr> |
| 32 | <td valign="top"> |
| 33 | <h2><span class="refentrytitle"><a name="redland-model.top_of_page"></a>RDF Graph (librdf_model)</span></h2> |
| 34 | <p>RDF Graph (librdf_model) — RDF graph (set of triples) API.</p> |
| 35 | </td> |
| 36 | <td valign="top" align="right"></td> |
| 37 | </tr></table></div> |
| 38 | <div class="refsynopsisdiv"> |
| 39 | <a name="redland-model.synopsis"></a><h2>Synopsis</h2> |
| 40 | <pre class="synopsis">typedef <a class="link" href="redland-model.html#librdf-model" title="librdf_model">librdf_model</a>; |
| 41 | typedef <a class="link" href="redland-model.html#librdf-model-factory" title="librdf_model_factory">librdf_model_factory</a>; |
| 42 | <span class="returnvalue">int</span> <a class="link" href="redland-model.html#librdf-model-enumerate" title="librdf_model_enumerate ()">librdf_model_enumerate</a> (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 43 | <em class="parameter"><code>const unsigned <span class="type">int</span> counter</code></em>, |
| 44 | <em class="parameter"><code>const <span class="type">char</span> **name</code></em>, |
| 45 | <em class="parameter"><code>const <span class="type">char</span> **label</code></em>); |
| 46 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="returnvalue">librdf_model</span></a> * <a class="link" href="redland-model.html#librdf-new-model" title="librdf_new_model ()">librdf_new_model</a> (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 47 | <em class="parameter"><code><a class="link" href="redland-storage.html#librdf-storage" title="librdf_storage"><span class="type">librdf_storage</span></a> *storage</code></em>, |
| 48 | <em class="parameter"><code>const <span class="type">char</span> *options_string</code></em>); |
| 49 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="returnvalue">librdf_model</span></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> (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 50 | <em class="parameter"><code><a class="link" href="redland-storage.html#librdf-storage" title="librdf_storage"><span class="type">librdf_storage</span></a> *storage</code></em>, |
| 51 | <em class="parameter"><code><a class="link" href="redland-hash.html#librdf-hash" title="librdf_hash"><span class="type">librdf_hash</span></a> *options</code></em>); |
| 52 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="returnvalue">librdf_model</span></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> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>); |
| 53 | <span class="returnvalue">void</span> <a class="link" href="redland-model.html#librdf-free-model" title="librdf_free_model ()">librdf_free_model</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>); |
| 54 | <span class="returnvalue">int</span> <a class="link" href="redland-model.html#librdf-model-size" title="librdf_model_size ()">librdf_model_size</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>); |
| 55 | <span class="returnvalue">int</span> <a class="link" href="redland-model.html#librdf-model-add" title="librdf_model_add ()">librdf_model_add</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 56 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *subject</code></em>, |
| 57 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *predicate</code></em>, |
| 58 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *object</code></em>); |
| 59 | <span class="returnvalue">int</span> <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> |
| 60 | (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 61 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *subject</code></em>, |
| 62 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *predicate</code></em>, |
| 63 | <em class="parameter"><code>const unsigned <span class="type">char</span> *literal</code></em>, |
| 64 | <em class="parameter"><code>const <span class="type">char</span> *xml_language</code></em>, |
| 65 | <em class="parameter"><code><span class="type">int</span> is_wf_xml</code></em>); |
| 66 | <span class="returnvalue">int</span> <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> |
| 67 | (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 68 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *subject</code></em>, |
| 69 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *predicate</code></em>, |
| 70 | <em class="parameter"><code>const unsigned <span class="type">char</span> *literal</code></em>, |
| 71 | <em class="parameter"><code>const <span class="type">char</span> *xml_language</code></em>, |
| 72 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *datatype_uri</code></em>); |
| 73 | <span class="returnvalue">int</span> <a class="link" href="redland-model.html#librdf-model-add-statement" title="librdf_model_add_statement ()">librdf_model_add_statement</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 74 | <em class="parameter"><code><a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> *statement</code></em>); |
| 75 | <span class="returnvalue">int</span> <a class="link" href="redland-model.html#librdf-model-add-statements" title="librdf_model_add_statements ()">librdf_model_add_statements</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 76 | <em class="parameter"><code><a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> *statement_stream</code></em>); |
| 77 | <span class="returnvalue">int</span> <a class="link" href="redland-model.html#librdf-model-remove-statement" title="librdf_model_remove_statement ()">librdf_model_remove_statement</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 78 | <em class="parameter"><code><a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> *statement</code></em>); |
| 79 | <span class="returnvalue">int</span> <a class="link" href="redland-model.html#librdf-model-contains-statement" title="librdf_model_contains_statement ()">librdf_model_contains_statement</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 80 | <em class="parameter"><code><a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> *statement</code></em>); |
| 81 | <span class="returnvalue">int</span> <a class="link" href="redland-model.html#librdf-model-has-arc-in" title="librdf_model_has_arc_in ()">librdf_model_has_arc_in</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 82 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>, |
| 83 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *property</code></em>); |
| 84 | <span class="returnvalue">int</span> <a class="link" href="redland-model.html#librdf-model-has-arc-out" title="librdf_model_has_arc_out ()">librdf_model_has_arc_out</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 85 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>, |
| 86 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *property</code></em>); |
| 87 | <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="returnvalue">librdf_stream</span></a> * <a class="link" href="redland-model.html#librdf-model-as-stream" title="librdf_model_as_stream ()">librdf_model_as_stream</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>); |
| 88 | <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="returnvalue">librdf_stream</span></a> * <a class="link" href="redland-model.html#librdf-model-serialise" title="librdf_model_serialise ()">librdf_model_serialise</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>); |
| 89 | <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="returnvalue">librdf_stream</span></a> * <a class="link" href="redland-model.html#librdf-model-find-statements" title="librdf_model_find_statements ()">librdf_model_find_statements</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 90 | <em class="parameter"><code><a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> *statement</code></em>); |
| 91 | #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> |
| 92 | <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="returnvalue">librdf_stream</span></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> |
| 93 | (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 94 | <em class="parameter"><code><a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> *statement</code></em>, |
| 95 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *context_node</code></em>, |
| 96 | <em class="parameter"><code><a class="link" href="redland-hash.html#librdf-hash" title="librdf_hash"><span class="type">librdf_hash</span></a> *options</code></em>); |
| 97 | <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="returnvalue">librdf_iterator</span></a> * <a class="link" href="redland-model.html#librdf-model-get-sources" title="librdf_model_get_sources ()">librdf_model_get_sources</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 98 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *arc</code></em>, |
| 99 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *target</code></em>); |
| 100 | <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="returnvalue">librdf_iterator</span></a> * <a class="link" href="redland-model.html#librdf-model-get-arcs" title="librdf_model_get_arcs ()">librdf_model_get_arcs</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 101 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *source</code></em>, |
| 102 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *target</code></em>); |
| 103 | <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="returnvalue">librdf_iterator</span></a> * <a class="link" href="redland-model.html#librdf-model-get-targets" title="librdf_model_get_targets ()">librdf_model_get_targets</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 104 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *source</code></em>, |
| 105 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *arc</code></em>); |
| 106 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * <a class="link" href="redland-model.html#librdf-model-get-source" title="librdf_model_get_source ()">librdf_model_get_source</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 107 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *arc</code></em>, |
| 108 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *target</code></em>); |
| 109 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * <a class="link" href="redland-model.html#librdf-model-get-arc" title="librdf_model_get_arc ()">librdf_model_get_arc</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 110 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *source</code></em>, |
| 111 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *target</code></em>); |
| 112 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * <a class="link" href="redland-model.html#librdf-model-get-target" title="librdf_model_get_target ()">librdf_model_get_target</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 113 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *source</code></em>, |
| 114 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *arc</code></em>); |
| 115 | <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="returnvalue">librdf_iterator</span></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> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 116 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>); |
| 117 | <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="returnvalue">librdf_iterator</span></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> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 118 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>); |
| 119 | <span class="returnvalue">int</span> <a class="link" href="redland-model.html#librdf-model-add-submodel" title="librdf_model_add_submodel ()">librdf_model_add_submodel</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 120 | <em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *sub_model</code></em>); |
| 121 | <span class="returnvalue">int</span> <a class="link" href="redland-model.html#librdf-model-remove-submodel" title="librdf_model_remove_submodel ()">librdf_model_remove_submodel</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 122 | <em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *sub_model</code></em>); |
| 123 | <span class="returnvalue">void</span> <a class="link" href="redland-model.html#librdf-model-print" title="librdf_model_print ()">librdf_model_print</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 124 | <em class="parameter"><code><span class="type">FILE</span> *fh</code></em>); |
| 125 | <span class="returnvalue">int</span> <a class="link" href="redland-model.html#librdf-model-context-add-statement" title="librdf_model_context_add_statement ()">librdf_model_context_add_statement</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 126 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *context</code></em>, |
| 127 | <em class="parameter"><code><a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> *statement</code></em>); |
| 128 | <span class="returnvalue">int</span> <a class="link" href="redland-model.html#librdf-model-context-add-statements" title="librdf_model_context_add_statements ()">librdf_model_context_add_statements</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 129 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *context</code></em>, |
| 130 | <em class="parameter"><code><a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> *stream</code></em>); |
| 131 | <span class="returnvalue">int</span> <a class="link" href="redland-model.html#librdf-model-context-remove-statement" title="librdf_model_context_remove_statement ()">librdf_model_context_remove_statement</a> |
| 132 | (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 133 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *context</code></em>, |
| 134 | <em class="parameter"><code><a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> *statement</code></em>); |
| 135 | <span class="returnvalue">int</span> <a class="link" href="redland-model.html#librdf-model-context-remove-statements" title="librdf_model_context_remove_statements ()">librdf_model_context_remove_statements</a> |
| 136 | (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 137 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *context</code></em>); |
| 138 | <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="returnvalue">librdf_stream</span></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> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 139 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *context</code></em>); |
| 140 | <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="returnvalue">librdf_stream</span></a> * <a class="link" href="redland-model.html#librdf-model-context-serialize" title="librdf_model_context_serialize ()">librdf_model_context_serialize</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 141 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *context</code></em>); |
| 142 | <span class="returnvalue">int</span> <a class="link" href="redland-model.html#librdf-model-contains-context" title="librdf_model_contains_context ()">librdf_model_contains_context</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 143 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *context</code></em>); |
| 144 | <span class="returnvalue">int</span> <a class="link" href="redland-model.html#librdf-model-supports-contexts" title="librdf_model_supports_contexts ()">librdf_model_supports_contexts</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>); |
| 145 | <a class="link" href="redland-query-results.html#librdf-query-results" title="librdf_query_results"><span class="returnvalue">librdf_query_results</span></a> * <a class="link" href="redland-model.html#librdf-model-query-execute" title="librdf_model_query_execute ()">librdf_model_query_execute</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 146 | <em class="parameter"><code><a class="link" href="redland-query.html#librdf-query" title="librdf_query"><span class="type">librdf_query</span></a> *query</code></em>); |
| 147 | <span class="returnvalue">int</span> <a class="link" href="redland-model.html#librdf-model-sync" title="librdf_model_sync ()">librdf_model_sync</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>); |
| 148 | <a class="link" href="redland-storage.html#librdf-storage" title="librdf_storage"><span class="returnvalue">librdf_storage</span></a> * <a class="link" href="redland-model.html#librdf-model-get-storage" title="librdf_model_get_storage ()">librdf_model_get_storage</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>); |
| 149 | <span class="returnvalue">int</span> <a class="link" href="redland-model.html#librdf-model-load" title="librdf_model_load ()">librdf_model_load</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 150 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *uri</code></em>, |
| 151 | <em class="parameter"><code>const <span class="type">char</span> *name</code></em>, |
| 152 | <em class="parameter"><code>const <span class="type">char</span> *mime_type</code></em>, |
| 153 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *type_uri</code></em>); |
| 154 | unsigned <span class="returnvalue">char</span> * <a class="link" href="redland-model.html#librdf-model-to-counted-string" title="librdf_model_to_counted_string ()">librdf_model_to_counted_string</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 155 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *uri</code></em>, |
| 156 | <em class="parameter"><code>const <span class="type">char</span> *name</code></em>, |
| 157 | <em class="parameter"><code>const <span class="type">char</span> *mime_type</code></em>, |
| 158 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *type_uri</code></em>, |
| 159 | <em class="parameter"><code><span class="type">size_t</span> *string_length_p</code></em>); |
| 160 | unsigned <span class="returnvalue">char</span> * <a class="link" href="redland-model.html#librdf-model-to-string" title="librdf_model_to_string ()">librdf_model_to_string</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 161 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *uri</code></em>, |
| 162 | <em class="parameter"><code>const <span class="type">char</span> *name</code></em>, |
| 163 | <em class="parameter"><code>const <span class="type">char</span> *mime_type</code></em>, |
| 164 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *type_uri</code></em>); |
| 165 | <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="returnvalue">librdf_stream</span></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> |
| 166 | (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 167 | <em class="parameter"><code><a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> *statement</code></em>, |
| 168 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *context_node</code></em>); |
| 169 | <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="returnvalue">librdf_iterator</span></a> * <a class="link" href="redland-model.html#librdf-model-get-contexts" title="librdf_model_get_contexts ()">librdf_model_get_contexts</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>); |
| 170 | #define <a class="link" href="redland-model.html#LIBRDF-MODEL-FEATURE-CONTEXTS:CAPS" title="LIBRDF_MODEL_FEATURE_CONTEXTS">LIBRDF_MODEL_FEATURE_CONTEXTS</a> |
| 171 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * <a class="link" href="redland-model.html#librdf-model-get-feature" title="librdf_model_get_feature ()">librdf_model_get_feature</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 172 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *feature</code></em>); |
| 173 | <span class="returnvalue">int</span> <a class="link" href="redland-model.html#librdf-model-set-feature" title="librdf_model_set_feature ()">librdf_model_set_feature</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 174 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *feature</code></em>, |
| 175 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *value</code></em>); |
| 176 | <span class="returnvalue">int</span> <a class="link" href="redland-model.html#librdf-model-transaction-commit" title="librdf_model_transaction_commit ()">librdf_model_transaction_commit</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>); |
| 177 | <span class="returnvalue">void</span> * <a class="link" href="redland-model.html#librdf-model-transaction-get-handle" title="librdf_model_transaction_get_handle ()">librdf_model_transaction_get_handle</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>); |
| 178 | <span class="returnvalue">int</span> <a class="link" href="redland-model.html#librdf-model-transaction-rollback" title="librdf_model_transaction_rollback ()">librdf_model_transaction_rollback</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>); |
| 179 | <span class="returnvalue">int</span> <a class="link" href="redland-model.html#librdf-model-transaction-start" title="librdf_model_transaction_start ()">librdf_model_transaction_start</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>); |
| 180 | <span class="returnvalue">int</span> <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> |
| 181 | (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 182 | <em class="parameter"><code><span class="type">void</span> *handle</code></em>); |
| 183 | <span class="returnvalue">int</span> <a class="link" href="redland-model.html#librdf-model-write" title="librdf_model_write ()">librdf_model_write</a> (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 184 | <em class="parameter"><code><span class="type">raptor_iostream</span> *iostr</code></em>); |
| 185 | </pre> |
| 186 | </div> |
| 187 | <div class="refsect1"> |
| 188 | <a name="redland-model.description"></a><h2>Description</h2> |
| 189 | <p> |
| 190 | The main user API class for Redland, providing access to the RDF |
| 191 | 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, |
| 192 | serializing and querying. |
| 193 | </p> |
| 194 | </div> |
| 195 | <div class="refsect1"> |
| 196 | <a name="redland-model.details"></a><h2>Details</h2> |
| 197 | <div class="refsect2"> |
| 198 | <a name="librdf-model"></a><h3>librdf_model</h3> |
| 199 | <pre class="programlisting">typedef struct librdf_model_s librdf_model; |
| 200 | </pre> |
| 201 | <p> |
| 202 | Redland model class. |
| 203 | </p> |
| 204 | </div> |
| 205 | <hr> |
| 206 | <div class="refsect2"> |
| 207 | <a name="librdf-model-factory"></a><h3>librdf_model_factory</h3> |
| 208 | <pre class="programlisting">typedef struct librdf_model_factory_s librdf_model_factory; |
| 209 | </pre> |
| 210 | <p> |
| 211 | Redland model factory class. |
| 212 | </p> |
| 213 | </div> |
| 214 | <hr> |
| 215 | <div class="refsect2"> |
| 216 | <a name="librdf-model-enumerate"></a><h3>librdf_model_enumerate ()</h3> |
| 217 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_model_enumerate (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 218 | <em class="parameter"><code>const unsigned <span class="type">int</span> counter</code></em>, |
| 219 | <em class="parameter"><code>const <span class="type">char</span> **name</code></em>, |
| 220 | <em class="parameter"><code>const <span class="type">char</span> **label</code></em>);</pre> |
| 221 | <p> |
| 222 | Get information on models. |
| 223 | </p> |
| 224 | <div class="variablelist"><table border="0"> |
| 225 | <col align="left" valign="top"> |
| 226 | <tbody> |
| 227 | <tr> |
| 228 | <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td> |
| 229 | <td>redland world object</td> |
| 230 | </tr> |
| 231 | <tr> |
| 232 | <td><p><span class="term"><em class="parameter"><code>counter</code></em> :</span></p></td> |
| 233 | <td>index into the list of models</td> |
| 234 | </tr> |
| 235 | <tr> |
| 236 | <td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td> |
| 237 | <td>pointer to store the name of the model (or NULL)</td> |
| 238 | </tr> |
| 239 | <tr> |
| 240 | <td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td> |
| 241 | <td>pointer to store syntax readable label (or NULL)</td> |
| 242 | </tr> |
| 243 | <tr> |
| 244 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 245 | <td>non 0 on failure of if counter is out of range</td> |
| 246 | </tr> |
| 247 | </tbody> |
| 248 | </table></div> |
| 249 | </div> |
| 250 | <hr> |
| 251 | <div class="refsect2"> |
| 252 | <a name="librdf-new-model"></a><h3>librdf_new_model ()</h3> |
| 253 | <pre class="programlisting"><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="returnvalue">librdf_model</span></a> * librdf_new_model (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 254 | <em class="parameter"><code><a class="link" href="redland-storage.html#librdf-storage" title="librdf_storage"><span class="type">librdf_storage</span></a> *storage</code></em>, |
| 255 | <em class="parameter"><code>const <span class="type">char</span> *options_string</code></em>);</pre> |
| 256 | <p> |
| 257 | 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. |
| 258 | </p> |
| 259 | <p> |
| 260 | The options are encoded as described in <a class="link" href="redland-hash.html#librdf-hash-from-string" title="librdf_hash_from_string ()"><code class="function">librdf_hash_from_string()</code></a> |
| 261 | and can be NULL if none are required. |
| 262 | </p> |
| 263 | <div class="variablelist"><table border="0"> |
| 264 | <col align="left" valign="top"> |
| 265 | <tbody> |
| 266 | <tr> |
| 267 | <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td> |
| 268 | <td>redland world object</td> |
| 269 | </tr> |
| 270 | <tr> |
| 271 | <td><p><span class="term"><em class="parameter"><code>storage</code></em> :</span></p></td> |
| 272 | <td> |
| 273 | <a class="link" href="redland-storage.html#librdf-storage" title="librdf_storage"><span class="type">librdf_storage</span></a> to use</td> |
| 274 | </tr> |
| 275 | <tr> |
| 276 | <td><p><span class="term"><em class="parameter"><code>options_string</code></em> :</span></p></td> |
| 277 | <td>options to initialise model</td> |
| 278 | </tr> |
| 279 | <tr> |
| 280 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 281 | <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> |
| 282 | </tr> |
| 283 | </tbody> |
| 284 | </table></div> |
| 285 | </div> |
| 286 | <hr> |
| 287 | <div class="refsect2"> |
| 288 | <a name="librdf-new-model-with-options"></a><h3>librdf_new_model_with_options ()</h3> |
| 289 | <pre class="programlisting"><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="returnvalue">librdf_model</span></a> * librdf_new_model_with_options (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>, |
| 290 | <em class="parameter"><code><a class="link" href="redland-storage.html#librdf-storage" title="librdf_storage"><span class="type">librdf_storage</span></a> *storage</code></em>, |
| 291 | <em class="parameter"><code><a class="link" href="redland-hash.html#librdf-hash" title="librdf_hash"><span class="type">librdf_hash</span></a> *options</code></em>);</pre> |
| 292 | <p> |
| 293 | 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. |
| 294 | </p> |
| 295 | <p> |
| 296 | Options are presently not used. |
| 297 | </p> |
| 298 | <div class="variablelist"><table border="0"> |
| 299 | <col align="left" valign="top"> |
| 300 | <tbody> |
| 301 | <tr> |
| 302 | <td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td> |
| 303 | <td>redland world object</td> |
| 304 | </tr> |
| 305 | <tr> |
| 306 | <td><p><span class="term"><em class="parameter"><code>storage</code></em> :</span></p></td> |
| 307 | <td> |
| 308 | <a class="link" href="redland-storage.html#librdf-storage" title="librdf_storage"><span class="type">librdf_storage</span></a> storage to use</td> |
| 309 | </tr> |
| 310 | <tr> |
| 311 | <td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td> |
| 312 | <td> |
| 313 | <a class="link" href="redland-hash.html#librdf-hash" title="librdf_hash"><span class="type">librdf_hash</span></a> of options to use</td> |
| 314 | </tr> |
| 315 | <tr> |
| 316 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 317 | <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> |
| 318 | </tr> |
| 319 | </tbody> |
| 320 | </table></div> |
| 321 | </div> |
| 322 | <hr> |
| 323 | <div class="refsect2"> |
| 324 | <a name="librdf-new-model-from-model"></a><h3>librdf_new_model_from_model ()</h3> |
| 325 | <pre class="programlisting"><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="returnvalue">librdf_model</span></a> * librdf_new_model_from_model (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>);</pre> |
| 326 | <p> |
| 327 | Copy constructor - create a new librdf_model from an existing one. |
| 328 | </p> |
| 329 | <p> |
| 330 | Creates a new model as a copy of the existing model in the same |
| 331 | storage context. |
| 332 | </p> |
| 333 | <div class="variablelist"><table border="0"> |
| 334 | <col align="left" valign="top"> |
| 335 | <tbody> |
| 336 | <tr> |
| 337 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 338 | <td>the existing <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> |
| 339 | </td> |
| 340 | </tr> |
| 341 | <tr> |
| 342 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 343 | <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> |
| 344 | </tr> |
| 345 | </tbody> |
| 346 | </table></div> |
| 347 | </div> |
| 348 | <hr> |
| 349 | <div class="refsect2"> |
| 350 | <a name="librdf-free-model"></a><h3>librdf_free_model ()</h3> |
| 351 | <pre class="programlisting"><span class="returnvalue">void</span> librdf_free_model (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>);</pre> |
| 352 | <p> |
| 353 | Destructor - Destroy a <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object. |
| 354 | </p> |
| 355 | <div class="variablelist"><table border="0"> |
| 356 | <col align="left" valign="top"> |
| 357 | <tbody><tr> |
| 358 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 359 | <td> |
| 360 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> model to destroy</td> |
| 361 | </tr></tbody> |
| 362 | </table></div> |
| 363 | </div> |
| 364 | <hr> |
| 365 | <div class="refsect2"> |
| 366 | <a name="librdf-model-size"></a><h3>librdf_model_size ()</h3> |
| 367 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_model_size (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>);</pre> |
| 368 | <p> |
| 369 | Get the number of statements in the model. |
| 370 | </p> |
| 371 | <p> |
| 372 | WARNING: Not all underlying stores can return the size of the graph |
| 373 | In which case the return value will be negative. |
| 374 | </p> |
| 375 | <div class="variablelist"><table border="0"> |
| 376 | <col align="left" valign="top"> |
| 377 | <tbody> |
| 378 | <tr> |
| 379 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 380 | <td> |
| 381 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object</td> |
| 382 | </tr> |
| 383 | <tr> |
| 384 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 385 | <td>the number of statements or <0 if not possible</td> |
| 386 | </tr> |
| 387 | </tbody> |
| 388 | </table></div> |
| 389 | </div> |
| 390 | <hr> |
| 391 | <div class="refsect2"> |
| 392 | <a name="librdf-model-add"></a><h3>librdf_model_add ()</h3> |
| 393 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_model_add (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 394 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *subject</code></em>, |
| 395 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *predicate</code></em>, |
| 396 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *object</code></em>);</pre> |
| 397 | <p> |
| 398 | Create and add a new statement about a resource to the model. |
| 399 | </p> |
| 400 | <p> |
| 401 | 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. |
| 402 | All of subject, predicate and object must be non-NULL. |
| 403 | </p> |
| 404 | <div class="variablelist"><table border="0"> |
| 405 | <col align="left" valign="top"> |
| 406 | <tbody> |
| 407 | <tr> |
| 408 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 409 | <td>model object</td> |
| 410 | </tr> |
| 411 | <tr> |
| 412 | <td><p><span class="term"><em class="parameter"><code>subject</code></em> :</span></p></td> |
| 413 | <td> |
| 414 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> of subject</td> |
| 415 | </tr> |
| 416 | <tr> |
| 417 | <td><p><span class="term"><em class="parameter"><code>predicate</code></em> :</span></p></td> |
| 418 | <td> |
| 419 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> of predicate</td> |
| 420 | </tr> |
| 421 | <tr> |
| 422 | <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td> |
| 423 | <td> |
| 424 | <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> |
| 425 | </tr> |
| 426 | <tr> |
| 427 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 428 | <td>non 0 on failure</td> |
| 429 | </tr> |
| 430 | </tbody> |
| 431 | </table></div> |
| 432 | </div> |
| 433 | <hr> |
| 434 | <div class="refsect2"> |
| 435 | <a name="librdf-model-add-string-literal-statement"></a><h3>librdf_model_add_string_literal_statement ()</h3> |
| 436 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_model_add_string_literal_statement |
| 437 | (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 438 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *subject</code></em>, |
| 439 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *predicate</code></em>, |
| 440 | <em class="parameter"><code>const unsigned <span class="type">char</span> *literal</code></em>, |
| 441 | <em class="parameter"><code>const <span class="type">char</span> *xml_language</code></em>, |
| 442 | <em class="parameter"><code><span class="type">int</span> is_wf_xml</code></em>);</pre> |
| 443 | <p> |
| 444 | Create and add a new statement about a literal to the model. |
| 445 | </p> |
| 446 | <p> |
| 447 | The language can be set to NULL if not used. |
| 448 | All of subject, predicate and literal must be non-NULL. |
| 449 | </p> |
| 450 | <p> |
| 451 | 0.9.12: xml_space argument deleted |
| 452 | </p> |
| 453 | <div class="variablelist"><table border="0"> |
| 454 | <col align="left" valign="top"> |
| 455 | <tbody> |
| 456 | <tr> |
| 457 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 458 | <td>model object</td> |
| 459 | </tr> |
| 460 | <tr> |
| 461 | <td><p><span class="term"><em class="parameter"><code>subject</code></em> :</span></p></td> |
| 462 | <td> |
| 463 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> of subject</td> |
| 464 | </tr> |
| 465 | <tr> |
| 466 | <td><p><span class="term"><em class="parameter"><code>predicate</code></em> :</span></p></td> |
| 467 | <td> |
| 468 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> of predicate</td> |
| 469 | </tr> |
| 470 | <tr> |
| 471 | <td><p><span class="term"><em class="parameter"><code>literal</code></em> :</span></p></td> |
| 472 | <td>string literal conten</td> |
| 473 | </tr> |
| 474 | <tr> |
| 475 | <td><p><span class="term"><em class="parameter"><code>xml_language</code></em> :</span></p></td> |
| 476 | <td>language of literal</td> |
| 477 | </tr> |
| 478 | <tr> |
| 479 | <td><p><span class="term"><em class="parameter"><code>is_wf_xml</code></em> :</span></p></td> |
| 480 | <td>literal is XML</td> |
| 481 | </tr> |
| 482 | <tr> |
| 483 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 484 | <td>non 0 on failure</td> |
| 485 | </tr> |
| 486 | </tbody> |
| 487 | </table></div> |
| 488 | </div> |
| 489 | <hr> |
| 490 | <div class="refsect2"> |
| 491 | <a name="librdf-model-add-typed-literal-statement"></a><h3>librdf_model_add_typed_literal_statement ()</h3> |
| 492 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_model_add_typed_literal_statement |
| 493 | (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 494 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *subject</code></em>, |
| 495 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *predicate</code></em>, |
| 496 | <em class="parameter"><code>const unsigned <span class="type">char</span> *literal</code></em>, |
| 497 | <em class="parameter"><code>const <span class="type">char</span> *xml_language</code></em>, |
| 498 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *datatype_uri</code></em>);</pre> |
| 499 | <p> |
| 500 | Create and add a new statement about a typed literal to the model. |
| 501 | </p> |
| 502 | <p> |
| 503 | 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 |
| 504 | owned by the model. |
| 505 | </p> |
| 506 | <p> |
| 507 | The language can be set to NULL if not used. |
| 508 | All of subject, predicate and literal must be non-NULL. |
| 509 | </p> |
| 510 | <div class="variablelist"><table border="0"> |
| 511 | <col align="left" valign="top"> |
| 512 | <tbody> |
| 513 | <tr> |
| 514 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 515 | <td>model object</td> |
| 516 | </tr> |
| 517 | <tr> |
| 518 | <td><p><span class="term"><em class="parameter"><code>subject</code></em> :</span></p></td> |
| 519 | <td> |
| 520 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> of subject</td> |
| 521 | </tr> |
| 522 | <tr> |
| 523 | <td><p><span class="term"><em class="parameter"><code>predicate</code></em> :</span></p></td> |
| 524 | <td> |
| 525 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> of predicate</td> |
| 526 | </tr> |
| 527 | <tr> |
| 528 | <td><p><span class="term"><em class="parameter"><code>literal</code></em> :</span></p></td> |
| 529 | <td>string literal content</td> |
| 530 | </tr> |
| 531 | <tr> |
| 532 | <td><p><span class="term"><em class="parameter"><code>xml_language</code></em> :</span></p></td> |
| 533 | <td>language of literal</td> |
| 534 | </tr> |
| 535 | <tr> |
| 536 | <td><p><span class="term"><em class="parameter"><code>datatype_uri</code></em> :</span></p></td> |
| 537 | <td>datatype <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> |
| 538 | </td> |
| 539 | </tr> |
| 540 | <tr> |
| 541 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 542 | <td>non 0 on failure</td> |
| 543 | </tr> |
| 544 | </tbody> |
| 545 | </table></div> |
| 546 | </div> |
| 547 | <hr> |
| 548 | <div class="refsect2"> |
| 549 | <a name="librdf-model-add-statement"></a><h3>librdf_model_add_statement ()</h3> |
| 550 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_model_add_statement (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 551 | <em class="parameter"><code><a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> *statement</code></em>);</pre> |
| 552 | <p> |
| 553 | Add a statement to the model. |
| 554 | </p> |
| 555 | <p> |
| 556 | The passed-in statement is copied when added to the model, not |
| 557 | shared with the model. It must be a complete statement - all |
| 558 | of subject, predicate, object parts must be present. |
| 559 | </p> |
| 560 | <p> |
| 561 | Only statements that are legal RDF can be added: URI or blank subject, |
| 562 | URI predicate and URI or blank or literal object (i.e. anything). |
| 563 | </p> |
| 564 | <p> |
| 565 | If the statement already exists in the model, it is not added. |
| 566 | Duplicate statements can be added when used with Redland Contexts |
| 567 | 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> |
| 568 | </p> |
| 569 | <div class="variablelist"><table border="0"> |
| 570 | <col align="left" valign="top"> |
| 571 | <tbody> |
| 572 | <tr> |
| 573 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 574 | <td>model object</td> |
| 575 | </tr> |
| 576 | <tr> |
| 577 | <td><p><span class="term"><em class="parameter"><code>statement</code></em> :</span></p></td> |
| 578 | <td>statement object</td> |
| 579 | </tr> |
| 580 | <tr> |
| 581 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 582 | <td>non 0 on failure</td> |
| 583 | </tr> |
| 584 | </tbody> |
| 585 | </table></div> |
| 586 | </div> |
| 587 | <hr> |
| 588 | <div class="refsect2"> |
| 589 | <a name="librdf-model-add-statements"></a><h3>librdf_model_add_statements ()</h3> |
| 590 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_model_add_statements (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 591 | <em class="parameter"><code><a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> *statement_stream</code></em>);</pre> |
| 592 | <p> |
| 593 | Add a stream of statements to the model. |
| 594 | </p> |
| 595 | <p> |
| 596 | If any of the statements are illegal RDF statements they will |
| 597 | 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. |
| 598 | </p> |
| 599 | <p> |
| 600 | If any of the statements already exists in the store, they are not |
| 601 | added unless Redland contexts are being used. See also |
| 602 | <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> |
| 603 | </p> |
| 604 | <div class="variablelist"><table border="0"> |
| 605 | <col align="left" valign="top"> |
| 606 | <tbody> |
| 607 | <tr> |
| 608 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 609 | <td>model object</td> |
| 610 | </tr> |
| 611 | <tr> |
| 612 | <td><p><span class="term"><em class="parameter"><code>statement_stream</code></em> :</span></p></td> |
| 613 | <td>stream of statements to use</td> |
| 614 | </tr> |
| 615 | <tr> |
| 616 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 617 | <td>non 0 on failure</td> |
| 618 | </tr> |
| 619 | </tbody> |
| 620 | </table></div> |
| 621 | </div> |
| 622 | <hr> |
| 623 | <div class="refsect2"> |
| 624 | <a name="librdf-model-remove-statement"></a><h3>librdf_model_remove_statement ()</h3> |
| 625 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_model_remove_statement (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 626 | <em class="parameter"><code><a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> *statement</code></em>);</pre> |
| 627 | <p> |
| 628 | Remove a known statement from the model. |
| 629 | </p> |
| 630 | <p> |
| 631 | It must be a complete statement - all of subject, predicate, object |
| 632 | parts must be present and a legal RDF triple. |
| 633 | </p> |
| 634 | <div class="variablelist"><table border="0"> |
| 635 | <col align="left" valign="top"> |
| 636 | <tbody> |
| 637 | <tr> |
| 638 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 639 | <td>the model object</td> |
| 640 | </tr> |
| 641 | <tr> |
| 642 | <td><p><span class="term"><em class="parameter"><code>statement</code></em> :</span></p></td> |
| 643 | <td>the statement</td> |
| 644 | </tr> |
| 645 | <tr> |
| 646 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 647 | <td>non 0 on failure</td> |
| 648 | </tr> |
| 649 | </tbody> |
| 650 | </table></div> |
| 651 | </div> |
| 652 | <hr> |
| 653 | <div class="refsect2"> |
| 654 | <a name="librdf-model-contains-statement"></a><h3>librdf_model_contains_statement ()</h3> |
| 655 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_model_contains_statement (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 656 | <em class="parameter"><code><a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> *statement</code></em>);</pre> |
| 657 | <p> |
| 658 | Check for a statement in the model. |
| 659 | </p> |
| 660 | <p> |
| 661 | It must be a complete statement - all of subject, predicate, |
| 662 | object parts must be present and a legal RDF triple. Use |
| 663 | librdf_model_find_statements to search for partial statement |
| 664 | matches. |
| 665 | </p> |
| 666 | <p> |
| 667 | WARNING: librdf_model_contains_statement may not work correctly |
| 668 | with stores using contexts. In this case, a search using |
| 669 | librdf_model_find_statements for a non-empty list will |
| 670 | return the correct result. |
| 671 | </p> |
| 672 | <div class="variablelist"><table border="0"> |
| 673 | <col align="left" valign="top"> |
| 674 | <tbody> |
| 675 | <tr> |
| 676 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 677 | <td>the model object</td> |
| 678 | </tr> |
| 679 | <tr> |
| 680 | <td><p><span class="term"><em class="parameter"><code>statement</code></em> :</span></p></td> |
| 681 | <td>the statement</td> |
| 682 | </tr> |
| 683 | <tr> |
| 684 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 685 | <td>non 0 if the model contains the statement (>0 if the statement is illegal)</td> |
| 686 | </tr> |
| 687 | </tbody> |
| 688 | </table></div> |
| 689 | </div> |
| 690 | <hr> |
| 691 | <div class="refsect2"> |
| 692 | <a name="librdf-model-has-arc-in"></a><h3>librdf_model_has_arc_in ()</h3> |
| 693 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_model_has_arc_in (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 694 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>, |
| 695 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *property</code></em>);</pre> |
| 696 | <p> |
| 697 | Check if a node has a given property pointing to it. |
| 698 | </p> |
| 699 | <div class="variablelist"><table border="0"> |
| 700 | <col align="left" valign="top"> |
| 701 | <tbody> |
| 702 | <tr> |
| 703 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 704 | <td> |
| 705 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object</td> |
| 706 | </tr> |
| 707 | <tr> |
| 708 | <td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td> |
| 709 | <td> |
| 710 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> resource node</td> |
| 711 | </tr> |
| 712 | <tr> |
| 713 | <td><p><span class="term"><em class="parameter"><code>property</code></em> :</span></p></td> |
| 714 | <td> |
| 715 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> property node</td> |
| 716 | </tr> |
| 717 | <tr> |
| 718 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 719 | <td>non 0 if arc property does point to the resource node</td> |
| 720 | </tr> |
| 721 | </tbody> |
| 722 | </table></div> |
| 723 | </div> |
| 724 | <hr> |
| 725 | <div class="refsect2"> |
| 726 | <a name="librdf-model-has-arc-out"></a><h3>librdf_model_has_arc_out ()</h3> |
| 727 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_model_has_arc_out (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 728 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>, |
| 729 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *property</code></em>);</pre> |
| 730 | <p> |
| 731 | Check if a node has a given property pointing from it. |
| 732 | </p> |
| 733 | <div class="variablelist"><table border="0"> |
| 734 | <col align="left" valign="top"> |
| 735 | <tbody> |
| 736 | <tr> |
| 737 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 738 | <td> |
| 739 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object</td> |
| 740 | </tr> |
| 741 | <tr> |
| 742 | <td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td> |
| 743 | <td> |
| 744 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> resource node</td> |
| 745 | </tr> |
| 746 | <tr> |
| 747 | <td><p><span class="term"><em class="parameter"><code>property</code></em> :</span></p></td> |
| 748 | <td> |
| 749 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> property node</td> |
| 750 | </tr> |
| 751 | <tr> |
| 752 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 753 | <td>non 0 if arc property does point from the resource node</td> |
| 754 | </tr> |
| 755 | </tbody> |
| 756 | </table></div> |
| 757 | </div> |
| 758 | <hr> |
| 759 | <div class="refsect2"> |
| 760 | <a name="librdf-model-as-stream"></a><h3>librdf_model_as_stream ()</h3> |
| 761 | <pre class="programlisting"><a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="returnvalue">librdf_stream</span></a> * librdf_model_as_stream (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>);</pre> |
| 762 | <p> |
| 763 | List the model contents as a stream of statements. |
| 764 | </p> |
| 765 | <div class="variablelist"><table border="0"> |
| 766 | <col align="left" valign="top"> |
| 767 | <tbody> |
| 768 | <tr> |
| 769 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 770 | <td>the model object</td> |
| 771 | </tr> |
| 772 | <tr> |
| 773 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 774 | <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> |
| 775 | </tr> |
| 776 | </tbody> |
| 777 | </table></div> |
| 778 | </div> |
| 779 | <hr> |
| 780 | <div class="refsect2"> |
| 781 | <a name="librdf-model-serialise"></a><h3>librdf_model_serialise ()</h3> |
| 782 | <pre class="programlisting"><a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="returnvalue">librdf_stream</span></a> * librdf_model_serialise (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>);</pre> |
| 783 | <p> |
| 784 | Serialise the entire model as a stream (DEPRECATED). |
| 785 | </p> |
| 786 | <p> |
| 787 | DEPRECATED to reduce confusion with the librdf_serializer class. |
| 788 | Please use librdf_model_as_stream. |
| 789 | </p> |
| 790 | <div class="variablelist"><table border="0"> |
| 791 | <col align="left" valign="top"> |
| 792 | <tbody> |
| 793 | <tr> |
| 794 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 795 | <td>the model object</td> |
| 796 | </tr> |
| 797 | <tr> |
| 798 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 799 | <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> |
| 800 | </tr> |
| 801 | </tbody> |
| 802 | </table></div> |
| 803 | </div> |
| 804 | <hr> |
| 805 | <div class="refsect2"> |
| 806 | <a name="librdf-model-find-statements"></a><h3>librdf_model_find_statements ()</h3> |
| 807 | <pre class="programlisting"><a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="returnvalue">librdf_stream</span></a> * librdf_model_find_statements (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 808 | <em class="parameter"><code><a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> *statement</code></em>);</pre> |
| 809 | <p> |
| 810 | Find matching statements in the model. |
| 811 | </p> |
| 812 | <p> |
| 813 | The partial statement is a statement where the subject, predicate |
| 814 | and/or object can take the value NULL which indicates a match with |
| 815 | any value in the model |
| 816 | </p> |
| 817 | <div class="variablelist"><table border="0"> |
| 818 | <col align="left" valign="top"> |
| 819 | <tbody> |
| 820 | <tr> |
| 821 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 822 | <td>the model object</td> |
| 823 | </tr> |
| 824 | <tr> |
| 825 | <td><p><span class="term"><em class="parameter"><code>statement</code></em> :</span></p></td> |
| 826 | <td>the partial statement to match</td> |
| 827 | </tr> |
| 828 | <tr> |
| 829 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 830 | <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 |
| 831 | on failure.</td> |
| 832 | </tr> |
| 833 | </tbody> |
| 834 | </table></div> |
| 835 | </div> |
| 836 | <hr> |
| 837 | <div class="refsect2"> |
| 838 | <a name="LIBRDF-MODEL-FIND-OPTION-MATCH-SUBSTRING-LITERAL:CAPS"></a><h3>LIBRDF_MODEL_FIND_OPTION_MATCH_SUBSTRING_LITERAL</h3> |
| 839 | <pre class="programlisting">#define LIBRDF_MODEL_FIND_OPTION_MATCH_SUBSTRING_LITERAL "http://feature.librdf.org/model-find-match-substring-literal" |
| 840 | </pre> |
| 841 | <p> |
| 842 | Model find statement option. |
| 843 | </p> |
| 844 | <p> |
| 845 | If set, the find statement uses substring matching. |
| 846 | </p> |
| 847 | </div> |
| 848 | <hr> |
| 849 | <div class="refsect2"> |
| 850 | <a name="librdf-model-find-statements-with-options"></a><h3>librdf_model_find_statements_with_options ()</h3> |
| 851 | <pre class="programlisting"><a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="returnvalue">librdf_stream</span></a> * librdf_model_find_statements_with_options |
| 852 | (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 853 | <em class="parameter"><code><a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> *statement</code></em>, |
| 854 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *context_node</code></em>, |
| 855 | <em class="parameter"><code><a class="link" href="redland-hash.html#librdf-hash" title="librdf_hash"><span class="type">librdf_hash</span></a> *options</code></em>);</pre> |
| 856 | <p> |
| 857 | Search the model for matching statements with match options. |
| 858 | </p> |
| 859 | <p> |
| 860 | Searches the model for a (partial) statement as described in |
| 861 | <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 |
| 862 | matching <a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> objects. |
| 863 | </p> |
| 864 | <p> |
| 865 | If options is given then the match is made according to |
| 866 | the given options. If options is NULL, this is equivalent |
| 867 | to librdf_model_find_statements_in_context. |
| 868 | </p> |
| 869 | <div class="variablelist"><table border="0"> |
| 870 | <col align="left" valign="top"> |
| 871 | <tbody> |
| 872 | <tr> |
| 873 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 874 | <td> |
| 875 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object</td> |
| 876 | </tr> |
| 877 | <tr> |
| 878 | <td><p><span class="term"><em class="parameter"><code>statement</code></em> :</span></p></td> |
| 879 | <td> |
| 880 | <a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> partial statement to find</td> |
| 881 | </tr> |
| 882 | <tr> |
| 883 | <td><p><span class="term"><em class="parameter"><code>context_node</code></em> :</span></p></td> |
| 884 | <td> |
| 885 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> context node or NULL.</td> |
| 886 | </tr> |
| 887 | <tr> |
| 888 | <td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td> |
| 889 | <td> |
| 890 | <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> |
| 891 | </tr> |
| 892 | <tr> |
| 893 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 894 | <td> |
| 895 | <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> |
| 896 | </tr> |
| 897 | </tbody> |
| 898 | </table></div> |
| 899 | </div> |
| 900 | <hr> |
| 901 | <div class="refsect2"> |
| 902 | <a name="librdf-model-get-sources"></a><h3>librdf_model_get_sources ()</h3> |
| 903 | <pre class="programlisting"><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="returnvalue">librdf_iterator</span></a> * librdf_model_get_sources (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 904 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *arc</code></em>, |
| 905 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *target</code></em>);</pre> |
| 906 | <p> |
| 907 | Return the sources (subjects) of arc in an RDF graph given arc (predicate) and target (object). |
| 908 | </p> |
| 909 | <p> |
| 910 | Searches the model for arcs matching the given arc and target |
| 911 | 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 |
| 912 | </p> |
| 913 | <div class="variablelist"><table border="0"> |
| 914 | <col align="left" valign="top"> |
| 915 | <tbody> |
| 916 | <tr> |
| 917 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 918 | <td> |
| 919 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object</td> |
| 920 | </tr> |
| 921 | <tr> |
| 922 | <td><p><span class="term"><em class="parameter"><code>arc</code></em> :</span></p></td> |
| 923 | <td> |
| 924 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> arc</td> |
| 925 | </tr> |
| 926 | <tr> |
| 927 | <td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td> |
| 928 | <td> |
| 929 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> target</td> |
| 930 | </tr> |
| 931 | <tr> |
| 932 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 933 | <td> |
| 934 | <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> |
| 935 | </tr> |
| 936 | </tbody> |
| 937 | </table></div> |
| 938 | </div> |
| 939 | <hr> |
| 940 | <div class="refsect2"> |
| 941 | <a name="librdf-model-get-arcs"></a><h3>librdf_model_get_arcs ()</h3> |
| 942 | <pre class="programlisting"><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="returnvalue">librdf_iterator</span></a> * librdf_model_get_arcs (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 943 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *source</code></em>, |
| 944 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *target</code></em>);</pre> |
| 945 | <p> |
| 946 | Return the arcs (predicates) of an arc in an RDF graph given source (subject) and target (object). |
| 947 | </p> |
| 948 | <p> |
| 949 | Searches the model for arcs matching the given source and target |
| 950 | 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 |
| 951 | </p> |
| 952 | <div class="variablelist"><table border="0"> |
| 953 | <col align="left" valign="top"> |
| 954 | <tbody> |
| 955 | <tr> |
| 956 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 957 | <td> |
| 958 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object</td> |
| 959 | </tr> |
| 960 | <tr> |
| 961 | <td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td> |
| 962 | <td> |
| 963 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> source</td> |
| 964 | </tr> |
| 965 | <tr> |
| 966 | <td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td> |
| 967 | <td> |
| 968 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> target</td> |
| 969 | </tr> |
| 970 | <tr> |
| 971 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 972 | <td> |
| 973 | <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> |
| 974 | </tr> |
| 975 | </tbody> |
| 976 | </table></div> |
| 977 | </div> |
| 978 | <hr> |
| 979 | <div class="refsect2"> |
| 980 | <a name="librdf-model-get-targets"></a><h3>librdf_model_get_targets ()</h3> |
| 981 | <pre class="programlisting"><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="returnvalue">librdf_iterator</span></a> * librdf_model_get_targets (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 982 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *source</code></em>, |
| 983 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *arc</code></em>);</pre> |
| 984 | <p> |
| 985 | Return the targets (objects) of an arc in an RDF graph given source (subject) and arc (predicate). |
| 986 | </p> |
| 987 | <p> |
| 988 | Searches the model for targets matching the given source and arc |
| 989 | 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 |
| 990 | </p> |
| 991 | <div class="variablelist"><table border="0"> |
| 992 | <col align="left" valign="top"> |
| 993 | <tbody> |
| 994 | <tr> |
| 995 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 996 | <td> |
| 997 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object</td> |
| 998 | </tr> |
| 999 | <tr> |
| 1000 | <td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td> |
| 1001 | <td> |
| 1002 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> source</td> |
| 1003 | </tr> |
| 1004 | <tr> |
| 1005 | <td><p><span class="term"><em class="parameter"><code>arc</code></em> :</span></p></td> |
| 1006 | <td> |
| 1007 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> arc</td> |
| 1008 | </tr> |
| 1009 | <tr> |
| 1010 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1011 | <td> |
| 1012 | <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> |
| 1013 | </tr> |
| 1014 | </tbody> |
| 1015 | </table></div> |
| 1016 | </div> |
| 1017 | <hr> |
| 1018 | <div class="refsect2"> |
| 1019 | <a name="librdf-model-get-source"></a><h3>librdf_model_get_source ()</h3> |
| 1020 | <pre class="programlisting"><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * librdf_model_get_source (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 1021 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *arc</code></em>, |
| 1022 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *target</code></em>);</pre> |
| 1023 | <p> |
| 1024 | Return one source (subject) of arc in an RDF graph given arc (predicate) and target (object). |
| 1025 | </p> |
| 1026 | <p> |
| 1027 | Searches the model for arcs matching the given arc and target |
| 1028 | and returns one <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object |
| 1029 | </p> |
| 1030 | <div class="variablelist"><table border="0"> |
| 1031 | <col align="left" valign="top"> |
| 1032 | <tbody> |
| 1033 | <tr> |
| 1034 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1035 | <td> |
| 1036 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object</td> |
| 1037 | </tr> |
| 1038 | <tr> |
| 1039 | <td><p><span class="term"><em class="parameter"><code>arc</code></em> :</span></p></td> |
| 1040 | <td> |
| 1041 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> arc</td> |
| 1042 | </tr> |
| 1043 | <tr> |
| 1044 | <td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td> |
| 1045 | <td> |
| 1046 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> target</td> |
| 1047 | </tr> |
| 1048 | <tr> |
| 1049 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1050 | <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> |
| 1051 | </tr> |
| 1052 | </tbody> |
| 1053 | </table></div> |
| 1054 | </div> |
| 1055 | <hr> |
| 1056 | <div class="refsect2"> |
| 1057 | <a name="librdf-model-get-arc"></a><h3>librdf_model_get_arc ()</h3> |
| 1058 | <pre class="programlisting"><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * librdf_model_get_arc (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 1059 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *source</code></em>, |
| 1060 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *target</code></em>);</pre> |
| 1061 | <p> |
| 1062 | Return one arc (predicate) of an arc in an RDF graph given source (subject) and target (object). |
| 1063 | </p> |
| 1064 | <p> |
| 1065 | Searches the model for arcs matching the given source and target |
| 1066 | and returns one <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object |
| 1067 | </p> |
| 1068 | <div class="variablelist"><table border="0"> |
| 1069 | <col align="left" valign="top"> |
| 1070 | <tbody> |
| 1071 | <tr> |
| 1072 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1073 | <td> |
| 1074 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object</td> |
| 1075 | </tr> |
| 1076 | <tr> |
| 1077 | <td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td> |
| 1078 | <td> |
| 1079 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> source</td> |
| 1080 | </tr> |
| 1081 | <tr> |
| 1082 | <td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td> |
| 1083 | <td> |
| 1084 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> target</td> |
| 1085 | </tr> |
| 1086 | <tr> |
| 1087 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1088 | <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> |
| 1089 | </tr> |
| 1090 | </tbody> |
| 1091 | </table></div> |
| 1092 | </div> |
| 1093 | <hr> |
| 1094 | <div class="refsect2"> |
| 1095 | <a name="librdf-model-get-target"></a><h3>librdf_model_get_target ()</h3> |
| 1096 | <pre class="programlisting"><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * librdf_model_get_target (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 1097 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *source</code></em>, |
| 1098 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *arc</code></em>);</pre> |
| 1099 | <p> |
| 1100 | Return one target (object) of an arc in an RDF graph given source (subject) and arc (predicate). |
| 1101 | </p> |
| 1102 | <p> |
| 1103 | Searches the model for targets matching the given source and arc |
| 1104 | and returns one <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> object |
| 1105 | </p> |
| 1106 | <div class="variablelist"><table border="0"> |
| 1107 | <col align="left" valign="top"> |
| 1108 | <tbody> |
| 1109 | <tr> |
| 1110 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1111 | <td> |
| 1112 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object</td> |
| 1113 | </tr> |
| 1114 | <tr> |
| 1115 | <td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td> |
| 1116 | <td> |
| 1117 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> source</td> |
| 1118 | </tr> |
| 1119 | <tr> |
| 1120 | <td><p><span class="term"><em class="parameter"><code>arc</code></em> :</span></p></td> |
| 1121 | <td> |
| 1122 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> arc</td> |
| 1123 | </tr> |
| 1124 | <tr> |
| 1125 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1126 | <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> |
| 1127 | </tr> |
| 1128 | </tbody> |
| 1129 | </table></div> |
| 1130 | </div> |
| 1131 | <hr> |
| 1132 | <div class="refsect2"> |
| 1133 | <a name="librdf-model-get-arcs-in"></a><h3>librdf_model_get_arcs_in ()</h3> |
| 1134 | <pre class="programlisting"><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="returnvalue">librdf_iterator</span></a> * librdf_model_get_arcs_in (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 1135 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>);</pre> |
| 1136 | <p> |
| 1137 | Return the properties pointing to the given resource. |
| 1138 | </p> |
| 1139 | <div class="variablelist"><table border="0"> |
| 1140 | <col align="left" valign="top"> |
| 1141 | <tbody> |
| 1142 | <tr> |
| 1143 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1144 | <td> |
| 1145 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object</td> |
| 1146 | </tr> |
| 1147 | <tr> |
| 1148 | <td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td> |
| 1149 | <td> |
| 1150 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> resource node</td> |
| 1151 | </tr> |
| 1152 | <tr> |
| 1153 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1154 | <td> |
| 1155 | <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> |
| 1156 | </tr> |
| 1157 | </tbody> |
| 1158 | </table></div> |
| 1159 | </div> |
| 1160 | <hr> |
| 1161 | <div class="refsect2"> |
| 1162 | <a name="librdf-model-get-arcs-out"></a><h3>librdf_model_get_arcs_out ()</h3> |
| 1163 | <pre class="programlisting"><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="returnvalue">librdf_iterator</span></a> * librdf_model_get_arcs_out (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 1164 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>);</pre> |
| 1165 | <p> |
| 1166 | Return the properties pointing from the given resource. |
| 1167 | </p> |
| 1168 | <div class="variablelist"><table border="0"> |
| 1169 | <col align="left" valign="top"> |
| 1170 | <tbody> |
| 1171 | <tr> |
| 1172 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1173 | <td> |
| 1174 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object</td> |
| 1175 | </tr> |
| 1176 | <tr> |
| 1177 | <td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td> |
| 1178 | <td> |
| 1179 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> resource node</td> |
| 1180 | </tr> |
| 1181 | <tr> |
| 1182 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1183 | <td> |
| 1184 | <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> |
| 1185 | </tr> |
| 1186 | </tbody> |
| 1187 | </table></div> |
| 1188 | </div> |
| 1189 | <hr> |
| 1190 | <div class="refsect2"> |
| 1191 | <a name="librdf-model-add-submodel"></a><h3>librdf_model_add_submodel ()</h3> |
| 1192 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_model_add_submodel (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 1193 | <em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *sub_model</code></em>);</pre> |
| 1194 | <p> |
| 1195 | Add a sub-model to the model. |
| 1196 | </p> |
| 1197 | <p> |
| 1198 | FIXME: Not tested |
| 1199 | </p> |
| 1200 | <div class="variablelist"><table border="0"> |
| 1201 | <col align="left" valign="top"> |
| 1202 | <tbody> |
| 1203 | <tr> |
| 1204 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1205 | <td>the model object</td> |
| 1206 | </tr> |
| 1207 | <tr> |
| 1208 | <td><p><span class="term"><em class="parameter"><code>sub_model</code></em> :</span></p></td> |
| 1209 | <td>the sub model to add</td> |
| 1210 | </tr> |
| 1211 | <tr> |
| 1212 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1213 | <td>non 0 on failure</td> |
| 1214 | </tr> |
| 1215 | </tbody> |
| 1216 | </table></div> |
| 1217 | </div> |
| 1218 | <hr> |
| 1219 | <div class="refsect2"> |
| 1220 | <a name="librdf-model-remove-submodel"></a><h3>librdf_model_remove_submodel ()</h3> |
| 1221 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_model_remove_submodel (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 1222 | <em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *sub_model</code></em>);</pre> |
| 1223 | <p> |
| 1224 | Remove a sub-model from the model. |
| 1225 | </p> |
| 1226 | <p> |
| 1227 | FIXME: Not tested |
| 1228 | </p> |
| 1229 | <div class="variablelist"><table border="0"> |
| 1230 | <col align="left" valign="top"> |
| 1231 | <tbody> |
| 1232 | <tr> |
| 1233 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1234 | <td>the model object</td> |
| 1235 | </tr> |
| 1236 | <tr> |
| 1237 | <td><p><span class="term"><em class="parameter"><code>sub_model</code></em> :</span></p></td> |
| 1238 | <td>the sub model to remove</td> |
| 1239 | </tr> |
| 1240 | <tr> |
| 1241 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1242 | <td>non 0 on failure</td> |
| 1243 | </tr> |
| 1244 | </tbody> |
| 1245 | </table></div> |
| 1246 | </div> |
| 1247 | <hr> |
| 1248 | <div class="refsect2"> |
| 1249 | <a name="librdf-model-print"></a><h3>librdf_model_print ()</h3> |
| 1250 | <pre class="programlisting"><span class="returnvalue">void</span> librdf_model_print (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 1251 | <em class="parameter"><code><span class="type">FILE</span> *fh</code></em>);</pre> |
| 1252 | <p> |
| 1253 | Print the model. |
| 1254 | </p> |
| 1255 | <p> |
| 1256 | This method is for debugging and the format of the output should |
| 1257 | not be relied on. |
| 1258 | </p> |
| 1259 | <p> |
| 1260 | <em class="parameter"><code>Deprecated</code></em>: Use <a class="link" href="redland-model.html#librdf-model-write" title="librdf_model_write ()"><code class="function">librdf_model_write()</code></a> to write to <span class="type">raptor_iostream</span> |
| 1261 | which can be made to write to a string. Use a <a class="link" href="redland-serializer.html#librdf-serializer" title="librdf_serializer"><span class="type">librdf_serializer</span></a> |
| 1262 | to write proper syntax formats. |
| 1263 | </p> |
| 1264 | <div class="variablelist"><table border="0"> |
| 1265 | <col align="left" valign="top"> |
| 1266 | <tbody> |
| 1267 | <tr> |
| 1268 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1269 | <td>the model object</td> |
| 1270 | </tr> |
| 1271 | <tr> |
| 1272 | <td><p><span class="term"><em class="parameter"><code>fh</code></em> :</span></p></td> |
| 1273 | <td>the FILE stream to print to</td> |
| 1274 | </tr> |
| 1275 | </tbody> |
| 1276 | </table></div> |
| 1277 | </div> |
| 1278 | <hr> |
| 1279 | <div class="refsect2"> |
| 1280 | <a name="librdf-model-context-add-statement"></a><h3>librdf_model_context_add_statement ()</h3> |
| 1281 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_model_context_add_statement (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 1282 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *context</code></em>, |
| 1283 | <em class="parameter"><code><a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> *statement</code></em>);</pre> |
| 1284 | <p> |
| 1285 | Add a statement to a model with a context. |
| 1286 | </p> |
| 1287 | <p> |
| 1288 | It must be a complete statement - all |
| 1289 | of subject, predicate, object parts must be present. |
| 1290 | </p> |
| 1291 | <p> |
| 1292 | If <em class="parameter"><code>context</code></em> is NULL, this is equivalent to librdf_model_add_statement |
| 1293 | </p> |
| 1294 | <div class="variablelist"><table border="0"> |
| 1295 | <col align="left" valign="top"> |
| 1296 | <tbody> |
| 1297 | <tr> |
| 1298 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1299 | <td> |
| 1300 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object</td> |
| 1301 | </tr> |
| 1302 | <tr> |
| 1303 | <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td> |
| 1304 | <td> |
| 1305 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> context</td> |
| 1306 | </tr> |
| 1307 | <tr> |
| 1308 | <td><p><span class="term"><em class="parameter"><code>statement</code></em> :</span></p></td> |
| 1309 | <td> |
| 1310 | <a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> statement object</td> |
| 1311 | </tr> |
| 1312 | <tr> |
| 1313 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1314 | <td>Non 0 on failure</td> |
| 1315 | </tr> |
| 1316 | </tbody> |
| 1317 | </table></div> |
| 1318 | </div> |
| 1319 | <hr> |
| 1320 | <div class="refsect2"> |
| 1321 | <a name="librdf-model-context-add-statements"></a><h3>librdf_model_context_add_statements ()</h3> |
| 1322 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_model_context_add_statements (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 1323 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *context</code></em>, |
| 1324 | <em class="parameter"><code><a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> *stream</code></em>);</pre> |
| 1325 | <p> |
| 1326 | Add statements to a model with a context. |
| 1327 | </p> |
| 1328 | <p> |
| 1329 | If <em class="parameter"><code>context</code></em> is NULL, this is equivalent to librdf_model_add_statements |
| 1330 | </p> |
| 1331 | <div class="variablelist"><table border="0"> |
| 1332 | <col align="left" valign="top"> |
| 1333 | <tbody> |
| 1334 | <tr> |
| 1335 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1336 | <td> |
| 1337 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object</td> |
| 1338 | </tr> |
| 1339 | <tr> |
| 1340 | <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td> |
| 1341 | <td> |
| 1342 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> context</td> |
| 1343 | </tr> |
| 1344 | <tr> |
| 1345 | <td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td> |
| 1346 | <td> |
| 1347 | <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> stream object</td> |
| 1348 | </tr> |
| 1349 | <tr> |
| 1350 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1351 | <td>Non 0 on failure</td> |
| 1352 | </tr> |
| 1353 | </tbody> |
| 1354 | </table></div> |
| 1355 | </div> |
| 1356 | <hr> |
| 1357 | <div class="refsect2"> |
| 1358 | <a name="librdf-model-context-remove-statement"></a><h3>librdf_model_context_remove_statement ()</h3> |
| 1359 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_model_context_remove_statement |
| 1360 | (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 1361 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *context</code></em>, |
| 1362 | <em class="parameter"><code><a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> *statement</code></em>);</pre> |
| 1363 | <p> |
| 1364 | Remove a statement from a model in a context. |
| 1365 | </p> |
| 1366 | <p> |
| 1367 | It must be a complete statement - all of subject, predicate, object |
| 1368 | parts must be present. |
| 1369 | </p> |
| 1370 | <p> |
| 1371 | If <em class="parameter"><code>context</code></em> is NULL, this is equivalent to librdf_model_remove_statement |
| 1372 | </p> |
| 1373 | <div class="variablelist"><table border="0"> |
| 1374 | <col align="left" valign="top"> |
| 1375 | <tbody> |
| 1376 | <tr> |
| 1377 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1378 | <td> |
| 1379 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object</td> |
| 1380 | </tr> |
| 1381 | <tr> |
| 1382 | <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td> |
| 1383 | <td> |
| 1384 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> context</td> |
| 1385 | </tr> |
| 1386 | <tr> |
| 1387 | <td><p><span class="term"><em class="parameter"><code>statement</code></em> :</span></p></td> |
| 1388 | <td> |
| 1389 | <a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> statement</td> |
| 1390 | </tr> |
| 1391 | <tr> |
| 1392 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1393 | <td>Non 0 on failure</td> |
| 1394 | </tr> |
| 1395 | </tbody> |
| 1396 | </table></div> |
| 1397 | </div> |
| 1398 | <hr> |
| 1399 | <div class="refsect2"> |
| 1400 | <a name="librdf-model-context-remove-statements"></a><h3>librdf_model_context_remove_statements ()</h3> |
| 1401 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_model_context_remove_statements |
| 1402 | (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 1403 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *context</code></em>);</pre> |
| 1404 | <p> |
| 1405 | Remove statements from a model with the given context. |
| 1406 | </p> |
| 1407 | <div class="variablelist"><table border="0"> |
| 1408 | <col align="left" valign="top"> |
| 1409 | <tbody> |
| 1410 | <tr> |
| 1411 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1412 | <td> |
| 1413 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object</td> |
| 1414 | </tr> |
| 1415 | <tr> |
| 1416 | <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td> |
| 1417 | <td> |
| 1418 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> context</td> |
| 1419 | </tr> |
| 1420 | <tr> |
| 1421 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1422 | <td>Non 0 on failure</td> |
| 1423 | </tr> |
| 1424 | </tbody> |
| 1425 | </table></div> |
| 1426 | </div> |
| 1427 | <hr> |
| 1428 | <div class="refsect2"> |
| 1429 | <a name="librdf-model-context-as-stream"></a><h3>librdf_model_context_as_stream ()</h3> |
| 1430 | <pre class="programlisting"><a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="returnvalue">librdf_stream</span></a> * librdf_model_context_as_stream (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 1431 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *context</code></em>);</pre> |
| 1432 | <p> |
| 1433 | List all statements in a model context. |
| 1434 | </p> |
| 1435 | <div class="variablelist"><table border="0"> |
| 1436 | <col align="left" valign="top"> |
| 1437 | <tbody> |
| 1438 | <tr> |
| 1439 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1440 | <td> |
| 1441 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object</td> |
| 1442 | </tr> |
| 1443 | <tr> |
| 1444 | <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td> |
| 1445 | <td> |
| 1446 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> context</td> |
| 1447 | </tr> |
| 1448 | <tr> |
| 1449 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1450 | <td> |
| 1451 | <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> |
| 1452 | </tr> |
| 1453 | </tbody> |
| 1454 | </table></div> |
| 1455 | </div> |
| 1456 | <hr> |
| 1457 | <div class="refsect2"> |
| 1458 | <a name="librdf-model-context-serialize"></a><h3>librdf_model_context_serialize ()</h3> |
| 1459 | <pre class="programlisting"><a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="returnvalue">librdf_stream</span></a> * librdf_model_context_serialize (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 1460 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *context</code></em>);</pre> |
| 1461 | <p> |
| 1462 | List all statements in a model context. |
| 1463 | </p> |
| 1464 | <p> |
| 1465 | DEPRECATED to reduce confusion with the librdf_serializer class. |
| 1466 | Please use librdf_model_context_as_stream. |
| 1467 | </p> |
| 1468 | <div class="variablelist"><table border="0"> |
| 1469 | <col align="left" valign="top"> |
| 1470 | <tbody> |
| 1471 | <tr> |
| 1472 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1473 | <td> |
| 1474 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object</td> |
| 1475 | </tr> |
| 1476 | <tr> |
| 1477 | <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td> |
| 1478 | <td> |
| 1479 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> context</td> |
| 1480 | </tr> |
| 1481 | <tr> |
| 1482 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1483 | <td> |
| 1484 | <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> |
| 1485 | </tr> |
| 1486 | </tbody> |
| 1487 | </table></div> |
| 1488 | </div> |
| 1489 | <hr> |
| 1490 | <div class="refsect2"> |
| 1491 | <a name="librdf-model-contains-context"></a><h3>librdf_model_contains_context ()</h3> |
| 1492 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_model_contains_context (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 1493 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *context</code></em>);</pre> |
| 1494 | <p> |
| 1495 | Check for a context in the model. |
| 1496 | </p> |
| 1497 | <div class="variablelist"><table border="0"> |
| 1498 | <col align="left" valign="top"> |
| 1499 | <tbody> |
| 1500 | <tr> |
| 1501 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1502 | <td>the model object</td> |
| 1503 | </tr> |
| 1504 | <tr> |
| 1505 | <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td> |
| 1506 | <td>the contest</td> |
| 1507 | </tr> |
| 1508 | <tr> |
| 1509 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1510 | <td>non 0 if the model contains the context node</td> |
| 1511 | </tr> |
| 1512 | </tbody> |
| 1513 | </table></div> |
| 1514 | </div> |
| 1515 | <hr> |
| 1516 | <div class="refsect2"> |
| 1517 | <a name="librdf-model-supports-contexts"></a><h3>librdf_model_supports_contexts ()</h3> |
| 1518 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_model_supports_contexts (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>);</pre> |
| 1519 | <p> |
| 1520 | Check if this model supports contexts |
| 1521 | </p> |
| 1522 | <div class="variablelist"><table border="0"> |
| 1523 | <col align="left" valign="top"> |
| 1524 | <tbody> |
| 1525 | <tr> |
| 1526 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1527 | <td>the model object</td> |
| 1528 | </tr> |
| 1529 | <tr> |
| 1530 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1531 | <td>non-0 if contexts are supported</td> |
| 1532 | </tr> |
| 1533 | </tbody> |
| 1534 | </table></div> |
| 1535 | </div> |
| 1536 | <hr> |
| 1537 | <div class="refsect2"> |
| 1538 | <a name="librdf-model-query-execute"></a><h3>librdf_model_query_execute ()</h3> |
| 1539 | <pre class="programlisting"><a class="link" href="redland-query-results.html#librdf-query-results" title="librdf_query_results"><span class="returnvalue">librdf_query_results</span></a> * librdf_model_query_execute (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 1540 | <em class="parameter"><code><a class="link" href="redland-query.html#librdf-query" title="librdf_query"><span class="type">librdf_query</span></a> *query</code></em>);</pre> |
| 1541 | <p> |
| 1542 | Execute a query against the model. |
| 1543 | </p> |
| 1544 | <p> |
| 1545 | 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 |
| 1546 | matching <a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> objects |
| 1547 | </p> |
| 1548 | <div class="variablelist"><table border="0"> |
| 1549 | <col align="left" valign="top"> |
| 1550 | <tbody> |
| 1551 | <tr> |
| 1552 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1553 | <td> |
| 1554 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object</td> |
| 1555 | </tr> |
| 1556 | <tr> |
| 1557 | <td><p><span class="term"><em class="parameter"><code>query</code></em> :</span></p></td> |
| 1558 | <td> |
| 1559 | <a class="link" href="redland-query.html#librdf-query" title="librdf_query"><span class="type">librdf_query</span></a> object</td> |
| 1560 | </tr> |
| 1561 | <tr> |
| 1562 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1563 | <td> |
| 1564 | <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> |
| 1565 | </tr> |
| 1566 | </tbody> |
| 1567 | </table></div> |
| 1568 | </div> |
| 1569 | <hr> |
| 1570 | <div class="refsect2"> |
| 1571 | <a name="librdf-model-sync"></a><h3>librdf_model_sync ()</h3> |
| 1572 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_model_sync (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>);</pre> |
| 1573 | <p> |
| 1574 | Synchronise the model to the model implementation. |
| 1575 | </p> |
| 1576 | <div class="variablelist"><table border="0"> |
| 1577 | <col align="left" valign="top"> |
| 1578 | <tbody> |
| 1579 | <tr> |
| 1580 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1581 | <td> |
| 1582 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object</td> |
| 1583 | </tr> |
| 1584 | <tr> |
| 1585 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1586 | <td>non-0 on failure</td> |
| 1587 | </tr> |
| 1588 | </tbody> |
| 1589 | </table></div> |
| 1590 | </div> |
| 1591 | <hr> |
| 1592 | <div class="refsect2"> |
| 1593 | <a name="librdf-model-get-storage"></a><h3>librdf_model_get_storage ()</h3> |
| 1594 | <pre class="programlisting"><a class="link" href="redland-storage.html#librdf-storage" title="librdf_storage"><span class="returnvalue">librdf_storage</span></a> * librdf_model_get_storage (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>);</pre> |
| 1595 | <p> |
| 1596 | Return the storage of this model. |
| 1597 | </p> |
| 1598 | <p> |
| 1599 | Note: this can only return one storage, so model implementations |
| 1600 | 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 |
| 1601 | implement this. |
| 1602 | </p> |
| 1603 | <div class="variablelist"><table border="0"> |
| 1604 | <col align="left" valign="top"> |
| 1605 | <tbody> |
| 1606 | <tr> |
| 1607 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1608 | <td> |
| 1609 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object</td> |
| 1610 | </tr> |
| 1611 | <tr> |
| 1612 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1613 | <td> |
| 1614 | <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> |
| 1615 | </tr> |
| 1616 | </tbody> |
| 1617 | </table></div> |
| 1618 | </div> |
| 1619 | <hr> |
| 1620 | <div class="refsect2"> |
| 1621 | <a name="librdf-model-load"></a><h3>librdf_model_load ()</h3> |
| 1622 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_model_load (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 1623 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *uri</code></em>, |
| 1624 | <em class="parameter"><code>const <span class="type">char</span> *name</code></em>, |
| 1625 | <em class="parameter"><code>const <span class="type">char</span> *mime_type</code></em>, |
| 1626 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *type_uri</code></em>);</pre> |
| 1627 | <p> |
| 1628 | Load content from a URI into the model. |
| 1629 | </p> |
| 1630 | <p> |
| 1631 | If the name field is NULL, the library will try to guess |
| 1632 | the parser to use from the uri, mime_type and type_uri fields. |
| 1633 | This is done via the raptor_guess_parser_name function. |
| 1634 | </p> |
| 1635 | <div class="variablelist"><table border="0"> |
| 1636 | <col align="left" valign="top"> |
| 1637 | <tbody> |
| 1638 | <tr> |
| 1639 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1640 | <td> |
| 1641 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object</td> |
| 1642 | </tr> |
| 1643 | <tr> |
| 1644 | <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td> |
| 1645 | <td>the URI to read the content</td> |
| 1646 | </tr> |
| 1647 | <tr> |
| 1648 | <td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td> |
| 1649 | <td>the name of the parser (or NULL)</td> |
| 1650 | </tr> |
| 1651 | <tr> |
| 1652 | <td><p><span class="term"><em class="parameter"><code>mime_type</code></em> :</span></p></td> |
| 1653 | <td>the MIME type of the syntax (NULL if not used)</td> |
| 1654 | </tr> |
| 1655 | <tr> |
| 1656 | <td><p><span class="term"><em class="parameter"><code>type_uri</code></em> :</span></p></td> |
| 1657 | <td>URI identifying the syntax (NULL if not used)</td> |
| 1658 | </tr> |
| 1659 | <tr> |
| 1660 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1661 | <td>non 0 on failure</td> |
| 1662 | </tr> |
| 1663 | </tbody> |
| 1664 | </table></div> |
| 1665 | </div> |
| 1666 | <hr> |
| 1667 | <div class="refsect2"> |
| 1668 | <a name="librdf-model-to-counted-string"></a><h3>librdf_model_to_counted_string ()</h3> |
| 1669 | <pre class="programlisting">unsigned <span class="returnvalue">char</span> * librdf_model_to_counted_string (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 1670 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *uri</code></em>, |
| 1671 | <em class="parameter"><code>const <span class="type">char</span> *name</code></em>, |
| 1672 | <em class="parameter"><code>const <span class="type">char</span> *mime_type</code></em>, |
| 1673 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *type_uri</code></em>, |
| 1674 | <em class="parameter"><code><span class="type">size_t</span> *string_length_p</code></em>);</pre> |
| 1675 | <p> |
| 1676 | Write serialized model to a string. |
| 1677 | </p> |
| 1678 | <p> |
| 1679 | If the name field is NULL, the default serializer will be used. |
| 1680 | </p> |
| 1681 | <p> |
| 1682 | Note: the returned string must be freed by the caller using <a class="link" href="redland-general.html#librdf-free-memory" title="librdf_free_memory ()"><code class="function">librdf_free_memory()</code></a>. |
| 1683 | </p> |
| 1684 | <div class="variablelist"><table border="0"> |
| 1685 | <col align="left" valign="top"> |
| 1686 | <tbody> |
| 1687 | <tr> |
| 1688 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1689 | <td> |
| 1690 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object</td> |
| 1691 | </tr> |
| 1692 | <tr> |
| 1693 | <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td> |
| 1694 | <td>base URI to use in serializing (or NULL if not used)</td> |
| 1695 | </tr> |
| 1696 | <tr> |
| 1697 | <td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td> |
| 1698 | <td>the name of the serializer (or NULL for default)</td> |
| 1699 | </tr> |
| 1700 | <tr> |
| 1701 | <td><p><span class="term"><em class="parameter"><code>mime_type</code></em> :</span></p></td> |
| 1702 | <td>the MIME type of the syntax (NULL if not used)</td> |
| 1703 | </tr> |
| 1704 | <tr> |
| 1705 | <td><p><span class="term"><em class="parameter"><code>type_uri</code></em> :</span></p></td> |
| 1706 | <td>URI identifying the syntax (NULL if not used)</td> |
| 1707 | </tr> |
| 1708 | <tr> |
| 1709 | <td><p><span class="term"><em class="parameter"><code>string_length_p</code></em> :</span></p></td> |
| 1710 | <td>pointer to location to store string length (or NULL)</td> |
| 1711 | </tr> |
| 1712 | <tr> |
| 1713 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1714 | <td>new string or NULL on failure</td> |
| 1715 | </tr> |
| 1716 | </tbody> |
| 1717 | </table></div> |
| 1718 | </div> |
| 1719 | <hr> |
| 1720 | <div class="refsect2"> |
| 1721 | <a name="librdf-model-to-string"></a><h3>librdf_model_to_string ()</h3> |
| 1722 | <pre class="programlisting">unsigned <span class="returnvalue">char</span> * librdf_model_to_string (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 1723 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *uri</code></em>, |
| 1724 | <em class="parameter"><code>const <span class="type">char</span> *name</code></em>, |
| 1725 | <em class="parameter"><code>const <span class="type">char</span> *mime_type</code></em>, |
| 1726 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *type_uri</code></em>);</pre> |
| 1727 | <p> |
| 1728 | Write serialized model to a string. |
| 1729 | </p> |
| 1730 | <p> |
| 1731 | If the name field is NULL, the default serializer will be used. |
| 1732 | </p> |
| 1733 | <p> |
| 1734 | Note: the returned string must be freed by the caller. |
| 1735 | </p> |
| 1736 | <div class="variablelist"><table border="0"> |
| 1737 | <col align="left" valign="top"> |
| 1738 | <tbody> |
| 1739 | <tr> |
| 1740 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1741 | <td> |
| 1742 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object</td> |
| 1743 | </tr> |
| 1744 | <tr> |
| 1745 | <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td> |
| 1746 | <td>base URI to use in serializing (or NULL if not used)</td> |
| 1747 | </tr> |
| 1748 | <tr> |
| 1749 | <td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td> |
| 1750 | <td>the name of the serializer (or NULL for default)</td> |
| 1751 | </tr> |
| 1752 | <tr> |
| 1753 | <td><p><span class="term"><em class="parameter"><code>mime_type</code></em> :</span></p></td> |
| 1754 | <td>the MIME type of the syntax (NULL if not used)</td> |
| 1755 | </tr> |
| 1756 | <tr> |
| 1757 | <td><p><span class="term"><em class="parameter"><code>type_uri</code></em> :</span></p></td> |
| 1758 | <td>URI identifying the syntax (NULL if not used)</td> |
| 1759 | </tr> |
| 1760 | <tr> |
| 1761 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1762 | <td>new string or NULL on failure</td> |
| 1763 | </tr> |
| 1764 | </tbody> |
| 1765 | </table></div> |
| 1766 | </div> |
| 1767 | <hr> |
| 1768 | <div class="refsect2"> |
| 1769 | <a name="librdf-model-find-statements-in-context"></a><h3>librdf_model_find_statements_in_context ()</h3> |
| 1770 | <pre class="programlisting"><a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="returnvalue">librdf_stream</span></a> * librdf_model_find_statements_in_context |
| 1771 | (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 1772 | <em class="parameter"><code><a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> *statement</code></em>, |
| 1773 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *context_node</code></em>);</pre> |
| 1774 | <p> |
| 1775 | Search the model for matching statements in a given context. |
| 1776 | </p> |
| 1777 | <p> |
| 1778 | Searches the model for a (partial) statement as described in |
| 1779 | <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 |
| 1780 | <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 |
| 1781 | context is NULL, this is equivalent to librdf_model_find_statements. |
| 1782 | </p> |
| 1783 | <div class="variablelist"><table border="0"> |
| 1784 | <col align="left" valign="top"> |
| 1785 | <tbody> |
| 1786 | <tr> |
| 1787 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1788 | <td> |
| 1789 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object</td> |
| 1790 | </tr> |
| 1791 | <tr> |
| 1792 | <td><p><span class="term"><em class="parameter"><code>statement</code></em> :</span></p></td> |
| 1793 | <td> |
| 1794 | <a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> partial statement to find</td> |
| 1795 | </tr> |
| 1796 | <tr> |
| 1797 | <td><p><span class="term"><em class="parameter"><code>context_node</code></em> :</span></p></td> |
| 1798 | <td>context <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> (or NULL)</td> |
| 1799 | </tr> |
| 1800 | <tr> |
| 1801 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1802 | <td> |
| 1803 | <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> |
| 1804 | </tr> |
| 1805 | </tbody> |
| 1806 | </table></div> |
| 1807 | </div> |
| 1808 | <hr> |
| 1809 | <div class="refsect2"> |
| 1810 | <a name="librdf-model-get-contexts"></a><h3>librdf_model_get_contexts ()</h3> |
| 1811 | <pre class="programlisting"><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="returnvalue">librdf_iterator</span></a> * librdf_model_get_contexts (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>);</pre> |
| 1812 | <p> |
| 1813 | Return the list of contexts in the graph. |
| 1814 | </p> |
| 1815 | <p> |
| 1816 | 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 |
| 1817 | context in the graph. |
| 1818 | </p> |
| 1819 | <div class="variablelist"><table border="0"> |
| 1820 | <col align="left" valign="top"> |
| 1821 | <tbody> |
| 1822 | <tr> |
| 1823 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1824 | <td> |
| 1825 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object</td> |
| 1826 | </tr> |
| 1827 | <tr> |
| 1828 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1829 | <td> |
| 1830 | <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> |
| 1831 | </tr> |
| 1832 | </tbody> |
| 1833 | </table></div> |
| 1834 | </div> |
| 1835 | <hr> |
| 1836 | <div class="refsect2"> |
| 1837 | <a name="LIBRDF-MODEL-FEATURE-CONTEXTS:CAPS"></a><h3>LIBRDF_MODEL_FEATURE_CONTEXTS</h3> |
| 1838 | <pre class="programlisting">#define LIBRDF_MODEL_FEATURE_CONTEXTS "http://feature.librdf.org/model-contexts" |
| 1839 | </pre> |
| 1840 | <p> |
| 1841 | Model feature contexts. |
| 1842 | </p> |
| 1843 | <p> |
| 1844 | If set, the model has redland contexts. |
| 1845 | </p> |
| 1846 | </div> |
| 1847 | <hr> |
| 1848 | <div class="refsect2"> |
| 1849 | <a name="librdf-model-get-feature"></a><h3>librdf_model_get_feature ()</h3> |
| 1850 | <pre class="programlisting"><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * librdf_model_get_feature (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 1851 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *feature</code></em>);</pre> |
| 1852 | <p> |
| 1853 | Get the value of a graph feature . |
| 1854 | </p> |
| 1855 | <div class="variablelist"><table border="0"> |
| 1856 | <col align="left" valign="top"> |
| 1857 | <tbody> |
| 1858 | <tr> |
| 1859 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1860 | <td> |
| 1861 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object</td> |
| 1862 | </tr> |
| 1863 | <tr> |
| 1864 | <td><p><span class="term"><em class="parameter"><code>feature</code></em> :</span></p></td> |
| 1865 | <td> |
| 1866 | <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> feature property</td> |
| 1867 | </tr> |
| 1868 | <tr> |
| 1869 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1870 | <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 |
| 1871 | exists or the value is empty.</td> |
| 1872 | </tr> |
| 1873 | </tbody> |
| 1874 | </table></div> |
| 1875 | </div> |
| 1876 | <hr> |
| 1877 | <div class="refsect2"> |
| 1878 | <a name="librdf-model-set-feature"></a><h3>librdf_model_set_feature ()</h3> |
| 1879 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_model_set_feature (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 1880 | <em class="parameter"><code><a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> *feature</code></em>, |
| 1881 | <em class="parameter"><code><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *value</code></em>);</pre> |
| 1882 | <p> |
| 1883 | Set the value of a graph feature. |
| 1884 | </p> |
| 1885 | <div class="variablelist"><table border="0"> |
| 1886 | <col align="left" valign="top"> |
| 1887 | <tbody> |
| 1888 | <tr> |
| 1889 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1890 | <td> |
| 1891 | <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> object</td> |
| 1892 | </tr> |
| 1893 | <tr> |
| 1894 | <td><p><span class="term"><em class="parameter"><code>feature</code></em> :</span></p></td> |
| 1895 | <td> |
| 1896 | <a class="link" href="redland-uri.html#librdf-uri" title="librdf_uri"><span class="type">librdf_uri</span></a> feature property</td> |
| 1897 | </tr> |
| 1898 | <tr> |
| 1899 | <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td> |
| 1900 | <td> |
| 1901 | <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> feature property value</td> |
| 1902 | </tr> |
| 1903 | <tr> |
| 1904 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1905 | <td>non 0 on failure (negative if no such feature)</td> |
| 1906 | </tr> |
| 1907 | </tbody> |
| 1908 | </table></div> |
| 1909 | </div> |
| 1910 | <hr> |
| 1911 | <div class="refsect2"> |
| 1912 | <a name="librdf-model-transaction-commit"></a><h3>librdf_model_transaction_commit ()</h3> |
| 1913 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_model_transaction_commit (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>);</pre> |
| 1914 | <p> |
| 1915 | Commit a transaction. |
| 1916 | </p> |
| 1917 | <div class="variablelist"><table border="0"> |
| 1918 | <col align="left" valign="top"> |
| 1919 | <tbody> |
| 1920 | <tr> |
| 1921 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1922 | <td>the model object</td> |
| 1923 | </tr> |
| 1924 | <tr> |
| 1925 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1926 | <td>non-0 on failure</td> |
| 1927 | </tr> |
| 1928 | </tbody> |
| 1929 | </table></div> |
| 1930 | </div> |
| 1931 | <hr> |
| 1932 | <div class="refsect2"> |
| 1933 | <a name="librdf-model-transaction-get-handle"></a><h3>librdf_model_transaction_get_handle ()</h3> |
| 1934 | <pre class="programlisting"><span class="returnvalue">void</span> * librdf_model_transaction_get_handle (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>);</pre> |
| 1935 | <p> |
| 1936 | Get the current transaction handle. |
| 1937 | </p> |
| 1938 | <div class="variablelist"><table border="0"> |
| 1939 | <col align="left" valign="top"> |
| 1940 | <tbody> |
| 1941 | <tr> |
| 1942 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1943 | <td>the model object</td> |
| 1944 | </tr> |
| 1945 | <tr> |
| 1946 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1947 | <td>non-0 on failure</td> |
| 1948 | </tr> |
| 1949 | </tbody> |
| 1950 | </table></div> |
| 1951 | </div> |
| 1952 | <hr> |
| 1953 | <div class="refsect2"> |
| 1954 | <a name="librdf-model-transaction-rollback"></a><h3>librdf_model_transaction_rollback ()</h3> |
| 1955 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_model_transaction_rollback (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>);</pre> |
| 1956 | <p> |
| 1957 | Rollback a transaction. |
| 1958 | </p> |
| 1959 | <div class="variablelist"><table border="0"> |
| 1960 | <col align="left" valign="top"> |
| 1961 | <tbody> |
| 1962 | <tr> |
| 1963 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1964 | <td>the model object</td> |
| 1965 | </tr> |
| 1966 | <tr> |
| 1967 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1968 | <td>non-0 on failure</td> |
| 1969 | </tr> |
| 1970 | </tbody> |
| 1971 | </table></div> |
| 1972 | </div> |
| 1973 | <hr> |
| 1974 | <div class="refsect2"> |
| 1975 | <a name="librdf-model-transaction-start"></a><h3>librdf_model_transaction_start ()</h3> |
| 1976 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_model_transaction_start (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>);</pre> |
| 1977 | <p> |
| 1978 | Start a transaction |
| 1979 | </p> |
| 1980 | <div class="variablelist"><table border="0"> |
| 1981 | <col align="left" valign="top"> |
| 1982 | <tbody> |
| 1983 | <tr> |
| 1984 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 1985 | <td>the model object</td> |
| 1986 | </tr> |
| 1987 | <tr> |
| 1988 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 1989 | <td>non-0 on failure</td> |
| 1990 | </tr> |
| 1991 | </tbody> |
| 1992 | </table></div> |
| 1993 | </div> |
| 1994 | <hr> |
| 1995 | <div class="refsect2"> |
| 1996 | <a name="librdf-model-transaction-start-with-handle"></a><h3>librdf_model_transaction_start_with_handle ()</h3> |
| 1997 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_model_transaction_start_with_handle |
| 1998 | (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 1999 | <em class="parameter"><code><span class="type">void</span> *handle</code></em>);</pre> |
| 2000 | <p> |
| 2001 | Start a transaction using an existing external transaction object. |
| 2002 | </p> |
| 2003 | <div class="variablelist"><table border="0"> |
| 2004 | <col align="left" valign="top"> |
| 2005 | <tbody> |
| 2006 | <tr> |
| 2007 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 2008 | <td>the model object</td> |
| 2009 | </tr> |
| 2010 | <tr> |
| 2011 | <td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td> |
| 2012 | <td>the transaction object</td> |
| 2013 | </tr> |
| 2014 | <tr> |
| 2015 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 2016 | <td>non-0 on failure</td> |
| 2017 | </tr> |
| 2018 | </tbody> |
| 2019 | </table></div> |
| 2020 | </div> |
| 2021 | <hr> |
| 2022 | <div class="refsect2"> |
| 2023 | <a name="librdf-model-write"></a><h3>librdf_model_write ()</h3> |
| 2024 | <pre class="programlisting"><span class="returnvalue">int</span> librdf_model_write (<em class="parameter"><code><a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> *model</code></em>, |
| 2025 | <em class="parameter"><code><span class="type">raptor_iostream</span> *iostr</code></em>);</pre> |
| 2026 | <p> |
| 2027 | Write a model to an iostream in a debug format. |
| 2028 | </p> |
| 2029 | <p> |
| 2030 | This method is for debugging and the format of the output should |
| 2031 | not be relied on. In particular, when contexts are used the |
| 2032 | result may be 4 nodes. |
| 2033 | </p> |
| 2034 | <div class="variablelist"><table border="0"> |
| 2035 | <col align="left" valign="top"> |
| 2036 | <tbody> |
| 2037 | <tr> |
| 2038 | <td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td> |
| 2039 | <td>the model object</td> |
| 2040 | </tr> |
| 2041 | <tr> |
| 2042 | <td><p><span class="term"><em class="parameter"><code>iostr</code></em> :</span></p></td> |
| 2043 | <td>the iostream to write to</td> |
| 2044 | </tr> |
| 2045 | <tr> |
| 2046 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| 2047 | <td>non-0 on failure</td> |
| 2048 | </tr> |
| 2049 | </tbody> |
| 2050 | </table></div> |
| 2051 | </div> |
| 2052 | </div> |
| 2053 | </div> |
| 2054 | <div class="footer"> |
| 2055 | <hr> |
| 2056 | Generated by GTK-Doc V1.18</div> |
| 2057 | </body> |
| 2058 | </html> |