var link = thisUrlParams.link;
prefixes = queryManager['prefixes']['all'];
query = prefixes + (queryManager['querySchedaPersona']['queryInfo']).replace('{URI}', link);
doJsonQuery(query).done(function(data) { handle_data(data); });
queryURL = prefixes + (queryManager['querySchedaPersona']['query']).replace('{URI}', link);
doJsonQuery(queryURL).done(function(data) { handle_map(data); });
queryEx = prefixes + (queryManager['querySchedaPersona']['queryLetters']).replace('{URI}', link);
doJsonQuery(queryEx).done(function(data) { handle_Letters(data); });
queryOA = prefixes + (queryManager['querySchedaPersona']['queryOpere']).replace('{URI}', link);
doJsonQuery(queryOA).done(function(data) { handle_Artwork(data); });
queryOt = prefixes + (queryManager['querySchedaPersona']['queryOtherDoc']).replace('{URI}', link);
doJsonQuery(queryOt).done(function(data) { handle_Other_Documents(data); });
queryGt = prefixes + (queryManager['querySchedaPersona']['queryGettatelliEv']).replace('{URI}', link);
doJsonQuery(queryGt).done(function(data) { handle_Gettatelli(data); });
queryInfoGt = prefixes + (queryManager['querySchedaPersona']['queryInfoGettatelli']).replace('{URI}', link);
doJsonQuery(queryInfoGt).done(function(data) { handle_InfoGettatelli(data); });
queryRel = prefixes + (queryManager['querySchedaPersona']['queryRelazioni']).replace('{URI}', link);
doJsonQuery(queryRel).done(function(data) { handle_Relazioni(data); });
queryRelIn = prefixes + (queryManager['querySchedaPersona']['queryRelazioniInverse']).replace('{URI}', link);
doJsonQuery(queryRelIn).done(function(data) { handle_RelazioniInverse(data); });
queryCom = prefixes + (queryManager['querySchedaPersona']['queryCompagnia']).replace('{URI}', link);
doJsonQuery(queryCom).done(function(data) { handle_Compagnia(data); });
queryEv = prefixes + (queryManager['querySchedaPersona']['queryEventi']).replace('{URI}', link);
doJsonQuery(queryEv).done(function(data) { handle_Events(data); });
queryCon = prefixes + (queryManager['querySchedaPersona']['queryContrassegni']).replace('{URI}', link);
doJsonQuery(queryCon).done(function(data) { handle_Contrassegni(data); });
var labelName = "";
function handle_data(json) {
var graph = "";
var label = "";
if ("givenName" in json.results.bindings) {
givenName = value['givenName']['value'];
}
$.each(
json['results']['bindings'],
function (index, value) {
var graph = value['graph']['value'];
var uri = value['uri']['value'];
var label = value['label']['value'];
var name = value['name']['value'];
var givenName = "";
var familyName = "";
var alias = "";
var gender = "";
var patronymic = "";
var occupation = "";
var relative2 = "";
var relative3 = "";
var identifier = "";
var id_type = "";
var birth_date = "";
var birth_place = "";
var death_date = "";
var death_place = "";
var qualification = "";
var group = "";
var type = "";
var provenence = "";
var variants = "";
if ((value.hasOwnProperty('identifier')) && (value.hasOwnProperty('id_type'))) {
$("#identifier").css("display", "flex");
identifier = value['identifier']['value'];
id_type = value['id_type']['value'];
}
if (value.hasOwnProperty('givenName')) {
$("#givenName").css("display", "flex");
givenName = value['givenName']['value'];
}
if (value.hasOwnProperty('familyName')) {
$("#familyName").css("display", "flex");
familyName = value['familyName']['value'].toLowerCase();
familyName = familyName.charAt(0).toUpperCase() + familyName.slice(1);
}
if (value.hasOwnProperty('alias')) {
$("#aliasName").css("display", "flex");
alias = value['alias']['value'];
}
if (value.hasOwnProperty('gender')) {
$("#gender").css("display", "flex");
gender = value['gender']['value'];
}
if (value.hasOwnProperty('patronymic')) {
$("#patronymic").css("display", "flex");
patronymic = value['patronymic']['value'];
}
if (value.hasOwnProperty('provenienza')) {
$("#PlaceProvenence").css("display", "flex");
provenence = value['provenienza']['value'];
}
if (value.hasOwnProperty('occupation')) {
$("#occupation").css("display", "flex");
occupation = value['occupation']['value'];
}
if (value.hasOwnProperty('relative2')) {
relative2 = value['relative2']['value'];
}
if (value.hasOwnProperty('relative3')) {
relative3 = value['relative3']['value'];
}
if (value.hasOwnProperty('qualification')) {
$("#honorific").css("display", "flex");
qualification = value['qualification']['value'];
}
if (value.hasOwnProperty('person_type')) {
$("#type").css("display", "flex");
type = value['person_type']['value'];
}
if (value.hasOwnProperty('Birth_Date')) {
$("#BirthDate").css("display", "flex");
birth_date = value['Birth_Date']['value'];
}
if (value.hasOwnProperty('Birth_Place')) {
$("#BirthPlace").css("display", "flex");
birth_place = value['Birth_Place']['value'];
}
if (value.hasOwnProperty('Death_Date')) {
$("#DeathDate").css("display", "flex");
death_date = value['Death_Date']['value'];
}
if (value.hasOwnProperty('Death_Place')) {
$("#DeathPlace").css("display", "flex");
death_place = value['Death_Place']['value'];
}
if (value.hasOwnProperty('group')) {
$("#groups").css("display", "flex");
group = value['group']['value'];
}
if (value.hasOwnProperty('variants')) {
if (value['variants']['value'] != "| ") {
alert(value['variants']['value']);
$("#otherNames").css("display", "flex");
let strings = value['variants']['value'];
variants = strings.split(";");
}
}
var dataset = get_dataset_name(graph);
var second_name = patronymic;
if (relative2 != "") {
second_name = second_name + " " + relative2;
}
if (relative3 != "") {
second_name = second_name + " " + relative3;
}
if (familyName != "") {
second_name = second_name + " " + familyName;
}
var first_name = "";
if ((givenName != "") || (second_name != "") || (provenence != "")) {
first_name = givenName + " " + second_name + " " + provenence;
} else {
first_name = name;
}
first_name = first_name.replace(",", "");
first_name = titleCase(first_name);
name = titleCase(name);
givenName = titleCase(givenName);
var name_string = "";
if (variants.length>0) {
for (var i=0; i Scheda Oggetto Nessun evento trovato '+ send[i][1] + '';
object_type = "object";
infObject_button += '';
}
if (send[i][2] != "") {
letter = letter + " '+ receive[i][1] + '';
object_type = "object";
infObject_button += '';
}
if (receive[i][2] != "") {
letter = letter + " Nessun risultato trovato Nessun risultato trovato Nessun risultato trovato
";
}
}
labelName = first_name;
var Buttons = ' \
\
\
';
var id_snippet = "' +
' ';
var EventsTable = thead;
EventsTable += '';
for (var i=0; iEvento ' +
'Ruolo ' +
'Data ' +
'Luogo ' +
'Documento ' +
'' + events[i][0] + ' ' +
'' + events[i][1] + ' ' +
'' + events[i][2] + ' ' +
'' + events[i][4] + ' ' +
'' + events[i][6] + ' ' +
'';
}
EventsTable += '
Segnatura: " + send[i][2];
}
if (send[i][3] != "") {
letter = letter + "
Data: " + send[i][3];
}
letter = letter + '
Segnatura: " + receive[i][2];
}
if (receive[i][3] != "") {
letter = letter + "
Data: " + receive[i][3];
}
letter = letter + '
NCT: ' + oa[i][2];
if (oa[i][3] != "") {
artwork = artwork + "
Data: " + oa[i][3];
}
var object_button = '';
Artworks += '';
}
document.getElementById("n_oa").innerHTML = oa.length;
document.getElementById("object_oa").innerHTML = Artworks;
if (oa.length==0) {
var messaggio = "
Segnatura: " + doc[i][2];
}
if (doc[i][3] != "") {
paper = paper + "
Data: " + doc[i][3];
}
paper = paper + '
Nessun risultato trovato
"; document.getElementById("other_documents").innerHTML = messaggio; } } function handle_map(json) { //console.log(json); const locations = []; const place_names = []; const place_events = []; const luoghi = []; var lat = 0; var long = 0; var i=0; var myPlaces = ""; $.each( json['results']['bindings'], function (index, value) { const loc = [] var uri = value['place']['value']; var label = value['label']['value']; var coord = value['coordinates']['value']; var evento = value['tipo']['value'] var count = value['count']['value'] place_events.push([uri, evento, count]); if (!place_names.includes(uri)) { place_names.push(uri); const coordinates = coord.split(", "); loc.push(uri); label = titleCase(label); loc.push(label); myPlaces += "