Say I have some RDF data (showing N-Triples version for clarity): http://codepad.org/VRWbtLc7

As you can see, the predicate "title" has the same meaning, but it's using two different URI's. Therefore people searching through this data using SPARQL, will have to specify both predicates. For users this is extremely cumbersome because they first have to understand whether those two URI actually mean the same thing, and then specify both of them in the query.

Is there anything I can do to make my life, and my users life easier?

asked 11 Jan, 12:01

lmatteis's gravatar image

lmatteis
98617
accept rate: 12%


Sure, you can use predicates such as owl:equivalentProperty to make your intuition about the equivalence of your two properties explicit:

@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix foo: <http://foo.org/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .

dcterms:title owl:equivalentProperty foo:title .

Then you can expand your queries to include objects of all predicates that were marked as equivalent. Something like the following SPARQL query should work:

PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>

SELECT ?title
WHERE {
  {
    ?resource dcterms:title ?title .
  } UNION {
    {
      ?property owl:equivalentProperty dcterms:title .
    } UNION {
      dcterms:title owl:equivalentProperty ?property .
    }
    ?resource ?property ?title .
  }
}
link

answered 11 Jan, 12:19

jindrichm's gravatar image

jindrichm
1.4k110
accept rate: 32%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×904
×646
×8

Asked: 11 Jan, 12:01

Seen: 326 times

Last updated: 11 Jan, 12:19