You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by José Luis Larroque <la...@gmail.com> on 2014/02/03 20:48:01 UTC

Can´t retrieve movie genre of LinkedMDB

Hi!, I'm doing the following query in a sparql endpoint, and it works:

 PREFIX movie: <http://data.linkedmdb.org/resource/movie/film>
 PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
 PREFIX dc: <http://purl.org/dc/terms/>
 SELECT ?resource ?id WHERE {
    ?resource movie:id ?id .
    FILTER (?id = 72) .
}

but if i add genre, it doesn't work;
 PREFIX movie: <http://data.linkedmdb.org/resource/movie/film>
 PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
 PREFIX dc: <http://purl.org/dc/terms/>
 SELECT ?resource ?id ?genero WHERE {
    ?resource movie:id ?id .
    ?resource movie:genre ?genero .
    FILTER (?id = 72) .
}


With "this doesnt't work" i mean, it works, but it doesn't find anything.
The same happens for every attribute of "movie" type in page of
LinkedMDB<http://data.linkedmdb.org/page/film/2045>here , for some
reason i can't select them, i'm doing anything wrong?

Bye

Re: Can´t retrieve movie genre of LinkedMDB

Posted by José Luis Larroque <la...@gmail.com>.
Yes! that's why !

Thanks Andy.


2014-02-03 Andy Seaborne <an...@apache.org>:

> On 03/02/14 19:48, José Luis Larroque wrote:
>
>> Hi!, I'm doing the following query in a sparql endpoint, and it works:
>>
>>   PREFIX movie: <http://data.linkedmdb.org/resource/movie/film>
>>   PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
>>   PREFIX dc: <http://purl.org/dc/terms/>
>>   SELECT ?resource ?id WHERE {
>>      ?resource movie:id ?id .
>>      FILTER (?id = 72) .
>> }
>>
>> but if i add genre, it doesn't work;
>>   PREFIX movie: <http://data.linkedmdb.org/resource/movie/film>
>>   PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
>>   PREFIX dc: <http://purl.org/dc/terms/>
>>   SELECT ?resource ?id ?genero WHERE {
>>      ?resource movie:id ?id .
>>      ?resource movie:genre ?genero .
>>      FILTER (?id = 72) .
>> }
>>
>>
>> With "this doesnt't work" i mean, it works, but it doesn't find anything.
>> The same happens for every attribute of "movie" type in page of
>> LinkedMDB<http://data.linkedmdb.org/page/film/2045>here , for some
>>
>> reason i can't select them, i'm doing anything wrong?
>>
>> Bye
>>
>>
> You have
>
> movie: <http://data.linkedmdb.org/resource/movie/film>
>
> which is different.
>
> so movie:id is
>
> <http://data.linkedmdb.org/resource/movie/filmid>
>
> and  movie:genre is
>
> <http://data.linkedmdb.org/resource/movie/filmgenre>
>
> You meant:
>
> movie: <http://data.linkedmdb.org/resource/movie/>
>
> then
>
> movie:filmid
> movie:genre
>
>         Andy
>
>

Re: Can´t retrieve movie genre of LinkedMDB

Posted by Andy Seaborne <an...@apache.org>.
On 03/02/14 19:48, José Luis Larroque wrote:
> Hi!, I'm doing the following query in a sparql endpoint, and it works:
>
>   PREFIX movie: <http://data.linkedmdb.org/resource/movie/film>
>   PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
>   PREFIX dc: <http://purl.org/dc/terms/>
>   SELECT ?resource ?id WHERE {
>      ?resource movie:id ?id .
>      FILTER (?id = 72) .
> }
>
> but if i add genre, it doesn't work;
>   PREFIX movie: <http://data.linkedmdb.org/resource/movie/film>
>   PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
>   PREFIX dc: <http://purl.org/dc/terms/>
>   SELECT ?resource ?id ?genero WHERE {
>      ?resource movie:id ?id .
>      ?resource movie:genre ?genero .
>      FILTER (?id = 72) .
> }
>
>
> With "this doesnt't work" i mean, it works, but it doesn't find anything.
> The same happens for every attribute of "movie" type in page of
> LinkedMDB<http://data.linkedmdb.org/page/film/2045>here , for some
> reason i can't select them, i'm doing anything wrong?
>
> Bye
>

You have

movie: <http://data.linkedmdb.org/resource/movie/film>

which is different.

so movie:id is

<http://data.linkedmdb.org/resource/movie/filmid>

and  movie:genre is

<http://data.linkedmdb.org/resource/movie/filmgenre>

You meant:

movie: <http://data.linkedmdb.org/resource/movie/>

then

movie:filmid
movie:genre

	Andy