aboutsummaryrefslogtreecommitdiffstats
path: root/serd/serd.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-05-27 15:48:25 +0200
committerDavid Robillard <d@drobilla.net>2019-12-20 10:26:55 -0500
commit58a874fa1ba233c62272eb2f370a9f3c64b56c1a (patch)
treed284ac6be22aa7f6894352098dd3d5c0367ada65 /serd/serd.h
parentdd364625e2dda4691cec852a8f4fa3c40ac7e189 (diff)
downloadserd-58a874fa1ba233c62272eb2f370a9f3c64b56c1a.tar.gz
serd-58a874fa1ba233c62272eb2f370a9f3c64b56c1a.tar.bz2
serd-58a874fa1ba233c62272eb2f370a9f3c64b56c1a.zip
Add model validation
Diffstat (limited to 'serd/serd.h')
-rw-r--r--serd/serd.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/serd/serd.h b/serd/serd.h
index 45b61a4a..6bdb9164 100644
--- a/serd/serd.h
+++ b/serd/serd.h
@@ -109,7 +109,8 @@ typedef enum {
SERD_ERR_ID_CLASH, ///< Encountered clashing blank node IDs
SERD_ERR_BAD_CURIE, ///< Invalid CURIE (e.g. prefix does not exist)
SERD_ERR_INTERNAL, ///< Unexpected internal error (should not happen)
- SERD_ERR_OVERFLOW ///< Stack overflow
+ SERD_ERR_OVERFLOW, ///< Stack overflow
+ SERD_ERR_INVALID ///< Invalid data
} SerdStatus;
/// RDF syntax type
@@ -1564,6 +1565,21 @@ SerdStatus
serd_model_erase_range(SerdModel* model, SerdRange* 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* model);
+
+/**
@}
@name Inserter
@{