summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/world.c54
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);
}