[redland-dev] [patch] Re: duplicates in model
laalto at gmail.com
Mon May 5 10:28:56 BST 2008
2008/4/28 Michael Stahl <Michael.Stahl at sun.com>:
> so, it seems that librdf_storage_FOO_context_add_statement functions do not
> check for duplicates; methinks they should.
According to the documentation, they shouldn't:
"Duplicate statements can be added when used with Redland Contexts
such as with librdf_model_context_add_statement"
So I'd say it's a feature and not a bug. Of course, features can be
changed too if there's a reason to do so.
> this is with "rdfxml" serializer. (interestingly, the "rdfxml-abbrev" serializer eliminates the duplicates)
That's how the serializers work. Some such as "rdfxml" produce output
one statement at a time and do not keep track of which statements they
have seen. Abbreviating serializers build an internal representation
of the entire graph being serialized and produce output only until all
statements have been seen. Serializers work on triples level and not
quads with context. Therefore building the internal representation
also eliminates duplicates.
More information about the redland-dev