accurator/commit

Added domain labels to domain def, resolves #258

authorChris Dijkshoorn
Mon Apr 18 17:20:03 2016 +0200
committerChris Dijkshoorn
Mon Apr 18 17:20:03 2016 +0200
commit14af8cc253ebbf0c23c7c6dca5498c31792a999c
treeb39de3ca34c3c9e1653575d8aab9f15b33e30e3c
parentc4032016a8f3a7407c8363a3ad50d39bbbf2c5f9
Diff style: patch stat
diff --git a/rdf/accurator_schema.ttl b/rdf/accurator_schema.ttl
index ab006d7..a74631b 100644
--- a/rdf/accurator_schema.ttl
+++ b/rdf/accurator_schema.ttl
@@ -30,6 +30,10 @@ accu:hasUI a rdf:Property ;
 	rdfs:range auis:UI ;
 	rdfs:domain accu:Domain .
 
+accu:hasLabel a rdf:Property ;
+	rdfs:label "Has domain label"@en ;
+	rdfs:comment "Property linking a domain to a label."@en .
+
 accu:hasAnnotationUI a rdf:Property ;
 	rdfs:label "Has annotation interface specification"@en ;
 	rdfs:comment "Property linking a domain to an annotation interface specification."@en .
diff --git a/rdf/domain/bible/bible_domain.ttl b/rdf/domain/bible/bible_domain.ttl
index 1bd3a6c..083f23a 100644
--- a/rdf/domain/bible/bible_domain.ttl
+++ b/rdf/domain/bible/bible_domain.ttl
@@ -12,12 +12,16 @@
 
 abib:domain a accu:Domain ;
 	rdfs:label "bible" ;
+	accu:hasLabel abibui:label ;
 	accu:hasTarget <http://accurator.nl/ubvu#Target> ;
 	accu:hasUI abibui: ;
 	accu:hasAnnotationUI aabib:smallBibleUI ;
-	accu:hasDescriptiveImage abib:jeremia .
+	accu:hasDescriptiveImage abibui:jeremia .
 
-abib:jeremia a dctypes:StillImage ;
+abibui:label auis:textLabel "Bible domain"@en ,
+							"Bijbel domein"@nl .
+
+abibui:jeremia a dctypes:StillImage ;
 	accu:hasFilePath "img/background/bible.jpg" ;
 	accu:brightness "dark" .
 
diff --git a/rdf/domain/bible/ui/labels.ttl b/rdf/domain/bible/ui/labels.ttl
index 3b592e0..2fa5bdb 100644
--- a/rdf/domain/bible/ui/labels.ttl
+++ b/rdf/domain/bible/ui/labels.ttl
@@ -6,13 +6,6 @@
 @prefix dcterms:<http://purl.org/dc/terms/> .
 @prefix skos:   <http://www.w3.org/2004/02/skos/core#> .
 
-###### Bible Domain #####
-
-abibui:domain a auis:UI;
-	aui:domainLabel "Bible domain"@en .
-
-aui:domainLabel rdfs:subPropertyOf auis:uiLabel .
-
 ###### Bible Topic #####
 
 abibui:topic a auis:UI ;
@@ -31,11 +24,6 @@ abibui:introHdrSubSlogan rdfs:subPropertyOf auis:uiLabel .
 abibui:about a auis:UI ;
 	rdfs:subClassOf aui:about .
 
-##### Bible Register Screen #####
-
-abibui:register a aui:UI ;
-	rdfs:subClassOf aui:register .
-
 ##### Bible Expertise Screen #####
 
 abibui:expertise a auis:UI ;
@@ -58,13 +46,3 @@ abibui:results a aui:UI ;
 
 abibui:item a aui:UI ;
 	rdfs:subClassOf aui:item .
-
-##### Bible Form Screen #####
-
-abibui:form a auis:UI ;
-	rdfs:subClassOf aui:form .
-
-##### Bible Login Modal #####
-
-abibui:loginModal a auis:UI ;
-	rdfs:subClassOf aui:loginModal .
diff --git a/rdf/domain/bible/ui/labels_nl.ttl b/rdf/domain/bible/ui/labels_nl.ttl
index 2996671..51d6fea 100644
--- a/rdf/domain/bible/ui/labels_nl.ttl
+++ b/rdf/domain/bible/ui/labels_nl.ttl
@@ -2,10 +2,6 @@
 @prefix aui:    <http://accurator.nl/ui/generic#> .
 @prefix abibui: <http://accurator.nl/ui/bible#> .
 
