unique-should-properties-spoi-sparql.txt 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. geo:asWKT (errors)
  2. poi:address (no)
  3. dc:identifier (no)
  4. dc:rights (no)
  5. locn:locatorDesignator (error)
  6. locn:adminUnitL1 (no)
  7. locn:fullAddress (error)
  8. locn:postCode (no)
  9. locn:postName (error)
  10. poi:region (error)
  11. <http://www.w3.org/ns/locnfullAddress> (no)
  12. PREFIX geo: <http://www.opengis.net/ont/geosparql#>
  13. PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
  14. PREFIX virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
  15. PREFIX poi: <http://www.openvoc.eu/poi#>
  16. PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
  17. PREFIX locn: <http://www.w3.org/ns/locn#>
  18. PREFIX dc: <http://purl.org/dc/elements/1.1/>
  19. SELECT ?Resource
  20. FROM <http://www.sdi4apps.eu/poi.rdf>
  21. WHERE {
  22. ?Resource poi:region ?obj .
  23. }
  24. GROUP BY ?Resource
  25. HAVING(COUNT(?obj) > 1)
  26. #limit 10
  27. ### different languages label
  28. ''
  29. ru
  30. de
  31. pt
  32. en
  33. fr
  34. it
  35. cs
  36. ro
  37. pl
  38. fi
  39. la
  40. es
  41. cz
  42. lv
  43. PREFIX geo: <http://www.opengis.net/ont/geosparql#>
  44. PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
  45. PREFIX virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
  46. PREFIX poi: <http://www.openvoc.eu/poi#>
  47. PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
  48. PREFIX locn: <http://www.w3.org/ns/locn#>
  49. PREFIX dc: <http://purl.org/dc/elements/1.1/>
  50. SELECT distinct (lang(?obj))
  51. FROM <http://www.sdi4apps.eu/poi.rdf>
  52. WHERE {
  53. ?Resource rdfs:label ?obj .
  54. }
  55. #### different language title
  56. ''
  57. en
  58. de
  59. cs
  60. PREFIX geo: <http://www.opengis.net/ont/geosparql#>
  61. PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
  62. PREFIX virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
  63. PREFIX poi: <http://www.openvoc.eu/poi#>
  64. PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
  65. PREFIX locn: <http://www.w3.org/ns/locn#>
  66. PREFIX dc: <http://purl.org/dc/elements/1.1/>
  67. SELECT DISTINCT ?Resource1 ?Resource2
  68. FROM <http://www.sdi4apps.eu/poi/czech>
  69. WHERE {
  70. ?Resource1 a ?type1 .
  71. ?Resource1 rdfs:label ?label1 .
  72. ?Resource2 a ?type2 .
  73. ?Resource2 rdfs:label ?label2 .
  74. #FILTER(lcase(str(?label1) = lcase(str(?label1) ) .
  75. FILTER ( ?Resource1 != ?Resource2 )
  76. FILTER regex(?label1, ?label2, "i")
  77. }
  78. limit 10
  79. ###
  80. PREFIX geo: <http://www.opengis.net/ont/geosparql#>
  81. PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
  82. PREFIX virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
  83. PREFIX poi: <http://www.openvoc.eu/poi#>
  84. PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
  85. PREFIX locn: <http://www.w3.org/ns/locn#>
  86. PREFIX dc: <http://purl.org/dc/elements/1.1/>
  87. SELECT DISTINCT ?Resource1 ?Resource2
  88. FROM <http://www.sdi4apps.eu/poi.rdf>
  89. WHERE {
  90. ?Resource1 a ?type1 .
  91. ?Resource1 rdfs:label ?label1 .
  92. ?Resource2 a ?type2 .
  93. ?Resource2 rdfs:label ?label2 .
  94. FILTER (lcase(str(?label1)) = lcase(str(?label2) )) .
  95. FILTER ( ?Resource1 != ?Resource2 )
  96. #FILTER bif:contains(str(?label1), str(?label2))
  97. }
  98. limit 10
  99. ########
  100. PREFIX geo: <http://www.opengis.net/ont/geosparql#>
  101. PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
  102. PREFIX virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
  103. PREFIX poi: <http://www.openvoc.eu/poi#>
  104. PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
  105. PREFIX locn: <http://www.w3.org/ns/locn#>
  106. PREFIX dc: <http://purl.org/dc/elements/1.1/>
  107. PREFIX units: <http://www.opengis.net/def/uom/OGC/1.0/>
  108. SELECT DISTINCT ?Resource1 ?Resource2 ?distance
  109. FROM <http://www.sdi4apps.eu/poi/czech>
  110. WHERE {
  111. ?Resource1 a ?type1 .
  112. ?Resource1 rdfs:label ?label1 .
  113. ?Resource1 geo:asWKT ?geo1 .
  114. ?Resource2 a ?type2 .
  115. ?Resource2 rdfs:label ?label2 .
  116. ?Resource2 geo:asWKT ?geo2 .
  117. FILTER (lcase(str(?label1)) = lcase(str(?label2) )) .
  118. FILTER ( ?Resource1 != ?Resource2 && ?Resource1 < ?Resource2)
  119. FILTER (NOT EXISTS {?x a ?Resource1} && NOT EXISTS {?y a ?Resource2}) .
  120. BIND (geof:distance ( ?geo1 , ?geo2 , units:meter ) as ?distance) .
  121. FILTER ( ?distance < 1000 )
  122. }
  123. LIMIT 1000
  124. OFFSET 0