From b34ae1bec55b458a4b4b2aef335a81361f1a43ae Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 28 Mar 2015 01:35:01 +0000 Subject: sord_validate: Warn about properties with no label. git-svn-id: http://svn.drobilla.net/sord/trunk@327 3d64ff67-21c5-427c-a301-fe4f08042e5a --- src/sord_validate.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/sord_validate.c b/src/sord_validate.c index 7fbc5d6..82c98d9 100644 --- a/src/sord_validate.c +++ b/src/sord_validate.c @@ -67,6 +67,7 @@ typedef struct { SordNode* rdfs_Literal; SordNode* rdfs_Resource; SordNode* rdfs_domain; + SordNode* rdfs_label; SordNode* rdfs_range; SordNode* rdfs_subClassOf; SordNode* xsd_anyURI; @@ -455,6 +456,11 @@ check_properties(SordModel* model, URIs* uris) st = error("Use of undefined property", quad); } + if (!sord_ask(model, pred, uris->rdfs_label, NULL, NULL)) { + st = errorf("Property <%s> has no label\n", + sord_node_get_string(pred)); + } + if (is_DatatypeProperty && sord_node_get_type(obj) != SORD_LITERAL) { st = error("Datatype property with non-literal value", quad); @@ -714,6 +720,7 @@ main(int argc, char** argv) URI(rdfs, Literal); URI(rdfs, Resource); URI(rdfs, domain); + URI(rdfs, label); URI(rdfs, range); URI(rdfs, subClassOf); URI(xsd, anyURI); -- cgit v1.2.1