[redland-dev] Questions about example1.c

Dave Beckett dave.beckett at bristol.ac.uk
Tue May 27 11:47:12 BST 2003


On Tue, 27 May 2003 10:43:24 +0100
Paul Keogh <paul.keogh at anam.com> wrote:

> Hi,
> 
> I've been picking through example1.c with my debugger, learning
> about this library. I have a few questions, though, that the
> debugger can't answer.

example1.c is the simplest, example4.c is the most complete, testing
most of the api.

> * I understand the world/storage/model/parser sequence; but how
> does this work for multiple URIs ? This is important for me as
> I have about 50 UAProf documents I need to handle. Do I load all
> 50 into a single model ? or do I need to create one model per
> document and handle the models myself ?

Single model - I've not completed writing the aggregated model stuff.

> * If I can load more than one URI into the model, do I need to
> identify which document I want to query ?

That depends on what you want to do.  The document boundaries will be
lost once you load them all into one graph (redland model).  If you
load them with the correct base URI, you may still have a
relationship between the document URI and the RDF triples inside it.

You might benefit from the use of Redland contexts, which I've just
discovered aren't in a full example yet.  There is, however, some
test code at the end of librdf/rdf_model.c that might help.

Dave




More information about the redland-dev mailing list