Skip to content

Commit

Permalink
Merge 08095e1 into 62612ef
Browse files Browse the repository at this point in the history
  • Loading branch information
cedrikv committed May 16, 2023
2 parents 62612ef + 08095e1 commit ba9d06e
Showing 1 changed file with 12 additions and 10 deletions.
Expand Up @@ -43,15 +43,15 @@ define([
return xhr.get(this._target, {
handleAs: 'json',
headers: {'Content-Type': 'application/json', 'Accept': 'application/json'}
})
});
},

getConceptScheme: function(id) {
console.debug('ConceptSchemeController::getConceptScheme', id);
return xhr.get(this._target + '/' + id, {
handleAs: 'json',
headers: {'Content-Type': 'application/json', 'Accept': 'application/json'}
})
});
},


Expand Down Expand Up @@ -80,27 +80,29 @@ define([
return this.getConceptSchemes().then(lang.hitch(this, function (schemes) {
var externalSchemelist = [];
array.forEach(schemes, lang.hitch(this, function (scheme) {
if(array.indexOf(scheme.subject, 'external') === -1){
if (!scheme.label) {
scheme.label = scheme.uri;
}
if (array.indexOf(scheme.subject, 'external') === -1) {
this.conceptSchemeList.push(scheme);
}else{
} else {
externalSchemelist.push(scheme);
}
}));
this.externalSchemeStore = new dMemory({
idProperty: "id",
idProperty: 'id',
data: externalSchemelist
});
}))
}));
},

getConceptSchemeTree: function(scheme) {
var myStore = new Cache(new JsonRest({
return new Cache(new JsonRest({
target: "/conceptschemes/" + scheme + "/tree",
getChildren: function (object) {
return object.children || [];
}
}), new Memory());
return myStore;
},

getMatch: function (uri, type) {
Expand Down Expand Up @@ -180,7 +182,7 @@ define([
if (c.type != 'collection') {
clone.matches = {
exact: [uri]
}
};
}
deferred.resolve(clone);
},
Expand Down Expand Up @@ -231,6 +233,6 @@ define([
// console.error(err);
//});
}
})
});
});

0 comments on commit ba9d06e

Please sign in to comment.