summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-03-28 01:35:01 +0000
committerDavid Robillard <d@drobilla.net>2015-03-28 01:35:01 +0000
commitb34ae1bec55b458a4b4b2aef335a81361f1a43ae (patch)
tree0a7ca3d77da64d33951dfa54135e75f415b3e3ce /src
parent7b17a6e66f422147ed911c6466d68421fcafe815 (diff)
downloadsord-b34ae1bec55b458a4b4b2aef335a81361f1a43ae.tar.gz
sord-b34ae1bec55b458a4b4b2aef335a81361f1a43ae.tar.bz2
sord-b34ae1bec55b458a4b4b2aef335a81361f1a43ae.zip
sord_validate: Warn about properties with no label.
git-svn-id: http://svn.drobilla.net/sord/trunk@327 3d64ff67-21c5-427c-a301-fe4f08042e5a
Diffstat (limited to 'src')
-rw-r--r--src/sord_validate.c7
1 files changed, 7 insertions, 0 deletions
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);