-###### Bible Domain #####
-abibui:domain a auis:UI;
-	aui:domainLabel "Bijbel domein"@nl .
-
 ###### Bible Intro Screen #####
 
 abibui:intro a auis:UI ;
diff --git a/rdf/domain/bird/bird_domain.ttl b/rdf/domain/bird/bird_domain.ttl
index 19f778d..e878939 100644
--- a/rdf/domain/bird/bird_domain.ttl
+++ b/rdf/domain/bird/bird_domain.ttl
@@ -12,17 +12,21 @@
 
 abir:domain a accu:Domain ;
 	rdfs:label "bird";
+	accu:hasLabel abirui:label ;
 	dcterms:requires <http://purl.org/collections/nl/naturalis/ioc_birdlist_en_nl.ttl> ;
 	accu:hasTarget <http://accurator.nl/bird#Target> ;
 	skos:hasTopConcept birds:class-aves ;
 	accu:hasUI abirui: ;
 	accu:hasAnnotationUI aabir:smallBirdAnnotationUi ;
-	accu:hasDescriptiveImage abir:bird ;
+	accu:hasDescriptiveImage abirui:bird ;
 	accu:hasMaximumExpertiseTopics "50" ;
 	accu:hasMaximumChildren "2"  .
 
 <http://purl.org/collections/nl/naturalis/ioc_birdlist_en_nl.ttl> a skos:ConceptScheme .
 
+abirui:label auis:textLabel "Bird domain"@en ,
+				 			"Vogel domein"@nl .
+
 abir:snipeQuery a accu:QueryExample ;
 	dcterms:title "Search for Snipe"@en ,
                   "Zoek naar snip"@nl ;
@@ -41,7 +45,7 @@ abir:hondecoeterQuery a accu:QueryExample ;
 	accu:hasDescriptiveImage abir:hondecoeterImage ;
 	accu:action "results?query=hondecoeter" .
 
-abir:bird a dctypes:StillImage ;
+abirui:bird a dctypes:StillImage ;
 	accu:hasFilePath "img/background/bird.jpg" ;
 	accu:brightness "light" .
 
diff --git a/rdf/domain/bird/ui/labels.ttl b/rdf/domain/bird/ui/labels.ttl
index b890b98..7ca6a70 100644
--- a/rdf/domain/bird/ui/labels.ttl
+++ b/rdf/domain/bird/ui/labels.ttl
@@ -6,12 +6,6 @@
 @prefix dcterms:<http://purl.org/dc/terms/> .
 @prefix skos:   <http://www.w3.org/2004/02/skos/core#> .
 
-###### Bird Domain #####
-abirui:domain a auis:UI ;
-	aui:domainLabel "Bird domain"@en .
-
-aui:domainLabel rdfs:subPropertyOf auis:uiLabel .
-
 ###### Bird Topic #####
 
 abirui:topic a auis:UI ;
@@ -30,11 +24,6 @@ aui:introHdrSubSlogan rdfs:subPropertyOf auis:uiLabel .
 abirui:about a auis:UI ;
 	rdfs:subClassOf aui:about .
 
-##### Bird Register Screen #####
-
-abirui:register a aui:UI ;
-	rdfs:subClassOf aui:register .
-
 ##### Bird Expertise Screen #####
 
 abirui:expertise a auis:UI ;
@@ -57,18 +46,3 @@ abirui:results a aui:UI ;
 
 abirui:item a aui:UI ;
 	rdfs:subClassOf aui:item .
