[redland-dev] Re: [patch] Re: duplicates in model
Michael Stahl
Michael.Stahl at Sun.com
Fri May 9 16:10:51 BST 2008
Michael Stahl wrote:
> Lauri Aalto wrote:
>> 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"
>>
>> http://librdf.org/docs/api/redland-model.html#librdf-model-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.
>
> aha. so, why is this not documented at librdf_model_context_add_statement?
what does that sentence you quote actually want to say?
does it mean that you can add one statement to two distinct contexts, and
then have two statements in the model?
or does it mean that you can add one statement twice to the same context,
and then have two statements in that context?
if it does not mean the latter, then it _is_ a bug :)
either way, the documentation could be improved...
> and why are duplicate statements allowed in contexts, but not (directly)
> in models? that seems inconsistent to me.
> why would anybody want duplicate statements?
>
> also, i have just checked Sesame 2.0 (openrdf.org), which also has
> contexts, and does seem to eliminate duplicate statements added to
> contexts.
>
> i would welcome a bit of consistency across RDF repository
> implementations, given that i am currently implementing an abstraction
> layer for them...
>
> michael
--
"Formal methods will never have a significant impact until they can be
used by people that don't understand them." -- (attributed to) Tom Melham
More information about the redland-dev
mailing list