[redland-dev] Dynamic model creation

Kieron Taylor krt1 at soton.ac.uk
Tue Nov 27 12:55:04 GMT 2007


Apologies if this is something blindingly obvious, but the API 
documentation has proved unable to solve my problem.

I am looking to create a number of models within one storage object in 
order to keep several sets of RDF compartmentalised while making them 
all available to one general query later on.

Fine you say, do:

$model_1 = new Model
$model_2 = new Model
etc.

However, I don't know how many models I'm going to need, and I want to 
pick and choose between them later on.

I would like to be able to name each model within Redland, but I cannot 
see any part of the Model constructor that allows this. I don't want to 
use a base_uri, as that would stop me combining knowledge about one 
thing from two sources.

The only way I can think of proceeding is to use a dynamic array of 
pointers to each of my models, but in my opinion this will be an ugly 
solution that would not last beyond the end of the session.

Can anyone suggest a solution, or piece of Semantic Web doctrine that I 
am misunderstanding?

Thanks,

Kieron




More information about the redland-dev mailing list