-
-###### Bird End Screen #####
-
-abirui:end a auis:UI ;
-	rdfs:subClassOf aui:end .
-
-##### Bird Form Screen #####
-
-abirui:form a auis:UI ;
-	rdfs:subClassOf aui:form .
-
-##### Bird Login Modal #####
-
-abirui:loginModal a auis:UI ;
-	rdfs:subClassOf aui:loginModal .
diff --git a/rdf/domain/fashion/fashion_domain.ttl b/rdf/domain/fashion/fashion_domain.ttl
index c0cffdb..635ba9d 100644
--- a/rdf/domain/fashion/fashion_domain.ttl
+++ b/rdf/domain/fashion/fashion_domain.ttl
@@ -1,11 +1,12 @@
 @prefix accu:   <http://accurator.nl/schema#> .
 @prefix afas:   <http://accurator.nl/fashion#> .
-@prefix afasj:   <http://accurator.nl/fashion/jewelry#> .
-@prefix afass:   <http://accurator.nl/fashion/shoes#> .
+@prefix afasj:  <http://accurator.nl/fashion/jewelry#> .
+@prefix afasa:  <http://accurator.nl/fashion/accessories#> .
 @prefix afasui: <http://accurator.nl/ui/fashion#> .
+@prefix afasjui:<http://accurator.nl/ui/fashion/jewelry#> .
+@prefix afasaui:<http://accurator.nl/ui/fashion/accessories#> .
 @prefix aafas:  <http://accurator.nl/ui/annotation/fashion#> .
 @prefix auis:   <http://accurator.nl/ui/schema#> .
-@prefix ic:     <http://iconclass.org/> .
 @prefix rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
 @prefix rdfs:   <http://www.w3.org/2000/01/rdf-schema#> .
 @prefix dcterms:<http://purl.org/dc/terms/> .
@@ -14,32 +15,39 @@
 
 afas:domain a accu:Domain ;
 	rdfs:label "fashion" ;
+	accu:hasLabel afasui:label ;
 	accu:hasTarget <http://accurator.nl/fashion#Target> ;
 	accu:hasUI afasui: ;
 	accu:hasAnnotationUI aafas:fashionUI ;
-	accu:hasDescriptiveImage afas:dress ;
-	accu:subDomains afasj:domain ,
-					afass:domain .
-		# afas:fans ,
-		# afas:accessories ,
-		# afas:uniforms .
+	accu:hasDescriptiveImage afasui:dress ;
+	accu:subDomains afasa:domain ,
+					afasj:domain .
 
-<http://iconclass.org/> a skos:ConceptScheme .
+afasui:label auis:textLabel "Fashion domain"@en ,
+				 			"Domein mode"@nl .
+
+afasui:dress a dctypes:StillImage ;
+	accu:hasFilePath "img/background/dress.jpg" ;
+	accu:brightness "light" .
 
 afasj:domain a accu:Domain ;
 	rdfs:label "jewelry" ;
+	accu:hasLabel afasjui:label ;
 	accu:hasTarget <http://accurator.nl/fashion/jewelry#Target> ;
 	accu:hasUI afasui: ;
-	accu:hasDescriptiveImage afas:dress ;
+	accu:hasDescriptiveImage afasui:dress ;
 	accu:hasAnnotationUI aafas:fashionUI .
 
-afass:domain a accu:Domain ;
-	rdfs:label "shoes" ;
+afasjui:label auis:textLabel "Jewelry domain"@en ,
+							 "Domein juwelen"@nl .
+
+afasa:domain a accu:Domain ;
+	rdfs:label "accessories" ;
+	accu:hasLabel afasaui:label ;
 	accu:hasTarget <http://accurator.nl/fashion/shoes#Target> ;
 	accu:hasUI afasui: ;
-	accu:hasDescriptiveImage afas:dress ;
+	accu:hasDescriptiveImage afasui:dress ;
 	accu:hasAnnotationUI aafas:fashionUI .
 
-afas:dress a dctypes:StillImage ;
-	accu:hasFilePath "img/background/dress.jpg" ;
-	accu:brightness "light" .
+afasaui:label auis:textLabel "Accessories domain"@en ,
+							 "Domein accessoires"@nl .
diff --git a/rdf/domain/fashion/ui/labels.ttl b/rdf/domain/fashion/ui/labels.ttl
index 0360b07..b79a7c1 100644
--- a/rdf/domain/fashion/ui/labels.ttl
+++ b/rdf/domain/fashion/ui/labels.ttl
@@ -6,13 +6,6 @@
 @prefix dcterms:<http://purl.org/dc/terms/> .
 @prefix skos:   <http://www.w3.org/2004/02/skos/core#> .
 
