aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd
diff options
context:
space:
mode:
Diffstat (limited to 'include/serd')
-rw-r--r--include/serd/serd.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h
index fad9d070..5edb4b2f 100644
--- a/include/serd/serd.h
+++ b/include/serd/serd.h
@@ -1966,6 +1966,41 @@ serd_canon_new(const SerdWorld* SERD_NULLABLE world,
/**
@}
+ @defgroup serd_filter Filter
+ @{
+*/
+
+/**
+ Return a new sink that filters out statements that do not match a pattern.
+
+ The returned sink acts like `target` in all respects, except that some
+ statements may be dropped.
+
+ @param target The target sink to pass the filtered data to.
+
+ @param subject The optional subject of the filter pattern.
+
+ @param predicate The optional predicate of the filter pattern.
+
+ @param object The optional object of the filter pattern.
+
+ @param graph The optional graph of the filter pattern.
+
+ @param inclusive If true, then only statements that match the pattern are
+ passed through. Otherwise, only statements that do *not* match the pattern
+ are passed through.
+*/
+SERD_API
+SerdSink* SERD_ALLOCATED
+serd_filter_new(const SerdSink* SERD_NONNULL target,
+ const SerdNode* SERD_NULLABLE subject,
+ const SerdNode* SERD_NULLABLE predicate,
+ const SerdNode* SERD_NULLABLE object,
+ const SerdNode* SERD_NULLABLE graph,
+ bool inclusive);
+
+/**
+ @}
@defgroup serd_env Environment
@{
*/