/usr/share/gtk-doc/html/librdf/redland-statement.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 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>RDF Triple (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-serializer.html" title="Serializers">
<link rel="next" href="redland-storage.html" title="Triple stores">
<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-serializer.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-storage.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-statement.synopsis" class="shortcut">Top</a>
|
<a href="#redland-statement.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="redland-statement"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="redland-statement.top_of_page"></a>RDF Triple (librdf_statement)</span></h2>
<p>RDF Triple (librdf_statement) — RDF Triple.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="redland-statement.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">typedef <a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement">librdf_statement</a>;
enum <a class="link" href="redland-statement.html#librdf-statement-part" title="enum librdf_statement_part">librdf_statement_part</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-statement.html#librdf-new-statement" title="librdf_new_statement ()">librdf_new_statement</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>);
<a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="returnvalue">librdf_statement</span></a> * <a class="link" href="redland-statement.html#librdf-new-statement-from-statement" title="librdf_new_statement_from_statement ()">librdf_new_statement_from_statement</a> (<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>);
<a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="returnvalue">librdf_statement</span></a> * <a class="link" href="redland-statement.html#librdf-new-statement-from-statement2" title="librdf_new_statement_from_statement2 ()">librdf_new_statement_from_statement2</a>
(<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>);
<a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="returnvalue">librdf_statement</span></a> * <a class="link" href="redland-statement.html#librdf-new-statement-from-nodes" title="librdf_new_statement_from_nodes ()">librdf_new_statement_from_nodes</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><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *subject</code></em>,
<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>,
<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>);
<span class="returnvalue">void</span> <a class="link" href="redland-statement.html#librdf-statement-init" title="librdf_statement_init ()">librdf_statement_init</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><a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> *statement</code></em>);
<span class="returnvalue">void</span> <a class="link" href="redland-statement.html#librdf-statement-clear" title="librdf_statement_clear ()">librdf_statement_clear</a> (<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>);
<span class="returnvalue">void</span> <a class="link" href="redland-statement.html#librdf-free-statement" title="librdf_free_statement ()">librdf_free_statement</a> (<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>);
<a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * <a class="link" href="redland-statement.html#librdf-statement-get-subject" title="librdf_statement_get_subject ()">librdf_statement_get_subject</a> (<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>);
<span class="returnvalue">void</span> <a class="link" href="redland-statement.html#librdf-statement-set-subject" title="librdf_statement_set_subject ()">librdf_statement_set_subject</a> (<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-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</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-statement.html#librdf-statement-get-predicate" title="librdf_statement_get_predicate ()">librdf_statement_get_predicate</a> (<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>);
<span class="returnvalue">void</span> <a class="link" href="redland-statement.html#librdf-statement-set-predicate" title="librdf_statement_set_predicate ()">librdf_statement_set_predicate</a> (<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-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</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-statement.html#librdf-statement-get-object" title="librdf_statement_get_object ()">librdf_statement_get_object</a> (<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>);
<span class="returnvalue">void</span> <a class="link" href="redland-statement.html#librdf-statement-set-object" title="librdf_statement_set_object ()">librdf_statement_set_object</a> (<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-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>);
<span class="returnvalue">int</span> <a class="link" href="redland-statement.html#librdf-statement-is-complete" title="librdf_statement_is_complete ()">librdf_statement_is_complete</a> (<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>);
unsigned <span class="returnvalue">char</span> * <a class="link" href="redland-statement.html#librdf-statement-to-string" title="librdf_statement_to_string ()">librdf_statement_to_string</a> (<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>);
<span class="returnvalue">void</span> <a class="link" href="redland-statement.html#librdf-statement-print" title="librdf_statement_print ()">librdf_statement_print</a> (<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><span class="type">FILE</span> *fh</code></em>);
<span class="returnvalue">int</span> <a class="link" href="redland-statement.html#librdf-statement-equals" title="librdf_statement_equals ()">librdf_statement_equals</a> (<em class="parameter"><code><a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> *statement1</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> *statement2</code></em>);
<span class="returnvalue">int</span> <a class="link" href="redland-statement.html#librdf-statement-match" title="librdf_statement_match ()">librdf_statement_match</a> (<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" title="librdf_statement"><span class="type">librdf_statement</span></a> *partial_statement</code></em>);
<span class="returnvalue">size_t</span> <a class="link" href="redland-statement.html#librdf-statement-encode" title="librdf_statement_encode ()">librdf_statement_encode</a> (<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>unsigned <span class="type">char</span> *buffer</code></em>,
<em class="parameter"><code><span class="type">size_t</span> length</code></em>);
<span class="returnvalue">size_t</span> <a class="link" href="redland-statement.html#librdf-statement-encode2" title="librdf_statement_encode2 ()">librdf_statement_encode2</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><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>unsigned <span class="type">char</span> *buffer</code></em>,
<em class="parameter"><code><span class="type">size_t</span> length</code></em>);
<span class="returnvalue">size_t</span> <a class="link" href="redland-statement.html#librdf-statement-encode-parts" title="librdf_statement_encode_parts ()">librdf_statement_encode_parts</a> (<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-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *context_node</code></em>,
<em class="parameter"><code>unsigned <span class="type">char</span> *buffer</code></em>,
<em class="parameter"><code><span class="type">size_t</span> length</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> fields</code></em>);
<span class="returnvalue">size_t</span> <a class="link" href="redland-statement.html#librdf-statement-encode-parts2" title="librdf_statement_encode_parts2 ()">librdf_statement_encode_parts2</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><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-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *context_node</code></em>,
<em class="parameter"><code>unsigned <span class="type">char</span> *buffer</code></em>,
<em class="parameter"><code><span class="type">size_t</span> length</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> fields</code></em>);
<span class="returnvalue">size_t</span> <a class="link" href="redland-statement.html#librdf-statement-decode" title="librdf_statement_decode ()">librdf_statement_decode</a> (<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>unsigned <span class="type">char</span> *buffer</code></em>,
<em class="parameter"><code><span class="type">size_t</span> length</code></em>);
<span class="returnvalue">size_t</span> <a class="link" href="redland-statement.html#librdf-statement-decode2" title="librdf_statement_decode2 ()">librdf_statement_decode2</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><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-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> **context_node</code></em>,
<em class="parameter"><code>unsigned <span class="type">char</span> *buffer</code></em>,
<em class="parameter"><code><span class="type">size_t</span> length</code></em>);
<span class="returnvalue">size_t</span> <a class="link" href="redland-statement.html#librdf-statement-decode-parts" title="librdf_statement_decode_parts ()">librdf_statement_decode_parts</a> (<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-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> **context_node</code></em>,
<em class="parameter"><code>unsigned <span class="type">char</span> *buffer</code></em>,
<em class="parameter"><code><span class="type">size_t</span> length</code></em>);
<span class="returnvalue">int</span> <a class="link" href="redland-statement.html#librdf-statement-write" title="librdf_statement_write ()">librdf_statement_write</a> (<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><span class="type">raptor_iostream</span> *iostr</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="redland-statement.description"></a><h2>Description</h2>
<p>
An object representing an RDF Triple of three RDF terms (<a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a>).
Triples can be created, accessed, destroyed and en/decoded into a binary
form for use in storage.
</p>
</div>
<div class="refsect1">
<a name="redland-statement.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="librdf-statement"></a><h3>librdf_statement</h3>
<pre class="programlisting">typedef raptor_statement librdf_statement;
</pre>
<p>
Redland statement class.
</p>
</div>
<hr>
<div class="refsect2">
<a name="librdf-statement-part"></a><h3>enum librdf_statement_part</h3>
<pre class="programlisting">typedef enum {
LIBRDF_STATEMENT_SUBJECT = 1 << 0,
LIBRDF_STATEMENT_PREDICATE = 1 << 1,
LIBRDF_STATEMENT_OBJECT = 1 << 2,
/* must be a combination of all of the above */
LIBRDF_STATEMENT_ALL = (LIBRDF_STATEMENT_SUBJECT|
LIBRDF_STATEMENT_PREDICATE|
LIBRDF_STATEMENT_OBJECT)
} librdf_statement_part;
</pre>
<p>
Flags that are or-ed to indicate statement parts.
</p>
<p>
Used in fields arguments to methods such as the public
<a class="link" href="redland-statement.html#librdf-statement-encode-parts" title="librdf_statement_encode_parts ()"><code class="function">librdf_statement_encode_parts()</code></a> <a class="link" href="redland-statement.html#librdf-statement-decode-parts" title="librdf_statement_decode_parts ()"><code class="function">librdf_statement_decode_parts()</code></a>
<a class="link" href="redland-stream.html#librdf-new-stream-from-node-iterator" title="librdf_new_stream_from_node_iterator ()"><code class="function">librdf_new_stream_from_node_iterator()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="LIBRDF-STATEMENT-SUBJECT:CAPS"></a><span class="term"><code class="literal">LIBRDF_STATEMENT_SUBJECT</code></span></p></td>
<td>Subject of a statement.
</td>
</tr>
<tr>
<td><p><a name="LIBRDF-STATEMENT-PREDICATE:CAPS"></a><span class="term"><code class="literal">LIBRDF_STATEMENT_PREDICATE</code></span></p></td>
<td>Predicate of a statement.
</td>
</tr>
<tr>
<td><p><a name="LIBRDF-STATEMENT-OBJECT:CAPS"></a><span class="term"><code class="literal">LIBRDF_STATEMENT_OBJECT</code></span></p></td>
<td>Object of a statement.
</td>
</tr>
<tr>
<td><p><a name="LIBRDF-STATEMENT-ALL:CAPS"></a><span class="term"><code class="literal">LIBRDF_STATEMENT_ALL</code></span></p></td>
<td>All parts of a statement.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-new-statement"></a><h3>librdf_new_statement ()</h3>
<pre class="programlisting"><a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="returnvalue">librdf_statement</span></a> * librdf_new_statement (<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 empty <a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</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>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-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> or NULL on failure</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-new-statement-from-statement"></a><h3>librdf_new_statement_from_statement ()</h3>
<pre class="programlisting"><a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="returnvalue">librdf_statement</span></a> * librdf_new_statement_from_statement (<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>
<p>
Copy constructor - create a new librdf_statement from an existing librdf_statement.
Creates a deep copy - changes to original statement nodes are not reflected in the copy.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<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> to copy</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-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> with copy or NULL on failure</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-new-statement-from-statement2"></a><h3>librdf_new_statement_from_statement2 ()</h3>
<pre class="programlisting"><a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="returnvalue">librdf_statement</span></a> * librdf_new_statement_from_statement2
(<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>
<p>
Copy constructor - create a new librdf_statement from an existing librdf_statement.
Creates a shallow copy - changes to original statement nodes are reflected in the copy.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<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> to copy</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-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> with copy or NULL on failure</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-new-statement-from-nodes"></a><h3>librdf_new_statement_from_nodes ()</h3>
<pre class="programlisting"><a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="returnvalue">librdf_statement</span></a> * librdf_new_statement_from_nodes (<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><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *subject</code></em>,
<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>,
<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>
<p>
Constructor - create a new <a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> from existing <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> objects.
</p>
<p>
The node objects become owned by the new statement (or freed on error).
</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>subject</code></em> :</span></p></td>
<td><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a></td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>predicate</code></em> :</span></p></td>
<td><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a></td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a></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-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> with copy or NULL on failure</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-statement-init"></a><h3>librdf_statement_init ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> librdf_statement_init (<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><a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> *statement</code></em>);</pre>
<p>
Initialise a statically declared librdf_statement.
</p>
<p>
This MUST be called on a statically declared librdf_statement
to initialise it properly. It is the responsibility of the
user of the statically allocated librdf_statement to deal
with deallocation of any statement parts (subject, predicate, object).
</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>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> object</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-statement-clear"></a><h3>librdf_statement_clear ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> librdf_statement_clear (<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>
<p>
Empty a librdf_statement of nodes.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><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> object</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-free-statement"></a><h3>librdf_free_statement ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> librdf_free_statement (<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>
<p>
Destructor - destroy a <a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</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>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> object</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-statement-get-subject"></a><h3>librdf_statement_get_subject ()</h3>
<pre class="programlisting"><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * librdf_statement_get_subject (<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>
<p>
Get the statement subject.
</p>
<p>
This method returns a SHARED pointer to the subject which must
be copied by the caller if needed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<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> object</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a pointer to the <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> of the statement subject -</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-statement-set-subject"></a><h3>librdf_statement_set_subject ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> librdf_statement_set_subject (<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-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>);</pre>
<p>
Set the statement subject.
</p>
<p>
The subject passed in becomes owned by
the statement object and must not be used by the caller after this call.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<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> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td>
<td>
<a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> of subject</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-statement-get-predicate"></a><h3>librdf_statement_get_predicate ()</h3>
<pre class="programlisting"><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * librdf_statement_get_predicate (<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>
<p>
Get the statement predicate.
</p>
<p>
This method returns a SHARED pointer to the predicate which must
be copied by the caller if needed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<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> object</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a pointer to the <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> of the statement predicate -</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-statement-set-predicate"></a><h3>librdf_statement_set_predicate ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> librdf_statement_set_predicate (<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-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>);</pre>
<p>
Set the statement predicate.
</p>
<p>
The predicate passed in becomes owned by
the statement object and must not be used by the caller after this call.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<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> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td>
<td>
<a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> of predicate</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-statement-get-object"></a><h3>librdf_statement_get_object ()</h3>
<pre class="programlisting"><a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="returnvalue">librdf_node</span></a> * librdf_statement_get_object (<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>
<p>
Get the statement object.
</p>
<p>
This method returns a SHARED pointer to the object which must
be copied by the caller if needed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<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> object</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a pointer to the <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> of the statement object -</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-statement-set-object"></a><h3>librdf_statement_set_object ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> librdf_statement_set_object (<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-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *node</code></em>);</pre>
<p>
Set the statement object.
</p>
<p>
The object passed in becomes owned by
the statement object and must not be used by the caller after this call.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<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> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td>
<td>
<a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> of object</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-statement-is-complete"></a><h3>librdf_statement_is_complete ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> librdf_statement_is_complete (<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>
<p>
Check if statement is a complete and legal RDF triple.
</p>
<p>
Checks that all subject, predicate, object fields are present
and they have the allowed node types.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<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> object</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>non 0 if the statement is complete and legal</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-statement-to-string"></a><h3>librdf_statement_to_string ()</h3>
<pre class="programlisting">unsigned <span class="returnvalue">char</span> * librdf_statement_to_string (<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>
<p>
Format the librdf_statement as a string.
</p>
<p>
Formats the statement as a newly allocate string that must be freed by
the caller.
</p>
<p>
<em class="parameter"><code>Deprecated</code></em>: Use <a class="link" href="redland-statement.html#librdf-statement-write" title="librdf_statement_write ()"><code class="function">librdf_statement_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>statement</code></em> :</span></p></td>
<td>the statement</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the string or NULL on failure.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-statement-print"></a><h3>librdf_statement_print ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> librdf_statement_print (<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><span class="type">FILE</span> *fh</code></em>);</pre>
<p>
Pretty print the statement to a file descriptor.
</p>
<p>
This method is for debugging and the format of the output should
not be relied on.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>statement</code></em> :</span></p></td>
<td>the statement</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fh</code></em> :</span></p></td>
<td>file handle</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-statement-equals"></a><h3>librdf_statement_equals ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> librdf_statement_equals (<em class="parameter"><code><a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a> *statement1</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> *statement2</code></em>);</pre>
<p>
Check if two statements are equal.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>statement1</code></em> :</span></p></td>
<td>first <a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>statement2</code></em> :</span></p></td>
<td>second <a class="link" href="redland-statement.html#librdf-statement" title="librdf_statement"><span class="type">librdf_statement</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>non 0 if statements are equal</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-statement-match"></a><h3>librdf_statement_match ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> librdf_statement_match (<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" title="librdf_statement"><span class="type">librdf_statement</span></a> *partial_statement</code></em>);</pre>
<p>
Match a statement against a 'partial' statement.
</p>
<p>
A partial statement is where some parts of the statement -
subject, predicate or object can be empty (NULL).
Empty parts match against any value, parts with values
must match exactly. Node matching is done via <a class="link" href="redland-node.html#librdf-node-equals" title="librdf_node_equals ()"><code class="function">librdf_node_equals()</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>statement</code></em> :</span></p></td>
<td>statement</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>partial_statement</code></em> :</span></p></td>
<td>statement with possible empty parts</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>non 0 on match</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-statement-encode"></a><h3>librdf_statement_encode ()</h3>
<pre class="programlisting"><span class="returnvalue">size_t</span> librdf_statement_encode (<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>unsigned <span class="type">char</span> *buffer</code></em>,
<em class="parameter"><code><span class="type">size_t</span> length</code></em>);</pre>
<p>
Serialise a statement into a buffer.
</p>
<p>
Encodes the given statement in the buffer, which must be of sufficient
size. If buffer is NULL, no work is done but the size of buffer
required is returned.
</p>
<p>
<em class="parameter"><code>Deprecated</code></em>: Use <a class="link" href="redland-statement.html#librdf-statement-encode2" title="librdf_statement_encode2 ()"><code class="function">librdf_statement_encode2()</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>statement</code></em> :</span></p></td>
<td>the statement to serialise</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>the buffer to use</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>buffer size</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the number of bytes written or 0 on failure.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-statement-encode2"></a><h3>librdf_statement_encode2 ()</h3>
<pre class="programlisting"><span class="returnvalue">size_t</span> librdf_statement_encode2 (<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><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>unsigned <span class="type">char</span> *buffer</code></em>,
<em class="parameter"><code><span class="type">size_t</span> length</code></em>);</pre>
<p>
Serialise a statement into a buffer.
</p>
<p>
Encodes the given statement in the buffer, which must be of sufficient
size. If buffer is NULL, no work is done but the size of buffer
required is returned.
</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</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>statement</code></em> :</span></p></td>
<td>the statement to serialise</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>the buffer to use</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>buffer size</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the number of bytes written or 0 on failure.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-statement-encode-parts"></a><h3>librdf_statement_encode_parts ()</h3>
<pre class="programlisting"><span class="returnvalue">size_t</span> librdf_statement_encode_parts (<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-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *context_node</code></em>,
<em class="parameter"><code>unsigned <span class="type">char</span> *buffer</code></em>,
<em class="parameter"><code><span class="type">size_t</span> length</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> fields</code></em>);</pre>
<p>
Serialise parts of a statement into a buffer.
</p>
<p>
Encodes the given statement in the buffer, which must be of sufficient
size. If buffer is NULL, no work is done but the size of buffer
required is returned.
</p>
<p>
The fields values are or-ed combinations of:
<a class="link" href="redland-statement.html#LIBRDF-STATEMENT-SUBJECT:CAPS"><span class="type">LIBRDF_STATEMENT_SUBJECT</span></a> <a class="link" href="redland-statement.html#LIBRDF-STATEMENT-PREDICATE:CAPS"><span class="type">LIBRDF_STATEMENT_PREDICATE</span></a>
<a class="link" href="redland-statement.html#LIBRDF-STATEMENT-OBJECT:CAPS"><span class="type">LIBRDF_STATEMENT_OBJECT</span></a>
or <a class="link" href="redland-statement.html#LIBRDF-STATEMENT-ALL:CAPS"><span class="type">LIBRDF_STATEMENT_ALL</span></a> for subject,prdicate,object fields
</p>
<p>
If context_node is given, it is encoded also
</p>
<p>
<em class="parameter"><code>Deprecated</code></em>: This will no longer be a public API
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>statement</code></em> :</span></p></td>
<td>statement to serialise</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>context_node</code></em> :</span></p></td>
<td>
<a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> context node (can be NULL)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>the buffer to use</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>buffer size</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fields</code></em> :</span></p></td>
<td>fields to encode</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the number of bytes written or 0 on failure.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-statement-encode-parts2"></a><h3>librdf_statement_encode_parts2 ()</h3>
<pre class="programlisting"><span class="returnvalue">size_t</span> librdf_statement_encode_parts2 (<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><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-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> *context_node</code></em>,
<em class="parameter"><code>unsigned <span class="type">char</span> *buffer</code></em>,
<em class="parameter"><code><span class="type">size_t</span> length</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> fields</code></em>);</pre>
<p>
Serialise parts of a statement into a buffer.
</p>
<p>
Encodes the given statement in the buffer, which must be of sufficient
size. If buffer is NULL, no work is done but the size of buffer
required is returned.
</p>
<p>
The fields values are or-ed combinations of:
<a class="link" href="redland-statement.html#LIBRDF-STATEMENT-SUBJECT:CAPS"><span class="type">LIBRDF_STATEMENT_SUBJECT</span></a> <a class="link" href="redland-statement.html#LIBRDF-STATEMENT-PREDICATE:CAPS"><span class="type">LIBRDF_STATEMENT_PREDICATE</span></a>
<a class="link" href="redland-statement.html#LIBRDF-STATEMENT-OBJECT:CAPS"><span class="type">LIBRDF_STATEMENT_OBJECT</span></a>
or <a class="link" href="redland-statement.html#LIBRDF-STATEMENT-ALL:CAPS"><span class="type">LIBRDF_STATEMENT_ALL</span></a> for subject,prdicate,object fields
</p>
<p>
If context_node is given, it is encoded also
</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>statement</code></em> :</span></p></td>
<td>statement to serialise</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>context_node</code></em> :</span></p></td>
<td>
<a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> context node (can be NULL)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>the buffer to use</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>buffer size</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fields</code></em> :</span></p></td>
<td>fields to encode</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the number of bytes written or 0 on failure.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-statement-decode"></a><h3>librdf_statement_decode ()</h3>
<pre class="programlisting"><span class="returnvalue">size_t</span> librdf_statement_decode (<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>unsigned <span class="type">char</span> *buffer</code></em>,
<em class="parameter"><code><span class="type">size_t</span> length</code></em>);</pre>
<p>
Decodes a statement from a buffer. (ALWAYS FAILS)
</p>
<p>
Used to decode the serialised statement as created by
<a class="link" href="redland-statement.html#librdf-statement-encode" title="librdf_statement_encode ()"><code class="function">librdf_statement_encode()</code></a> from the given buffer.
</p>
<p>
<em class="parameter"><code>Deprecated</code></em>: Replaced by <a class="link" href="redland-statement.html#librdf-statement-decode2" title="librdf_statement_decode2 ()"><code class="function">librdf_statement_decode2()</code></a> which works.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>statement</code></em> :</span></p></td>
<td>the statement to deserialise into</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>the buffer to use</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>buffer size</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 signifying failure</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-statement-decode2"></a><h3>librdf_statement_decode2 ()</h3>
<pre class="programlisting"><span class="returnvalue">size_t</span> librdf_statement_decode2 (<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><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-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> **context_node</code></em>,
<em class="parameter"><code>unsigned <span class="type">char</span> *buffer</code></em>,
<em class="parameter"><code><span class="type">size_t</span> length</code></em>);</pre>
<p>
Decodes a statement + context node from a buffer.
</p>
<p>
Decodes the serialised statement (as created by <a class="link" href="redland-statement.html#librdf-statement-encode" title="librdf_statement_encode ()"><code class="function">librdf_statement_encode()</code></a> )
from the given buffer. If a context node is found and context_node is
not NULL, a pointer to the new <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> is stored in *context_node.
</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</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>statement</code></em> :</span></p></td>
<td>the statement to deserialise into</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>context_node</code></em> :</span></p></td>
<td>pointer to <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> context_node to deserialise into</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>the buffer to use</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>buffer size</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>number of bytes used or 0 on failure (bad encoding, allocation failure)</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-statement-decode-parts"></a><h3>librdf_statement_decode_parts ()</h3>
<pre class="programlisting"><span class="returnvalue">size_t</span> librdf_statement_decode_parts (<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-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> **context_node</code></em>,
<em class="parameter"><code>unsigned <span class="type">char</span> *buffer</code></em>,
<em class="parameter"><code><span class="type">size_t</span> length</code></em>);</pre>
<p>
Decodes a statement + context node from a buffer. (ALWAYS FAILS)
</p>
<p>
Used to decode the serialised statement as created by
<a class="link" href="redland-statement.html#librdf-statement-encode" title="librdf_statement_encode ()"><code class="function">librdf_statement_encode()</code></a> from the given buffer.
</p>
<p>
<em class="parameter"><code>Deprecated</code></em>: Replaced by <a class="link" href="redland-statement.html#librdf-statement-decode2" title="librdf_statement_decode2 ()"><code class="function">librdf_statement_decode2()</code></a> which works.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>statement</code></em> :</span></p></td>
<td>the statement to deserialise into</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>context_node</code></em> :</span></p></td>
<td>pointer to <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> context_node to deserialise into</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>the buffer to use</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>buffer size</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 signifying failure</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-statement-write"></a><h3>librdf_statement_write ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> librdf_statement_write (<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><span class="type">raptor_iostream</span> *iostr</code></em>);</pre>
<p>
Write the statement to an iostream
</p>
<p>
This method is for debugging and the format of the output should
not be relied on.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>statement</code></em> :</span></p></td>
<td>the statement</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iostr</code></em> :</span></p></td>
<td>raptor 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>
<div class="footer">
<hr>
Generated by GTK-Doc V1.18</div>
</body>
</html>
|