[redland-dev] triples with context
Dave Beckett
dave at dajobe.org
Fri Oct 14 04:01:57 BST 2005
Eyal Oren wrote:
> Hi,
>
> I am using triples with context (each triple has a context denoting its
> provenance). That works. I need to persistently store/retrieve them.
> Serialising them to xml or ntriples means losing the context, so that is
> no option.
Yes. redland (via raptor) provides no serialised forms that record
redland contexts in a syntax.
> Therefore I'm trying to use a hash_store (without serialising to
> ntriples or xml). First run: I create a model with a hash store and add
> some triples to it. Second run, I read from the earlier hash store, but
> if I associate a model with that hash_store it is empty.
That's strange. As long as you open the second store with model options
contexts='yes', it should find the contexts. You pretty much have to
have the identical storage options for re/opening a model. However
what you say suggest you have option new='yes' which will zero any
existing model on opening.
> Is what I want possible: persistently storing triples without
> serialising them? Or some other way of persistently storing triples
> with context?
It is possible.
If the storage options aren't the problem, maybe you can provide a
minimal test case that demonstrates it with a triple or two.
Dave
More information about the redland-dev
mailing list