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
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>section-parser: Raptor RDF Syntax Library Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="Raptor RDF Syntax Library Manual">
<link rel="up" href="reference-manual.html" title="Part II. Raptor Reference Manual">
<link rel="prev" href="raptor2-section-locator.html" title="section-locator">
<link rel="next" href="raptor2-section-sax2.html" title="section-sax2">
<meta name="generator" content="GTK-Doc V1.33.1 (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="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#raptor2-section-parser.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="reference-manual.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="raptor2-section-locator.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="raptor2-section-sax2.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="raptor2-section-parser"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="raptor2-section-parser.top_of_page"></a>section-parser</span></h2>
<p>section-parser</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="raptor2-section-parser.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="returnvalue">raptor_parser</span></a> *
</td>
<td class="function_name">
<a class="link" href="raptor2-section-parser.html#raptor-new-parser" title="raptor_new_parser ()">raptor_new_parser</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="returnvalue">raptor_parser</span></a> *
</td>
<td class="function_name">
<a class="link" href="raptor2-section-parser.html#raptor-new-parser-for-content" title="raptor_new_parser_for_content ()">raptor_new_parser_for_content</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-parser.html#raptor-free-parser" title="raptor_free_parser ()">raptor_free_parser</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="raptor2-section-parser.html#raptor-graph-mark-handler" title="raptor_graph_mark_handler ()">*raptor_graph_mark_handler</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="raptor2-section-parser.html#raptor-namespace-handler" title="raptor_namespace_handler ()">*raptor_namespace_handler</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-parser.html#raptor-parser-set-statement-handler" title="raptor_parser_set_statement_handler ()">raptor_parser_set_statement_handler</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-parser.html#raptor-parser-set-graph-mark-handler" title="raptor_parser_set_graph_mark_handler ()">raptor_parser_set_graph_mark_handler</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-parser.html#raptor-parser-set-namespace-handler" title="raptor_parser_set_namespace_handler ()">raptor_parser_set_namespace_handler</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="raptor2-section-general.html#raptor-syntax-description" title="raptor_syntax_description"><span class="returnvalue">raptor_syntax_description</span></a> *
</td>
<td class="function_name">
<a class="link" href="raptor2-section-parser.html#raptor-parser-get-description" title="raptor_parser_get_description ()">raptor_parser_get_description</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="raptor2-section-locator.html#raptor-locator" title="raptor_locator"><span class="returnvalue">raptor_locator</span></a> *
</td>
<td class="function_name">
<a class="link" href="raptor2-section-parser.html#raptor-parser-get-locator" title="raptor_parser_get_locator ()">raptor_parser_get_locator</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-parser.html#raptor-parser-parse-abort" title="raptor_parser_parse_abort ()">raptor_parser_parse_abort</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-parser.html#raptor-parser-parse-chunk" title="raptor_parser_parse_chunk ()">raptor_parser_parse_chunk</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-parser.html#raptor-parser-parse-file" title="raptor_parser_parse_file ()">raptor_parser_parse_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-parser.html#raptor-parser-parse-file-stream" title="raptor_parser_parse_file_stream ()">raptor_parser_parse_file_stream</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-parser.html#raptor-parser-parse-iostream" title="raptor_parser_parse_iostream ()">raptor_parser_parse_iostream</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-parser.html#raptor-parser-parse-start" title="raptor_parser_parse_start ()">raptor_parser_parse_start</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-parser.html#raptor-parser-parse-uri" title="raptor_parser_parse_uri ()">raptor_parser_parse_uri</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-parser.html#raptor-parser-parse-uri-with-connection" title="raptor_parser_parse_uri_with_connection ()">raptor_parser_parse_uri_with_connection</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *
</td>
<td class="function_name">
<a class="link" href="raptor2-section-parser.html#raptor-parser-get-graph" title="raptor_parser_get_graph ()">raptor_parser_get_graph</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="raptor2-section-parser.html#raptor-parser-get-name" title="raptor_parser_get_name ()">raptor_parser_get_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-parser.html#raptor-parser-set-option" title="raptor_parser_set_option ()">raptor_parser_set_option</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-parser.html#raptor-parser-get-option" title="raptor_parser_get_option ()">raptor_parser_get_option</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="raptor2-section-parser.html#raptor-parser-get-accept-header" title="raptor_parser_get_accept_header ()">raptor_parser_get_accept_header</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-parser.html#raptor-parser-set-uri-filter" title="raptor_parser_set_uri_filter ()">raptor_parser_set_uri_filter</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="returnvalue">raptor_world</span></a> *
</td>
<td class="function_name">
<a class="link" href="raptor2-section-parser.html#raptor-parser-get-world" title="raptor_parser_get_world ()">raptor_parser_get_world</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="raptor2-section-parser.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody>
<tr>
<td class="typedef_keyword">typedef</td>
<td class="function_name"><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser">raptor_parser</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="raptor2-section-parser.html#raptor-graph-mark-flags" title="enum raptor_graph_mark_flags">raptor_graph_mark_flags</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="raptor2-section-parser.description"></a><h2>Description</h2>
</div>
<div class="refsect1">
<a name="raptor2-section-parser.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="raptor-new-parser"></a><h3>raptor_new_parser ()</h3>
<pre class="programlisting"><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="returnvalue">raptor_parser</span></a> *
raptor_new_parser (<em class="parameter"><code><a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="type">raptor_world</span></a> *world</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
<p>Constructor - create a new raptor_parser object.</p>
<div class="refsect3">
<a name="raptor-new-parser.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>world</p></td>
<td class="parameter_description"><p>world object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>the parser name or NULL for default parser</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-new-parser.returns"></a><h4>Returns</h4>
<p> a new <a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> object or NULL on failure</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-new-parser-for-content"></a><h3>raptor_new_parser_for_content ()</h3>
<pre class="programlisting"><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="returnvalue">raptor_parser</span></a> *
raptor_new_parser_for_content (<em class="parameter"><code><a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="type">raptor_world</span></a> *world</code></em>,
<em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *uri</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *mime_type</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *buffer</code></em>,
<em class="parameter"><code><span class="type">size_t</span> len</code></em>,
<em class="parameter"><code>const unsigned <span class="type">char</span> *identifier</code></em>);</pre>
<p>Constructor - create a new raptor_parser.</p>
<p>Uses <a class="link" href="raptor2-section-world.html#raptor-world-guess-parser-name" title="raptor_world_guess_parser_name ()"><code class="function">raptor_world_guess_parser_name()</code></a> to find a parser by scoring
recognition of the syntax by a block of characters, the content
identifier or a mime type. The content identifier is typically a
filename or URI or some other identifier.</p>
<div class="refsect3">
<a name="raptor-new-parser-for-content.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>world</p></td>
<td class="parameter_description"><p>world object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>URI identifying the syntax (or NULL)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mime_type</p></td>
<td class="parameter_description"><p>mime type identifying the content (or NULL)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>buffer of content to guess (or NULL)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>len</p></td>
<td class="parameter_description"><p>length of buffer</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>identifier</p></td>
<td class="parameter_description"><p>identifier of content (or NULL)</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-new-parser-for-content.returns"></a><h4>Returns</h4>
<p> a new <a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> object or NULL on failure</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-free-parser"></a><h3>raptor_free_parser ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
raptor_free_parser (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *parser</code></em>);</pre>
<p>Destructor - destroy a raptor_parser object.</p>
<div class="refsect3">
<a name="raptor-free-parser.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>parser</p></td>
<td class="parameter_description"><p><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-graph-mark-handler"></a><h3>raptor_graph_mark_handler ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
<span class="c_punctuation">(</span>*raptor_graph_mark_handler<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
<em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *graph</code></em>,
<em class="parameter"><code><span class="type">int</span> flags</code></em>);</pre>
<p>Graph start/end mark handler function.</p>
<p>Records start and end of graphs happening in a stream of generated
<a class="link" href="raptor2-section-triples.html#raptor-statement" title="raptor_statement"><span class="type">raptor_statement</span></a> via the statement handler. The callback starts a
graph when <em class="parameter"><code>flags</code></em>
has <a class="link" href="raptor2-section-parser.html#RAPTOR-GRAPH-MARK-START:CAPS"><span class="type">RAPTOR_GRAPH_MARK_START</span></a> bit set.</p>
<p>The start and ends may be either declared in the syntax via some
keyword or mechanism such as TRiG {} syntax when <em class="parameter"><code>flags</code></em>
has bit
<a class="link" href="raptor2-section-parser.html#RAPTOR-GRAPH-MARK-DECLARED:CAPS"><span class="type">RAPTOR_GRAPH_MARK_DECLARED</span></a> set, or be implied by the start/end of
the data in other syntaxes, and the bit will be unset.</p>
<div class="refsect3">
<a name="raptor-graph-mark-handler.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>graph</p></td>
<td class="parameter_description"><p>graph to report, NULL for the default graph</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>bitmask of <a class="link" href="raptor2-section-parser.html#raptor-graph-mark-flags" title="enum raptor_graph_mark_flags"><span class="type">raptor_graph_mark_flags</span></a> flags</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-namespace-handler"></a><h3>raptor_namespace_handler ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
<span class="c_punctuation">(</span>*raptor_namespace_handler<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
<em class="parameter"><code><a class="link" href="raptor2-section-xml-namespace.html#raptor-namespace" title="raptor_namespace"><span class="type">raptor_namespace</span></a> *nspace</code></em>);</pre>
<p>XML Namespace declaration reporting handler set by
<a class="link" href="raptor2-section-parser.html#raptor-parser-set-namespace-handler" title="raptor_parser_set_namespace_handler ()"><code class="function">raptor_parser_set_namespace_handler()</code></a>.</p>
<div class="refsect3">
<a name="raptor-namespace-handler.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>nspace</p></td>
<td class="parameter_description"><p><a class="link" href="raptor2-section-xml-namespace.html#raptor-namespace" title="raptor_namespace"><span class="type">raptor_namespace</span></a> declared</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-set-statement-handler"></a><h3>raptor_parser_set_statement_handler ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
raptor_parser_set_statement_handler (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *parser</code></em>,
<em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
<em class="parameter"><code><a class="link" href="raptor2-section-general.html#raptor-statement-handler" title="raptor_statement_handler ()"><span class="type">raptor_statement_handler</span></a> handler</code></em>);</pre>
<p>Set the statement handler function for the parser.</p>
<p>Use this to set the function to receive statements as the parsing
proceeds. The statement argument to <em class="parameter"><code>handler</code></em>
is shared and must be
copied by the caller with <a class="link" href="raptor2-section-triples.html#raptor-statement-copy" title="raptor_statement_copy ()"><code class="function">raptor_statement_copy()</code></a>.</p>
<div class="refsect3">
<a name="raptor-parser-set-statement-handler.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>parser</p></td>
<td class="parameter_description"><p><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> parser object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data pointer for callback</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>handler</p></td>
<td class="parameter_description"><p>new statement callback function</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-set-graph-mark-handler"></a><h3>raptor_parser_set_graph_mark_handler ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
raptor_parser_set_graph_mark_handler (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *parser</code></em>,
<em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-graph-mark-handler" title="raptor_graph_mark_handler ()"><span class="type">raptor_graph_mark_handler</span></a> handler</code></em>);</pre>
<p>Set the graph mark handler function for the parser.</p>
<p>See <a class="link" href="raptor2-section-parser.html#raptor-graph-mark-handler" title="raptor_graph_mark_handler ()"><span class="type">raptor_graph_mark_handler</span></a> and <a class="link" href="raptor2-section-parser.html#raptor-graph-mark-flags" title="enum raptor_graph_mark_flags"><span class="type">raptor_graph_mark_flags</span></a> for
the marks that may be returned by the handler.</p>
<div class="refsect3">
<a name="raptor-parser-set-graph-mark-handler.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>parser</p></td>
<td class="parameter_description"><p><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> parser object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data pointer for callback</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>handler</p></td>
<td class="parameter_description"><p>new graph callback function</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-set-namespace-handler"></a><h3>raptor_parser_set_namespace_handler ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
raptor_parser_set_namespace_handler (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *parser</code></em>,
<em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-namespace-handler" title="raptor_namespace_handler ()"><span class="type">raptor_namespace_handler</span></a> handler</code></em>);</pre>
<p>Set the namespace handler function for the parser.</p>
<p>When a prefix/namespace is seen in a parser, call the given
<em class="parameter"><code>handler</code></em>
with the prefix string and the <a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> namespace URI.
Either can be NULL for the default prefix or default namespace.</p>
<p>The handler function does not deal with duplicates so any
namespace may be declared multiple times.</p>
<div class="refsect3">
<a name="raptor-parser-set-namespace-handler.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>parser</p></td>
<td class="parameter_description"><p><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> parser object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data pointer for callback</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>handler</p></td>
<td class="parameter_description"><p>new namespace callback function</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-get-description"></a><h3>raptor_parser_get_description ()</h3>
<pre class="programlisting">const <a class="link" href="raptor2-section-general.html#raptor-syntax-description" title="raptor_syntax_description"><span class="returnvalue">raptor_syntax_description</span></a> *
raptor_parser_get_description (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>);</pre>
<p>Get description of the syntaxes of the parser.</p>
<p>The returned description is static and lives as long as the raptor
library (raptor world).</p>
<div class="refsect3">
<a name="raptor-parser-get-description.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>rdf_parser</p></td>
<td class="parameter_description"><p><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> parser object</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-parser-get-description.returns"></a><h4>Returns</h4>
<p> description of syntax</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-get-locator"></a><h3>raptor_parser_get_locator ()</h3>
<pre class="programlisting"><a class="link" href="raptor2-section-locator.html#raptor-locator" title="raptor_locator"><span class="returnvalue">raptor_locator</span></a> *
raptor_parser_get_locator (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>);</pre>
<p>Get the current raptor locator object.</p>
<div class="refsect3">
<a name="raptor-parser-get-locator.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>rdf_parser</p></td>
<td class="parameter_description"><p>raptor parser</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-parser-get-locator.returns"></a><h4>Returns</h4>
<p> raptor locator</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-parse-abort"></a><h3>raptor_parser_parse_abort ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
raptor_parser_parse_abort (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>);</pre>
<p>Abort an ongoing parsing.</p>
<p>Causes any ongoing generation of statements by a parser to be
terminated and the parser to return controlto the application
as soon as draining any existing buffers.</p>
<p>Most useful inside <a class="link" href="raptor2-section-parser.html#raptor-parser-parse-file" title="raptor_parser_parse_file ()"><code class="function">raptor_parser_parse_file()</code></a> or
<a class="link" href="raptor2-section-parser.html#raptor-parser-parse-uri" title="raptor_parser_parse_uri ()"><code class="function">raptor_parser_parse_uri()</code></a> when the Raptor library is directing the
parsing and when one of the callback handlers such as as set by
<a class="link" href="raptor2-section-parser.html#raptor-parser-set-statement-handler" title="raptor_parser_set_statement_handler ()"><code class="function">raptor_parser_set_statement_handler()</code></a> requires to return to the main
application code.</p>
<div class="refsect3">
<a name="raptor-parser-parse-abort.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>rdf_parser</p></td>
<td class="parameter_description"><p><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> parser object</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-parse-chunk"></a><h3>raptor_parser_parse_chunk ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
raptor_parser_parse_chunk (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *buffer</code></em>,
<em class="parameter"><code><span class="type">size_t</span> len</code></em>,
<em class="parameter"><code><span class="type">int</span> is_end</code></em>);</pre>
<p>Parse a block of content into triples.</p>
<p>This method can only be called after <a class="link" href="raptor2-section-parser.html#raptor-parser-parse-start" title="raptor_parser_parse_start ()"><code class="function">raptor_parser_parse_start()</code></a> has
initialised the parser.</p>
<div class="refsect3">
<a name="raptor-parser-parse-chunk.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>rdf_parser</p></td>
<td class="parameter_description"><p>RDF parser</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>content to parse</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>len</p></td>
<td class="parameter_description"><p>length of buffer</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>is_end</p></td>
<td class="parameter_description"><p>non-0 if this is the end of the content (such as EOF)</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-parser-parse-chunk.returns"></a><h4>Returns</h4>
<p> non-0 on failure.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-parse-file"></a><h3>raptor_parser_parse_file ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
raptor_parser_parse_file (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>,
<em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *uri</code></em>,
<em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *base_uri</code></em>);</pre>
<p>Parse RDF content at a file URI.</p>
<p>If <em class="parameter"><code>uri</code></em>
is NULL (source is stdin), then the <em class="parameter"><code>base_uri</code></em>
is required.</p>
<div class="refsect3">
<a name="raptor-parser-parse-file.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>rdf_parser</p></td>
<td class="parameter_description"><p>parser</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>URI of RDF content or NULL to read from standard input</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>base_uri</p></td>
<td class="parameter_description"><p>the base URI to use (or NULL if the same)</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-parser-parse-file.returns"></a><h4>Returns</h4>
<p> non 0 on failure</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-parse-file-stream"></a><h3>raptor_parser_parse_file_stream ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
raptor_parser_parse_file_stream (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>,
<em class="parameter"><code><span class="type">FILE</span> *stream</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
<em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *base_uri</code></em>);</pre>
<p>Parse RDF content from a FILE*.</p>
<p>After draining the FILE* stream (EOF), fclose is not called on it.</p>
<div class="refsect3">
<a name="raptor-parser-parse-file-stream.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>rdf_parser</p></td>
<td class="parameter_description"><p>parser</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>stream</p></td>
<td class="parameter_description"><p>FILE* of RDF content</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>filename</p></td>
<td class="parameter_description"><p>filename of content or NULL if it has no name</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>base_uri</p></td>
<td class="parameter_description"><p>the base URI to use</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-parser-parse-file-stream.returns"></a><h4>Returns</h4>
<p> non 0 on failure</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-parse-iostream"></a><h3>raptor_parser_parse_iostream ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
raptor_parser_parse_iostream (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>,
<em class="parameter"><code><a class="link" href="raptor2-section-iostream.html#raptor-iostream" title="raptor_iostream"><span class="type">raptor_iostream</span></a> *iostr</code></em>,
<em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *base_uri</code></em>);</pre>
<p>Parse content from an iostream</p>
<p>If the parser requires a base URI and <em class="parameter"><code>base_uri</code></em>
is NULL, an error
will be generated and the function will fail.</p>
<div class="refsect3">
<a name="raptor-parser-parse-iostream.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>rdf_parser</p></td>
<td class="parameter_description"><p>parser</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>iostr</p></td>
<td class="parameter_description"><p>iostream to read from</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>base_uri</p></td>
<td class="parameter_description"><p>the base URI to use (or NULL)</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-parser-parse-iostream.returns"></a><h4>Returns</h4>
<p> non 0 on failure, <0 if a required base URI was missing</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-parse-start"></a><h3>raptor_parser_parse_start ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
raptor_parser_parse_start (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>,
<em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *uri</code></em>);</pre>
<p>Start a parse of content with base URI.</p>
<p>Parsers that need a base URI can be identified using a syntax
description returned by <a class="link" href="raptor2-section-world.html#raptor-world-get-parser-description" title="raptor_world_get_parser_description ()"><code class="function">raptor_world_get_parser_description()</code></a>
statically or <a class="link" href="raptor2-section-parser.html#raptor-parser-get-description" title="raptor_parser_get_description ()"><code class="function">raptor_parser_get_description()</code></a> on a constructed
parser.</p>
<div class="refsect3">
<a name="raptor-parser-parse-start.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>rdf_parser</p></td>
<td class="parameter_description"><p>RDF parser</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>base URI or may be NULL if no base URI is required</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-parser-parse-start.returns"></a><h4>Returns</h4>
<p> non-0 on failure, <0 if a required base URI was missing</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-parse-uri"></a><h3>raptor_parser_parse_uri ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
raptor_parser_parse_uri (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>,
<em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *uri</code></em>,
<em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *base_uri</code></em>);</pre>
<p>Parse the RDF content at URI.</p>
<p>Sends an HTTP Accept: header whent the URI is of the HTTP protocol,
see <a class="link" href="raptor2-section-parser.html#raptor-parser-parse-uri-with-connection" title="raptor_parser_parse_uri_with_connection ()"><code class="function">raptor_parser_parse_uri_with_connection()</code></a> for details including
how the <em class="parameter"><code>base_uri</code></em>
is used.</p>
<div class="refsect3">
<a name="raptor-parser-parse-uri.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>rdf_parser</p></td>
<td class="parameter_description"><p>parser</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>URI of RDF content</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>base_uri</p></td>
<td class="parameter_description"><p>the base URI to use (or NULL if the same)</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-parser-parse-uri.returns"></a><h4>Returns</h4>
<p> non 0 on failure</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-parse-uri-with-connection"></a><h3>raptor_parser_parse_uri_with_connection ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
raptor_parser_parse_uri_with_connection
(<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>,
<em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *uri</code></em>,
<em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *base_uri</code></em>,
<em class="parameter"><code><span class="type">void</span> *connection</code></em>);</pre>
<p>Parse RDF content at URI using existing WWW connection.</p>
<p>If <em class="parameter"><code>base_uri</code></em>
is not given and during resolution of the URI, a
protocol redirection occurs, the final resolved URI will be
used as the base URI. If redirection does not occur, the
base URI will be <em class="parameter"><code>uri</code></em>
.</p>
<p>If <em class="parameter"><code>base_uri</code></em>
is given, it overrides the process above.</p>
<p>When <em class="parameter"><code>connection</code></em>
is NULL and a MIME Type exists for the parser
type, this type is sent in an HTTP Accept: header in the form
Accept: MIME-TYPE along with a wildcard of 0.1 quality, so MIME-TYPE is
prefered rather than the sole answer. The latter part may not be
necessary but should ensure an HTTP 200 response.</p>
<div class="refsect3">
<a name="raptor-parser-parse-uri-with-connection.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>rdf_parser</p></td>
<td class="parameter_description"><p>parser</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>URI of RDF content</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>base_uri</p></td>
<td class="parameter_description"><p>the base URI to use (or NULL if the same)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>connection</p></td>
<td class="parameter_description"><p>connection object pointer or NULL to create a new one</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-parser-parse-uri-with-connection.returns"></a><h4>Returns</h4>
<p> non 0 on failure</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-get-graph"></a><h3>raptor_parser_get_graph ()</h3>
<pre class="programlisting"><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="returnvalue">raptor_uri</span></a> *
raptor_parser_get_graph (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>);</pre>
<p>Get the current graph for the parser</p>
<p>The returned URI is owned by the caller and must be freed with
<a class="link" href="raptor2-section-uri.html#raptor-free-uri" title="raptor_free_uri ()"><code class="function">raptor_free_uri()</code></a></p>
<div class="refsect3">
<a name="raptor-parser-get-graph.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>rdf_parser</p></td>
<td class="parameter_description"><p>parser</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-parser-get-graph.returns"></a><h4>Returns</h4>
<p> raptor_uri* graph name or NULL for the default graph</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-get-name"></a><h3>raptor_parser_get_name ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
raptor_parser_get_name (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>);</pre>
<p>Get the name of a parser.</p>
<p>Use <a class="link" href="raptor2-section-parser.html#raptor-parser-get-description" title="raptor_parser_get_description ()"><code class="function">raptor_parser_get_description()</code></a> to get the alternate names and
aliases as well as other descriptive values.</p>
<div class="refsect3">
<a name="raptor-parser-get-name.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>rdf_parser</p></td>
<td class="parameter_description"><p><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> parser object</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-parser-get-name.returns"></a><h4>Returns</h4>
<p> the short name for the parser.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-set-option"></a><h3>raptor_parser_set_option ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
raptor_parser_set_option (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *parser</code></em>,
<em class="parameter"><code><a class="link" href="raptor2-section-option.html#raptor-option" title="enum raptor_option"><span class="type">raptor_option</span></a> option</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *string</code></em>,
<em class="parameter"><code><span class="type">int</span> integer</code></em>);</pre>
<p>Set parser option.</p>
<p>If <em class="parameter"><code>string</code></em>
is not NULL and the option type is numeric, the string
value is converted to an integer and used in preference to <em class="parameter"><code>integer</code></em>
.</p>
<p>If <em class="parameter"><code>string</code></em>
is NULL and the option type is not numeric, an error is
returned.</p>
<p>The <em class="parameter"><code>string</code></em>
values used are copied.</p>
<p>The allowed options are available via
<a class="link" href="raptor2-section-option.html#raptor-world-get-option-description" title="raptor_world_get_option_description ()"><code class="function">raptor_world_get_option_description()</code></a>.</p>
<div class="refsect3">
<a name="raptor-parser-set-option.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>parser</p></td>
<td class="parameter_description"><p><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> parser object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>option</p></td>
<td class="parameter_description"><p>option to set from enumerated <a class="link" href="raptor2-section-option.html#raptor-option" title="enum raptor_option"><span class="type">raptor_option</span></a> values</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>string</p></td>
<td class="parameter_description"><p>string option value (or NULL)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>integer</p></td>
<td class="parameter_description"><p>integer option value</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-parser-set-option.returns"></a><h4>Returns</h4>
<p> non 0 on failure or if the option is unknown</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-get-option"></a><h3>raptor_parser_get_option ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
raptor_parser_get_option (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *parser</code></em>,
<em class="parameter"><code><a class="link" href="raptor2-section-option.html#raptor-option" title="enum raptor_option"><span class="type">raptor_option</span></a> option</code></em>,
<em class="parameter"><code><span class="type">char</span> **string_p</code></em>,
<em class="parameter"><code><span class="type">int</span> *integer_p</code></em>);</pre>
<p>Get parser option.</p>
<p>Any string value returned in *<em class="parameter"><code>string_p</code></em>
is shared and must
be copied by the caller.</p>
<p>The allowed options are available via
<a class="link" href="raptor2-section-option.html#raptor-world-get-option-description" title="raptor_world_get_option_description ()"><code class="function">raptor_world_get_option_description()</code></a>.</p>
<div class="refsect3">
<a name="raptor-parser-get-option.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>parser</p></td>
<td class="parameter_description"><p><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> parser object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>option</p></td>
<td class="parameter_description"><p>option to get value</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>string_p</p></td>
<td class="parameter_description"><p>pointer to where to store string value</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>integer_p</p></td>
<td class="parameter_description"><p>pointer to where to store integer value</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-parser-get-option.returns"></a><h4>Returns</h4>
<p> option value or < 0 for an illegal option</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-get-accept-header"></a><h3>raptor_parser_get_accept_header ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
raptor_parser_get_accept_header (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>);</pre>
<p>Get an HTTP Accept value for the parser.</p>
<p>The returned string must be freed by the caller such as with
<a class="link" href="raptor2-section-memory.html#raptor-free-memory" title="raptor_free_memory ()"><code class="function">raptor_free_memory()</code></a>.</p>
<div class="refsect3">
<a name="raptor-parser-get-accept-header.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>rdf_parser</p></td>
<td class="parameter_description"><p>parser</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-parser-get-accept-header.returns"></a><h4>Returns</h4>
<p> a new Accept: header string or NULL on failure</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-set-uri-filter"></a><h3>raptor_parser_set_uri_filter ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
raptor_parser_set_uri_filter (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *parser</code></em>,
<em class="parameter"><code><a class="link" href="raptor2-section-www.html#raptor-uri-filter-func" title="raptor_uri_filter_func ()"><span class="type">raptor_uri_filter_func</span></a> filter</code></em>,
<em class="parameter"><code><span class="type">void</span> *user_data</code></em>);</pre>
<p>Set URI filter function for WWW retrieval.</p>
<div class="refsect3">
<a name="raptor-parser-set-uri-filter.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>parser</p></td>
<td class="parameter_description"><p>parser object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>filter</p></td>
<td class="parameter_description"><p>URI filter function</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>User data to pass to filter function</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-parser-get-world"></a><h3>raptor_parser_get_world ()</h3>
<pre class="programlisting"><a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="returnvalue">raptor_world</span></a> *
raptor_parser_get_world (<em class="parameter"><code><a class="link" href="raptor2-section-parser.html#raptor-parser" title="raptor_parser"><span class="type">raptor_parser</span></a> *rdf_parser</code></em>);</pre>
<p>Get the <a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="type">raptor_world</span></a> object associated with a parser.</p>
<div class="refsect3">
<a name="raptor-parser-get-world.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>rdf_parser</p></td>
<td class="parameter_description"><p>parser</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-parser-get-world.returns"></a><h4>Returns</h4>
<p> raptor_world* pointer</p>
</div>
</div>
</div>
<div class="refsect1">
<a name="raptor2-section-parser.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="raptor-parser"></a><h3>raptor_parser</h3>
<pre class="programlisting">raptor_parser* raptor_parser;
</pre>
<p>Raptor Parser class</p>
</div>
<hr>
<div class="refsect2">
<a name="raptor-graph-mark-flags"></a><h3>enum raptor_graph_mark_flags</h3>
<p>Graph mark handler bitmask flags</p>
<div class="refsect3">
<a name="raptor-graph-mark-flags.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="RAPTOR-GRAPH-MARK-START:CAPS"></a>RAPTOR_GRAPH_MARK_START</p></td>
<td class="enum_member_description">
<p>mark is start of graph (otherwise is end)</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="RAPTOR-GRAPH-MARK-DECLARED:CAPS"></a>RAPTOR_GRAPH_MARK_DECLARED</p></td>
<td class="enum_member_description">
<p>mark was declared in syntax rather than implict</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>
|