diff options
author | David Robillard <d@drobilla.net> | 2013-02-10 08:56:33 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-02-10 08:56:33 +0000 |
commit | 36c22be51af07fc96a9168684949b82b8f6e325c (patch) | |
tree | 0cbdde26bbcd2d94727dd87ba61e2e7975eb9bc2 /src/world.c | |
parent | 1ad20b172af88a909991289e6a11c8cc7934a875 (diff) | |
download | lilv-36c22be51af07fc96a9168684949b82b8f6e325c.tar.gz lilv-36c22be51af07fc96a9168684949b82b8f6e325c.tar.bz2 lilv-36c22be51af07fc96a9168684949b82b8f6e325c.zip |
Add lilv_world_ask() for easily checking if a statement exists.
Add lilv_world_get() and lilv_port_get() for easily getting one value.
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@5053 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/world.c')
-rw-r--r-- | src/world.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/world.c b/src/world.c index a3f59ed..147690b 100644 --- a/src/world.c +++ b/src/world.c @@ -201,6 +201,22 @@ lilv_world_find_nodes(LilvWorld* world, object ? object->node : NULL); } +LILV_API +LilvNode* +lilv_world_get(LilvWorld* world, + const LilvNode* subject, + const LilvNode* predicate, + const LilvNode* object) +{ + return lilv_node_new_from_node( + world, + sord_get(world->model, + subject ? subject->node : NULL, + predicate ? predicate->node : NULL, + object ? object->node : NULL, + NULL)); +} + SordIter* lilv_world_query_internal(LilvWorld* world, const SordNode* subject, |