CINXE.COM
Willem I (koning der Nederlanden ; 1772-1843) — LodView
<html version="XHTML+RDFa 1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/1999/xhtml http://www.w3.org/MarkUp/SCHEMA/xhtml-rdfa-2.xsd" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:foaf="http://xmlns.com/foaf/0.1/"> <head data-color="#ddb109-#888888" profile="http://www.w3.org/1999/xhtml/vocab"> <title>Willem I (koning der Nederlanden ; 1772-1843) — LodView</title> <link href="https://data.bibliotheken.nl/staticResources/style.css" rel="stylesheet" type="text/css" /> <script> document.write('<style type="text/css">'); document.write('.c2{visibility:hidden}'); document.write('</style>'); </script> <meta http-equiv="x-ua-compatible" content="IE=Edge"/> <script src="https://data.bibliotheken.nl/staticResources/vendor/jquery.min.js"></script> <meta property="og:title" content="Willem I (koning der Nederlanden ; 1772-1843) — LodView, giving data a new shape"> <meta property="og:image" content="https://data.bibliotheken.nl/staticResources/img/lodview_sharer.png"> <link rel="image_src" href="https://data.bibliotheken.nl/staticResources/img/lodview_sharer.png"> <meta name="twitter:title" content="Willem I (koning der Nederlanden ; 1772-1843) — LodView, giving data a new shape"> <meta name="twitter:description" content="LodView is a powerful RDF viewer, IRI dereferencer and opensource SPARQL navigator"> <link rel="icon" type="image/png" href="https://data.bibliotheken.nl/staticResources/img/favicon.png"> <link href='//fonts.googleapis.com/css?family=Roboto:100,300,500&subset=latin-ext,latin,greek-ext,greek,cyrillic-ext,vietnamese,cyrillic' rel='stylesheet' type='text/css'> <!-- managing maps --> <link rel="stylesheet" href="https://data.bibliotheken.nl/staticResources/vendor/leaflet/leaflet.css" /> <script src="https://data.bibliotheken.nl/staticResources/vendor/leaflet/leaflet.js"></script> <link rel="canonical" href="http://data.bibliotheken.nl/id/thes/p068686943" > <script src="https://data.bibliotheken.nl/staticResources/vendor/masonry.pkgd.min.js"></script> <script src="https://data.bibliotheken.nl/staticResources/vendor/modernizr-custom.min.js"></script> <style type="text/css"> hgroup, #linking a span,#audio .audio{ background-color: #ddb109 } header div#abstract, #loadPanel, div#lodCloud .connected div#counterBlock.content { background-color: #888888 } #errorPage div#bnodes { color: #888888 } div#loadPanel span.ok img { background-color: #ddb109 } </style> <script> var isRetina = window.devicePixelRatio > 1; var isChrome = /chrom(e|ium)/.test(navigator.userAgent.toLowerCase()) </script> <script> var haveSeenHttps = (sessionStorage.getItem('haveSeenHttps') === '1') if (!haveSeenHttps && !(location.protocol === 'http:')) { sessionStorage.setItem('haveSeenHttps', '1') var toLoc = 'http:'+ location.href.substring(location.protocol.length) location.replace(toLoc); } </script> <!-- a custom metadata addition to the header of a resource page --> <script type="application/ld+json"> { "@context": "http://schema.org/", "@type": "schema:Person", "name":"Willem I (koning der Nederlanden ; 1772-1843)", "url": "http://data.bibliotheken.nl/id/thes/p068686943" } </script> </head><body id="top"> <article> <div id="logoBanner"> <div id="logo"> <!-- placeholder for logo --> </div> </div> <header> <hgroup> <h1><span>Willem I (koning der Nederlanden ; 1772-1843)</span></h1> <h2> <a class="iri" href="http://data.bibliotheken.nl/id/thes/p068686943">http://data.bibliotheken.nl/id/thes/p068686943</a> <span class="istance"> <a title="<http://schema.org/Person>" href="http://schema.org/Person" target="_blank" > <span class="istanceOf">an entity of type:</span> <span>Person</span> </a> </span> <!-- <div id="seeOnLodlive" class="sp"> <a title="view resource on lodlive" target="_blank" href="http://en.lodlive.it?http://data.bibliotheken.nl/id/thes/p068686943"></a> </div> --> </h2> </hgroup> <div id="abstract" class="empty"></div> </header> <aside><span class="c1"></span><div id="widgets" class="c2"><div id="linking"> <a href="#lodCloud" title="data from the lod cloud"><span class="sp"></span></a> </div></div></aside> <div id="directs"> <label class="c1"><a data-label="label" data-comment="A human-readable name for the subject." href="http://www.w3.org/2000/01/rdf-schema#label"> rdfs:<span>label</span> </a></label> <div class="c2 value "> <div class="toMultiLine "> <div class="fixed"> Willem I (koning der Nederlanden ; 1772-1843)  </div> </div> </div> <label class="c1"><a data-label="" data-comment="" href="http://schema.org/deathDate"> schema:<span>deathDate</span> </a></label> <div class="c2 value multiInLineBlock"> <span class="multiInLine"> <span class="dType">xsd:gYear</span> 1843  </span> </div> <label class="c1"><a data-label="" data-comment="" href="http://schema.org/alternateName"> schema:<span>alternateName</span> </a></label> <div class="c2 value "> <div class="toMultiLine "> <div class="fixed"> Wilhelm von Oranien  </div> </div> <div class="toMultiLine "> <div class="fixed"> Wilhelm Friederich  </div> </div> <div class="toMultiLine "> <div class="fixed"> Willem Frederik van Nassau (koning der Nederlanden)  </div> </div> <div class="toMultiLine "> <div class="fixed"> Wilhelm VI von Nassau-Oranien  </div> </div> <div class="toMultiLine "> <div class="fixed"> Wilhelm von Nassau-Oranien  </div> </div> <div class="toMultiLine "> <div class="fixed"> Willem Frederik prins van Oranje en Nassau  </div> </div> <div class="toMultiLine "> <div class="fixed"> Willem ha-ri拧on  </div> </div> </div> <label class="c1"><a data-label="" data-comment="" href="http://schema.org/description"> schema:<span>description</span> </a></label> <div class="c2 value "> <div class="toMultiLine "> <div class="fixed"> bij zijn geboorte aangeduid als: Willem de Sesde  </div> </div> <div class="toMultiLine "> <div class="fixed"> regeerperiode: 1813/15-1840 (van 1814-1830, koning van Verenigd Koninkrijk der Nederlanden; in 1830/31 scheidde de Zuidelijke Nederlanden zich af als de zelfstandige staat: Belgi毛)  </div> </div> <div class="toMultiLine "> <div class="fixed"> LET OP! STCN beheert dit record in de CERL-database. Neem voor mutaties contact op met STCN via stcn@kb.nl  </div> </div> </div> <label class="c1"><a data-label="" data-comment="" href="http://schema.org/name"> schema:<span>name</span> </a></label> <div class="c2 value multiInLineBlock"> <span class="multiInLine">   </span> </div> <label class="c1"><a data-label="" data-comment="" href="http://schema.org/birthDate"> schema:<span>birthDate</span> </a></label> <div class="c2 value multiInLineBlock"> <span class="multiInLine"> <span class="dType">xsd:gYear</span> 1772  </span> </div> <label class="c1"><a data-label="" data-comment="" href="http://schema.org/familyName"> schema:<span>familyName</span> </a></label> <div class="c2 value multiInLineBlock"> <span class="multiInLine">   </span> </div> <label class="c1"><a data-label="" data-comment="" href="http://schema.org/givenName"> schema:<span>givenName</span> </a></label> <div class="c2 value multiInLineBlock"> <span class="multiInLine">   </span> </div> <label class="c1"><a data-label="" data-comment="" href="http://schema.org/nationality"> schema:<span>nationality</span> </a></label> <div class="c2 value multiInLineBlock"> <span class="multiInLine"> nl  </span> </div> <label class="c1"><a data-label="type" data-comment="The subject is an instance of a class." href="http://www.w3.org/1999/02/22-rdf-syntax-ns#type"> rdf:<span>type</span> </a></label> <div class="c2 value"> <div class="toOneLine"> <a title="<http://schema.org/Person>" class=" " href="http://schema.org/Person" target="_blank" > schema:Person </a> </div> </div> <label class="c1"><a data-label="sameAs" data-comment="The property that determines that two given individuals are equal." href="http://www.w3.org/2002/07/owl#sameAs"> owl:<span>sameAs</span> </a></label> <div class="c2 value"> <div class="toOneLine"> <a title="<http://data.bibliotheken.nl/id/dbnla/will012>" class="linkingElement isLocal" href="http://data.bibliotheken.nl/id/dbnla/will012" > <http://data.bibliotheken.nl/id/dbnla/will012> </a> </div> </div> <label class="c1"><a data-label="" data-comment="" href="http://schema.org/sameAs"> schema:<span>sameAs</span> </a></label> <div class="c2 value"> <div class="toOneLine"> <a title="<http://www.wikidata.org/entity/Q2079957>" class=" " href="http://www.wikidata.org/entity/Q2079957" target="_blank" > <http://www.wikidata.org/entity/Q2079957> </a> </div> <div class="toOneLine"> <a title="<http://www.isni.org/isni/0000000117602532>" class=" " href="http://www.isni.org/isni/0000000117602532" target="_blank" > <http://www.isni.org/isni/0000000117602532> </a> </div> <div class="toOneLine"> <a title="<http://viaf.org/viaf/42645467>" class=" " href="http://viaf.org/viaf/42645467" target="_blank" > <http://viaf.org/viaf/42645467> </a> </div> </div> <label class="c1"><a data-label="" data-comment="" href="http://schema.org/mainEntityOfPage"> schema:<span>mainEntityOfPage</span> </a></label> <div class="c2 value"> <div class="toOneLine"> <a href="#89804b13c62b1dffe41c507810a21f2a" id="t_89804b13c62b1dffe41c507810a21f2a"> _:89804b13c62b1dffe41c507810a21f2a</a> </div> </div> </div> <div id="bnodes"> <h3> blank nodes </h3> <label class="c1"><a data-label="" data-comment="" href="http://schema.org/mainEntityOfPage"> schema:<span>mainEntityOfPage</span> </a></label> <div class="c2 valuecnt"> <div class="toOneLine"> <a href="#t_89804b13c62b1dffe41c507810a21f2a" id="89804b13c62b1dffe41c507810a21f2a"> _:89804b13c62b1dffe41c507810a21f2a</a> </div> <label class="c3"><a data-label="" data-comment="" href="http://data.bibliotheken.nl/def#ppn"> <http://data.bibliotheken.nl/def#<span>ppn</span>> </a></label> <div class="c4 value "> <div class="toMultiLine "> <div class="fixed"> 068686943  </div> </div> </div> <label class="c3"><a data-label="" data-comment="" href="http://schema.org/dateModified"> schema:<span>dateModified</span> </a></label> <div class="c4 value "> <div class="toMultiLine "> <div class="fixed"> <span class="dType">xsd:date</span> 2023-05-23  </div> </div> </div> <label class="c3"><a data-label="type" data-comment="The subject is an instance of a class." href="http://www.w3.org/1999/02/22-rdf-syntax-ns#type"> rdf:<span>type</span> </a></label> <div class="c4 value"> <div class="toOneLine"> <a title="<http://schema.org/Dataset>" class=" " href="http://schema.org/Dataset" target="_blank" > schema:Dataset </a> </div> <div class="toOneLine"> <a title="<http://schema.org/WebPage>" class=" " href="http://schema.org/WebPage" target="_blank" > schema:WebPage </a> </div> </div> <label class="c3"><a data-label="sameAs" data-comment="The property that determines that two given individuals are equal." href="http://www.w3.org/2002/07/owl#sameAs"> owl:<span>sameAs</span> </a></label> <div class="c4 value"> <div class="toOneLine"> <a title="<http://data.bibliotheken.nl/doc/thes/p068686943>" class="linkingElement isLocal" href="http://data.bibliotheken.nl/doc/thes/p068686943" > <http://data.bibliotheken.nl/doc/thes/p068686943> </a> </div> </div> <label class="c3"><a data-label="" data-comment="" href="http://schema.org/license"> schema:<span>license</span> </a></label> <div class="c4 value"> <div class="toOneLine"> <a title="<http://creativecommons.org/publicdomain/zero/1.0/>" class=" " href="http://creativecommons.org/publicdomain/zero/1.0/" target="_blank" > <http://creativecommons.org/publicdomain/zero/1.0/> </a> </div> </div> <label class="c3"><a data-label="" data-comment="" href="http://schema.org/isPartOf"> schema:<span>isPartOf</span> </a></label> <div class="c4 value"> <div class="toOneLine"> <a title="<http://data.bibliotheken.nl/id/dataset/persons>" class=" isLocal" href="http://data.bibliotheken.nl/id/dataset/persons" > <http://data.bibliotheken.nl/id/dataset/persons> </a> </div> </div> <label class="c3"><a data-label="" data-comment="" href="http://schema.org/isBasedOn"> schema:<span>isBasedOn</span> </a></label> <div class="c4 value"> <div class="toOneLine"> <a title="<http://services.kb.nl/mdo/oai?verb=GetRecord&identifier=GGC-THES:AC:068686943&metadataPrefix=mdoall>" class=" " href="http://services.kb.nl/mdo/oai?verb=GetRecord&identifier=GGC-THES:AC:068686943&metadataPrefix=mdoall" target="_blank" > <http://services.kb.nl/mdo/oai?verb=GetRecord&identifier=GGC-THES:AC:068686943&metadataPrefix=mdoall> </a> </div> </div> <label class="c3"><a data-label="" data-comment="" href="http://schema.org/mainEntity"> schema:<span>mainEntity</span> </a></label> <div class="c4 value"> <div class="toOneLine"> <a title="<http://data.bibliotheken.nl/id/thes/p068686943>" class=" isLocal" href="http://data.bibliotheken.nl/id/thes/p068686943" > <http://data.bibliotheken.nl/id/thes/p068686943> </a> </div> </div> </div> </div> <div id="inverses" class="empty"></div> <div id="lodCloud"> <h3> data from the linked data cloud </h3> <div class="masonry"></div> </div> <!-- a custom space located before the footer --> <div id="customFooter"> <div id="credits"> <div></div> </div> <menu> </menu> </div> </article> <footer> <div id="download"> <a href="http://lodview.it" id="linkBack"></a> </div> <div id="endpoint"> <ul> <li>data from: <a href="http://data.bibliotheken.nl/sparql">data.bibliotheken.nl/sparql</a></li> <p> view as: <a href="http://data.bibliotheken.nl/id/thes/p068686943.rdf">RDF</a>, <a href="http://data.bibliotheken.nl/id/thes/p068686943.ttl">Turtle</a>, <a href="http://data.bibliotheken.nl/id/thes/p068686943.nt">N-Triples</a>, <a href="http://data.bibliotheken.nl/id/thes/p068686943.json">JSON-LD</a> </p> </ul> </div> </footer> <script> var col1 = 0; var col3 = 0; var paginator = { "to top" : $('body'), "direct relations" : null, "blank nodes" : null, "inverse relations" : null, "data from the linked data cloud" : null }; $('#logo').click(function() { document.location = 'http://data.bibliotheken.nl'; }); var callingPage = null; var callingPageTitles = null; $(function() { /* error images */ lodview.setErrorImage($('#widgets').find('img')); /* improving interface */ lodview.setColumnsSize(); lodview.betterHeader(); $(window).on('resize', function() { lodview.betterHeader(); var img = $('body').find('img.hover'); if (img.length > 0) lodview.zoomHelper(img); var map = $('body').find('#maphover'); if (map.length > 0) lodview.zoomHelper($('body').find('.maphover'), map, true); }); lodview.betterTypes(); lodview.imagesInWidget(); lodview.mapInWidget(); $(document).keyup(function(e) { if (e.keyCode === 27) { //close fullscreen images and maps lodview.closeFull(); } }); /* adding info tooltips */ lodview.infoTooltip('init'); /* footer functions */ lodview.footer(); /* managing languages */ lodview.multiLabels(); /* recovering connected titles from relations */ lodview.connectedResourceTitles(); /* navigation tool */ lodview.rNavigator(); /* grabbing informations from the LOD cloud */ lodview.grabData(); $(window).on('load', function() { /* removing lodCloud block if empty */ if ($('.linkingElement').length > 0) { paginator["data from the linked data cloud"] = $('#lodCloud'); } if ($('#directs').children(":first").length == 0) { $('#directs').addClass("empty"); } else { paginator["direct relations"] = $('#directs'); } if ($('#bnodes').not('.empty').length > 0) { paginator["blank nodes"] = $('#bnodes'); } lodview.imagesInWidget(true); }); }); var lodview = { zoomHelper : function(img, obj, alignLeft,ow,oh) { var l = this; if (alignLeft) { var ww = window.innerWidth; var wh = window.innerHeight; if (obj) { obj.css({ width : ww - 70, height : wh }); } img.css({ width : ww - 70, height : wh, opacity : 0, left : 0, top : 0 }); } else { var ww = window.innerWidth - 100; var wh = window.innerHeight - 100; var w = ww; var h = wh; try { w = ow?ow:img.naturalWidth(); h = oh?oh:img.naturalHeight(); } catch (e) { } if (!w) { w = ww; } if (!h) { h = wh; } // image bigger than the window if (w > ww) { h = ww * h / w; w = ww; } if (h > wh) { w = wh * w / h; h = wh; } if (obj) { obj.css({ width : w, height : h }); } img.css({ width : w, height : h, opacity : 0, left : '50%', top : '50%', marginLeft : -(w / 2), marginTop : -(h / 2) }); } img.fadeTo(300, 1); }, betterTypes:function(){ $('.dType').each(function() { var w = $(this).width(); $(this).closest('div.c2').css({ paddingRight : w + 7 }) }); }, drawMap : function drawMap(id, lat, lon, testoPopup, fullVersion) { var map = null; if (fullVersion) { var map = L.map(id).setView([ lat, lon ], 8); L.marker([ lat, lon ]).addTo(map).bindPopup(testoPopup).openPopup(); } else { map = L.map(id, { scrollWheelZoom : false, zoomControl : false }).setView([ lat, lon ], 3); L.marker([ lat, lon ]).addTo(map); } var osmurl = 'http://{s}.tile.osm.org/{z}/{x}/{y}.png'; if(document.location.href.indexOf('https://') == 0){ osmurl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'; } L.tileLayer(osmurl, { attribution : '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors' }).addTo(map); }, mapInWidget : function(forceLoad) { if ($('map').length > 0) { var l = this; l.drawMap("resourceMap", '', ''); var a = $('#resourceMap'); var w = a.width(); var h = a.height(); var tools = $('<div class="imgTools" style="width:' + w + 'px;height:' + h + 'px;"></div>') var zoom = $('<span class="zoom sp" style="margin-top:' + (h / 2 - 15) + 'px;margin-left:' + (w / 2 - 15) + 'px;"></span>'); tools.append(zoom); zoom.click(function() { l.fullMap('', '', 'Willem I (koning der Nederlanden ; 1772-1843)'); }); a.prepend(tools); a.hover(function() { $(this).find('.imgTools').stop().fadeIn('fast'); }, function() { $(this).find('.imgTools').stop().fadeOut('fast'); }); } }, imagesInWidget : function(forceLoad) { var l = this; if (forceLoad) { $('#widgets>div#images>a>img').load(); } else { $('#widgets>div#images>a>img').load(function() { var w = $(this).width(); var h = $(this).height(); $(this).parent().animate({ minWidth : w }, 'slow', 'swing'); var a = $(this).parent(); var anchor = a.attr("href"); if (anchor) { var tools = $('<div class="imgTools" style="width:' + w + 'px;height:' + h + 'px;"></div>') var zoom = $('<span class="zoom sp" style="margin-left:' + (w / 2 - 15) + 'px;"></span>'); var open = $('<span class="open sp" style="margin-top:' + (h / 2 - 15 - 19) + 'px;margin-left:' + (w / 2 - 7) + 'px;"></span>'); tools.append(open); tools.append(zoom); open.click(function() { window.open($(this).parent().attr("data-href")); }); zoom.click(function() { var aImg = $(this).parent().parent().find('img'); l.fullImg(aImg.clone(true),aImg.naturalWidth(),aImg.naturalHeight()); }); tools.attr("data-href", anchor); a.removeAttr("href"); a.css({ 'cursor' : 'default' }); a.prepend(tools); a.hover(function() { $(this).find('.imgTools').stop().fadeIn('fast'); }, function() { $(this).find('.imgTools').stop().fadeOut('fast'); }); } }); } }, closeFull : function() { $('body').find('div.hover').fadeOut(350, function() { $(this).remove() }); $('body').find('#maphover').fadeOut(200, function() { $(this).remove() }); $('body').find('img.hover').fadeOut(200, function() { $(this).remove() }) }, fullMap : function(lat, lon, testoPopup) { var l = this; $('body').find('.hover').remove(); var layer = $('<div id="hover" class="hover"></div>'); var map = $('<div class="hover maphover"><div id="maphover"></div><div class="closemapzoom sp"></div></div>'); layer.click(function() { l.closeFull(); }); map.find('.closemapzoom').click(function() { l.closeFull(); }); $('body').append(layer); $('body').append(map); l.zoomHelper(map, $('#maphover'), true); layer.fadeIn(300, function() { l.drawMap("maphover", lat, lon, testoPopup, true); }); }, fullImg : function(img,w,h) { var l = this; img.addClass('hover'); $('body').find('.hover').remove(); var layer = $('<div id="hover" class="hover"></div>'); layer.click(function() { l.closeFull(); }); img.click(function() { l.closeFull(); }); $('body').append(layer); layer.fadeIn(300, function() { $('body').append(img); img.show(); img.fadeTo(0, 0); l.zoomHelper(img,null,null,w,h); }); }, betterHeader : function() { var IRI = $('h2>.iri'); var istance = $('h2>.istance'); var istsize = 0; istance.find('a').each(function() { istsize += $(this).width(); }); if (window.innerWidth - IRI.width() - istsize < 250) { istance.css({ "float" : "none", "text-align" : "left", "display" : "block" }); } else { istance.css({ "float" : "right", "text-align" : "right", "display" : "inline-block" }); } }, connectedResourceTitles : function() { var l = this; l.lMessage("loading inverse relations", 'open'); var abouts = []; $('a.isLocal').each(function() { var a = $(this).attr('title').replace(/[><]/g, ''); if ($.inArray(a, abouts) == -1) { abouts.push(a); } }); if (abouts.length > 0) { $('#lconnected').fadeIn('fast'); l.doConnectedResourceTitles(abouts, function() { l.getInverses() }); } else { l.getInverses(); } }, doConnectedResourceTitles : function(abouts, onComplete) { return $.ajax({ url : "http://data.bibliotheken.nl/linkedResourceTitles", data : { "abouts" : abouts, "IRI" : "http://data.bibliotheken.nl/id/thes/p068686943", "sparql" : "http://data.bibliotheken.nl/sparql", "prefix" : "http://data.bibliotheken.nl/" }, method : 'POST', beforeSend : function() { }, success : function(data) { data = $(data); data.find('resource').each(function() { var IRI = $(this).attr("about"); var title = $(this).find("title").text(); $('a.isLocal[title="<' + IRI + '>"]').each(function() { if ($(this).find('tt').length == 0) { $(this).append("<br><span class='derivedTitle'><tt class=\"sp\"></tt>" + title + "</span>"); } }) }); }, error : function(e) { /* TODO: manage errors */ }, complete : function() { /* inverse relations */ if (onComplete) { onComplete(); } } }); }, multiLabels : function() { var l = this; var cLocale = 'en'; $('.value').each(function() { var cnt = $(this); var multipleLang = false; var plang = ""; $('.lang', cnt).each(function() { var lang = $(this).attr("data-lang"); if (lang != plang && plang != '') { multipleLang = true; } plang = lang; }); if (multipleLang) { $('.lang', cnt).each(function() { var lang = $(this).attr("data-lang"); if ($.trim(lang) && cnt.find("span.clang." + lang).length == 0) { var clang = $("<span class=\"clang " + lang + "\">" + lang + "</span>"); clang.click(function() { var lang = $(this).text(); $(this).parent().children('div').hide(); $(this).parent().children('div.lang.' + lang).show(); $(this).parent().children('span.clang').removeClass('sel'); $(this).addClass('sel'); }); cnt.find("div:first").before(clang); } }); cnt.find('.clang').sort(function(a, b) { var contentA = $(a).text(); var contentB = $(b).text(); return (contentA < contentB) ? -1 : (contentA > contentB) ? 1 : 0; }).prependTo(cnt); var btt = cnt.children('span.clang.' + cLocale); if (btt.length == 0) { btt = cnt.children('span.clang.en'); // fallback to // english } if (btt.length == 0) { btt = cnt.children('span.clang:first'); } btt.click(); } else { $('.lang', cnt).each(function() { var lang = $(this).attr("data-lang"); if ($.trim(lang)) { var a = $(this); if (a.find("div.fixed").length > 0) { a = a.find(".fixed"); } a.append("<span class=\"elang\">@" + lang + "</span>"); } $(this).removeClass('lang'); }); } }); }, infoTooltip : function(act, obj) { var l = this; if (act === 'init') { $('[data-label]').each(function() { if ($(this).attr('data-label')) { var iph = $('<span class="iph"></span>'); $(this).before(iph); $(this).parent().hover(function() { l.infoTooltip('showInfoPoint', $(this)); }, function() { l.infoTooltip('remove', $(this)); }); /* * $(this).parent().on('mousemove', function() { * l.infoTooltip('checkInfoPoint', $(this)); }); */ } }); } else if (act === 'checkInfoPoint') { if (obj.find('i').length == 0) { var i = $('<span class="i"><span class="sp"></span></span>'); obj.prepend(i); i.hover(function() { l.infoTooltip('show', obj); }, function() { l.infoTooltip('remove', obj); }); } } else if (act === 'showInfoPoint') { var i = $('<span class="i"><span class="sp"></span></span>'); obj.prepend(i); i.show(); i.hover(function() { l.infoTooltip('show', obj); }, function() { l.infoTooltip('remove', obj); }); } else if (act === 'show') { var data = obj.children('[data-label]'); var t = $('<div class="tooltip" style="display:block;visibility:hidden"><strong>' + data.attr("data-label") + '</strong>' + (data.attr("data-comment") ? '<br />' + data.attr("data-comment") : '') + '</div>'); obj.prepend(t); var th = obj.position().top - $(window).scrollTop() + t.height(); var wh = window.innerHeight - 50; if (th > wh) { t.css({ marginTop : '-' + (t.height() + 23) + 'px' }); } t.css({ display : 'none', visibility : 'visible' }); t.show(); } else if (act === 'remove') { var p = obj.parent(); p.find('.tooltip').fadeOut('fast', function() { $(this).remove(); }); p.find('.i').fadeOut('fast', function() { $(this).remove(); }); } }, getInverses : function() { var l = this; l.lMessage("loading connected resource titles"); var invCont = $('#inverses'); var iri = "http://data.bibliotheken.nl/id/thes/p068686943"; if (iri) { $('#linverse').delay(100).fadeIn('fast'); $.ajax({ url : "http://data.bibliotheken.nl/linkedResourceInverses", method : 'POST', data : { "IRI" : iri, "sparql" : "http://data.bibliotheken.nl/sparql", "prefix" : "http://data.bibliotheken.nl/" }, beforeSend : function() { }, success : function(data) { data = $(data); if (data.find('resource').length > 0) { invCont.removeClass("empty"); invCont.append($("<h3>inverse relations</h3>")); paginator["inverse relations"] = invCont; } data.find('resource').each(function() { var IRI = $(this).attr("nsabout"); if (IRI.indexOf("null:") == 0) { IRI = '<' + $(this).attr("about").replace(/(http:\/\/.+[/#])([^/#]+)$/, '$1<span>$2') + "</span>>"; } else { IRI = IRI.replace(/:/, ':<span>') + '</span>'; } var count = $(this).find("count").text(); var msg = "is {0} of"; // TODO: add link! msg = msg.replace(/\{0\}/, "<a data-comment=\"" + $(this).attr("propertycomment") + "\" data-label=\"" + $(this).attr("propertylabel") + "\" title=\"<" + $(this).attr("about") + ">\">" + IRI); var el = $("<label class=\"c1\" title=\"" + $(this).attr("about") + "\">" + msg + "</label>"); var anchor = $("<a href=\"#openIt\" data-property=\"" + $(this).attr("about") + "\">" + count + " " + (count == 1 ? "resource" : "resources") + "</a>"); anchor.click(function() { if (anchor.parent().hasClass('isOpened')) { anchor.parent().find('.toOneLine,.prevArrow,.nextArrow,.lloadingb').remove(); anchor.parent().removeClass('isOpened'); anchor.parent().removeClass('opened'); } else { var property = $(this).attr('data-property'); var contInverse = $(this).parent(); anchor.parent().addClass("isOpened"); var start = 0; $.ajax({ url : "http://data.bibliotheken.nl/linkedResourceInverses", method : 'POST', data : { "start" : start, "IRI" : "http://data.bibliotheken.nl/id/thes/p068686943", "property" : property, "sparql" : "http://data.bibliotheken.nl/sparql", "prefix" : "http://data.bibliotheken.nl/" }, beforeSend : function() { anchor.parent().find('.toOneLine,.prevArrow,.nextArrow,.lloadingb').remove(); anchor.after("<span class=\"lloadingb\"></span>"); }, success : function(data) { data = $(data); var abouts = []; data.find('resource').each(function() { var IRI = $(this).attr("nsabout"); if (IRI.indexOf("null:") == 0) { IRI = '<' + $(this).attr("about") + ">"; } if (IRI.indexOf(":") == -1) { IRI = "_:" + $(this).attr("about"); } var title = $(this).find("title").text(); var url = $(this).attr("propertyurl") contInverse.append($("<div class='toOneLine' style='display:none'> <a title=\"<" + $(this).attr("about") + ">\" href=\"" + url + "\" class=\"isLocal\">" + IRI + "</a></div>")); abouts.push($(this).attr("about")); }); $('.toOneLine', contInverse).show(); if (count > 10) { anchor.parent().addClass("opened"); } if (abouts.length > 0) { l.doConnectedResourceTitles(abouts, function() { anchor.parent().find('.lloadingb').hide(); }); } else { anchor.parent().find('.lloadingb').hide(); } }, complete : function() { if (count > 10) { var prev = $('<a href="#prev" class="prevArrow sp"></a>'); var next = $('<a href="#next" class="nextArrow sp"></a>'); prev.css({ 'opacity' : '0.3', 'cursor' : 'default' }); next.click(function() { return l.paginating('next', $(this), start, property, count); }); anchor.after(next); anchor.after(prev); } }, error : function() { contInverse.append($("<div class='toOneLine' >sorry, an error occurred</div>")); } }); } return false; }); invCont.append(el); var value = $("<div class=\"c2 value\"></div>"); value.append(anchor); invCont.append(value); if ("open" == "open") { anchor.click(); } }); l.setColumnsSize(true); $('#linverse').append('<span class="ok"><img src="https://data.bibliotheken.nl/staticResources/img/checked' + (isRetina ? '@2x' : '') + '.png" ></span>').find('img').fadeIn('fast'); }, error : function(e) { $('#linverse').append('<span class="error"></span>'); }, complete : function() { l.lMessage(null, 'close'); } }); } }, paginating : function(direction, anchor, start, property, count) { var l = this; if (direction == 'next') { start = start + 10; } else if (start > 0) { start = start - 10; } var contInverse = anchor.parent(); if (callingPage) { callingPage.abort(); } if (callingPageTitles) { callingPageTitles.abort(); } callingPage = $.ajax({ url : "http://data.bibliotheken.nl/linkedResourceInverses", method : 'POST', data : { "start" : start, "IRI" : "http://data.bibliotheken.nl/id/thes/p068686943", "property" : property, "sparql" : "http://data.bibliotheken.nl/sparql", "prefix" : "http://data.bibliotheken.nl/" }, beforeSend : function() { contInverse.find('.toOneLine').addClass('toRemove').css({ 'opacity' : 0.2 }); contInverse.find('.prevArrow,.nextArrow').remove(); contInverse.find('.lloadingb').show(); var prev = $('<a href="#prev" class="prevArrow sp"></a>'); var next = $('<a href="#next" class="nextArrow sp"></a>'); if (start + 10 > count) { next.css({ 'opacity' : '0.3', 'cursor' : 'default' }); } else { next.click(function() { return l.paginating('next', $(this), start, property, count); }); } if (start > 0) { prev.click(function() { return l.paginating('prev', $(this), start, property, count); }); } else { prev.css({ 'opacity' : '0.3', 'cursor' : 'default' }); } contInverse.find('a:first').after(next); contInverse.find('a:first').after(prev); }, success : function(data) { data = $(data); var abouts = []; data.find('resource').each(function() { var IRI = $(this).attr("nsabout"); if (IRI.indexOf("null:") == 0) { IRI = '<' + $(this).attr("about") + ">"; } if (IRI.indexOf(":") == -1) { IRI = "_:" + $(this).attr("about"); } var title = $(this).find("title").text(); var url = $(this).attr("propertyurl") contInverse.append($("<div class='toOneLine' style='display:none'> <a title=\"<" + $(this).attr("about") + ">\" href=\"" + url + "\" class=\"isLocal\">" + IRI + "</a></div>")); abouts.push($(this).attr("about")); }); if (abouts.length > 0) { callingPageTitles = l.doConnectedResourceTitles(abouts, function() { contInverse.find('.toOneLine.toRemove').remove(); $('.toOneLine', contInverse).show(); contInverse.find('.lloadingb').hide(); }); } else { contInverse.find('.toOneLine.toRemove').remove(); $('.toOneLine', contInverse).show(); contInverse.find('.lloadingb').hide(); } anchor.unbind('click'); }, complete : function() { }, error : function() { contInverse.find('.toOneLine').remove(); contInverse.append($("<div class='toOneLine' >sorry, an error occurred</div>")); } }); return false; }, grabData : function() { var l = this; var linkingList = []; var counter = 0; var errors = 0; var map = $('map:first'); $('.linkingElement').each(function() { var link = $.trim($(this).attr("href")); linkingList.push(link); }); /* lod cloud */ if (linkingList.length == 0) { $('#lodCloud').empty(); $('#lodCloud').addClass("empty"); $('#linking').hide(); } else { $('#linking').fadeIn('fast'); var container = $('#lodCloud').children("div"); var dest = $('<div class="connected"><span class="lloading"></span></div>'); var content = $("<div class=\"content\" id='counterBlock'></div>"); content.append("<p id='grabDataTotal'>Resource connected \u003Cstrong\u003E0\u003C\/strong\u003E</p>") content.append("<p id='grabDataTotalErrors'>Resource not online \u003Cstrong\u003E0\u003C\/strong\u003E</p>") content.append("<p id='grabDataTotalLoaded'>Resource loaded \u003Cstrong\u003E0\u003C\/strong\u003E</p>") dest.append(content); container.append(dest); // initialize container.masonry({ itemSelector : '.connected' }); l.updateCounter(linkingList.length, counter, errors); l.grabSingleResource(linkingList, counter, errors, map); } }, grabSingleResource : function(linkingList, counter, errors, map) { var l = this; if (counter < linkingList.length) { var linking = $('#lodCloud').children("div"); $.ajax({ url : "http://data.bibliotheken.nl/linkedResource", method : 'POST', timeout : 10000, // 5 sec. data : { "IRI" : linkingList[counter] }, beforeSend : function() { // console.debug(counter + " -- " + linkingList[counter]) }, success : function(data) { data = $(data); var dest = $('<div class="connected"></div>'); data.find('img:first').each(function() { dest.append("<span class=\"imgCnt sp\"><img class=\"main\" src=\"" + $(this).attr("src") + "\"></span>"); }); var title = (data.find('title').text() != 'null' ? data.find('title').text() : ""); if (data.find('img:first').length == 0 && data.find('longitude').text().replace(/null/, '') && data.find('latitude').text().replace(/null/, '')) { var id = new Date().getMilliseconds(); var map = $('<map id="inlodMap' + id + '" class="inLodMap sp"></map>'); dest.append(map); } l.setErrorImage(dest.find('img')); var content = $("<div class=\"content\"></div>"); content.append("<h5>" + title + "</h5>"); var IRI = data.find('root').attr('about'); content.append("<a class=\"link\" target=\"_blank\" href=\"" + IRI + "\">" + IRI.replace(/([^a-zA-Z0-9])/g, '$1​') + "</a>"); if ($.trim(data.find('description').text())) { var descr = data.find('description').text() + " @" + data.find('description').attr("lang"); descr = descr.replace(/@(null|)$/, ''); content.append("<div>" + descr + "</div>"); } dest.append(content); var tot = data.find('links').attr("tot"); if (parseInt(tot, 10) > 0) { dest.append("<div class=\"more\">" + tot + " " + (tot == 1 ? "connected resource" : "connected resources") + "</div>") } dest.find('img').on('load', function() { linking.masonry(); }).each(function() { if (this.complete) { $(this).load(); } }); counter++; if (!data.find('root').attr('error')) { linking.masonry().append(dest).masonry('appended', dest); if (dest.find('map').length > 0) { l.drawMap(dest.find('map').attr("id"), data.find('latitude').text(), data.find('longitude').text(), title); } data.find('link').each(function() { var a = $(this).attr("href"); if ($.inArray(a, linkingList) == -1 && a != "http://data.bibliotheken.nl/id/thes/p068686943") { linkingList.push(a); } }); } else { errors++; } linking.masonry(); l.grabSingleResource(linkingList, counter, errors, map); l.updateCounter(linkingList.length, counter, errors); }, error : function(e) { l.updateCounter(linkingList.length, (counter + 1), (errors + 1)); l.grabSingleResource(linkingList, (counter + 1), (errors + 1), map); }, complete : function() { } }); } else { $('.connected').find('.lloading').fadeOut(); } }, lMessage : function(msg, action) { var l = this; var lp = $('#loadPanel'); if (action) { if (action == 'open') { if (isChrome) { // moving the panel to the center of the page lp.addClass("cfix"); } lp.fadeIn('fast'); } else { lp.delay(2000).fadeOut('fast'); } } if (msg) { lp.queue(function() { setTimeout(function() { lp.find('.content').remove(); lp.find('#lmessage').append("<span class=\"content\">" + msg + "</span>"); lp.dequeue(); }, action == 'open' ? 0 : 2000); }); } }, slideNext : function(obj) { var l = this; obj.next().slideDown('fast', function() { l.slideNext($(this)); }); }, updateCounter : function(tot, count, errors) { var g = $('#lmessage > .content'); g.children('strong').html(count); g.children('span:last').html(tot); var b = $('#counterBlock'); b.find('p#grabDataTotal > strong').html(tot); b.find('p#grabDataTotalLoaded > strong').html(count - errors); b.find('p#grabDataTotalErrors > strong').html(errors); }, footer : function() { $('#endpoint').find('.viewas').find('a').click(function() { var loc = document.location.href; loc = loc.replace(/#[^#]+/, ''); if (loc.indexOf("?") != -1) { loc += "&output=" + $(this).attr("title"); } else { loc += "?output=" + $(this).attr("title"); } document.location = loc; }); }, setErrorImage : function(obj) { obj.error(function() { $(this).attr("title", "image not available, broken URL?\n" + $(this).attr("src")); $(this).attr("src", "https://data.bibliotheken.nl/staticResources/img/no_image" + (isRetina ? "@2x" : "") + ".png"); $(this).addClass("errorImg"); $(this).unwrap("a"); }); }, rNavigator : function() { var l = this; $('#navigator').find('.top').hover(function() { var e = $(this); if (window.scrollY > 0) { e.addClass('hover'); var a = $('<a href="#top"></a>'); a.click(function() { $('body').scrollTo(0, {}, function() { a.parent().trigger('mouseleave'); a.parent().trigger('mouseenter'); }); return false; }); e.prepend(a); e.prepend("<span>to top</span>"); } }, function() { $(this).removeClass('hover'); $(this).find('span , a').remove(); }); $('#navigator').find('.up').hover(function() { var y = window.scrollY; var prev = null; var e = $(this); $.each(paginator, function(k, v) { if (v && v.position() && y > v.position().top) { prev = {}; prev[k] = v; } }); if (prev) { $.each(prev, function(k, v) { e.addClass('hover'); var a = $('<a href="#' + v.attr("id") + '"></a>'); a.click(function() { $('body').scrollTo(v.position().top, {}, function() { a.parent().trigger('mouseleave'); a.parent().trigger('mouseenter'); }); return false; }); e.prepend(a); e.prepend('<span>' + k + '</span>'); }); } }, function() { $(this).removeClass('hover'); $(this).find('span , a').remove(); }); $('#navigator').find('.down').hover(function() { var y = window.scrollY + 1; var next = null; var e = $(this); $.each(paginator, function(k, v) { if (!next && v && v.position() && y < v.position().top && y + window.innerHeight < $(document).height()) { next = {}; next[k] = v; } }); if (next) { $.each(next, function(k, v) { e.addClass('hover'); var a = $('<a href="#' + v.attr("id") + '"></a>'); a.click(function() { $('body').scrollTo(v.position().top, {}, function() { a.parent().trigger('mouseleave'); a.parent().trigger('mouseenter'); }); return false; }); e.prepend(a); e.prepend('<span>' + k + '</span>'); }); } }, function() { $(this).removeClass('hover'); $(this).find('span , a').remove(); }); $.fn.scrollTo = function(target, options, callback) { if (typeof options == 'function' && arguments.length == 2) { callback = options; options = target; } var settings = $.extend({ scrollTarget : target, offsetTop : 50, duration : 200, easing : 'swing' }, options); return this.each(function() { var scrollPane = $(this); var scrollTarget = (typeof settings.scrollTarget == "number") ? settings.scrollTarget : $(settings.scrollTarget); var scrollY = (typeof scrollTarget == "number") ? scrollTarget : scrollTarget.offset().top + scrollPane.scrollTop() - parseInt(settings.offsetTop); scrollPane.animate({ scrollTop : scrollY }, parseInt(settings.duration), settings.easing, function() { if (typeof callback == 'function') { callback.call(this); } }); }); } // adding naturalWidth and naturalHeight to images function img(url) { var i = new Image; i.src = url; return i; } var props = [ 'Width', 'Height' ], prop; while (prop = props.pop()) { (function(natural, prop) { $.fn[natural] = (natural in new Image()) ? function() { return this[0][natural]; } : function() { var node = this[0], img, value; if (node.tagName.toLowerCase() === 'img') { img = new Image(); img.src = node.src, value = img[prop]; } return value; }; }('natural' + prop, prop.toLowerCase())); } }, setColumnsSize : function(secondTrip) { $('.c1').each(function() { var s = $(this).width(); if (secondTrip) { // occurs after web font rendering s = s - 8; } if (s > col1) { col1 = s; } }); $('.c2').animate({ // 24 = main padding marginLeft : col1 + 24, marginTop : 0 }, 'slow', 'swing', function() { $('.c2').css({ visibility : 'visible' }); }); $('.c3').each(function() { var s = $(this).width(); if (s > col3) { col3 = s; } }); $('.c4').each(function() { var h = $(this).prev('.c3').height(); $(this).animate({ // 24 = main padding marginLeft : col3 + 24, marginTop : 0 }, 'slow'); }); } }; </script> <div id="loadPanel"> <p id="lmessage"> <span class="lloading"></span><span class="content"> </span> </p> </div> <div id="navigator"> <div class="up sp"></div> <div class="top sp"></div> <div class="down sp"></div> </div> </body> </html>