From 4bd0ab43209ab81239cb7ff9ccc9365354a5fb91 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 29 Jan 2011 18:10:27 +0000 Subject: Tidy. git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@2851 a436a847-0d15-0410-975c-d299462d15a1 --- src/world.c | 54 +++++++++++++++++++++++------------------------------- 1 file changed, 23 insertions(+), 31 deletions(-) (limited to 'src/world.c') diff --git a/src/world.c b/src/world.c index 770cfac..b1e55fa 100644 --- a/src/world.c +++ b/src/world.c @@ -284,8 +284,7 @@ slv2_world_load_bundle(SLV2World world, SLV2Value bundle_uri) // Add ?plugin rdfs:seeAlso ?binary to dynamic model librdf_model_add( manifest_model, plugin, - librdf_new_node_from_uri_string(world->world, - SLV2_NS_RDFS "seeAlso"), + librdf_new_node_from_uri_string(world->world, SLV2_NS_RDFS "seeAlso"), librdf_new_node_from_node(binary_node)); } librdf_free_stream(dyn_plugins); @@ -312,26 +311,23 @@ slv2_world_load_bundle(SLV2World world, SLV2Value bundle_uri) librdf_node* plugin = librdf_statement_get_subject(s); // Add ?plugin rdfs:seeAlso - librdf_node* subject = librdf_new_node_from_node(plugin); - librdf_node* predicate = librdf_new_node_from_uri_string(world->world, - (const unsigned char*)(SLV2_NS_RDFS "seeAlso")); - librdf_node* object = librdf_new_node_from_uri(world->world, - manifest_uri); - librdf_model_add(world->model, subject, predicate, object); + librdf_model_add( + world->model, + librdf_new_node_from_node(plugin), + librdf_new_node_from_uri_string(world->world, SLV2_NS_RDFS "seeAlso"), + librdf_new_node_from_uri(world->world, manifest_uri)); // Add ?plugin slv2:bundleURI - subject = librdf_new_node_from_node(plugin); - predicate = librdf_new_node_from_uri_string(world->world, - (const unsigned char*)(SLV2_NS_SLV2 "bundleURI")); - object = librdf_new_node_from_uri(world->world, bundle_uri->val.uri_val); - - librdf_model_add(world->model, subject, predicate, object); + librdf_model_add( + world->model, + librdf_new_node_from_node(plugin), + librdf_new_node_from_uri_string(world->world, SLV2_NS_SLV2 "bundleURI"), + librdf_new_node_from_uri(world->world, bundle_uri->val.uri_val)); librdf_stream_next(results); } librdf_free_stream(results); - // ?specification a lv2:Specification results = slv2_world_find_statements( world, manifest_model, @@ -339,26 +335,22 @@ slv2_world_load_bundle(SLV2World world, SLV2Value bundle_uri) librdf_new_node_from_node(world->rdf_a_node), librdf_new_node_from_node(world->lv2_specification_node)); while (!librdf_stream_end(results)) { - librdf_statement* s = librdf_stream_get_object(results); - - librdf_node* spec_node = librdf_new_node_from_node(librdf_statement_get_subject(s)); + librdf_statement* s = librdf_stream_get_object(results); + librdf_node* spec = librdf_statement_get_subject(s); // Add ?specification rdfs:seeAlso - librdf_node* subject = spec_node; - librdf_node* predicate = librdf_new_node_from_uri_string(world->world, - (const unsigned char*)(SLV2_NS_RDFS "seeAlso")); - librdf_node* object = librdf_new_node_from_uri(world->world, - manifest_uri); - - librdf_model_add(world->model, subject, predicate, object); + librdf_model_add( + world->model, + librdf_new_node_from_node(spec), + librdf_new_node_from_uri_string(world->world, SLV2_NS_RDFS "seeAlso"), + librdf_new_node_from_uri(world->world, manifest_uri)); // Add ?specification slv2:bundleURI - subject = librdf_new_node_from_node(spec_node); - predicate = librdf_new_node_from_uri_string(world->world, - (const unsigned char*)(SLV2_NS_SLV2 "bundleURI")); - object = librdf_new_node_from_uri(world->world, bundle_uri->val.uri_val); - - librdf_model_add(world->model, subject, predicate, object); + librdf_model_add( + world->model, + librdf_new_node_from_node(spec), + librdf_new_node_from_uri_string(world->world, SLV2_NS_SLV2 "bundleURI"), + librdf_new_node_from_uri(world->world, bundle_uri->val.uri_val)); librdf_stream_next(results); } -- cgit v1.2.1