Advertisement
asanchez75

SPARQL/insert

Apr 13th, 2015
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. INSERT
  2. {GRAPH <http://data.linkedmdb.org/linkset> {
  3. ?instance1 owl:sameAs ?instance2.
  4. }}
  5. WHERE
  6. {GRAPH <http://data.linkedmdb.org> {
  7. ?instance1 owl:sameAs ?instance2.
  8. FILTER(REGEX(str(?instance2), 'http://dbpedia.org'))
  9. }}
  10.  
  11. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  12. SELECT * {
  13. ?s rdf:type <http://www.w3.org/2002/07/owl#ObjectProperty>
  14. }
  15. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  16. SELECT * {
  17. ?s rdf:type <http://www.w3.org/2002/07/owl#DatatypeProperty>
  18. }
  19. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  20.  
  21. SELECT DISTINCT *
  22. WHERE {GRAPH <http://data.linkedmdb.org> {
  23. ?instance1 owl:sameAs ?instance2.
  24. OPTIONAL {
  25. GRAPH <http://data.linkedmdb.org> {
  26. ?instance1 rdf:type ?c1.
  27. }}
  28. OPTIONAL {
  29. GRAPH <http://dbpedia.org> {
  30. ?instance2 rdf:type ?c2.
  31. }}
  32. }}
  33. LIMIT 10 OFFSET 0
  34. +++++++++++++++++++++++++++++++++++++++++++++++++++++
  35. SPARQL SELECT DISTINCT * {
  36. GRAPH <http://graph1> {
  37. ?instance1 xlore:hasURL ?propertyValue1.
  38. OPTIONAL {
  39. ?instance1 rdf:type ?c1.
  40. }
  41. OPTIONAL {GRAPH <http://graph2> {
  42. ?instance2 rdf:type ?c2.
  43. ?instance2 foaf:isPrimaryTopicOf ?propertyValue2.
  44. }}
  45. FILTER(str(?propertyValue1) = str(?propertyValue2))
  46. }
  47. }
  48. LIMIT 10 OFFSET 0
  49. +++++++++++++++++++++++++++++++++++++++++++++++++++++
  50. SPARQL SELECT DISTINCT * {
  51. GRAPH <http://graph1> {
  52. ?instance1 xlore:hasURL ?propertyValue1.
  53. OPTIONAL {
  54. ?instance1 owl:InstanceOf ?c1.
  55. }
  56. OPTIONAL {GRAPH <http://graph2> {
  57. ?instance2 rdf:type ?c2.
  58. ?instance2 foaf:isPrimaryTopicOf ?propertyValue2.
  59. }}
  60. FILTER(str(?propertyValue1) = str(?propertyValue2))
  61. }
  62. }
  63. LIMIT 10 OFFSET 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement