protege sparql query not showing results

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

protege sparql query not showing results

stanimir
Hi everyone,
I'm a student master degree and i have to make project in protege.
I made the ontology but my sparql queries are not showing results. I have
individuals for every class, object and data properties.
My query is:

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX stg: <http://www.strategy.com/Game#>
SELECT ?game ?hero
WHERE { ?game stg:hasHero ?hero }
ORDER BY ?game

I need to know what's wrong with it.
Can someone help me. My ontology is
StrategyGameOntology.owl
<http://protege-project.136.n4.nabble.com/file/t377187/StrategyGameOntology.owl>

Thanks,
Stanimir
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: protege sparql query not showing results

samsontu
None of your game individuals has the property assertion stg:hasHero ?hero.

With best regards,
Samson


On Jan 15, 2020, at 7:06 AM, Ivan Petkov <[hidden email]> wrote:

Hi everyone,
I'm a student master degree and i have to make project in protege.
I made the ontology but my sparql queries are not showing results. I have
individuals for every class, object and data properties.
My query is:

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX stg: <http://www.strategy.com/Game#>
SELECT ?game ?hero
WHERE { ?game stg:hasHero ?hero }
ORDER BY ?game

I need to know what's wrong with it.
Can someone help me. My ontology is
StrategyGameOntology.owl
<http://protege-project.136.n4.nabble.com/file/t377187/StrategyGameOntology.owl>

Thanks,
Stanimir
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

smime.p7s (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: protege sparql query not showing results

stanimir
So you want to say that the correct statement is ?hero stg:hasHero ?game



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: protege sparql query not showing results

Lorenz Buehmann
No ... there is no use of the property stg:hasHero at all. Look at the
data, there are a few instances of class stg:game with no more
information attached and a bunch of other stuff like heros and towers.
But there is no connection between the games and those other entities.

On 15.01.20 20:34, stanimir wrote:

> So you want to say that the correct statement is ?hero stg:hasHero ?game
>
>
>
> --
> Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: protege sparql query not showing results

stanimir
I just want to bring out all games that have a certain type of joker using
hasJoker property



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: protege sparql query not showing results

Lorenz Buehmann
Ok, but did you load the ontology in Protege or simply open the file in
a text editor? I mean, there is no such information in this dataset, so
I'm wondering what you expect?

There is no property hasJoker ... I'm a bit confused what you expect how
the data retrieval here works?... you cannot simply think about some
properties and then query some arbitrary dataset for it, right?

And this file looks just like a small dummy ontology done by somebody.
But again, load the ontology into Protege and then you can see all the
data contained in it.

Or do I miss something here?


On 16.01.20 10:33, stanimir wrote:

> I just want to bring out all games that have a certain type of joker using
> hasJoker property
>
>
>
> --
> Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: protege sparql query not showing results

stanimir
i meant hasTower not hasJoker
My task is to make an ontology with 12-15 classes. That's why it's not
something interesting



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: protege sparql query not showing results

Lorenz Buehmann
Ok. But did you understand that you never connected any game to other
entities? I mean, you have to add hasTower assertions to your ontology
first, then you can query for it.

On 16.01.20 11:12, stanimir wrote:

> i meant hasTower not hasJoker
> My task is to make an ontology with 12-15 classes. That's why it's not
> something interesting
>
>
>
> --
> Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: protege sparql query not showing results

stanimir
I don't know man. Professor of Semantic Web in my university told me that my
query is right but i don't have individuals for this class



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: protege sparql query not showing results

Lorenz Buehmann
yeah, so? You have individuals for game and tower, you have to add
relations between those. Sorry, but I don't know your assignment. All we
can say, the data is missing in your ontology, thus, the query result is
empty. Anything beyond is your task now.

Good luck

On 16.01.20 11:29, stanimir wrote:

> I don't know man. Professor of Semantic Web in my university told me that my
> query is right but i don't have individuals for this class
>
>
>
> --
> Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user