|
@@ -8,6 +8,9 @@ doJsonQuery(queryURL).done(function(data) { handle_OAdata(data); });
|
|
|
queryPro = prefixes + (queryManager['querySchedaOpera']['queryProduction']).replace('{URI}', link);
|
|
|
doJsonQuery(queryPro).done(function(data) { handle_Production(data); });
|
|
|
|
|
|
+queryBib = prefixes + (queryManager['querySchedaOpera']['queryBibliography']).replace('{URI}', link);
|
|
|
+doJsonQuery(queryBib).done(function(data) { handle_Bibliography(data); });
|
|
|
+
|
|
|
|
|
|
function handle_OAdata(json) {
|
|
|
|
|
@@ -83,8 +86,12 @@ function handle_OAdata(json) {
|
|
|
inscription = value['iscrizione']['value'];
|
|
|
}
|
|
|
if (value.hasOwnProperty('uriSubjectPer')) {
|
|
|
+ var givenName = value['personName']['value'];
|
|
|
+ var surname = value['personSurname']['value'];
|
|
|
+ var patronymic = value['personPatronymic']['value'];
|
|
|
+ var name = givenName + " " + patronymic + " " + titleCase(surname);
|
|
|
subject += "<br /><div class='d-flex'><div class='mr-3'><a href='" + value['uriSubjectPer']['value'] + "'>" +
|
|
|
- value['subject_person']['value'] + "</a></div><div class='d-flex ml-auto'><div class='persona btn-icon' style='cursor:pointer' id='" +
|
|
|
+ name + "</a></div><div class='d-flex ml-auto'><div class='persona btn-icon' style='cursor:pointer' id='" +
|
|
|
value['uriSubjectPer']['value'] + "'><i class='fa fa-user'></i><p class='btn-text'>PERSONA</p></div></div></div></div>";
|
|
|
|
|
|
}
|
|
@@ -208,6 +215,38 @@ function handle_Production(json) {
|
|
|
|
|
|
}
|
|
|
|
|
|
+function handle_Bibliography(json) {
|
|
|
+
|
|
|
+ console.log(json['results']['bindings']);
|
|
|
+
|
|
|
+ var Biblio = "";
|
|
|
+ const bibArray = [];
|
|
|
+
|
|
|
+ $.each(
|
|
|
+ json['results']['bindings'],
|
|
|
+ function (index, value) {
|
|
|
+ var bib = value['bibliography']['value'];
|
|
|
+ var pages = "";
|
|
|
+
|
|
|
+ if (value.hasOwnProperty('pages')) {
|
|
|
+ pages = value['pages']['value'];
|
|
|
+ }
|
|
|
+
|
|
|
+ var book = bib + " " + pages;
|
|
|
+ bibArray.push(book);
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+ bibArray.sort();
|
|
|
+
|
|
|
+ for (k in bibArray) {
|
|
|
+ Biblio += '<li>' + bibArray[k] + '</li>';
|
|
|
+ }
|
|
|
+
|
|
|
+ document.getElementById("bibliography").innerHTML = Biblio;
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
function show_OA(){
|
|
|
document.getElementById("OA_info").style.display = "block";
|
|
|
document.getElementById("catalogo_info").style.display = "none";
|