/usr/share/gtk-doc/html/librdf/redland-stream.html is in librdf0-dev 1.0.17-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Stream of triples (#librdf_statement).</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="Redland RDF Library Manual">
<link rel="up" href="reference-manual.html" title="Part II. Reference Manual">
<link rel="prev" href="redland-storage-module-virtuoso.html" title="Store 'virtuoso'">
<link rel="next" href="redland-unicode.html" title="Unicode">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="redland-storage-module-virtuoso.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="reference-manual.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Redland RDF Library Manual</th>
<td><a accesskey="n" href="redland-unicode.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#redland-stream.synopsis" class="shortcut">Top</a>
|
<a href="#redland-stream.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="redland-stream"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="redland-stream.top_of_page"></a>Stream of triples (#librdf_statement).</span></h2>
<p>Stream of triples (#librdf_statement). — Sequence of RDF Triples.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="redland-stream.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">typedef <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream">librdf_stream</a>;
enum <a class="link" href="redland-stream.html#librdf-stream-get-method-flags" title="enum librdf_stream_get_method_flags">librdf_stream_get_method_flags</a>;
<a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="returnvalue">librdf_statement</span></a> * (<a class="link" href="redland-stream.html#librdf-stream-map-handler" title="librdf_stream_map_handler ()">*librdf_stream_map_handler</a>) (<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>,
<em class="parameter"><code><span class="type">void</span> *map_context</code></em>,
<em class="parameter"><code><a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> *item</code></em>);
<span class="returnvalue">void</span> (<a class="link" href="redland-stream.html#librdf-stream-map-free-context-handler" title="librdf_stream_map_free_context_handler ()">*librdf_stream_map_free_context_handler</a>)
(<em class="parameter"><code><span class="type">void</span> *map_context</code></em>);
<a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="returnvalue">librdf_stream</span></a> * <a class="link" href="redland-stream.html#librdf-new-stream" title="librdf_new_stream ()">librdf_new_stream</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>,
<em class="parameter"><code><span class="type">void</span> *context</code></em>,
<em class="parameter"><code><span class="type">int</span> (*is_end_method) (void*)</code></em>,
<em class="parameter"><code><span class="type">int</span> (*next_method) (void*)</code></em>,
<em class="parameter"><code><span class="type">void</span>* (*get_method) (void*, int)</code></em>,
<em class="parameter"><code><span class="type">void</span> (*finished_method) (void*)</code></em>);
<a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="returnvalue">librdf_stream</span></a> * <a class="link" href="redland-stream.html#librdf-new-stream-from-node-iterator" title="librdf_new_stream_from_node_iterator ()">librdf_new_stream_from_node_iterator</a>
(<em class="parameter"><code><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> *iterator</code></em>,
<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>,
<em class="parameter"><code><a class="link" href="redland-statement.html#librdf-statement-part" title="enum librdf_statement_part"><span class="type">librdf_statement_part</span></a> field</code></em>);
<a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="returnvalue">librdf_stream</span></a> * <a class="link" href="redland-stream.html#librdf-new-empty-stream" title="librdf_new_empty_stream ()">librdf_new_empty_stream</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>);
<span class="returnvalue">void</span> <a class="link" href="redland-stream.html#librdf-free-stream" title="librdf_free_stream ()">librdf_free_stream</a> (<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>);
<span class="returnvalue">int</span> <a class="link" href="redland-stream.html#librdf-stream-end" title="librdf_stream_end ()">librdf_stream_end</a> (<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>);
<span class="returnvalue">int</span> <a class="link" href="redland-stream.html#librdf-stream-next" title="librdf_stream_next ()">librdf_stream_next</a> (<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>);
<a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="returnvalue">librdf_statement</span></a> * <a class="link" href="redland-stream.html#librdf-stream-get-object" title="librdf_stream_get_object ()">librdf_stream_get_object</a> (<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>);
<span class="returnvalue">void</span> * <a class="link" href="redland-stream.html#librdf-stream-get-context" title="librdf_stream_get_context ()">librdf_stream_get_context</a> (<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>);
<a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * <a class="link" href="redland-stream.html#librdf-stream-get-context2" title="librdf_stream_get_context2 ()">librdf_stream_get_context2</a> (<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>);
<span class="returnvalue">int</span> <a class="link" href="redland-stream.html#librdf-stream-add-map" title="librdf_stream_add_map ()">librdf_stream_add_map</a> (<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>,
<em class="parameter"><code><a class="link" href="redland-stream.html#librdf-stream-map-handler" title="librdf_stream_map_handler ()"><span class="type">librdf_stream_map_handler</span></a> map_function</code></em>,
<em class="parameter"><code><a class="link" href="redland-stream.html#librdf-stream-map-free-context-handler" title="librdf_stream_map_free_context_handler ()"><span class="type">librdf_stream_map_free_context_handler</span></a> free_context</code></em>,
<em class="parameter"><code><span class="type">void</span> *map_context</code></em>);
<span class="returnvalue">void</span> <a class="link" href="redland-stream.html#librdf-stream-print" title="librdf_stream_print ()">librdf_stream_print</a> (<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>,
<em class="parameter"><code><span class="type">FILE</span> *fh</code></em>);
<span class="returnvalue">int</span> <a class="link" href="redland-stream.html#librdf-stream-write" title="librdf_stream_write ()">librdf_stream_write</a> (<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>,
<em class="parameter"><code><span class="type">raptor_iostream</span> *iostr</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="redland-stream.description"></a><h2>Description</h2>
<p>
Iterate a sequence of RDF triples from some object.
</p>
</div>
<div class="refsect1">
<a name="redland-stream.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="librdf-stream"></a><h3>librdf_stream</h3>
<pre class="programlisting">typedef struct librdf_stream_s librdf_stream;
</pre>
<p>
Redland stream class.
</p>
</div>
<hr>
<div class="refsect2">
<a name="librdf-stream-get-method-flags"></a><h3>enum librdf_stream_get_method_flags</h3>
<pre class="programlisting">typedef enum {
LIBRDF_STREAM_GET_METHOD_GET_OBJECT = LIBRDF_ITERATOR_GET_METHOD_GET_OBJECT,
LIBRDF_STREAM_GET_METHOD_GET_CONTEXT = LIBRDF_ITERATOR_GET_METHOD_GET_CONTEXT
} librdf_stream_get_method_flags;
</pre>
<p>
Flags for <a class="link" href="redland-stream.html#librdf-new-stream" title="librdf_new_stream ()"><code class="function">librdf_new_stream()</code></a> get_method function pointer.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="LIBRDF-STREAM-GET-METHOD-GET-OBJECT:CAPS"></a><span class="term"><code class="literal">LIBRDF_STREAM_GET_METHOD_GET_OBJECT</code></span></p></td>
<td>get object from iterator - implementing <a class="link" href="redland-stream.html#librdf-stream-get-object" title="librdf_stream_get_object ()"><code class="function">librdf_stream_get_object()</code></a>
</td>
</tr>
<tr>
<td><p><a name="LIBRDF-STREAM-GET-METHOD-GET-CONTEXT:CAPS"></a><span class="term"><code class="literal">LIBRDF_STREAM_GET_METHOD_GET_CONTEXT</code></span></p></td>
<td>get context from iterator - implementing <a class="link" href="redland-stream.html#librdf-stream-get-context" title="librdf_stream_get_context ()"><code class="function">librdf_stream_get_context()</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-stream-map-handler"></a><h3>librdf_stream_map_handler ()</h3>
<pre class="programlisting"><a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="returnvalue">librdf_statement</span></a> * (*librdf_stream_map_handler) (<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>,
<em class="parameter"><code><span class="type">void</span> *map_context</code></em>,
<em class="parameter"><code><a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> *item</code></em>);</pre>
<p>
Map function for a <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> map operation.
</p>
<p>
See <a class="link" href="redland-stream.html#librdf-stream-add-map" title="librdf_stream_add_map ()"><code class="function">librdf_stream_add_map()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
<td>Stream that this map is operating over.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>map_context</code></em> :</span></p></td>
<td>Map data context pointer.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>item</code></em> :</span></p></td>
<td>Pointer to the current item in the iteration.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>item in keep the iteration or NULL to remove it</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-stream-map-free-context-handler"></a><h3>librdf_stream_map_free_context_handler ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> (*librdf_stream_map_free_context_handler)
(<em class="parameter"><code><span class="type">void</span> *map_context</code></em>);</pre>
<p>
Free handler function for a <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> map operation.
</p>
<p>
See <a class="link" href="redland-stream.html#librdf-stream-add-map" title="librdf_stream_add_map ()"><code class="function">librdf_stream_add_map()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>map_context</code></em> :</span></p></td>
<td>Map data context pointer.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-new-stream"></a><h3>librdf_new_stream ()</h3>
<pre class="programlisting"><a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="returnvalue">librdf_stream</span></a> * librdf_new_stream (<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>,
<em class="parameter"><code><span class="type">void</span> *context</code></em>,
<em class="parameter"><code><span class="type">int</span> (*is_end_method) (void*)</code></em>,
<em class="parameter"><code><span class="type">int</span> (*next_method) (void*)</code></em>,
<em class="parameter"><code><span class="type">void</span>* (*get_method) (void*, int)</code></em>,
<em class="parameter"><code><span class="type">void</span> (*finished_method) (void*)</code></em>);</pre>
<p>
Constructor - create a new <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a>.
</p>
<p>
Creates a new stream with an implementation based on the passed in
functions. The functions next_statement and end_of_stream will be called
multiple times until either of them signify the end of stream by
returning NULL or non 0 respectively. The finished function is called
once only when the stream object is destroyed with <a class="link" href="redland-stream.html#librdf-free-stream" title="librdf_free_stream ()"><code class="function">librdf_free_stream()</code></a>
</p>
<p>
A mapping function can be set for the stream using <a class="link" href="redland-stream.html#librdf-stream-add-map" title="librdf_stream_add_map ()"><code class="function">librdf_stream_add_map()</code></a>
function which allows the statements generated by the stream to be
filtered and/or altered as they are generated before passing back
to the user.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td>
<td>redland world object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
<td>context to pass to the stream implementing objects</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>is_end_method</code></em> :</span></p></td>
<td>pointer to function to test for end of stream</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>next_method</code></em> :</span></p></td>
<td>pointer to function to move to the next statement in stream</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>get_method</code></em> :</span></p></td>
<td>pointer to function to get the current statement</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>finished_method</code></em> :</span></p></td>
<td>pointer to function to finish the stream.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> object or NULL on failure</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-new-stream-from-node-iterator"></a><h3>librdf_new_stream_from_node_iterator ()</h3>
<pre class="programlisting"><a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="returnvalue">librdf_stream</span></a> * librdf_new_stream_from_node_iterator
(<em class="parameter"><code><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> *iterator</code></em>,
<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>,
<em class="parameter"><code><a class="link" href="redland-statement.html#librdf-statement-part" title="enum librdf_statement_part"><span class="type">librdf_statement_part</span></a> field</code></em>);</pre>
<p>
Constructor - create a new <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> from an iterator of nodes.
</p>
<p>
Creates a new <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> using the passed in <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a>
which generates a series of <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> objects. The resulting
nodes are then inserted into the given statement and returned.
The field attribute indicates which statement node is being generated.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iterator</code></em> :</span></p></td>
<td>
<a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> of <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> objects</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>statement</code></em> :</span></p></td>
<td>
<a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> prototype with one NULL node space</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
<td>node part of statement</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> object or NULL on failure</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-new-empty-stream"></a><h3>librdf_new_empty_stream ()</h3>
<pre class="programlisting"><a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="returnvalue">librdf_stream</span></a> * librdf_new_empty_stream (<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>);</pre>
<p>
Constructor - create a new <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> with no content.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td>
<td>redland world object</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> object or NULL on failure</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-free-stream"></a><h3>librdf_free_stream ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> librdf_free_stream (<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>
<p>
Destructor - destroy an <span class="type">libdf_stream</span> object.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
<td>
<a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> object</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-stream-end"></a><h3>librdf_stream_end ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> librdf_stream_end (<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>
<p>
Test if the stream has ended.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
<td>
<a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>non 0 at end of stream.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-stream-next"></a><h3>librdf_stream_next ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> librdf_stream_next (<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>
<p>
Move to the next librdf_statement in the stream.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
<td>
<a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>non 0 if the stream has finished</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-stream-get-object"></a><h3>librdf_stream_get_object ()</h3>
<pre class="programlisting"><a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="returnvalue">librdf_statement</span></a> * librdf_stream_get_object (<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>
<p>
Get the current librdf_statement in the stream.
</p>
<p>
This method returns a SHARED pointer to the current statement object
which should be copied by the caller to preserve it if the stream
is moved on <a class="link" href="redland-stream.html#librdf-stream-next" title="librdf_stream_next ()"><code class="function">librdf_stream_next()</code></a> or if it should last after the
stream is closed. <a class="link" href="redland-statement.html#librdf-new-statement-from-statement" title="librdf_new_statement_from_statement ()"><code class="function">librdf_new_statement_from_statement()</code></a> can be used
for copying the statement.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
<td>
<a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the current <a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> object or NULL at end of stream.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-stream-get-context"></a><h3>librdf_stream_get_context ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> * librdf_stream_get_context (<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>
<p>
Get the context of the current object on the stream.
</p>
<p>
This method returns a SHARED pointer to the current context node object
which should be copied by the caller to preserve it if the stream
is moved on librdf_stream_next or if it should last after the
stream is closed.
</p>
<p>
<em class="parameter"><code>Deprecated</code></em>: Use <a class="link" href="redland-stream.html#librdf-stream-get-context2" title="librdf_stream_get_context2 ()"><code class="function">librdf_stream_get_context2()</code></a> which returns a <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
<td>the <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The context node (can be NULL) or NULL if the stream has finished.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-stream-get-context2"></a><h3>librdf_stream_get_context2 ()</h3>
<pre class="programlisting"><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * librdf_stream_get_context2 (<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>
<p>
Get the context of the current object on the stream.
</p>
<p>
This method returns a SHARED pointer to the current context node object
which should be copied by the caller to preserve it if the stream
is moved on librdf_stream_next or if it should last after the
stream is closed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
<td>the <a class="link" href="redland-stream.html#librdf-stream" title="librdf_stream"><span class="type">librdf_stream</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The context node (can be NULL) or NULL if the stream has finished.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-stream-add-map"></a><h3>librdf_stream_add_map ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> librdf_stream_add_map (<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>,
<em class="parameter"><code><a class="link" href="redland-stream.html#librdf-stream-map-handler" title="librdf_stream_map_handler ()"><span class="type">librdf_stream_map_handler</span></a> map_function</code></em>,
<em class="parameter"><code><a class="link" href="redland-stream.html#librdf-stream-map-free-context-handler" title="librdf_stream_map_free_context_handler ()"><span class="type">librdf_stream_map_free_context_handler</span></a> free_context</code></em>,
<em class="parameter"><code><span class="type">void</span> *map_context</code></em>);</pre>
<p>
Add a librdf_stream mapping function.
</p>
<p>
Adds an stream mapping function which operates over the stream to
select which elements are returned; it will be applied as soon as
this method is called.
</p>
<p>
Several mapping functions can be added and they are applied in
the order given.
</p>
<p>
The mapping function should return the statement to return, or NULL
to remove it from the stream.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
<td>the stream</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>map_function</code></em> :</span></p></td>
<td>the function to perform the mapping</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>free_context</code></em> :</span></p></td>
<td>the function to use to free the context (or NULL)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>map_context</code></em> :</span></p></td>
<td>the context to pass to the map function</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>Non 0 on failure</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-stream-print"></a><h3>librdf_stream_print ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> librdf_stream_print (<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>,
<em class="parameter"><code><span class="type">FILE</span> *fh</code></em>);</pre>
<p>
Print the stream.
</p>
<p>
This prints the remaining statements of the stream to the given
file handle. Note that after this method is called the stream
will be empty so that <a class="link" href="redland-stream.html#librdf-stream-end" title="librdf_stream_end ()"><code class="function">librdf_stream_end()</code></a> will always be true
and <a class="link" href="redland-stream.html#librdf-stream-next" title="librdf_stream_next ()"><code class="function">librdf_stream_next()</code></a> will always return NULL. The only
useful operation is to dispose of the stream with the
<a class="link" href="redland-stream.html#librdf-free-stream" title="librdf_free_stream ()"><code class="function">librdf_free_stream()</code></a> destructor.
</p>
<p>
This method is for debugging and the format of the output should
not be relied on.
</p>
<p>
<em class="parameter"><code>Deprecated</code></em>: Use <a class="link" href="redland-stream.html#librdf-stream-write" title="librdf_stream_write ()"><code class="function">librdf_stream_write()</code></a> to write to
<span class="type">raptor_iostream</span> 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> to write proper syntax formats.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
<td>the stream object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fh</code></em> :</span></p></td>
<td>the FILE stream to print to</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-stream-write"></a><h3>librdf_stream_write ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> librdf_stream_write (<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>,
<em class="parameter"><code><span class="type">raptor_iostream</span> *iostr</code></em>);</pre>
<p>
Write a stream of triples to an iostream in a debug format.
</p>
<p>
This prints the remaining statements of the stream to the given
<span class="type">raptor_iostream</span> in a debug format.
</p>
<p>
Note that after this method is called the stream will be empty so
that <a class="link" href="redland-stream.html#librdf-stream-end" title="librdf_stream_end ()"><code class="function">librdf_stream_end()</code></a> will always be true and
<a class="link" href="redland-stream.html#librdf-stream-next" title="librdf_stream_next ()"><code class="function">librdf_stream_next()</code></a> will always return NULL. The only useful
operation is to dispose of the stream with the
<a class="link" href="redland-stream.html#librdf-free-stream" title="librdf_free_stream ()"><code class="function">librdf_free_stream()</code></a> destructor.
</p>
<p>
This method is for debugging and the format of the output should
not be relied on. In particular, when contexts are used the
result may be 4 nodes.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
<td>the stream object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iostr</code></em> :</span></p></td>
<td>the iostream to write to</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>non-0 on failure</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="redland-stream.see-also"></a><h2>See Also</h2>
<p>
Provides a way to operate across a sequence of RDF Triples that are
generated one-by-one on demand. The generated triples can be from
some API call in the <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> class, from listing a graph content
as individual triples, from parsing a syntax or returning an RDF graph
result from a query. Streams can be passed into methods for the reverse
operations such as adding to a graph, serializing a graph to a syntax.
Streams pass individual triples (<a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a>) between objects
and are usually lazily generated and consumed.
</p>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.18</div>
</body>
</html>
|