diff options
author | David Robillard <d@drobilla.net> | 2011-01-29 18:10:27 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-01-29 18:10:27 +0000 |
commit | 4bd0ab43209ab81239cb7ff9ccc9365354a5fb91 (patch) | |
tree | f23ee2b4af5e521cf1e147bf6d98a3430683e782 /src/world.c | |
parent | eb0302d62d68f63faf2b7c8be6a75a65a946df18 (diff) | |
download | lilv-4bd0ab43209ab81239cb7ff9ccc9365354a5fb91.tar.gz lilv-4bd0ab43209ab81239cb7ff9ccc9365354a5fb91.tar.bz2 lilv-4bd0ab43209ab81239cb7ff9ccc9365354a5fb91.zip |
Tidy.
git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@2851 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/world.c')
-rw-r--r-- | src/world.c | 54 |
1 files changed, 23 insertions, 31 deletions
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 <manifest.ttl> - 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 <file://some/path> - 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 <manifest.ttl> - 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 <file://some/path> - 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); } |