Updated support for quads in RDF::Trine

Gregory Williams greg at evilfunhouse.com
Tue Jan 19 02:28:41 CET 2010


On Jan 18, 2010, at 5:52 PM, Kjetil Kjernsmo wrote:

>> I'm not sure about the variant
>> with no arguments: maybe it should instead follow the quad semantics?
>> Thoughts?
> 
> No. :-)
> 
> 
>> Again, I'm not sure if the no arguments variant should follow the quad
>> semantics. Thoughts?
> 
> Again, I haven't really seen any practical uses of this myself, so I don't 
> know.

You think mostly people want to view the data as triples and not quads when they call get_statements? That's clearly how it's been up to this point (just because that's how the code worked), but I'm less sure that that's how it *should* be going forward. Can you explain why you prefer the triples approach?


>> I've made these changes to RDF::Trine::Store::DBI and added a new
>> RDF::Trine::Store::Memory (that's based on pure-perl data structures
>> without the need for SQLite) that follows this API.
> 
> Great! Does temporary_storage use this now?

Yes, and I've also added a new temporary_model method to ::Model to avoid that extra step. Right now it's set up to switch over from the memory store to the sqlite store once a pre-set number of inserts occurs (the thought being that the memory store is preferable for small tasks, but the fact that it's temporary should limit it from handling very large graphs).

> Again, as above, I think this would simplify the code in RDF::RDFa::Parser, 
> so I'm +1.

Glad to hear. I'll be looking into how to simplify the parser APIs so that a parser that produces triples can be used to insert quads with a specific graph value (e.g. "insert triples from example.rdf into the model in the named graph <http://example/>").

.greg



More information about the Dev mailing list