Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Merge branch 'birds'

  • Loading branch information...
rasvaan committed Nov 23, 2016
2 parents 81c0063 + a547168 commit 9b933c7e86e44a6ace6a468f57e05c2c5c1806db
Showing with 33 additions and 36 deletions.
  1. +3 −7 rdf/domain/bird/bird_domain.ttl
  2. +16 −16 rdf/domain/bird/ui/fields.ttl
  3. +14 −13 web/js/components/field.js
@@ -3,7 +3,7 @@
@prefix abirui: <http://accurator.nl/ui/bird#> .
@prefix aabir: <http://accurator.nl/ui/annotation/bird#> .
@prefix auis: <http://accurator.nl/ui/schema#> .
@prefix birds: <http://purl.org/collections/birds/> .
@prefix ioc: <http://purl.org/vocab/ioc/> .
@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/> .
@@ -13,16 +13,12 @@
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 abirui:bird ;
accu:hasMaximumExpertiseTopics "50" ;
accu:hasMaximumChildren "2" .
accu:hasDescriptiveImage abirui:bird .

<http://purl.org/collections/nl/naturalis/ioc_birdlist_en_nl.ttl> a skos:ConceptScheme .
<http://purl.org/vocab/ioc/ioc_birdlist_en_nl.ttl> a skos:ConceptScheme .

abirui:label auis:textLabel "Bird domain"@en ,
"Vogel domein"@nl .
@@ -1,15 +1,15 @@
@prefix aabir: <http://accurator.nl/ui/annotation/bird#> .
@prefix auis: <http://accurator.nl/ui/schema#> .
@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/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix aabir: <http://accurator.nl/ui/annotation/bird#> .
@prefix auis: <http://accurator.nl/ui/schema#> .
@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/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .

aabir:smallBirdAnnotationUi a auis:AnnotationUI ;
dcterms:title "Bird annotation UI"@en;
dcterms:title "Bird annotation UI"@en;
auis:fragmentFields (
aabir:IOCCommonNameAnnotation
aabir:IOCScientificNameAnnotation
aabir:IOCCommonNameAnnotation
aabir:IOCScientificNameAnnotation
) .

aabir:birdAnnotationUi a auis:AnnotationUI ;
@@ -31,9 +31,9 @@ aabir:IOCCommonNameAnnotation a auis:DropdownField ;
auis:source aabir:IOCCommonNameSource .

aabir:IOCCommonNameSource a auis:AlternativesSource ;
auis:api "/api/autocomplete" ;
auis:filterScheme "http://purl.org/collections/birds/IOCConceptScheme" ;
auis:labelRank "['http://lod.taxonconcept.org/ontology/txn.owl%23commonName'-1]" .
auis:api "/api/autocomplete/all" ;
auis:filterScheme "http://purl.org/vocab/ioc/IOCConceptScheme" ;
auis:labelRank "['http://lod.taxonconcept.org/ontology/txn.owl#commonName'-1]" .

aabir:IOCScientificNameAnnotation a auis:DropdownField ;
rdfs:label "Scientific name"@en ;
@@ -43,11 +43,11 @@ aabir:IOCScientificNameAnnotation a auis:DropdownField ;
auis:source aabir:IOCScientificNameSource .

aabir:IOCScientificNameSource a auis:AlternativesSource ;
auis:api "/api/autocomplete" ;
auis:filterScheme "http://purl.org/collections/birds/IOCConceptScheme" ;
auis:labelRank "['http://lod.taxonconcept.org/ontology/txn.owl%23scientificName'-1]" .
auis:api "/api/autocomplete/all" ;
auis:filterScheme "http://purl.org/vocab/ioc/IOCConceptScheme" ;
auis:labelRank "['http://lod.taxonconcept.org/ontology/txn.owl#scientificName'-1]" .

aabir:Gender a auis:RadioButtonField ;
aabir:Gender a auis:DropdownField ;
rdfs:label "Geslacht"@nl ;
rdfs:label "Gender"@en ;
dcterms:comment "add gender of the species"@en ;
@@ -295,24 +295,25 @@ DropdownField.prototype.addDropdownListeners = function() {
}

DropdownField.prototype.getAllAlternatives = function() {
//HACK for getting EN resources Iconclass
var locale = this.locale;
var parameters = { q:"stub", method:"all" };

if (this.source.filterScheme === "http://accurator.nl/bible#BiblicalThemeConceptScheme") {
locale = "en";
locale = "en"; //HACK for getting EN resources Iconclass
}
parameters.locale = locale;

// Create filter with eiter class or scheme, scheme has precedence
if (this.source.filterScheme) {
parameters.filter = JSON.stringify({ "scheme":this.source.filterScheme });
}

if (this.source.labelRank) {
parameters.labelrank = this.source.labelRank;
}

// Get autocomplete alternatives
var filter = JSON.stringify({scheme: this.source.filterScheme});
// var labelRank = "['http://www.w3.org/2004/02/skos/core#prefLabel'-1]";

// Return promise
return $.getJSON("api/autocomplete", {
q:"stub",
filter:filter,
// labelrank:labelRank,
method:"all",
locale:locale //HACK: should be this.locale
});
return $.getJSON("api/autocomplete", parameters);
}

DropdownField.prototype.addTypeAhead = function() {

0 comments on commit 9b933c7

Please sign in to comment.
You can’t perform that action at this time.