|
@@ -35,9 +35,9 @@ async function doJsonQuery(query, isUnique = false){
|
|
|
|
|
|
let out = response['results']['bindings'];
|
|
|
if(!isUnique) return out;
|
|
|
- if(!out.length) throw "Letter not found";
|
|
|
- if(out.length>1) throw "Ambiguity -- multiple letters matching URI";
|
|
|
- return out;
|
|
|
+ if(!out.length) throw "ERROR: Letter not found";
|
|
|
+ if(out.length>1) throw "ERROR: ambiguity in search -- multiple letters matching search parameters";
|
|
|
+ return out[0];
|
|
|
|
|
|
}
|
|
|
|
|
@@ -137,13 +137,13 @@ rdfs:label ?raccolta . \
|
|
|
?racc_type rdfs:label 'Raccolta'. \
|
|
|
}"
|
|
|
|
|
|
-queryToponimo = prefixes + "SELECT DISTINCT ?link_toponimo ?toponimo \
|
|
|
+queryToponimi = prefixes + "SELECT DISTINCT ?link_toponimo ?toponimo \
|
|
|
WHERE {<" + thisUrlParams.link + "> crm:P67_refers_to ?link_toponimo . \
|
|
|
?link_toponimo rdfs:label ?toponimo ; \
|
|
|
crm:P2_has_type 'Toponimo' . \
|
|
|
}"
|
|
|
|
|
|
-queryAntroponimo = prefixes + "SELECT DISTINCT * \
|
|
|
+queryAntroponimi = prefixes + "SELECT DISTINCT * \
|
|
|
WHERE {<" + thisUrlParams.link + "> crm:P67_refers_to ?link_antroponimo . \
|
|
|
?link_antroponimo rdfs:label ?antroponimo; \
|
|
|
crm:P2_has_type 'Antroponimo'}"
|