summaryrefslogtreecommitdiffstats
path: root/sord/sord.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-03-30 02:19:52 +0000
committerDavid Robillard <d@drobilla.net>2012-03-30 02:19:52 +0000
commitff3c6fc88657d2e94847ceb00adea7597894d897 (patch)
tree95931a641722a75fb3ed306e7960f3f179680eaf /sord/sord.h
parent43ee05bf7402c47e7034490bfebf08d3f57900e7 (diff)
downloadsord-ff3c6fc88657d2e94847ceb00adea7597894d897.tar.gz
sord-ff3c6fc88657d2e94847ceb00adea7597894d897.tar.bz2
sord-ff3c6fc88657d2e94847ceb00adea7597894d897.zip
Add convenient sord_search(), sord_ask(), and sord_count().
Add sord_validate tool for validating data against RDF/OWL schemas. git-svn-id: http://svn.drobilla.net/sord/trunk@211 3d64ff67-21c5-427c-a301-fe4f08042e5a
Diffstat (limited to 'sord/sord.h')
-rw-r--r--sord/sord.h36
1 files changed, 35 insertions, 1 deletions
diff --git a/sord/sord.h b/sord/sord.h
index 9bd3f02..9c4baf8 100644
--- a/sord/sord.h
+++ b/sord/sord.h
@@ -367,7 +367,7 @@ SordIter*
sord_begin(const SordModel* model);
/**
- Search for a triple pattern.
+ Search for statements by a quad pattern.
@return an iterator to the first match, or NULL if no matches found.
*/
SORD_API
@@ -375,6 +375,40 @@ SordIter*
sord_find(SordModel* model, const SordQuad pat);
/**
+ Search for statements by nodes.
+ @return an iterator to the first match, or NULL if no matches found.
+*/
+SORD_API
+SordIter*
+sord_search(SordModel* model,
+ const SordNode* s,
+ const SordNode* p,
+ const SordNode* o,
+ const SordNode* g);
+
+/**
+ Return true iff a statement exists.
+*/
+SORD_API
+bool
+sord_ask(SordModel* model,
+ const SordNode* s,
+ const SordNode* p,
+ const SordNode* o,
+ const SordNode* g);
+
+/**
+ Return the number of matching statements.
+*/
+SORD_API
+uint64_t
+sord_count(SordModel* model,
+ const SordNode* s,
+ const SordNode* p,
+ const SordNode* o,
+ const SordNode* g);
+
+/**
Check if @a model contains a triple pattern.
*/
SORD_API