From a1e6f53715ba7be340d4a59a9878d0ca2c7c6c3f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 18 Dec 2019 19:16:14 -0500 Subject: WIP: Add statement filtering --- serd/serd.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'serd') diff --git a/serd/serd.h b/serd/serd.h index 794fe285..78a1d0cf 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -1242,6 +1242,22 @@ SERD_API SerdSink* serd_normaliser_new(const SerdSink* target, const SerdEnv* env); +/** + Return a sink that filters out statements that do not match a pattern. + + The returned sink acts like `target` in all respects, except statements that + do not match the pattern are dropped. Only statements where each node is + either equivalent to the corresponding pattern node, or the pattern node is + null, will be passed through to the target sink. +*/ +SERD_API +SerdSink* +serd_filter_new(const SerdSink* target, + const SerdNode* subject, + const SerdNode* predicate, + const SerdNode* object, + const SerdNode* graph); + /** @} @name Reader -- cgit v1.2.1