aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-05-27 15:48:25 +0200
committerDavid Robillard <d@drobilla.net>2021-03-08 23:34:56 -0500
commit1ba44998b0c5b8d76d574531d60b703ad56a2c8a (patch)
tree9b25a77abd72f4fcc7905e5fc48cdd605ab40221 /include/serd
parent00456f395e50b43a9f26ff1479b9ef8b06a4d219 (diff)
downloadserd-1ba44998b0c5b8d76d574531d60b703ad56a2c8a.tar.gz
serd-1ba44998b0c5b8d76d574531d60b703ad56a2c8a.tar.bz2
serd-1ba44998b0c5b8d76d574531d60b703ad56a2c8a.zip
Add model validation
Diffstat (limited to 'include/serd')
-rw-r--r--include/serd/serd.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h
index 14e321b5..93e280dc 100644
--- a/include/serd/serd.h
+++ b/include/serd/serd.h
@@ -138,6 +138,7 @@ typedef enum {
SERD_ERR_BAD_WRITE, ///< Error writing to file/stream
SERD_ERR_BAD_CALL, ///< Invalid call
SERD_ERR_BAD_URI, ///< Invalid or unresolved URI
+ SERD_ERR_INVALID, ///< Invalid data
} SerdStatus;
/// RDF syntax type
@@ -1900,6 +1901,21 @@ serd_model_erase_range(SerdModel* SERD_NONNULL model,
SerdRange* SERD_NONNULL range);
/**
+ Validate model.
+
+ This performs validation based on the RDFS and OWL vocabularies. All
+ necessary data, including those vocabularies and any property/class
+ definitions that use them, are assumed to be in `model`.
+
+ Validation errors are reported to the world's error sink.
+
+ @return 0 on success.
+*/
+SERD_API
+SerdStatus
+serd_validate(const SerdModel* SERD_NONNULL model);
+
+/**
@}
@defgroup serd_inserter Inserter
@{