diff options
author | David Robillard <d@drobilla.net> | 2018-06-03 19:24:59 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-04-13 19:15:32 +0200 |
commit | 96f32b5e935318ebc3a9137d54903f63bf71bab7 (patch) | |
tree | a4508ae17bdb706aa2a9307bff51ee257d1ed77c /serd | |
parent | 289698b4eb3ef1e4a41db3947a0f19d27fd78717 (diff) | |
download | serd-96f32b5e935318ebc3a9137d54903f63bf71bab7.tar.gz serd-96f32b5e935318ebc3a9137d54903f63bf71bab7.tar.bz2 serd-96f32b5e935318ebc3a9137d54903f63bf71bab7.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 1e303990..db1ac5db 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); + +/** + @} @} */ |