angular.module("ml.lodlive",["ml.lodlive.tpls"]),function(){"use strict";angular.module("ml.lodlive").directive("mlLodlive",[function(){return{restrict:"E",replace:!0,scope:{iri:"=",profile:"=",zooming:"@"},template:'
',link:function(e,t,o){e.$watch("iri",function(o,r){o&&angular.element(t).lodlive({profile:e.profile,firstUri:o,ignoreBnodes:!0})})}}}])}(),function(){"use strict";angular.module("ml.lodlive").directive("mlLodliveLegend",[function(){return{restrict:"E",controller:"MLLodliveLegendCtrl",replace:!0,scope:{profile:"=",zooming:"="},templateUrl:"/ml-lodlive-ng/ml-lodlive-legend-dir.html"}}]).controller("MLLodliveLegendCtrl",["$scope",function(e){function t(){if(o.profile.UI&&o.profile.UI.relationships){var e=o.profile.UI.relationships;for(var t in e)if(e.hasOwnProperty(t)){var r=e[t].title||t;r.indexOf("#")>-1?r=r.substring(r.lastIndexOf("#")+1):r.indexOf("/")>-1&&(r=r.substring(r.lastIndexOf("/")+1)),o.relationships.push({icon:"fa fa-circle",title:r,style:"color: "+e[t].color})}}}var o={profile:e.profile,showLegend:!1,items:[{icon:"fa fa-list",title:"Document Information"},{icon:"fa fa-cog",title:"Tools"},{icon:"fa fa-arrows-alt",title:"Expand All"},{icon:"fa fa-info-circle",title:"More Information"},{icon:"fa fa-dot-circle-o",title:"Make Root Node"},{icon:"fa fa-external-link",title:"Open In Another Page"},{icon:"fa fa-trash-o",title:"Remove the Node"},{icon:"fa fa-certificate",title:"Group of Related Items"},{icon:"fa fa-circle",title:"Related Item"}],relationships:[]};t();var r=1;angular.extend(e,{model:o,zoomReset:function(){r=1;var e=$(".lodlive-graph-context")[0];e.style.transform="scale("+r+")"},zoomIn:function(){r+=.1;var e=$(".lodlive-graph-context")[0];e.style.transform="scale("+r+")"},zoomOut:function(){r-=.1;var e=$(".lodlive-graph-context")[0];e.style.transform="scale("+r+")"}})}])}(),function(){"use strict";angular.module("ml.lodlive").factory("MLLodliveProfileFactory",[function(){var e={};e.connection={"http:":{description:{it:"DBpedia is a community effort to extract structured information from Wikipedia and to make this information available on the Web. DBpedia allows you to ask sophisticated queries against Wikipedia, and to link other data sets on the Web to Wikipedia data.",en:"DBpedia is a community effort to extract structured information from Wikipedia and to make this information available on the Web. DBpedia allows you to ask sophisticated queries against Wikipedia, and to link other data sets on the Web to Wikipedia data."},sparql:{allClasses:"SELECT DISTINCT ?object WHERE {[] a ?object} ORDER BY ?object LIMIT 50 ",findSubject:"SELECT DISTINCT ?subject WHERE { {?subject a <{CLASS}>; ?object. FILTER(regex(str(?object),'{VALUE}','i'))} UNION {?subject a <{CLASS}>; ?object. FILTER(regex(str(?object),'{VALUE}','i'))} UNION {?subject a <{CLASS}>; ?object. FILTER(regex(str(?object),'{VALUE}','i'))} } LIMIT 1",documentUri:"SELECT DISTINCT * WHERE {<{URI}> ?property ?object.FILTER ((( isIRI(?object) && ?property != )|| ?property = || ?property = || ?property = || ?property = || ?property = ))} ORDER BY ?property",document:'SELECT DISTINCT * WHERE {{<{URI}> ?property ?object. FILTER(!isLiteral(?object))} UNION {<{URI}> ?property ?object.FILTER(isLiteral(?object)).FILTER(lang(?object) ="it")} UNION {<{URI}> ?property ?object.FILTER(isLiteral(?object)).FILTER(lang(?object) ="en")}} ORDER BY ?property',bnode:"SELECT DISTINCT * WHERE {<{URI}> ?property ?object}",inverse:"SELECT DISTINCT * WHERE {?object ?property <{URI}> FILTER(REGEX(STR(?object),'//dbpedia.org'))} LIMIT 100",inverseSameAs:"SELECT DISTINCT * WHERE {?object <{URI}> FILTER(REGEX(STR(?object),'//dbpedia.org'))}"},useForInverseSameAs:!0,endpoint:"http://dbpedia.org/sparql"}},e.arrows={"http://www.w3.org/2002/07/owl#sameAs":"isSameAs","http://purl.org/dc/terms/isPartOf":"isPartOf","http://purl.org/dc/elements/1.1/type":"isType","http://www.w3.org/1999/02/22-rdf-syntax-ns#type":"isType"},e["default"]={sparql:{allClasses:"SELECT DISTINCT ?object WHERE {[] a ?object}",findSubject:"SELECT DISTINCT ?subject WHERE { {?subject a <{CLASS}>; ?object. FILTER(regex(str(?object),'{VALUE}','i'))} UNION {?subject a <{CLASS}>; ?object. FILTER(regex(str(?object),'{VALUE}','i'))} UNION {?subject a <{CLASS}>; ?object. FILTER(regex(str(?object),'{VALUE}','i'))} } LIMIT 1 ",documentUri:"SELECT DISTINCT * WHERE {<{URI}> ?property ?object} ORDER BY ?property",document:"SELECT DISTINCT * WHERE {<{URI}> ?property ?object}",bnode:"SELECT DISTINCT * WHERE {<{URI}> ?property ?object}",inverse:"SELECT DISTINCT * WHERE {?object ?property <{URI}>.} LIMIT 100",inverseSameAs:"SELECT DISTINCT * WHERE {{?object <{URI}> } UNION { ?object <{URI}>}}"},endpoint:"http://labs.regesta.com/resourceProxy/",document:{className:"standard",titleName:"none",titleProperties:["http://xmlns.com/foaf/0.1/name"]}},e.UI={ignoreBnodes:!0,nodeIcons:[{builtin:"tools"},{builtin:"docInfo"},{icon:"fa fa-refresh",title:"Randomize node color",handler:function(e,t){var o="#"+Math.floor(16777216*Math.random()).toString(16);e.find(".lodlive-node-label").css("backgroundColor",o)}}],tools:[{builtin:"remove"},{builtin:"rootNode"},{builtin:"expand"}],nodeHover:function(){},relationships:{"http://www.w3.org/1999/02/22-rdf-syntax-ns#type":{color:"#000"},"http://www.w3.org/2004/02/skos/core#broader":{color:"#69C"},"http://www.w3.org/2004/02/skos/core#related":{color:"#FFF444"}}},e.endpoints={all:"output=json&format=json&timeout=0",jsonp:!0};var t={};return t.connection={"http:":{endpoint:"/v1/graphs/sparql",accepts:"application/sparql-results+json",description:{en:"MarkLogic LodLive"}}},t.arrows={"http://www.w3.org/2002/07/owl#sameAs":"isSameAs","http://purl.org/dc/terms/isPartOf":"isPartOf","http://purl.org/dc/elements/1.1/type":"isType","http://www.w3.org/1999/02/22-rdf-syntax-ns#type":"isType","http://ieee.org/concept/coContrib":"Contributor To","http://ieee.org/concept/hasAffiliation":"Has Affiliation"},t["default"]={sparql:{allClasses:"SELECT DISTINCT ?object WHERE {[] < ?object}",findSubject:"SELECT DISTINCT ?subject WHERE { {?subject a <{CLASS}>; ?object. FILTER(regex(str(?object),'{VALUE}','i'))} UNION {?subject a <{CLASS}>; ?object. FILTER(regex(str(?object),'{VALUE}','i'))} UNION {?subject a <{CLASS}>; ?object. FILTER(regex(str(?object),'{VALUE}','i'))} UNION {?subject a <{CLASS}>; ?object. FILTER(regex(str(?object),'{VALUE}','i'))} } LIMIT 1 ",documentUri:"SELECT DISTINCT * WHERE {<{URI}> ?property ?object} ORDER BY ?property",document:"SELECT DISTINCT * WHERE {<{URI}> ?property ?object}",bnode:"SELECT DISTINCT * WHERE {<{URI}> ?property ?object}",inverse:"SELECT DISTINCT * WHERE {?object ?property <{URI}>.} LIMIT 100",inverseSameAs:"SELECT DISTINCT * WHERE {{?object <{URI}> } UNION { ?object <{URI}>}}"},document:{className:"standard",titleProperties:["http://www.w3.org/2004/02/skos/core#prefLabel","http://xmlns.com/foaf/0.1/name","http://purl.org/dc/elements/1.1/title","http://www.w3.org/2000/01/rdf-schema#label","http://purl.org/dc/terms/title"]}},t.UI={ignoreBnodes:!1,nodeIcons:[{builtin:"tools"},{builtin:"docInfo"}],tools:[{builtin:"remove"},{builtin:"rootNode"},{builtin:"expand"}],nodeHover:function(){},relationships:{"http://www.w3.org/1999/02/22-rdf-syntax-ns#type":{color:"#000",title:"rdf:type"},"http://www.w3.org/1999/02/22-rdf-syntax-ns#instance":{color:"#000",title:"rdf:instance"},"http://www.w3.org/2004/02/skos/core#broader":{color:"#69C",title:"skos:broader"},"http://www.w3.org/2004/02/skos/core#narrower":{color:"#69C",title:"skos:narrower"},"http://www.w3.org/2004/02/skos/core#related":{color:"#69C",title:"skos:related"},"http://www.w3.org/2002/07/owl#imports":{color:"#FA0527",title:"owl:imports"},"http://www.w3.org/2002/07/owl#sameAs":{color:"#FA0527",title:"owl:sameAs"},"http://www.w3.org/2000/01/rdf-schema#subClassOf":{color:"#FA7F05",title:"rdfs:subClassOf"},"http://www.w3.org/2000/01/rdf-schema#isDefinedBy":{color:"#FA7F05",title:"rdfs:isDefinedBy"},"http://ieee.org/concept/hasAffiliation":{color:"#588F27",title:"ieee:hasAffiliation"},"http://purl.org/dc/elements/1.1/contributor":{color:"#04756F",title:"dc:contributor"}}},t.endpoints={all:"",jsonp:!1},{profile:function(o){return"dbpedia"===o?e:t}}}])}(),function(e){try{e=angular.module("ml.lodlive.tpls")}catch(t){e=angular.module("ml.lodlive.tpls",[])}e.run(["$templateCache",function(e){e.put("/ml-lodlive-ng/ml-lodlive-legend-dir.html",'

Legend

{{item.title}}
Relationships
{{rel.title}}
other
')}])}();