-###### Fashion (Sub)Domain(s) #####
-
-afasui:domain a auis:UI ;
-	aui:domainLabel "Fashion domain"@en .
-
-aui:domainLabel rdfs:subPropertyOf auis:uiLabel .
-
 ###### Fashion Topic Screen #####
 
 afasui:topic a auis:UI ;
@@ -31,10 +24,6 @@ aui:introHdrSubSlogan rdfs:subPropertyOf auis:uiLabel .
 afasui:about a auis:UI ;
 	rdfs:subClassOf aui:about .
 
-##### Fashion Register Screen #####
-
-afasui:register a aui:UI ;
-	rdfs:subClassOf aui:register .
 
 ##### Fashion Expertise Screen #####
 
@@ -58,18 +47,3 @@ afasui:results a aui:UI ;
 
 afasui:item a aui:UI ;
 	rdfs:subClassOf aui:item .
-
-###### Fashion End Screen #####
-
-afasui:end a auis:UI ;
-	rdfs:subClassOf aui:end .
-
-##### Fashion Form Screen #####
-
-afasui:form a auis:UI ;
-	rdfs:subClassOf aui:form .
-
-##### Fashion Login Modal #####
-
-afasui:loginModal a auis:UI ;
-	rdfs:subClassOf aui:loginModal .
diff --git a/rdf/domain/fashion/ui/labels_nl.ttl b/rdf/domain/fashion/ui/labels_nl.ttl
index 5d280d2..2208868 100644
--- a/rdf/domain/fashion/ui/labels_nl.ttl
+++ b/rdf/domain/fashion/ui/labels_nl.ttl
@@ -2,16 +2,6 @@
 @prefix aui:    <http://accurator.nl/ui/generic#> .
 @prefix afasui: <http://accurator.nl/ui/fashion#> .
 
-###### Fashion Domain #####
-afasui:domain a auis:UI ;
-	aui:domainLabel "Domein mode"@nl .
-
-afasui:jewelry a auis:UI ;
-	aui:domainLabel "Domein seiraden"@nl .
-
-afasui:shoes a auis:UI ;
-	aui:domainLabel "Schoenen domein"@nl .
-
 ###### Fashion Intro Screen #####
 
 afasui:intro a auis:UI ;
diff --git a/rdf/ui/labels_schema.ttl b/rdf/ui/labels_schema.ttl
index feff7c8..9424ded 100644
--- a/rdf/ui/labels_schema.ttl
+++ b/rdf/ui/labels_schema.ttl
@@ -82,7 +82,7 @@ auis:hasSelectOption a rdf:Property ;
 auis:AlternativesSource a rdfs:Class ;
 	rdfs:label "Source of annotation alternatives" ;
 	rdfs:comment "Source of annotation alternatives, e.g. dropdown alternatives."@en .
-	
+
 auis:source a rdf:Property ;
 	rdfs:label "Has source" ;
 	rdfs:comment "The source of data for an input field."@en .
diff --git a/web/js/domain.js b/web/js/domain.js
index d82e752..61a8eb7 100644
--- a/web/js/domain.js
+++ b/web/js/domain.js
@@ -86,8 +86,10 @@ function populateDomains(locale, domainLabels) {
 
 function addDomain(row, locale) {
 	return function(domainData) {
-		return getLabels(locale, domainData.hasUI + "domain")
+		console.log("row ", row, " data ", domainData);
+		return getLabels(locale, domainData.hasLabel)
 		.then(function(labels) {
+			console.log("label ", labels);
 			var topics = null;
 			var subDomains;
 
@@ -109,7 +111,7 @@ function addDomain(row, locale) {
 			// domainData
 			var domain = new Domain (
 				domainData.domain,
-				labels.domainLabel,
+				labels.textLabel,
 				domainData.image,
 				domainData.imageBrightness,
 				subDomains,