diff options
author | David Robillard <d@drobilla.net> | 2018-06-03 19:24:59 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-11-25 22:12:47 +0100 |
commit | b2e692cb13040e569b964b884867011cceb9d4c3 (patch) | |
tree | 18f7edeb899b5e272665b68470b3d20c65624793 /serd | |
parent | 45a2fee262b684f8e218067bd1a7ed978b83fab7 (diff) | |
download | serd-b2e692cb13040e569b964b884867011cceb9d4c3.tar.gz serd-b2e692cb13040e569b964b884867011cceb9d4c3.tar.bz2 serd-b2e692cb13040e569b964b884867011cceb9d4c3.zip |
Add SerdStatement
Diffstat (limited to 'serd')
-rw-r--r-- | serd/serd.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/serd/serd.h b/serd/serd.h index 139578c0..5bfcec1e 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -63,6 +63,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 @@ -1151,6 +1158,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); + +/** + @} @} */ |