SPARQL QUERIES

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

SPARQL QUERIES

Effie Papalambrou
Hello,
I have the 3.2beta edition and I want to run SPARQL queries. I want to find the editor who has salary>30000 . How am I going to do it?


Χρησιμοποιείτε Yahoo!
Βαρεθήκατε τα ενοχλητικά μηνύ ματα (spam); Το Yahoo! Mail διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών μηνυμάτων
http://login.yahoo.com/config/mail?.intl=gr
Reply | Threaded
Open this post in threaded view
|

Re: SPARQL QUERIES

Mark Feblowitz
Using the SPARQL query panel, enter something like:

SELECT ?E
WHERE {
?E a :Editor .
?E :hasSalary ?S .
FILTER ?S > 30000 }

Note the colons (:) and the periods (.)

This assumes
  • there is a class Editor, in the ontology you're searching
  • there is an Object Property "hasSalary" with domain "Editor" (likely with a range of xs:int)
If there are Editor individuals with salaries > 30000, they should display in the lower right.

If you can to see both the Editor and the Editor's Salary, use the select statement

        SELECT ?E ?S

And if you want to identify the editor by full name,
SELECT ?EditorName ?Salary
WHERE {
?Editor a :Editor .
?Editor :hasSalary ?Salary .
FILTER ?Salary > 30000 .
?Editor :hasFullName ?EditorName }
You get the gist.

At 12:24 PM 2/10/2006, you wrote:
Hello,
I have the 3.2beta edition and I want to run SPARQL queries. I want to find the editor who has salary>30000 . How am I going to do it?


×ñçóéìïðïéåßôå Yahoo!
ÂáñåèÞêáôå ôá åíï÷ëçôéêÜ ìçíý ìáôá (spam); Ôï Yahoo! Mail äéáèÝôåé ôçí êáëýôåñç äõíáôÞ ðñïóôáóßá êáôÜ ôùí åíï÷ëçôéêþí ìçíõìÜôùí
http://login.yahoo.com/config/mail?.intl=gr
Reply | Threaded
Open this post in threaded view
|

Θέμα: [protege-owl] Re: SPARQL QUERIES

Effie Papalambrou
Dear Mark,
thank you very much for your response. Could you, please, explain to me what is E? Why do I have to use a:Editor? I run the query, but gives me an error.unsolved qname-> a:Editor

Mark Feblowitz <[hidden email]> έγραψε:
Using the SPARQL query panel, enter something like:

SELECT ?E
WHERE {
?E a :Editor .
?E :hasSalary ?S .
FILTER ?S > 30000 }

Note the colons (:) and the periods (.)

This assumes
  • there is a class Editor, in the ontology you're searching
  • there is an Object Property "hasSalary" with domain "Editor" (likely with a range of xs:int)
If there are Editor individuals with salaries > 30000, they should display in the lower right.

If you can to see both the Editor and the Editor's Salary, use the select statement

        SELECT ?E ?S

And if you want to identify the editor by full name,
SELECT ?EditorName ?Salary
WHERE {
?Editor a :Editor .
?Editor :hasSalary ?Salary .
FILTER ?Salary > 30000 .
?Editor :hasFullName ?EditorName }
You get the gist.

At 12:24 PM 2/10/2006, you wrote:
Hello,
I have the 3.2beta edition and I want to run SPARQL queries. I want to find the editor who has salary>30000 . How am I going to do it?


Χρησιμοποιείτε Yahoo!
Βαρεθήκατε τα ενοχλητικά μηνύ ματα (spam); Το Yahoo! Mail διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών μηνυμάτων
http://login.yahoo.com/config/mail?.intl=gr


Χρησιμοποιείτε Yahoo!
Βαρεθήκατε τα ενοχλητικά μηνύ ματα (spam); Το Yahoo! Mail διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών μηνυμάτων
http://login.yahoo.com/config/mail?.intl=gr
Reply | Threaded
Open this post in threaded view
|

Θέμα: [protege-owl] Re: SPARQL QUERIES

Effie Papalambrou
In reply to this post by Mark Feblowitz
Hey,
I have run the query and I got the error "unresolved qname=a:Editor". What's wrong? I have an ontology named Editor with the properties name,salary and by_name. Could you, please, tell me how am I gonna write the query?
                                                                    thank u

Mark Feblowitz <[hidden email]> έγραψε:
Using the SPARQL query panel, enter something like:

SELECT ?E
WHERE {
?E a :Editor .
?E :hasSalary ?S .
FILTER ?S > 30000 }

Note the colons (:) and the periods (.)

This assumes
  • there is a class Editor, in the ontology you're searching
  • there is an Object Property "hasSalary" with domain "Editor" (likely with a range of xs:int)
If there are Editor individuals with salaries > 30000, they should display in the lower right.

If you can to see both the Editor and the Editor's Salary, use the select statement

        SELECT ?E ?S

And if you want to identify the editor by full name,
SELECT ?EditorName ?Salary
WHERE {
?Editor a :Editor .
?Editor :hasSalary ?Salary .
FILTER ?Salary > 30000 .
?Editor :hasFullName ?EditorName }
You get the gist.

At 12:24 PM 2/10/2006, you wrote:
Hello,
I have the 3.2beta edition and I want to run SPARQL queries. I want to find the editor who has salary>30000 . How am I going to do it?


