On Jan 28, 2008 4:39 AM, Vincent Carey 525-2265 <[EMAIL PROTECTED]> wrote: > the closest thing i see in the API doc is librdf_model_add_submodel, > but it is not clear what a submodel is. my expectation is that > after the addition, the model added is a submodel of the result of > the addition, but before the addition we simply have two models.
Reading the source, it seems that submodels are just a list of librdf_model objects owned by another librdf_model. As of now, they are not usable or useful for anything other than having the submodels be automatically freed when freeing the main model. > the API doc indicates that this is not tested. is it best at this > time just to add statements from one model to another through iteration? For performance reasons, I'd let it iterate on the lowest level possible. Get a statement stream of the source model with librdf_model_as_stream() and use librdf_model_add_statements() to add the statement stream to the destionation model. This way the underlying storage module can optimize for batch addition of statements. Lauri _______________________________________________ redland-dev mailing list [email protected] http://lists.librdf.org/mailman/listinfo/redland-dev
