All,

I have the following query, which is a rather complex one. The weird thing 
about it is that I have a LIMIT 4 at the end, but it still gives 6 solutions. 
I'm a bit uncertain about how LIMIT should work, but to me this looks wrong.


prefix dct:<http://purl.org/dc/terms/> 
prefix rdfs:<http://www.w3.org/2000/01/rdf-schema#>

CONSTRUCT { ?resource dct:title ?title ; 
                      a ?type }

FROM <http://msone.computas.no/graphs/inferred/classification> 
FROM <http://msone.computas.no/graphs>
FROM <http://msone.computas.no/graphs/instance/nfi> 
FROM <http://msone.computas.no/graphs/instance/mo> 
FROM <http://msone.computas.no/graphs/ontology/mediasone>
FROM <http://msone.computas.no/graphs/vocab/mediasone> 
FROM <http://msone.computas.no/graphs/inferred/nfi/realisation1>
FROM <http://msone.computas.no/graphs/inferred/mo/realisation1> 
FROM <http://msone.computas.no/graphs/inferred/nfi/realisation2>
FROM <http://msone.computas.no/graphs/inferred/mo/realisation2> 
FROM <http://msone.computas.no/graphs/inferred/agent-classification> 
FROM <http://msone.computas.no/graphs/ontology/mediasone/agent>

WHERE {
  {
        ?resource a ?type .
        FILTER (?type = <http://www.w3.org/2002/07/owl#Class> ) .  
        ?resource rdfs:label ?title . 
  } UNION {
        ?resource a ?type .
        FILTER (?type = <http://musicbrainz.org/mm/mm-2.1#Track> ) .
        ?resource dct:title ?title .
  } UNION {
        ?resource a ?type .
        FILTER (?type = 
<http://www.csd.abdn.ac.uk/~ggrimnes/dev/imdb/IMDB#Movie> ).
        ?resource dct:title ?title .
  } UNION {
        ?resource a ?type .
        FILTER (?type = <http://xmlns.com/foaf/0.1/Image> ) .
        ?resource dct:title ?title .
  } UNION {
        ?resource a ?type .
        FILTER (?type = <http://www.computas.com/mediasone#Text> ) .
        ?resource dct:title ?title .
  }
  FILTER regex(?title, "turi", "i") 
}  
ORDER BY ?title LIMIT 4 OFFSET 0 

The query can be run at this endpoint:
http://msoneutv.computas.no:8890/sparql

Can anyone explain why this happens?

Kind regards 

Kjetil Kjernsmo
-- 
Senior Knowledge Engineer
Mobile: +47 986 48 234
Email: kjetil.kjern...@computas.com   
Web: http://www.computas.com/

|  SHARE YOUR KNOWLEDGE  |

Computas AS  PO Box 482, N-1327 Lysaker | Phone:+47 6783 1000 | Fax:+47 6783 
1001


Reply via email to