Χρησιμοποιείτε Yahoo!
Βαρεθήκατε τα ενοχλητικά μηνύ ματα (spam); Το Yahoo! Mail διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών μηνυμάτων
http://login.yahoo.com/config/mail?.intl=gr


Χρησιμοποιείτε Yahoo!
Βαρεθήκατε τα ενοχλητικά μηνύ ματα (spam); Το Yahoo! Mail διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών μηνυμάτων
http://login.yahoo.com/config/mail?.intl=gr
Reply | Threaded
Open this post in threaded view
|

Re: [protege-owl] Θέμα: [protege-owl] Re: SPARQL QUERIES

Mark Feblowitz
In reply to this post by Effie Papalambrou
You need to read up on SPARQL.

"?E" is a variable
"a" is a shortcut for "rdf:type"
You need a space between the "a" and the ":"

The colon with nothing preceding it means that the thing after is in the current namespace. If the concept Editor were defined in namespace "foo", then you would say "foo:Editor" to reference the resource "Editor" and "foo:hasSalary" to reference the predicate hasSalary.


At 02:53 PM 2/10/2006, you wrote:
Dear Mark,
thank you very much for your response. Could you, please, explain to me what is E? Why do I have to use a:Editor? I run the query, but gives me an error.unsolved qname-> a:Editor

Mark Feblowitz <[hidden email]> Ýãñáøå:
Using the SPARQL query panel, enter something like:

SELECT ?E
WHERE {
?E a :Editor .
?E :hasSalary ?S .
FILTER ?S > 30000 }

Note the colons (:) and the periods (.)

This assumes
there is a class Editor, in the ontology you're searching
there is an Object Property "hasSalary" with domain "Editor" (likely with a range of xs:int)
If there are Editor individuals with salaries > 30000, they should display in the lower right.

If you can to see both the Edito! r and the Editor's Salary, use the select statement

        SELECT ?E ?S

And if you want to identify the editor by full name,
SELECT ?EditorName ?Salary
WHERE {
?Editor a :Editor .
?Editor :hasSalary ?Salary .
FILTER ?Salary > 30000 .
?Editor :hasFullName ?EditorName }
You get the gist.

At 12:24 PM 2/10/2006, you wrote:
Hello,
I have the 3.2beta edition and I want to run SPARQL queries. I want to find the editor who has salary>30000 . How am I going to do it?


×ñçóéìïðïéåßôå Yahoo!
ÂáñåèÞêáôå ôá åíï÷ëçôéêÜ ìçíý ìáôá (spam); Ôï Yahoo! Mail äéáèÝôåé ôçí êáëýôåñç äõíáôÞ ðñïóôáóßá êáôÜ ôùí åíï÷ëçôéêþí ìçíõìÜôùí
http://login.yahoo.com/config/mail?.intl=gr



×ñçóéìïðïéåßôå Yahoo!
ÂáñåèÞêáôå ôá åíï÷ëçôéêÜ ìçíý ìáôá (spam); Ôï Yahoo! Mail äéáèÝôåé ôçí êáëýôåñç äõíáôÞ ðñïóôáóßá êáôÜ ôùí åíï÷ëçôéêþí ìçíõìÜôùí
http://login.yahoo.com/config/mail?.intl=gr
Reply | Threaded
Open this post in threaded view
|

Re: SPARQL QUERIES

Raj M Verma
In reply to this post by Mark Feblowitz
hi,

are you discussin abt the Newspaper ontology? If so, then I cudn't load the SPARQL query panel in Protege after opening this Newspaper ontology,  b'cos there is no option for this in the tab list of selection... so can you let me know how to use SPARQL in the non-owl ontologies?

thanx,
Raj.
Reply | Threaded
Open this post in threaded view
|

Re: SPARQL QUERIES

Nick Drummond
Raj, as far as I know there is no support for SPARQL ourside ProtegeOWL.

Nick

Raj M Verma wrote:

> hi,
>
> are you discussin abt the Newspaper ontology? If so, then I cudn't
> load the SPARQL query panel in Protege after opening this Newspaper
> ontology,  b'cos there is no option for this in the tab list of
> selection... so can you let me know how to use SPARQL in the non-owl
> ontologies?
>
> thanx,
> Raj.


--

Nick Drummond

http://www.cs.man.ac.uk/~drummond/ <http://www.cs.man.ac.uk/%7Edrummond/>
-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: SPARQL QUERIES

Nick Drummond
That is, Protege Frames does not have support for SPARQL.
Nick

Nick Drummond wrote:

> Raj, as far as I know there is no support for SPARQL ourside ProtegeOWL.
>
> Nick
>
> Raj M Verma wrote:
>
>> hi,
>>
>> are you discussin abt the Newspaper ontology? If so, then I cudn't
>> load the SPARQL query panel in Protege after opening this Newspaper
>> ontology,  b'cos there is no option for this in the tab list of
>> selection... so can you let me know how to use SPARQL in the non-owl
>> ontologies?
>>
>> thanx,
>> Raj.
>
>
>

--

Nick Drummond

http://www.cs.man.ac.uk/~drummond/ <http://www.cs.man.ac.uk/%7Edrummond/>
-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html