From 5f936c270bb8f8e449a7ca2daf50c164910339b8 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 1 May 2007 04:01:04 +0000 Subject: Converted Raul (and thus Ingen and Machina) to use Redland over Raptor/Rasqal independently. Fixed patch loading for Ingen (local only, still something wrong with remote...). git-svn-id: http://svn.drobilla.net/lad/slv2@486 a436a847-0d15-0410-975c-d299462d15a1 --- src/world.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src') diff --git a/src/world.c b/src/world.c index 556ccf4..dab7532 100644 --- a/src/world.c +++ b/src/world.c @@ -57,6 +57,33 @@ slv2_world_new() } +SLV2World +slv2_world_new_using_rdf_world(librdf_world* rdf_world) +{ + struct _World* world = (struct _World*)malloc(sizeof(struct _World)); + + world->world = rdf_world; + + world->storage = librdf_new_storage(world->world, "hashes", NULL, + "hash-type='memory'"); + + world->model = librdf_new_model(world->world, world->storage, NULL); + + world->parser = librdf_new_parser(world->world, "turtle", NULL, NULL); + + world->plugin_classes = slv2_plugin_classes_new(); + + // Add the ever-present lv2:Plugin to classes + static const char* lv2_plugin_uri = "http://lv2plug.in/ontology#Plugin"; + raptor_sequence_push(world->plugin_classes, slv2_plugin_class_new( + world, NULL, lv2_plugin_uri, "Plugin")); + + world->plugins = slv2_plugins_new(); + + return world; +} + + void slv2_world_free(SLV2World world) { -- cgit v1.2.1