aboutsummaryrefslogtreecommitdiffstats
path: root/serd/serd.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-06-03 19:24:59 +0200
committerDavid Robillard <d@drobilla.net>2018-12-31 11:37:47 -0500
commit7dafd649f8a089fed52e90a4f8bdbd5e21ba31a3 (patch)
tree0d86747fb03b6662964bb7d813a2edabcf5d2fed /serd/serd.h
parentc7571828dda66dcf4c49e8fd9e0427fc3d3b4464 (diff)
downloadserd-7dafd649f8a089fed52e90a4f8bdbd5e21ba31a3.tar.gz
serd-7dafd649f8a089fed52e90a4f8bdbd5e21ba31a3.tar.bz2
serd-7dafd649f8a089fed52e90a4f8bdbd5e21ba31a3.zip
Add SerdStatement
Diffstat (limited to 'serd/serd.h')
-rw-r--r--serd/serd.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/serd/serd.h b/serd/serd.h
index 26630614..d108e120 100644
--- a/serd/serd.h
+++ b/serd/serd.h
@@ -62,6 +62,13 @@ extern "C" {
typedef struct SerdWorldImpl SerdWorld;
/**
+ Statement.
+
+ A subject, predicate, and object, with optional graph context.
+*/
+typedef struct SerdStatementImpl SerdStatement;
+
+/**
Environment.
Represents the state required to resolve a CURIE or relative URI, e.g. the
@@ -1150,6 +1157,47 @@ serd_writer_finish(SerdWriter* writer);
/**
@}
+ @name Statement
+ @{
+*/
+
+/**
+ Return the given node in `statement`.
+*/
+SERD_API
+const SerdNode*
+serd_statement_get_node(const SerdStatement* statement, SerdField field);
+
+/**
+ Return the subject in `statement`.
+*/
+SERD_API
+const SerdNode*
+serd_statement_get_subject(const SerdStatement* statement);
+
+/**
+ Return the predicate in `statement`.
+*/
+SERD_API
+const SerdNode*
+serd_statement_get_predicate(const SerdStatement* statement);
+
+/**
+ Return the object in `statement`.
+*/
+SERD_API
+const SerdNode*
+serd_statement_get_object(const SerdStatement* statement);
+
+/**
+ Return the graph in `statement`.
+*/
+SERD_API
+const SerdNode*
+serd_statement_get_graph(const SerdStatement* statement);
+
+/**
+ @}
@}
*/