/usr/share/gtk-doc/html/raptor/raptor-section-triples.html is in libraptor1-doc 1.4.21-10.
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 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Triples</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="Raptor RDF Syntax Parsing and Serializing Library Manual">
<link rel="up" href="reference-manual.html" title="Part II. Raptor Reference Manual">
<link rel="prev" href="raptor-section-stringbuffer.html" title="String buffer">
<link rel="next" href="raptor-section-unicode.html" title="Unicode">
<meta name="generator" content="GTK-Doc V1.13 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="introduction.html" title="Raptor Overview">
<link rel="part" href="tutorial.html" title="Part I. Raptor Tutorial">
<link rel="chapter" href="tutorial-initialising-finishing.html" title="Initialising and Finishing using the Library">
<link rel="chapter" href="tutorial-querying-functionality.html" title="Listing built-in functionality">
<link rel="chapter" href="tutorial-parsing.html" title="Parsing syntaxes to RDF Triples">
<link rel="chapter" href="tutorial-serializing.html" title="Serializing RDF triples to a syntax">
<link rel="part" href="reference-manual.html" title="Part II. Raptor Reference Manual">
<link rel="chapter" href="raptor-parsers.html" title="Parsers in Raptor (syntax to triples)">
<link rel="chapter" href="raptor-serializers.html" title="Serializers in Raptor (triples to syntax)">
<link rel="index" href="ix01.html" title="Index">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="raptor-section-stringbuffer.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="reference-manual.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Raptor RDF Syntax Parsing and Serializing Library Manual</th>
<td><a accesskey="n" href="raptor-section-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="#raptor-section-triples.synopsis" class="shortcut">Top</a>
|
<a href="#raptor-section-triples.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry" title="Triples">
<a name="raptor-section-triples"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="raptor-section-triples.top_of_page"></a>Triples</span></h2>
<p>Triples — RDF Triples</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="raptor-section-triples.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">enum <a class="link" href="raptor-section-triples.html#raptor-genid-type" title="enum raptor_genid_type">raptor_genid_type</a>;
enum <a class="link" href="raptor-section-triples.html#raptor-identifier-type" title="enum raptor_identifier_type">raptor_identifier_type</a>;
<a class="link" href="raptor-section-triples.html#raptor-identifier" title="raptor_identifier">raptor_identifier</a>;
<a class="link" href="raptor-section-triples.html#raptor-identifier" title="raptor_identifier"><span class="returnvalue">raptor_identifier</span></a>* <a class="link" href="raptor-section-triples.html#raptor-new-identifier" title="raptor_new_identifier ()">raptor_new_identifier</a> (<a class="link" href="raptor-section-triples.html#raptor-identifier-type" title="enum raptor_identifier_type"><span class="returnvalue">raptor_identifier_type</span></a> type,
<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *uri,
<span class="returnvalue">raptor_uri_source</span> uri_source,
unsigned <span class="returnvalue">char</span> *id,
unsigned <span class="returnvalue">char</span> *literal,
<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *literal_datatype,
unsigned <span class="returnvalue">char</span> *literal_language);
<span class="returnvalue">int</span> <a class="link" href="raptor-section-triples.html#raptor-copy-identifier" title="raptor_copy_identifier ()">raptor_copy_identifier</a> (<a class="link" href="raptor-section-triples.html#raptor-identifier" title="raptor_identifier"><span class="returnvalue">raptor_identifier</span></a> *dest,
<a class="link" href="raptor-section-triples.html#raptor-identifier" title="raptor_identifier"><span class="returnvalue">raptor_identifier</span></a> *src);
<span class="returnvalue">void</span> <a class="link" href="raptor-section-triples.html#raptor-free-identifier" title="raptor_free_identifier ()">raptor_free_identifier</a> (<a class="link" href="raptor-section-triples.html#raptor-identifier" title="raptor_identifier"><span class="returnvalue">raptor_identifier</span></a> *identifier);
<a class="link" href="raptor-section-triples.html#raptor-statement" title="raptor_statement">raptor_statement</a>;
<span class="returnvalue">int</span> <a class="link" href="raptor-section-triples.html#raptor-statement-compare" title="raptor_statement_compare ()">raptor_statement_compare</a> (const <a class="link" href="raptor-section-triples.html#raptor-statement" title="raptor_statement"><span class="returnvalue">raptor_statement</span></a> *s1,
const <a class="link" href="raptor-section-triples.html#raptor-statement" title="raptor_statement"><span class="returnvalue">raptor_statement</span></a> *s2);
<span class="returnvalue">void</span> <a class="link" href="raptor-section-triples.html#raptor-print-statement" title="raptor_print_statement ()">raptor_print_statement</a> (const <a class="link" href="raptor-section-triples.html#raptor-statement" title="raptor_statement"><span class="returnvalue">raptor_statement</span></a> *statement,
<span class="returnvalue">FILE</span> *stream);
<span class="returnvalue">void</span> <a class="link" href="raptor-section-triples.html#raptor-print-statement-as-ntriples" title="raptor_print_statement_as_ntriples ()">raptor_print_statement_as_ntriples</a> (const <a class="link" href="raptor-section-triples.html#raptor-statement" title="raptor_statement"><span class="returnvalue">raptor_statement</span></a> *statement,
<span class="returnvalue">FILE</span> *stream);
<span class="returnvalue">void</span> <a class="link" href="raptor-section-triples.html#raptor-print-statement-detailed" title="raptor_print_statement_detailed ()">raptor_print_statement_detailed</a> (const <a class="link" href="raptor-section-triples.html#raptor-statement" title="raptor_statement"><span class="returnvalue">raptor_statement</span></a> *statement,
<span class="returnvalue">int</span> detailed,
<span class="returnvalue">FILE</span> *stream);
unsigned <span class="returnvalue">char</span>* <a class="link" href="raptor-section-triples.html#raptor-statement-part-as-counted-string" title="raptor_statement_part_as_counted_string ()">raptor_statement_part_as_counted_string</a>
(const <span class="returnvalue">void</span> *term,
<a class="link" href="raptor-section-triples.html#raptor-identifier-type" title="enum raptor_identifier_type"><span class="returnvalue">raptor_identifier_type</span></a> type,
<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *literal_datatype,
unsigned <span class="returnvalue">char</span> *literal_language,
<span class="returnvalue">size_t</span> *len_p);
unsigned <span class="returnvalue">char</span>* <a class="link" href="raptor-section-triples.html#raptor-statement-part-as-string" title="raptor_statement_part_as_string ()">raptor_statement_part_as_string</a> (const <span class="returnvalue">void</span> *term,
<a class="link" href="raptor-section-triples.html#raptor-identifier-type" title="enum raptor_identifier_type"><span class="returnvalue">raptor_identifier_type</span></a> type,
<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *literal_datatype,
unsigned <span class="returnvalue">char</span> *literal_language);
</pre>
</div>
<div class="refsect1" title="Description">
<a name="raptor-section-triples.description"></a><h2>Description</h2>
<p>
Representation of RDF triples inside Raptor. They are a sequence
of three <a class="link" href="raptor-section-triples.html#raptor-identifier" title="raptor_identifier"><span class="type">raptor_identifier</span></a> which cover the RDF terms of
URI (<a class="link" href="raptor-section-triples.html#RAPTOR-IDENTIFIER-TYPE-RESOURCE:CAPS"><code class="literal">RAPTOR_IDENTIFIER_TYPE_RESOURCE</code></a>),
Literal (<a class="link" href="raptor-section-triples.html#RAPTOR-IDENTIFIER-TYPE-LITERAL:CAPS"><code class="literal">RAPTOR_IDENTIFIER_TYPE_LITERAL</code></a>) and
Blank Node (<a class="link" href="raptor-section-triples.html#RAPTOR-IDENTIFIER-TYPE-ANONYMOUS:CAPS"><code class="literal">RAPTOR_IDENTIFIER_TYPE_ANONYMOUS</code></a>).
Some other <span class="type">raptor_identifer_type</span> forms exist but are deprecated.
</p>
</div>
<div class="refsect1" title="Details">
<a name="raptor-section-triples.details"></a><h2>Details</h2>
<div class="refsect2" title="enum raptor_genid_type">
<a name="raptor-genid-type"></a><h3>enum raptor_genid_type</h3>
<pre class="programlisting">typedef enum {
RAPTOR_GENID_TYPE_BNODEID,
RAPTOR_GENID_TYPE_BAGID
} raptor_genid_type;
</pre>
<p>
Intended type for a generated identifier asked for by the handler
registered with <a class="link" href="raptor-section-parser.html#raptor-set-generate-id-handler" title="raptor_set_generate_id_handler ()"><code class="function">raptor_set_generate_id_handler()</code></a>.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="RAPTOR-GENID-TYPE-BNODEID:CAPS"></a><span class="term"><code class="literal">RAPTOR_GENID_TYPE_BNODEID</code></span></p></td>
<td> Generated ID is for a blank node
</td>
</tr>
<tr>
<td><p><a name="RAPTOR-GENID-TYPE-BAGID:CAPS"></a><span class="term"><code class="literal">RAPTOR_GENID_TYPE_BAGID</code></span></p></td>
<td> Generated ID is for rdf:bagID
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="enum raptor_identifier_type">
<a name="raptor-identifier-type"></a><h3>enum raptor_identifier_type</h3>
<pre class="programlisting">typedef enum {
RAPTOR_IDENTIFIER_TYPE_UNKNOWN,
RAPTOR_IDENTIFIER_TYPE_RESOURCE,
RAPTOR_IDENTIFIER_TYPE_ANONYMOUS,
RAPTOR_IDENTIFIER_TYPE_PREDICATE,
RAPTOR_IDENTIFIER_TYPE_ORDINAL,
RAPTOR_IDENTIFIER_TYPE_LITERAL,
RAPTOR_IDENTIFIER_TYPE_XML_LITERAL
} raptor_identifier_type;
</pre>
<p>
Type of identifier in a <a class="link" href="raptor-section-triples.html#raptor-statement" title="raptor_statement"><span class="type">raptor_statement</span></a></p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="RAPTOR-IDENTIFIER-TYPE-UNKNOWN:CAPS"></a><span class="term"><code class="literal">RAPTOR_IDENTIFIER_TYPE_UNKNOWN</code></span></p></td>
<td> Internal
</td>
</tr>
<tr>
<td><p><a name="RAPTOR-IDENTIFIER-TYPE-RESOURCE:CAPS"></a><span class="term"><code class="literal">RAPTOR_IDENTIFIER_TYPE_RESOURCE</code></span></p></td>
<td> Resource URI (e.g. <code class="literal">rdf:about</code>)
</td>
</tr>
<tr>
<td><p><a name="RAPTOR-IDENTIFIER-TYPE-ANONYMOUS:CAPS"></a><span class="term"><code class="literal">RAPTOR_IDENTIFIER_TYPE_ANONYMOUS</code></span></p></td>
<td> <code class="literal">_:foo</code> N-Triples, or generated
</td>
</tr>
<tr>
<td><p><a name="RAPTOR-IDENTIFIER-TYPE-PREDICATE:CAPS"></a><span class="term"><code class="literal">RAPTOR_IDENTIFIER_TYPE_PREDICATE</code></span></p></td>
<td> predicate URI. WARNING: Will not be generated in in Raptor 1.4.9 or newer. Instead a <a class="link" href="raptor-section-triples.html#RAPTOR-IDENTIFIER-TYPE-RESOURCE:CAPS"><span class="type">RAPTOR_IDENTIFIER_TYPE_RESOURCE</span></a> will be returned.
</td>
</tr>
<tr>
<td><p><a name="RAPTOR-IDENTIFIER-TYPE-ORDINAL:CAPS"></a><span class="term"><code class="literal">RAPTOR_IDENTIFIER_TYPE_ORDINAL</code></span></p></td>
<td> <code class="literal">rdf:li</code>, <code class="literal">rdf:_</code><span class="emphasis"><em>n</em></span>. No longer generated in any parser in Raptor 1.4.10+, instead a <a class="link" href="raptor-section-triples.html#RAPTOR-IDENTIFIER-TYPE-RESOURCE:CAPS"><span class="type">RAPTOR_IDENTIFIER_TYPE_RESOURCE</span></a> is returned.
</td>
</tr>
<tr>
<td><p><a name="RAPTOR-IDENTIFIER-TYPE-LITERAL:CAPS"></a><span class="term"><code class="literal">RAPTOR_IDENTIFIER_TYPE_LITERAL</code></span></p></td>
<td> regular literal
</td>
</tr>
<tr>
<td><p><a name="RAPTOR-IDENTIFIER-TYPE-XML-LITERAL:CAPS"></a><span class="term"><code class="literal">RAPTOR_IDENTIFIER_TYPE_XML_LITERAL</code></span></p></td>
<td> <code class="literal">rdf:parseType="Literal"</code>. No longer generated by any parser in Raptor 1.4.8+, instead a <a class="link" href="raptor-section-triples.html#RAPTOR-IDENTIFIER-TYPE-LITERAL:CAPS"><span class="type">RAPTOR_IDENTIFIER_TYPE_LITERAL</span></a> is returned with a datatype of <code class="literal">rdf:XMLLiteral</code>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="raptor_identifier">
<a name="raptor-identifier"></a><h3>raptor_identifier</h3>
<pre class="programlisting">typedef struct {
raptor_identifier_type type;
raptor_uri *uri;
raptor_uri_source uri_source;
const unsigned char *id;
int ordinal;
int is_malloced;
const unsigned char *literal;
raptor_uri *literal_datatype;
const unsigned char *literal_language;
raptor_world *world;
} raptor_identifier;
</pre>
<p>
Raptor RDF term identifier.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="raptor-section-triples.html#raptor-identifier-type" title="enum raptor_identifier_type"><span class="type">raptor_identifier_type</span></a> <em class="structfield"><code><a name="raptor-identifier.type"></a>type</code></em>;</span></p></td>
<td> Type of identifier
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *<em class="structfield"><code><a name="raptor-identifier.uri"></a>uri</code></em>;</span></p></td>
<td> URI of identifier for types <a class="link" href="raptor-section-triples.html#RAPTOR-IDENTIFIER-TYPE-RESOURCE:CAPS"><code class="literal">RAPTOR_IDENTIFIER_TYPE_RESOURCE</code></a> and
<a class="link" href="raptor-section-triples.html#RAPTOR-IDENTIFIER-TYPE-PREDICATE:CAPS"><code class="literal">RAPTOR_IDENTIFIER_TYPE_PREDICATE</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">raptor_uri_source</span> <em class="structfield"><code><a name="raptor-identifier.uri-source"></a>uri_source</code></em>;</span></p></td>
<td> where the identifier (URI or blank node) came from
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">int</span> <em class="structfield"><code><a name="raptor-identifier.ordinal"></a>ordinal</code></em>;</span></p></td>
<td> integer ordinal for type <a class="link" href="raptor-section-triples.html#RAPTOR-IDENTIFIER-TYPE-ORDINAL:CAPS"><code class="literal">RAPTOR_IDENTIFIER_TYPE_ORDINAL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">int</span> <em class="structfield"><code><a name="raptor-identifier.is-malloced"></a>is_malloced</code></em>;</span></p></td>
<td> internal
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *<em class="structfield"><code><a name="raptor-identifier.literal-datatype"></a>literal_datatype</code></em>;</span></p></td>
<td> RDF literal datatype URI for types
<a class="link" href="raptor-section-triples.html#RAPTOR-IDENTIFIER-TYPE-LITERAL:CAPS"><code class="literal">RAPTOR_IDENTIFIER_TYPE_LITERAL</code></a> and <a class="link" href="raptor-section-triples.html#RAPTOR-IDENTIFIER-TYPE-XML-LITERAL:CAPS"><code class="literal">RAPTOR_IDENTIFIER_TYPE_XML_LITERAL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="raptor-section-world.html#raptor-world" title="raptor_world"><span class="type">raptor_world</span></a> *<em class="structfield"><code><a name="raptor-identifier.world"></a>world</code></em>;</span></p></td>
<td> raptor_world object
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="raptor_new_identifier ()">
<a name="raptor-new-identifier"></a><h3>raptor_new_identifier ()</h3>
<pre class="programlisting"><a class="link" href="raptor-section-triples.html#raptor-identifier" title="raptor_identifier"><span class="returnvalue">raptor_identifier</span></a>* raptor_new_identifier (<a class="link" href="raptor-section-triples.html#raptor-identifier-type" title="enum raptor_identifier_type"><span class="returnvalue">raptor_identifier_type</span></a> type,
<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *uri,
<span class="returnvalue">raptor_uri_source</span> uri_source,
unsigned <span class="returnvalue">char</span> *id,
unsigned <span class="returnvalue">char</span> *literal,
<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *literal_datatype,
unsigned <span class="returnvalue">char</span> *literal_language);</pre>
<p>
Constructor - create a raptor_identifier.
</p>
<p>
Constructs a new identifier copying the URI, ID fields.
SHARED means raptor_new_identifier owns this argument after calling.
</p>
<p>
<a class="link" href="raptor-section-world.html#raptor-init" title="raptor_init ()"><code class="function">raptor_init()</code></a> MUST have been called before calling this function.
Use <code class="function">raptor_new_identifier_v2()</code> if using raptor_world APIs.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td> raptor_identifier_type of identifier
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td> <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> of identifier (if relevant) (SHARED)
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri_source</code></em> :</span></p></td>
<td> raptor_uri_source of URI (if relevant)
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
<td> string for ID or genid (if relevant) (SHARED)
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>literal</code></em> :</span></p></td>
<td> string for literal (SHARED)
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>literal_datatype</code></em> :</span></p></td>
<td> <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> of identifier (SHARED)
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>literal_language</code></em> :</span></p></td>
<td> literal language (SHARED)
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a new raptor_identifier object or NULL on failure
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="raptor_copy_identifier ()">
<a name="raptor-copy-identifier"></a><h3>raptor_copy_identifier ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> raptor_copy_identifier (<a class="link" href="raptor-section-triples.html#raptor-identifier" title="raptor_identifier"><span class="returnvalue">raptor_identifier</span></a> *dest,
<a class="link" href="raptor-section-triples.html#raptor-identifier" title="raptor_identifier"><span class="returnvalue">raptor_identifier</span></a> *src);</pre>
<p>
Copy raptor_identifiers.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
<td> destination <a class="link" href="raptor-section-triples.html#raptor-identifier" title="raptor_identifier"><span class="type">raptor_identifier</span></a> (previously created)
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>src</code></em> :</span></p></td>
<td> source <a class="link" href="raptor-section-triples.html#raptor-identifier" title="raptor_identifier"><span class="type">raptor_identifier</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Non 0 on failure
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="raptor_free_identifier ()">
<a name="raptor-free-identifier"></a><h3>raptor_free_identifier ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> raptor_free_identifier (<a class="link" href="raptor-section-triples.html#raptor-identifier" title="raptor_identifier"><span class="returnvalue">raptor_identifier</span></a> *identifier);</pre>
<p>
Destructor - destroy a raptor_identifier object.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>identifier</code></em> :</span></p></td>
<td> <a class="link" href="raptor-section-triples.html#raptor-identifier" title="raptor_identifier"><span class="type">raptor_identifier</span></a> object
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="raptor_statement">
<a name="raptor-statement"></a><h3>raptor_statement</h3>
<pre class="programlisting">typedef struct {
const void *subject;
raptor_identifier_type subject_type;
const void *predicate;
raptor_identifier_type predicate_type;
const void *object;
raptor_identifier_type object_type;
raptor_uri *object_literal_datatype;
const unsigned char *object_literal_language;
} raptor_statement;
</pre>
<p>
An RDF triple
</p>
<p>
See <a class="link" href="raptor-section-triples.html#raptor-identifier" title="raptor_identifier"><span class="type">raptor_identifier</span></a> for a description of how the fields may be used.
As returned by a parser statement_handler.
</p>
<p>
See also <span class="type">raptor_statement_v2</span>.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">const <span class="type">void</span> *<em class="structfield"><code><a name="raptor-statement.subject"></a>subject</code></em>;</span></p></td>
<td> triple subject data
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="raptor-section-triples.html#raptor-identifier-type" title="enum raptor_identifier_type"><span class="type">raptor_identifier_type</span></a> <em class="structfield"><code><a name="raptor-statement.subject-type"></a>subject_type</code></em>;</span></p></td>
<td> triple subject type
</td>
</tr>
<tr>
<td><p><span class="term">const <span class="type">void</span> *<em class="structfield"><code><a name="raptor-statement.predicate"></a>predicate</code></em>;</span></p></td>
<td> triple predicate data
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="raptor-section-triples.html#raptor-identifier-type" title="enum raptor_identifier_type"><span class="type">raptor_identifier_type</span></a> <em class="structfield"><code><a name="raptor-statement.predicate-type"></a>predicate_type</code></em>;</span></p></td>
<td> triple predicate type
</td>
</tr>
<tr>
<td><p><span class="term">const <span class="type">void</span> *<em class="structfield"><code><a name="raptor-statement.object"></a>object</code></em>;</span></p></td>
<td> triple object literal string
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="raptor-section-triples.html#raptor-identifier-type" title="enum raptor_identifier_type"><span class="type">raptor_identifier_type</span></a> <em class="structfield"><code><a name="raptor-statement.object-type"></a>object_type</code></em>;</span></p></td>
<td> triple object type
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *<em class="structfield"><code><a name="raptor-statement.object-literal-datatype"></a>object_literal_datatype</code></em>;</span></p></td>
<td> triple object literal datatype URI (or NULL)
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="raptor_statement_compare ()">
<a name="raptor-statement-compare"></a><h3>raptor_statement_compare ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> raptor_statement_compare (const <a class="link" href="raptor-section-triples.html#raptor-statement" title="raptor_statement"><span class="returnvalue">raptor_statement</span></a> *s1,
const <a class="link" href="raptor-section-triples.html#raptor-statement" title="raptor_statement"><span class="returnvalue">raptor_statement</span></a> *s2);</pre>
<p>
Compare a pair of <a class="link" href="raptor-section-triples.html#raptor-statement" title="raptor_statement"><span class="type">raptor_statement</span></a>
</p>
<p>
If types are different, the <a class="link" href="raptor-section-triples.html#raptor-identifier-type" title="enum raptor_identifier_type"><span class="type">raptor_identifier_type</span></a> order is used.
Resource and datatype URIs are compared with <a class="link" href="raptor-section-uri.html#raptor-uri-compare" title="raptor_uri_compare ()"><code class="function">raptor_uri_compare()</code></a>,
blank nodes and literals with <code class="function">strcmp()</code>. If one literal has no
language, it is earlier than one with a language. If one literal
has no datatype, it is earlier than one with a datatype.
</p>
<p>
<a class="link" href="raptor-section-world.html#raptor-init" title="raptor_init ()"><code class="function">raptor_init()</code></a> MUST have been called before calling this function.
Use <code class="function">raptor_statement_compare_v2()</code> if using raptor_world APIs.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>s1</code></em> :</span></p></td>
<td> first statement
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>s2</code></em> :</span></p></td>
<td> second statement
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <0 if s1 is before s2, 0 if equal, >0 if s1 is after s2
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="raptor_print_statement ()">
<a name="raptor-print-statement"></a><h3>raptor_print_statement ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> raptor_print_statement (const <a class="link" href="raptor-section-triples.html#raptor-statement" title="raptor_statement"><span class="returnvalue">raptor_statement</span></a> *statement,
<span class="returnvalue">FILE</span> *stream);</pre>
<p>
Print a raptor_statement to a stream.
</p>
<p>
<a class="link" href="raptor-section-world.html#raptor-init" title="raptor_init ()"><code class="function">raptor_init()</code></a> MUST have been called before calling this function.
Use <code class="function">raptor_print_statement_v2()</code> if using raptor_world APIs.</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="raptor-section-triples.html#raptor-statement" title="raptor_statement"><span class="type">raptor_statement</span></a> object to print
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
<td> <span class="type">FILE</span>* stream
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="raptor_print_statement_as_ntriples ()">
<a name="raptor-print-statement-as-ntriples"></a><h3>raptor_print_statement_as_ntriples ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> raptor_print_statement_as_ntriples (const <a class="link" href="raptor-section-triples.html#raptor-statement" title="raptor_statement"><span class="returnvalue">raptor_statement</span></a> *statement,
<span class="returnvalue">FILE</span> *stream);</pre>
<p>
Print a raptor_statement in N-Triples form.
</p>
<p>
<a class="link" href="raptor-section-world.html#raptor-init" title="raptor_init ()"><code class="function">raptor_init()</code></a> MUST have been called before calling this function.
Use <code class="function">raptor_print_statement_as_ntriples_v2()</code> if using raptor_world APIs.</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="raptor-section-triples.html#raptor-statement" title="raptor_statement"><span class="type">raptor_statement</span></a> to print
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
<td> <span class="type">FILE</span>* stream
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="raptor_print_statement_detailed ()">
<a name="raptor-print-statement-detailed"></a><h3>raptor_print_statement_detailed ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> raptor_print_statement_detailed (const <a class="link" href="raptor-section-triples.html#raptor-statement" title="raptor_statement"><span class="returnvalue">raptor_statement</span></a> *statement,
<span class="returnvalue">int</span> detailed,
<span class="returnvalue">FILE</span> *stream);</pre>
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">raptor_print_statement_detailed</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Print a raptor_statement to a stream in a detailed fashion.
</p>
<p>
<a class="link" href="raptor-section-world.html#raptor-init" title="raptor_init ()"><code class="function">raptor_init()</code></a> MUST have been called before calling this function.
</p>
<p>
<em class="parameter"><code>deprecated</code></em>: an internal function, do not use.
</p>
<p>
No current difference from calling <a class="link" href="raptor-section-triples.html#raptor-print-statement" title="raptor_print_statement ()"><code class="function">raptor_print_statement()</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> <a class="link" href="raptor-section-triples.html#raptor-statement" title="raptor_statement"><span class="type">raptor_statement</span></a> object to print
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>detailed</code></em> :</span></p></td>
<td> unused
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
<td> <span class="type">FILE</span>* stream
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="raptor_statement_part_as_counted_string ()">
<a name="raptor-statement-part-as-counted-string"></a><h3>raptor_statement_part_as_counted_string ()</h3>
<pre class="programlisting">unsigned <span class="returnvalue">char</span>* raptor_statement_part_as_counted_string
(const <span class="returnvalue">void</span> *term,
<a class="link" href="raptor-section-triples.html#raptor-identifier-type" title="enum raptor_identifier_type"><span class="returnvalue">raptor_identifier_type</span></a> type,
<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *literal_datatype,
unsigned <span class="returnvalue">char</span> *literal_language,
<span class="returnvalue">size_t</span> *len_p);</pre>
<p>
Turns part of raptor statement into a N-Triples format counted string.
</p>
<p>
Turns the given <em class="parameter"><code>term</code></em> into an N-Triples escaped string using all the
escapes as defined in http://www.w3.org/TR/rdf-testcases/<span class="type">ntriples</span>
</p>
<p>
The part (subject, predicate, object) of the raptor_statement is
typically passed in as <em class="parameter"><code>term</code></em>, the part type (subject_type,
predicate_type, object_type) is passed in as <em class="parameter"><code>type</code></em>. When the part
is a literal, the <em class="parameter"><code>literal_datatype</code></em> and <em class="parameter"><code>literal_language</code></em> fields
are set, otherwise NULL (usually object_datatype,
object_literal_language).
</p>
<p>
<a class="link" href="raptor-section-world.html#raptor-init" title="raptor_init ()"><code class="function">raptor_init()</code></a> MUST have been called before calling this function.
Use <code class="function">raptor_statement_part_as_counted_string_v2()</code> if using raptor_world APIs.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>term</code></em> :</span></p></td>
<td> <a class="link" href="raptor-section-triples.html#raptor-statement" title="raptor_statement"><span class="type">raptor_statement</span></a> part (subject, predicate, object)
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td> <a class="link" href="raptor-section-triples.html#raptor-statement" title="raptor_statement"><span class="type">raptor_statement</span></a> part type
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>literal_datatype</code></em> :</span></p></td>
<td> <a class="link" href="raptor-section-triples.html#raptor-statement" title="raptor_statement"><span class="type">raptor_statement</span></a> part datatype
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>literal_language</code></em> :</span></p></td>
<td> <a class="link" href="raptor-section-triples.html#raptor-statement" title="raptor_statement"><span class="type">raptor_statement</span></a> part language
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len_p</code></em> :</span></p></td>
<td> Pointer to location to store length of new string (if not NULL)
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the new string or NULL on failure. The length of
the new string is returned in *<em class="parameter"><code>len_p</code></em> if len_p is not NULL.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="raptor_statement_part_as_string ()">
<a name="raptor-statement-part-as-string"></a><h3>raptor_statement_part_as_string ()</h3>
<pre class="programlisting">unsigned <span class="returnvalue">char</span>* raptor_statement_part_as_string (const <span class="returnvalue">void</span> *term,
<a class="link" href="raptor-section-triples.html#raptor-identifier-type" title="enum raptor_identifier_type"><span class="returnvalue">raptor_identifier_type</span></a> type,
<a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *literal_datatype,
unsigned <span class="returnvalue">char</span> *literal_language);</pre>
<p>
Turns part of raptor statement into a N-Triples format string.
</p>
<p>
Turns the given <em class="parameter"><code>term</code></em> into an N-Triples escaped string using all the
escapes as defined in http://www.w3.org/TR/rdf-testcases/<span class="type">ntriples</span>
</p>
<p>
The part (subject, predicate, object) of the raptor_statement is
typically passed in as <em class="parameter"><code>term</code></em>, the part type (subject_type,
predicate_type, object_type) is passed in as <em class="parameter"><code>type</code></em>. When the part
is a literal, the <em class="parameter"><code>literal_datatype</code></em> and <em class="parameter"><code>literal_language</code></em> fields
are set, otherwise NULL (usually object_datatype,
object_literal_language).
</p>
<p>
<a class="link" href="raptor-section-world.html#raptor-init" title="raptor_init ()"><code class="function">raptor_init()</code></a> MUST have been called before calling this function.
Use <code class="function">raptor_statement_part_as_string_v2()</code> if using raptor_world APIs.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>term</code></em> :</span></p></td>
<td> <a class="link" href="raptor-section-triples.html#raptor-statement" title="raptor_statement"><span class="type">raptor_statement</span></a> part (subject, predicate, object)
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td> <a class="link" href="raptor-section-triples.html#raptor-statement" title="raptor_statement"><span class="type">raptor_statement</span></a> part type
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>literal_datatype</code></em> :</span></p></td>
<td> <a class="link" href="raptor-section-triples.html#raptor-statement" title="raptor_statement"><span class="type">raptor_statement</span></a> part datatype
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>literal_language</code></em> :</span></p></td>
<td> <a class="link" href="raptor-section-triples.html#raptor-statement" title="raptor_statement"><span class="type">raptor_statement</span></a> part language
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the new string or NULL on failure.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.13</div>
</body>
</html>
|