lodlive.profile-localhost-example.js 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /*
  2. just an example of configuration useful to redirect all the request on the same endpoint
  3. */
  4. $.jStorage.set('profile', {
  5. // parametri di connessione agli endpoint
  6. 'connection' : {
  7. /*matching all the requested URIs*/
  8. 'http://' : {
  9. description : {
  10. en : 'just a test'
  11. },
  12. useForInverseSameAs : true,
  13. /*change this*/
  14. endpoint : 'http://localhost:8890/sparql',
  15. examples : [{
  16. label : 'test 1',
  17. uri : 'http://mysite.com/aaa'
  18. }, {
  19. label : 'test 2',
  20. uri : 'http://your.com/bbbb'
  21. }]
  22. }
  23. },
  24. arrows : {
  25. 'http://www.w3.org/2002/07/owl#sameAs' : 'isSameAs',
  26. 'http://purl.org/dc/terms/isPartOf' : 'isPartOf',
  27. 'http://purl.org/dc/elements/1.1/type' : 'isType',
  28. 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type' : 'isType'
  29. },
  30. uriSubstitutor : [{
  31. findStr : 'mpii.de/yago/resource/',
  32. replaceStr : 'yago-knowledge.org/resource/'
  33. }],
  34. // configurazione standard per la rappresentazione di un documento
  35. // utilizzata nel caso manchi una specifica configurazione per la classe
  36. 'default' : {
  37. sparql : {
  38. allClasses : 'SELECT DISTINCT ?object WHERE {[] a ?object}',
  39. findSubject : 'SELECT DISTINCT ?subject WHERE { {?subject a <{CLASS}>;<http://purl.org/dc/elements/1.1/title> ?object. FILTER(regex(str(?object),\'{VALUE}\',\'i\'))} UNION {?subject a <{CLASS}>;<http://www.w3.org/2000/01/rdf-schema#label> ?object. FILTER(regex(str(?object),\'{VALUE}\',\'i\'))} UNION {?subject a <{CLASS}>;<http://www.w3.org/2004/02/skos/core#prefLabel> ?object. FILTER(regex(str(?object),\'{VALUE}\',\'i\'))} } LIMIT 1 ',
  40. documentUri : 'SELECT DISTINCT * WHERE {<{URI}> ?property ?object} ORDER BY ?property',
  41. document : 'SELECT DISTINCT * WHERE {<{URI}> ?property ?object}',
  42. bnode : 'SELECT DISTINCT * WHERE {<{URI}> ?property ?object}',
  43. inverse : 'SELECT DISTINCT * WHERE {?object ?property <{URI}>.} LIMIT 100',
  44. inverseSameAs : 'SELECT DISTINCT * WHERE {{?object <http://www.w3.org/2002/07/owl#sameAs> <{URI}> } UNION { ?object <http://www.w3.org/2004/02/skos/core#exactMatch> <{URI}>}}'
  45. },
  46. endpoint : 'http://labs.regesta.com/resourceProxy/',
  47. document : {
  48. className : 'standard',
  49. titleProperties : ['http://dati.senato.it/osr/titolo', 'http://www.w3.org/2004/02/skos/core#notation', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#value', 'http://www.geonames.org/ontology#name', 'http://purl.org/dc/elements/1.1/title', 'http://purl.org/dc/terms/title', 'http://www.w3.org/2000/01/rdf-schema#label', 'http://www.w3.org/2004/02/skos/core#prefLabel', 'http://logd.tw.rpi.edu/source/visualizing-org/dataset/2010-global-agenda-council-interlinkage-survey/vocab/enhancement/1/how_councils_interlink', 'http://rdf.freebase.com/ns/type.object.name', 'http://spcdata.digitpa.gov.it/nome_cognome', 'http://xmlns.com/foaf/0.1/firstName', 'http://xmlns.com/foaf/0.1/lastName', 'http://xmlns.com/foaf/0.1/surname', 'http://xmlns.com/foaf/0.1/name', 'http://purl.org/dc/terms/description', 'http://www.geonames.org/ontology/officialName']
  50. }, // http://www.w3.org/2000/01/rdf-schema#label
  51. images : {
  52. properties : ['http://www.w3.org/2006/vcard/ns#photo', 'http://xmlns.com/foaf/0.1/depiction', 'http://dbpedia.org/ontology/thumbnail', 'http://dbpedia.org/property/logo', 'http://linkedgeodata.org/ontology/schemaIcon']
  53. },
  54. maps : {
  55. longs : ['http://www.w3.org/2003/01/geo/wgs84_pos#long'],
  56. lats : ['http://www.w3.org/2003/01/geo/wgs84_pos#lat'],
  57. points : ['http://www.georss.org/georss/point']
  58. },
  59. weblinks : {
  60. properties : ['http://www.w3.org/ns/dcat#accessURL', 'http://xmlns.com/foaf/0.1/mbox', 'http://rdfs.org/sioc/ns#links_to', 'http://it.dbpedia.org/property/url', 'http://data.nytimes.com/elements/search_api_query', 'http://www.w3.org/2000/01/rdf-schema#isDefinedBy', 'http://xmlns.com/foaf/0.1/page', 'http://xmlns.com/foaf/0.1/homepage', 'http://purl.org/dc/terms/isReferencedBy', 'http://purl.org/dc/elements/1.1/relation', 'http://dbpedia.org/ontology/wikiPageExternalLink', 'http://data.nytimes.com/elements/topicPage']
  61. }
  62. },
  63. 'http://www.w3.org/2002/07/owl#Class' : {
  64. document : {
  65. className : 'Class'/*,
  66. titleProperties : ['http://purl.org/dc/elements/1.1/title', 'http://www.w3.org/2000/01/rdf-schema#label']*/
  67. }
  68. },
  69. 'http://www.w3.org/2002/07/owl#ObjectProperty' : {
  70. document : {
  71. className : 'ObjectProperty'
  72. }
  73. },
  74. 'http://www.w3.org/2002/07/owl#Restriction' : {
  75. document : {
  76. className : 'DatatypeProperty'
  77. }
  78. },
  79. 'http://www.w3.org/2002/07/owl#DatatypeProperty' : {
  80. document : {
  81. className : 'DatatypeProperty'
  82. }
  83. },
  84. 'http://www.w3.org/2002/07/owl#Property' : {
  85. document : {
  86. className : 'Property'
  87. }
  88. },
  89. 'http://www.w3.org/ns/locn#Address' : {
  90. document : {
  91. titleProperties : ['http://www.w3.org/ns/locn#fullAddress']
  92. }
  93. }
  94. });
  95. if (!document.lodliveVars) {
  96. document.lodliveVars = {};
  97. }
  98. $.jStorage.set('boxTemplate', '<div class="boxWrapper" id="first"><div class="box sprite"></div></div>');
  99. $.jStorage.set('relationsLimit', 25);
  100. $.jStorage.set('doStats', $.jStorage.get('doStats', true));
  101. $.jStorage.set('doInverse', $.jStorage.get('doAutoExpand', true));
  102. $.jStorage.set('doAutoExpand', $.jStorage.get('doAutoExpand', true));
  103. $.jStorage.set('doAutoSameas', $.jStorage.get('doAutoSameas', true));
  104. $.jStorage.set('doCollectImages', $.jStorage.get('doCollectImages', true));
  105. $.jStorage.set('doDrawMap', $.jStorage.get('doDrawMap', true));
  106. $.jStorage.set('showInfoConsole', $.jStorage.get('showInfoConsole', true));
  107. $.jStorage.set('endpoints', {
  108. all : 'output=json&format=application/json&timeout=0',
  109. arcSparql : 'output=json&jsonp=lodlive',
  110. sesame : 'Accept=application/sparql-results%2Bjson'
  111. });