forked from dajobe/librdf
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ChangeLog.3
3268 lines (2239 loc) · 106 KB
/
ChangeLog.3
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
2002-12-28 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* Redland.i: Added model methods for add/remove/serialize contexts.
* examples/example4.c: Updated to test contexts (not enabled by
default) and print out context nodes of results (always, when they
are present).
* Redland.i, python/RDF.py, perl/lib/RDF/Redland/Stream.pm,
perl/lib/RDF/Redland/Iterator.pm,
java/org/librdf/redland/Stream.java,
java/org/librdf/redland/Iterator.java: Updated Stream, Iterator
classes with context methods returning a Node
* librdf/rdf_storage_list.c: All experimental group methods now
context. List now always stores a small struct instead of a
statement (less conditional code at a small overhead of
alloc/dealloc).
(librdf_storage_list_init): Use contexts on user option
("contexts").
(librdf_storage_list_node_equals): Added for comparing the list
node structs.
* librdf/rdf_storage_hashes.c: All experimental group methods now
context.
(librdf_storage_get_hash_description_by_name): Now used, returning
a librdf_hash_descriptor.
(librdf_storage_hashes_register): Added, for registering the
hashes more dynamically.
(librdf_storage_hashes_init_common): Use
librdf_storage_hashes_register to index predicates, contexts on
user option ("index-predicates", "contexts").
Use librdf_statement_encode_parts and
librdf_statement_decode_parts to de/en-code with context node if
necessary.
(librdf_storage_hashes_serialise*): Hold knowledge if current
deserialized statement is fresh and only do once on demand.
* librdf/rdf_model.c: All experimental group methods now context.
(librdf_model_print): Docs
(librdf_model_add_statements): Does not free stream at end of
work.
(main): Demo updated to use context+nodes (not group+uris)
* librdf/rdf_model.h, librdf/rdf_storage.c, librdf/rdf_storage.h:
All experimental group methods now context.
* librdf/rdf_stream.c (librdf_stream_print): Docs. Prints
contexts of statements if there are any.
* librdf/rdf_statement.c (librdf_statement_print): Docs
(librdf_statement_encode): Update for changed
librdf_statement_encode_parts.
(librdf_statement_encode_parts): Takes context node arg.
(librdf_statement_decode): Uses librdf_statement_decode_parts.
(librdf_statement_decode_parts): New, takes context node arg.
* librdf/rdf_statement.h: Prototype for
librdf_statement_decode_parts Statement ID, FLAGS parts gone (were
never used)
* librdf/rdf_node.c (librdf_node_print): Docs
2002-12-22 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* raptor/raptor_uri.c:
(main) Try test again with /etc - surely that is least likely to
be a symlink?
* raptor/tests/Makefile.am: check-bad-rdf: turn off bourne shell
exiting while running tests expected to fail.
* raptor/tests/Makefile.am: Set baseuri from test file basename;
ensure no dirs are in the base URI
* Makefile.am: Added acconfig.h to dist - some automake versions
don't do this automatically such as 1.4-p5 which comes with Redhat
7.3
* java/org/librdf/redland/Makefile.am, java/Makefile.am:
coreJNI.java is not for dist
* perl/test.pl: test.pl now t/*.t
* librdf/Makefile.am: No need for ex1.rdf ex2.rdf in deps
* librdf/Makefile.am, librdf/ex1.rdf, librdf/ex2.rdf: Remove test
files; generated from strings in rdf_model.c (main) when needed
* librdf/rdf_model.c (main): Create test files from string content
here rather than rely on ex1.rdf and ex2.rdf being present.
* librdf/rdf_parser_repat.c, librdf/rdf_parser_raptor.c: Don't
declare extern errno, the optional errno.h header does that.
* librdf/rdf_parser_repat.c, librdf/rdf_parser_raptor.c: Include
errno.h if present to get the write definition.
* configure.in: check for errno.h (again?)
* perl/Makefile.am: Fix for 5.8 install
2002-12-21 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* raptor/configure.ac: Removed just for now
2002-12-20 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* raptor/NEWS.html: tweak
* raptor/configure.in: Bumped version to 0.9.8
* raptor/NEWS.html: date
* raptor/raptor.spec.in: Updated for 0.9.7 release
2002-12-19 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* raptor/INSTALL.html, raptor/README.html, raptor/NEWS.html:
Updated for 0.9.7 release
* raptor/acconfig.h: Seems like PACKAGE and VERSION are not needed
here, and later autoconfs generate headers that moan.
* raptor/raptor_parse.c, raptor/raptor_general.c: castings
* raptor/raptor.h: Indent CPP directives after column 1 # for lame
C compiler
* raptor/tests/Makefile.am: test(1) string equality is = not ==
* docs/stylesheet.css: Remove some of the boxes in sidebar; turn
category header to white on blue.
2002-12-18 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* raptor/autogen.sh: Delete autom4te too
* raptor/configure.ac: auto-configure source for newer autoconfs
2002-12-16 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* raptor/raptor_uri.c (main): Use /bin to test, seems more likely
to be around on more posix systems such as OSX
* raptor/raptor_parse.c (raptor_generate_statement): Handle NULL
reified being passed.
(raptor_process_property_attributes): Property attributes are
never reified explicitly but may be in a bag.
(raptor_start_element_grammar,raptor_end_element_grammar): Turn
bad uses of bag:ID into errors not warnings.
* raptor/tests/Makefile.am: Added more bag:ID checks (44-45) and
errors (bad 05-09) Make test failures stop the 'make check'.
* raptor/tests/bad-05.rdf, raptor/tests/bad-06.rdf,
raptor/tests/bad-07.rdf, raptor/tests/bad-08.rdf,
raptor/tests/bad-09.rdf, raptor/tests/ex-48.rdf,
raptor/tests/ex-49.rdf, raptor/tests/ex-50.rdf,
raptor/tests/ex-46.rdf, raptor/tests/ex-47.rdf,
raptor/tests/ex-48.out, raptor/tests/ex-49.out,
raptor/tests/ex-50.out, raptor/tests/ex-46.out,
raptor/tests/ex-47.out: Turned rdf:bagID property element checks
into errors
* raptor/raptor_parse.c: Add rdf:bagID checks - only allow it in
the two cases it is in the grammar - on a node element and an
empty property element. Otherwise emit warnings since there is no
error test case yet.
* raptor/tests/ex-50.out, raptor/tests/ex-50.rdf,
raptor/tests/ex-44.out, raptor/tests/ex-45.out,
raptor/tests/ex-46.out, raptor/tests/ex-47.out,
raptor/tests/ex-48.out, raptor/tests/ex-49.out,
raptor/tests/ex-44.rdf, raptor/tests/ex-45.rdf,
raptor/tests/ex-46.rdf, raptor/tests/ex-47.rdf,
raptor/tests/ex-48.rdf, raptor/tests/ex-49.rdf: Checking rdf:bagID
ignored on other property element cases
* raptor/raptor_parse.c (raptor_generate_statement): Handles
generating a reified statement ID for use with bagID and then
reiifying the statement too.
* raptor/tests/Makefile.am: Add ex-43
* raptor/tests/ex-43.out, raptor/tests/ex-43.rdf: Test rdf:bagID
when property elements need generated reified ID
* raptor/raptor_parse.c (raptor_generate_statement): Gain
bag_element argument, use it throughout to indicate the element to
find the rdf:bagID if any.
(raptor_start_element_grammar): Generate _:bagid rdf:type rdf:Bag
when rdf:bagID appears on node element.
* raptor/tests/ex-42.out: Correct for actual output order
2002-12-15 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* raptor/tests/ex-03.rdf, raptor/tests/ex-03.out: correct this now
that rdf:bagID support begins to work
* raptor/tests/Makefile.am: Added ex-42
* raptor/tests/ex-42.out, raptor/tests/ex-42.rdf: rdf:bagID
* raptor/tests/bad-04.rdf: Check rdf:ID and rdf:bagID with same
value fails
* raptor/tests/bad-02.rdf: Duplicate rdf:ID names
* raptor/raptor_parse.c: Make debug less chatty about cdata,
unless RAPTOR_DEBUG_CDATA defined.
* raptor/raptor_parse.c (raptor_record_ID): Added, notes rdf:ID
and rdf:bagID values, checks for duplicates (per in-scope
base-URI).
(raptor_free_ID_list): Added, frees structure above.
(raptor_xml_start_element_handler): Handle xml:base using
raptor_new_uri_for_xmlbase to strip/fix parts that aren't used.
(raptor_start_element_grammar): Check for illegal rdf:ID,
rdf:bagID and rdf:nodeID using raptor_valid_xml_ID. Check for
duplicate rdf:ID and rdf:bagID values using raptor_record_ID.
Only allow parsetype "Literal", "Resource" and "Collection", not
case-equivalents. Check for and forbid property attributes on a
literal property elemnent.
* raptor/Makefile.am: Added raptor_utf8.c
* raptor/raptor_internal.h: Export less from raptor_utf8.c
* raptor/raptor_general.c (raptor_valid_xml_ID): Use
raptor_unicode_is_namestartchar and raptor_unicode_is_namechar.
* raptor/raptor_utf8.c: Raptor UTF-8 and Unicode support
* raptor/tests/bad-03.rdf: Check rdf:ID and rdf:bagID values
* raptor/tests/Makefile.am: Added bad-02 to bad-04
* raptor/raptor_uri.c (raptor_uri_construct): Internal; constructs
a uri-ref string from the parts.
(raptor_new_uri_for_xmlbase): Ad
(raptor_uri_resolve_uri_reference): Copy reference path across
when reference URI has one. Work for path components that are >1
letter long.
(raptor_new_uri_for_xmlbase): Added, makes a new uri from an
existing one, suitable for xml:base (no fragment, query; path must
be present).
(main): Make test cases use example.org. Add checks for the above
bugs.
* raptor/raptor.h: Added prototype for raptor_new_uri_for_xmlbase
* raptor/ntriples_parse.c: raptor_ntriples_unicode_char_to_utf8
now raptor_unicode_char_to_utf8
raptor_ntriples_utf8_to_unicode_char now
raptor_unicode_utf8_to_unicode_char
(raptor_print_ntriples_string): Allow no delimiter.
* raptor/raptor_internal.h: Added prototypes for
raptor_valid_xml_ID Added prototypes for raptor_unicode_is_*
methods. The ntriples_* utf8/unicode methods are now
raptor_unicode_*
* raptor/raptor_general.c (raptor_print_statement_as_ntriples):
N-Triples escape URIs (for IRI compatibility).
(raptor_validate_xml_ID): Added, checks that the syntax of
attributes matching xml:ID are correct matching
http://www.w3.org/TR/REC-xml-names/#NT-NCName
* raptor/rdfdump.c: Exit 1 on error, 2 on warnings.
* raptor/README.html: Words
2002-12-13 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* raptor/tests/ex-41.rdf, raptor/tests/ex-41.out: Add rdf:datatype
test with xml:lang
* raptor/raptor_parse.c: Don't care state about numbers
* raptor/raptor_parse.c (raptor_xml_end_element_handler): Don't
check for unbalanced XML; the XML parsers do that
* raptor/raptor_parse.c: Update parser states to match
http://www.w3.org/TR/rdf-syntax-grammar/ names. Fix comments to
also match. rdf_syntax_terms_info - added to describe forbidden
nodeEl, propEl, propAttr
(raptor_forbidden_nodeElement_name,
raptor_forbidden_propertyElement_name): Added, using above
* raptor/rdfdump.c: Exit with code 2 if there were warnings.
* raptor/raptor_parse.c: Zap xml:lang attr
2002-12-12 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* java/Makefile.am: die, extra ;
* php/Makefile.am: _ not -
* perl/lib/RDF/Redland.pm (DESTROY): call librdf_perl_world_finish
at exit.
* php/Makefile.am: Tidy clean
* docs/php.html: Updated for current state (not working yet).
* php/test.php, php/Makefile.am: PHP updates. Still not working yet.
* php/php.ini: testing php.ini config
* docs/ruby.html, docs/tcl.html: Updated, tested
* tcl/example.tcl: fix stream typo
* tcl/test.tcl: comment out non-working serializer test
* python/example.py: fix arg
* python/example.py: Added serializer code
* docs/python.html: updated example output
* tcl/Makefile.am: tidy clean
* python/RDF.py: consistency things
* python/RDF.py: Added yet more pydoc
* python/RDF.py: Added more pydoc
* docs/python.html: Reference, link ot pydoc/RDF.html
* docs/fix-python-xhtml: Fix exceptions.html
* docs/Makefile.am: Added pydoc and pydoc/RDF.html
* docs/fix-python-xhtml: Fix pydoc output to be xhtml
* docs/fix-pod-xhtml: minor changes
* docs/python.html: Added RDFLib.net
* python/example.py: Fixed for stream updates
* docs/python.html: Added Serializer class
* docs/perl.html: moved serializer around
* docs/perl.html: Updated example output
* docs/perl.html: Added Serializer class
* docs/Makefile.am: Added perl POD Serializer
* perl/example.pl: Tidy, add serializer example.
* perl/Makefile.am: clean test-out.rdf
* librdf/rdf_storage_hashes.c (librdf_storage_hashes_find_map):
Don't free filtered shared statement, just return NULL.
* docs/java.html: Updated.
Added Serializer.
* java/Makefile.am: More javac fixes
* java/example.java: Tidy up
* java/Makefile.am:
Build redland-java.jar for tests and -classpath to use it.
* java/test2.java:
Replaced finalize() method with finished() that apps should call
to release resources since Java never guarantees it is.
* java/skeleton.java: Added Serializer
* java/org/librdf/redland/World.java,
java/org/librdf/redland/URI.java,
java/org/librdf/redland/Stream.java,
java/org/librdf/redland/Storage.java,
java/org/librdf/redland/Statement.java,
java/org/librdf/redland/Serializer.java,
java/org/librdf/redland/Parser.java,
java/org/librdf/redland/Node.java,
java/org/librdf/redland/Model.java,
java/org/librdf/redland/Iterator.java: Replaced finalize() method
with finished() that apps should call to release resources since
Java never guarantees it is.
* java/test1.java: free uri after finishing with it
* java/Makefile.am:
Added lots of bodges to get around SWIG 1.3.15+ broken Java API.
sed editing of the generated files to remove the stupid coreJNI
class.
* java/org/librdf/redland/Model.java (add - literal):
Use librdf_model_add_typed_literal_statement
* java/org/librdf/redland/Stream.java: Updated for stream changes
* java/org/librdf/redland/Iterator.java: Updated for iterator changes
2002-12-11 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* python/RDF.py:
Big update, lots of new docucomments, encouraged by pydoc.
* python/Makefile.am:
Added build target for RDF.html; should work if pydoc is around.
* perl/lib/RDF/Redland/Model.pm (add_typed_literal_statement):
Replacing add_string_literal_statement.
* perl/Makefile.am: test.pl now in t/* tests dir.
* configure.in: Added perl/t dir
* Redland.i: Added librdf_model_add_typed_literal_statement
to replace librdf_model_add_string_literal_statement
* librdf/rdf_model.h, librdf/rdf_model.c:
Added librdf_model_add_typed_literal_statement
* perl/lib/RDF/Redland/Node.pm: Updated node types
* python/test/test.py: add some more output messages
* python/Makefile.am: tidy cleanfiles
* Redland.i:
Discovered the %newobject directive; use it to free() returned
malloc() memory from the *_to_string methods.
* perl/t/test1.t: Test updates, fixes.
* perl/t/Makefile.am, perl/t/test1.t, perl/t/test2.t, perl/t/test3.t:
perl test ftest.pl split into t/test1-3.t
2002-12-10 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* python/test/test.py: test Serializer class
* python/Makefile.am: Add clean for serializer output
* python/RDF.py: Serializer class fix
* raptor/configure.in: Added raptor-config
* redland-src-config.in: Call raptor/raptor-src-config
* raptor/Makefile.am: Added raptor-src-config
* raptor/raptor-src-config.in: raptor-src-config source
* librdf/rdf_storage_hashes.c
(librdf_storage_hashes_serialise_get_statement): Clear shared
statement in context before decoding into it.
(librdf_storage_hashes_node_iterator_get_method): Clear appropriate
node/nodes of shared statement before decoding into it.
For p2so case, use statement2 in context as shared statement result.
(librdf_storage_hashes_node_iterator_finished): Tidy up shared
statements or predicate from p2so statement2.
(librdf_storage_hashes_node_iterator_create) Copy query nodes,
initialise statement2 for p2so case.
(librdf_storage_hashes_group_serialise_get_statement): Clear shared
statement before decoding into it.
* configure.in, acconfig.h, librdf/rdf_hash.c,
librdf/rdf_hash_gdbm.c, librdf/rdf_hash_gdbm.h,
librdf/Makefile.am: GDBM dead
* examples/example1.c: Revert to memory storage for test
* examples/example4.c: Do free statements added, used in queries.
Don't free nodes returned from sources/targets/arcs
* librdf/rdf_storage_list.c
(librdf_storage_list_group_serialise_get_statement):
clear statement of any previous nodes before overwriting.
* librdf/rdf_statement.c (librdf_statement_decode):
Revert freeing overwritten nodes; some
code relies on this for shared nodes. Use librdf_statement_clear
before to ensure this.
* librdf/rdf_storage_list.c:
Use librdf_stream_map_free_context_handler for calling
librdf_stream_set_map
* librdf/rdf_stream.h:
Added librdf_stream_map_free_context_handler typedef
* librdf/rdf_serializer.h:
Added librdf_serializer_serialize_model_to_file
* librdf/rdf_storage_hashes.c (librdf_storage_hashes_init_common):
Added 'index-predicates=<boolean>'
config to turn on p2so index.
(librdf_storage_get_hash_description_by_name): Comment out, unused for
now.
* examples/example1.c (main): Free added statement
* examples/example1.c (main):
Don't free shared node returned by iterator
* librdf/rdf_storage_list.c (librdf_storage_list_find_map):
Don't free statement on discard, just
return NULL.
* java/org/librdf/redland/Makefile.am: Added Serializer.java
* java/org/librdf/redland/Serializer.java: Java Serializer class
* python/RDF.py: Added Serializer class (not tested)
* perl/lib/RDF/Redland/Serializer.pm:
call librdf_serializer_serialize_model_to_file properly
* python/RDF.py:
When building sequences from iterated nodes, copy them.
* perl/lib/RDF/Redland/Serializer.pm:
method serialize_model now serialize_model_to_file
* Redland.i:
Replaced librdf_serializer_serialize_model with more suitable method
librdf_serializer_serialize_model_to_file
* librdf/rdf_serializer.c (librdf_serializer_serialize_model_to_file):
Added - more suitable for
calling from other langs than something with a FILE* arg.
* librdf/PrintConsumer.java, librdf/PrintParser.java:
Removed java wrapper parsers
* librdf/rdf_parser.h, librdf/rdf_parser.c, librdf/Makefile.am,
docs/api.sgml.in, docs/Makefile.am, configure.in, acconfig.h:
Deleted old parsers: libwww, java sirpac-stanford, java sirpac-w3c
* librdf/rdf_query.h: Include rdf_query_triples.h internally
* librdf/rdf_node.h: Added librdf_node_static_iterator_create
* librdf/rdf_hash.c: doc fix
* librdf/Makefile.am: added rdf_stream_test rdf_iterator_test
* librdf/rdf_stream.c (librdf_stream_from_node_iterator*): Changed
implementation; copy the prototype statement, ensuring no problems
if it goes away.
(main): Added, testing librdf_new_stream_from_node_iterator using
librdf_node_static_iterator_create to make a simple node iterator.
* librdf/rdf_iterator.c (main): Added, testing general iterator
features using librdf_node_static_iterator_create
* librdf/rdf_node.c (librdf_node_static_iterator_is_end,
librdf_node_static_iterator_next_method,
librdf_node_static_iterator_get_method,
librdf_node_static_iterator_finished,
librdf_node_static_iterator_create): Added, to create an iterator
over a static array of nodes. Mostly intended for testing
iterator code.
(main): style tweaks.
* librdf/rdf_storage_hashes.c
(librdf_storage_hashes_find_statements): Copy the passed in
statement and use librdf_stream_set_map free map context argument
to free it when the stream is closed.
* librdf/rdf_storage_list.c (librdf_storage_list_find_statements):
Copy the passed in statement and use librdf_stream_set_map free
map context argument to free it when the stream is closed.
* librdf/rdf_stream.c (librdf_free_stream): Use free map context
method if present argument
(librdf_stream_set_map): Added a free map context method argument
* librdf/rdf_stream.h: librdf_stream_set_map gains a free context
method argument
2002-12-09 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* perl/lib/RDF/Redland/RSS.pm (properties_with_ns_prefix): Updated
pod
* librdf/rdf_statement.c (librdf_statement_init): Zap s,p,o
pointers
(librdf_statement_set_subject, librdf_statement_set_predicate,
librdf_statement_set_object): Revert; don't free old pointers,
some code is using this to update shared pointers.
* librdf/rdf_hash.c (librdf_hash_keys_iterator_get_method): Return
something for the GET_OBJECT method, so that
librdf_iterator_update_current_element works OK
* Redland.i: Add some prototypes.
* librdf/rdf_statement.h, librdf/rdf_statement.c,
librdf/rdf_node.h, librdf/rdf_node.c, librdf/librdf.h:
librdf_statement is no longer a type of librdf_node. This
implementation issue was never visible or used in the public API.
* librdf/rdf_statement.c:
(librdf_statement_set_subject, librdf_statement_set_predicate,
librdf_statement_set_object): Free any existing node before setting.
* perl/serialize.pl: More playing, still incomplete.
2002-12-08 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* librdf/rdf_storage_hashes.c
(librdf_storage_hashes_add_remove_statement): Remove
librdf_free_statement from here; wrong place.
(librdf_storage_hashes_add_statements): Do not statement copy
before add_statement method.
* librdf/rdf_storage_hashes.c
(librdf_storage_hashes_serialise_finished): Clear static
statement.
* librdf/rdf_storage_hashes.c
(librdf_storage_hashes_add_remove_statement): Free passed in
statement
2002-12-04 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* librdf/rdf_storage_list.c:
(librdf_storage_list_group_serialise_finished) Use
librdf_statement_clear to empty static statment.
* librdf/rdf_statement.c (librdf_statement_clear): Added, for
clearing static statements of nodes.
(librdf_statement_decode): Check/remove existing nodes before
overwriting them.
* librdf/rdf_statement.h: Added librdf_statement_clear
* raptor/raptor_parse.c (raptor_xml_start_element_handler): Save
away the element attributes in an allocated array, restore the
pointers later. This allows the XML parser to free them
correctly.
(raptor_xml_end_element_handler): Call raptor_free_qname again to
tidy up.
(raptor_init_parser_rdfxml): Initialise libxml2 explicitly
(raptor_terminate_parser_rdfxml): Added, cleaning up libxml2.
* raptor/raptor_libxml.c (raptor_libxml_endDocument): free the
libxml2 Doc that is created but never freed by the SAX methods.
* raptor/raptor_internal.h, raptor/raptor_general.c: Added
raptor_terminate_parser_rdfxml() for closing rdfxml parser
factory.
* librdf/rdf_stream.c, librdf/rdf_iterator.c: Use is_finished and
current fields to track when finished/empty. Rename
iterator/stream *get_next_mapped* to *update_current*
element/statement
* librdf/rdf_storage.c
(librdf_storage_stream_to_node_iterator_get_method): Do not touch
fields in shared statement from stream.
* librdf/rdf_statement.c: Fix comment.
* librdf/rdf_storage_list.c
(librdf_storage_list_group_serialise_get_statement): Use iterator
(hash) value to decode context correctly.
* librdf/rdf_hash.c (librdf_hash_get_all_iterator_get_method):
Return something for get_object to enable general iterator to work
2002-12-03 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* raptor/raptor_libxml.c
(raptor_libxml_internalSubset,raptor_libxml_externalSubset): No
return value.
* raptor/raptor.h: Update prototype for unsigned char arg.
* raptor/raptor_parse.c: Yet more casts, for expat XML_Char as
char*
* raptor/raptor_uri.c (raptor_free_uri): There is no return value
* raptor/raptor_uri.c, raptor/raptor_qname.c,
raptor/raptor_parse.c, raptor/raptor_namespace.c,
raptor/raptor_general.c, raptor/raptor.h, raptor/ntriples_parse.c:
More unsigned char to char fixes, other castings enough to make
g++ happy.
* raptor/raptor_parse.c, raptor/raptor_qname.c,
raptor/raptor_namespace.c, raptor/raptor_general.c,
raptor/raptor_internal.h: Use unsigned char for UTF-8 strings
rather than char (That means all XML names, content, buffers)
* raptor/raptor_parse.c:
Delete HAVE_XML_SetNamespaceDeclHandler - never used
Don't merge expat XML_Char (char) and libxml2 xmlChar (unsigned char).
Work with unsigned char always.
* raptor/raptor_internal.h:
Don't merge expat XML_Char (char) and libxml2 xmlChar (unsigned char).
Work with unsigned char always.
* raptor/configure.in, raptor/acconfig.h:
Delete HAVE_XML_SetNamespaceDeclHandler - never used
* raptor/raptor_parse.c (raptor_element_has_property_attributes):
Unused rdf_parser arg
zapped.
* raptor/raptor_parse.c (raptor_xml_parse_chunk_):
Don't assign a negative number to size_t
len, it is probably unsigned.
* raptor/raptor_parse.c (raptor_free_element):
Use raptor_free_uri on datatype URI
* raptor/raptor_parse.c, raptor/raptor.h:
Removed trailing ','s in enums
2002-12-02 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* librdf/rdf_utf8.c:
Updates for Unicode 3.2 UTF-8 encoding; forbid ranges and encodings
that aren't used or allowed.
* raptor/ntriples_parse.c (raptor_ntriples_string): sscanf format lx
2002-11-27 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* raptor/INSTALL.html:
Now works with old libxml 2.3.5 (released 2001-03-23)
* raptor/raptor_libxml.c (raptor_libxml_init):
Use RAPTOR_LIBXML_XMLSAXHANDLER_INITIALIZED
to see if libxml xmlSAXHandler has an initialized field
* raptor/configure.in: Check libxml xmlSAXHandler has initialized
field defining RAPTOR_LIBXML_XMLSAXHANDLER_INITIALIZED if so
* raptor/acconfig.h: Added RAPTOR_LIBXML_XMLSAXHANDLER_INITIALIZED
* raptor/INSTALL.html: Updated supported versions
2002-11-26 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* librdf/rdf_utf8.c, librdf/rdf_uri.c, librdf/rdf_stream.c,
librdf/rdf_storage_list.c, librdf/rdf_storage_hashes.c,
librdf/rdf_storage.c, librdf/rdf_statement.c,
librdf/rdf_serializer_rdfxml.c, librdf/rdf_serializer_raptor.c,
librdf/rdf_serializer.c, librdf/rdf_query_triples.c,
librdf/rdf_query.c, librdf/rdf_parser_sirpac.c,
librdf/rdf_parser_repat.c, librdf/rdf_parser_raptor.c,
librdf/rdf_parser_libwww.c, librdf/rdf_parser.c,
librdf/rdf_node.c, librdf/rdf_model.c, librdf/rdf_memory.c,
librdf/rdf_list.c, librdf/rdf_iterator.c, librdf/rdf_init.c,
librdf/librdf.h, configure.in, raptor/win32_config.h,
raptor/configure.in, raptor/rdfdump.c, raptor/raptor_uri.c,
raptor/raptor_parse.c, raptor/raptor_libxml.c,
raptor/raptor_general.c, raptor/ntriples_parse.c:
stdarg.h is now a required header.
* raptor/configure.in, configure.in:
Added --with-xml2-config to set location of libxml xml2-config program.
* librdf/rdf_serializer_rdfxml.c: Fix broken comment
* librdf/rdf_serializer_rdfxml.c: Documentation. Added some.
(rdf_serializer_rdfxml_ok_xml_name): Correct the check.
2002-11-25 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* librdf/rdf_serializer.h: Added librdf_serializer_rdfxml_constructor
* librdf/rdf_serializer.c: Use librdf_serializer_rdfxml_constructor
* librdf/rdf_serializer_rdfxml.c: s/stream/handle/ for file handles
(rdf_serializer_rdfxml_print_as_xml_content): Added to print
XML-escaped element content
(rdf_serializer_rdfxml_print_as_xml_attribute): Added to print
XML-escaped attribute content
(rdf_serializer_rdfxml_print_xml_attribute): Added to print attribute
plus escaped content.
(librdf_serializer_print_statement_as_rdfxml): Use above to properly
handle attributes and element content.
* librdf/Makefile.am: Added rdf_serializer_rdfxml.c
* librdf/rdf_serializer_rdfxml.c: Dumb RDF/XML Serializer
* INSTALL.html: Tested with BDB 4.1.24
* acconfig.h, configure.in, librdf/rdf_hash_bdb.c (librdf_hash_bdb_open):
Updated to handle BDB V4.1 DB->open which now
has 7 arguments.
2002-11-24 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* raptor/raptor_parse.c (raptor_xml_start_element_handler): Don't free
raptor_free_qname(element_name) here, raptor_free_element does it.
* perl/lib/Makefile.am, perl/lib/RDF.pm: RDF.pm removed as promised
2002-11-21 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* librdf/rdf_parser_libwww.c: parse into model always works
* librdf/rdf_parser_libwww.c: Updated for stream method changes.
* ruby/example.rb, tcl/test.tcl, tcl/example.tcl,
python/test/test.py, python/example.py, python/RDF.py,
perl/lib/RDF/Redland/Stream.pm, perl/lib/RDF/Redland/Model.pm,
perl/lib/RDF/Redland/Iterator.pm: Updated for stream and iterator
method changes.
* perl/test.pl, perl/serialize.pl, perl/example.pl,
examples/example4.c, examples/example1.c: Updated for stream
method changes.
* Redland.i: Updated for stream method changes.
Added librdf_node_set_typed_literal_value
Added librdf_stream_get_object, split from librdf_stream_next
* librdf/rdf_parser_repat.c: Updated for stream method changes.
* librdf/rdf_parser_raptor.c: Updated for stream method changes.
(librdf_parser_raptor_get_next_statement): Call Raptor using new
raptor_parse_chunk API allowing better handling of large content.
(librdf_parser_raptor_destructor): Added, to tidy up raptor on module
close.
* librdf/rdf_storage_list.c, librdf/rdf_storage_hashes.c,
librdf/rdf_storage.h, librdf/rdf_storage.c: Updated for stream
method changes.
* librdf/rdf_parser.h: Added librdf_parser_raptor_destructor
* librdf/rdf_parser.c (librdf_finish_parser):
Call librdf_parser_raptor_destructor on
module close.
* librdf/rdf_serializer_raptor.c
(librdf_serializer_print_statement_as_ntriple):
Updated for N-Triples
language changes, XML Literal
(librdf_serializer_raptor_serialize_model): Updated for stream method
changes.
* librdf/rdf_serializer.c (librdf_get_serializer_factory):
Fix call to librdf_uri_equals.
* librdf/rdf_model.c: (librdf_model_add_statements_group,
librdf_model_remove_statements_group) Updated for stream method
changes.
* librdf/rdf_stream.c:
Stream changed to more cursor-like, matching Iterator class.
(librdf_new_stream): Updated args - next_method and get_method
(librdf_free_stream): Updated for renamed method.
(librdf_stream_get_next_mapped_statement,
librdf_stream_end,librdf_stream_next): Updated for new methods.
(librdf_stream_get_object): Added
(librdf_stream_get_context): Added
(librdf_new_stream_from_node_iterator,
librdf_stream_from_node_iterator_next_statement,
librdf_stream_from_node_iterator_get_statement): Added / updated for
stream changes. Use a static statement instead of creating new ones
on each call.
(librdf_stream_print): Updated for stream method changes.
* librdf/rdf_stream.h:
Stream changed to more cursor-like, matching Iterator class.
Split get_next method into get/next methods.
Added librdf_stream_get_object, librdf_stream_get_context
* librdf/rdf_iterator.h:
iterator structure - is_end now is_end_method, finished now
finished_method
* librdf/rdf_iterator.c (librdf_new_iterator,librdf_free_iterator):
Parameter and structure
renamings; use is_end_method instead of is_end
* librdf/rdf_uri.c (librdf_uri_equals):
Added defensive check, any NULL parameters is
failure.
* librdf/rdf_statement.c (librdf_statement_init):
Added stronger usage instructions.
* librdf/rdf_concepts.h, librdf/rdf_concepts.c: Added rdf:XMLLiteral
* librdf/rdf_node.h:
Remove is_wf_xml field, add datatype URI field to node structure
Added prototypes for:
librdf_new_node_from_typed_literal,
librdf_node_get_literal_value_datatype_uri,
librdf_node_set_typed_literal_value
* librdf/rdf_node.c (librdf_node_set_typed_literal_value): Added
(librdf_new_node_from_typed_literal): Added
(librdf_node_get_literal_value_datatype_uri): Added
Remove is_wf_xml field, add datatype URI field to node structure
(librdf_node_equals): Updated for datatypes
(librdf_node_encode, librdf_node_decode): Added datatyped node
encoding 'M'.
* raptor/configure.in:
Make it use expat sources if this is part of Redland, ../expat dir
exists and there is no installed expat system library
* raptor/raptor_parse.c (raptor_xml_parse_chunk_):
Only use the libxml2 bug workaround for small
buffers for libxml2 versions lower than 2.4.25
* raptor/tests/Makefile.am:
Report error status from standard rdf/xml tests, even if the answer
was correct.
* raptor/tests/ex-03.rdf: Remove aboutEach* and bare bagID
2002-11-20 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* php/test.php, php/example.php: Do nothing
* php/Makefile.am:
Run test (does nothing so far apart from import Redland)
* docs/php.html: typo
* docs/Makefile.am: Added php.html (no API in release though)
* docs/php.html: PHP API doc
2002-11-19 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* raptor/tests/test.out, raptor/tests/test.nt,
raptor/tests/ex-11.out, raptor/tests/ex-07.out,
raptor/raptor_parse.c, raptor/raptor_general.c,
raptor/ntriples_parse.c:
rdfs:XMLLiteral now rdf:XMLLiteral
Add rdf:nil to allowed rdf namespace terms
* raptor/raptor_parse.c: More error/warnings rewordings
* raptor/raptor_parse.c:
Remove M&S from some comments, messages. Use RDF namespace.
* raptor/raptor_parse.c:
Improve warning about multiple object nodes for a property element.
2002-11-12 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* perl/lib/RDF/Redland/RSS.pm (inchannel):
Delete; never part of RSS 1.0
2002-11-11 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* perl/lib/RDF/Makefile.am, perl/lib/RDF/Stream.pm,
perl/lib/RDF/URI.pm, perl/lib/RDF/Model.pm, perl/lib/RDF/Node.pm,
perl/lib/RDF/Parser.pm, perl/lib/RDF/RSS.pm,
perl/lib/RDF/Statement.pm, perl/lib/RDF/Storage.pm,
perl/lib/RDF/Iterator.pm:
Removed old perl namespaced modules
* Redland.i: Removed duplicate and clashing extern declarations.
2002-11-07 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* raptor/tests/test.out: typo
* raptor/tests/test.nt:
Remove xml"foo" tests, replacing with "foo"<...> form.
2002-11-06 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* raptor/tests/test.out, raptor/tests/ex-11.out,
raptor/tests/ex-07.out:
Remove xml"foo" tests, replacing with "foo"<...> form.
* raptor/raptor_general.c: Remove xml"foo" (stage 1).
(raptor_print_statement_detailed): Output this as a datatyped literal.
(raptor_print_statement_as_ntriples): Output the "foo"<..> datatype
N-Triples form.
* raptor/ntriples_parse.c:
Remove xml"foo" (stage 1). Parsing it works but gives an error.
Never output.
(raptor_ntriples_generate_statement): Output "foo"<...> for xml
literal. Remove is_xml argument.
(raptor_ntriples_parse_line): For XML literal (old xml"foo"), parse,
give an error and emit it in the datatype form.