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 '13, 12:01

Luca%20Matteis's gravatar image

Luca Matteis
1.6k39
accept rate: 13%


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 .
  }
}
permanent link

answered 11 Jan '13, 12:19

jindrichm's gravatar image

jindrichm
1.9k210
accept rate: 35%

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

Question tags:

×1,302
×877
×11

question asked: 11 Jan '13, 12:01

question was seen: 880 times

last updated: 11 Jan '13, 12:19