aboutsummaryrefslogtreecommitdiffstats
path: root/serd
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-06-03 19:24:59 +0200
committerDavid Robillard <d@drobilla.net>2019-12-19 20:55:17 -0500
commit3395e65e8b0c5edb107019d1d8345dac71f5d86c (patch)
treed6567876d5f9dcf6d43102d1d435a740508c77a8 /serd
parent747582934c172a61ca3251f94e9a6b408616a637 (diff)
downloadserd-3395e65e8b0c5edb107019d1d8345dac71f5d86c.tar.gz
serd-3395e65e8b0c5edb107019d1d8345dac71f5d86c.tar.bz2
serd-3395e65e8b0c5edb107019d1d8345dac71f5d86c.zip
Add SerdStatement
Diffstat (limited to 'serd')
-rw-r--r--serd/serd.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/serd/serd.h b/serd/serd.h
index da6fbc7e..67ad5d6b 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
@@ -1162,6 +1169,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);
+
+/**
+ @}
@}
*/