best choice for Query language

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

best choice for Query language

s.a.s.a.n
Hi , Im new to ontology and learning to work with protege .
I would like to know what is best query language for me right now  ?
and the other question is where  can I get RQL plugin for protege ? (or how to use RQL !)
thanks a lot
Reply | Threaded
Open this post in threaded view
|

Re: best choice for Query language

giulianimartini
Hi,

it depends on your needs.

If you have an ontology described in RDF, SPARQL and RQL can give you all you need.
By the other hand, if you have an OWL ontology, SQWRL may be the way.

Take a look in this paper about some query languages for ontologies: http://cobweb.cs.uga.edu/~jam/home/theses/zhijun_thesis/final/zzms1.pdf

On Sun, Oct 11, 2015 at 9:36 AM, s.a.s.a.n <[hidden email]> wrote:
Hi , Im new to ontology and learning to work with protege .
I would like to know what is best query language for me right now  ?
and the other question is where  can I get RQL plugin for protege ? (or how
to use RQL !)
thanks a lot



--
View this message in context: http://protege-project.136.n4.nabble.com/best-choice-for-Query-language-tp4663670.html
Sent from the Protege User mailing list archive at Nabble.com.
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user



--
Ricardo G. Martini, MsC.
---------------------------------------------------------------------------
Doutorando em Informática
Programa Doutoral em Informática (PDInf)
Centro Algoritmi
Universidade do Minho (UMinho) - Braga, Portugal

Mestre em Computação - Universidade Federal de Santa Maria (UFSM)
Santa Maria, RS, Brasil
Lattes CV: http://lattes.cnpq.br/8710772034085679
---------------------------------------------------------------------------

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

Re: best choice for Query language

s.a.s.a.n
thank you for answering . Im gonna use OWL . so you think SQWRL  is better one ?
Reply | Threaded
Open this post in threaded view
|

Re: best choice for Query language

giulianimartini
I worked with SQWRL/SWRL in my master thesis and it was a good choice.

I suggest you read about the existing languages to take the right decision.
Google it =D

On Sun, Oct 11, 2015 at 4:40 PM, s.a.s.a.n <[hidden email]> wrote:
thank you for answering . Im gonna use OWL . so you think SQWRL  is better
one ?



--
View this message in context: http://protege-project.136.n4.nabble.com/best-choice-for-Query-language-tp4663670p4663673.html
Sent from the Protege User mailing list archive at Nabble.com.
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user



--
Ricardo G. Martini, MsC.
---------------------------------------------------------------------------
Doutorando em Informática
Programa Doutoral em Informática (PDInf)
Centro Algoritmi
Universidade do Minho (UMinho) - Braga, Portugal

Mestre em Computação - Universidade Federal de Santa Maria (UFSM)
Santa Maria, RS, Brasil
Lattes CV: http://lattes.cnpq.br/8710772034085679
---------------------------------------------------------------------------

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

Re: best choice for Query language

samsontu
In reply to this post by s.a.s.a.n

On Oct 11, 2015, at 8:40 AM, s.a.s.a.n <[hidden email]> wrote:

thank you for answering . Im gonna use OWL . so you think SQWRL  is better
one ?


The current (beta 5) version of Protege supports DL query (which uses OWL class expressions as query language) and SPARQL. The “Snap SPARQL query” plugin supports SPARQL 1.0 OWL entailment regime. Both are suitable query languages for working with OWL.

With best regards,
Samson 

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

Re: best choice for Query language

s.a.s.a.n
and one more question is how should I get SQWRL tab for protege ?
I have really searched a lot and could nt find the way !
again thanks a lot for guidance

On Sun, Oct 11, 2015 at 11:30 PM, samsontu [via Protege Project] <[hidden email]> wrote:

On Oct 11, 2015, at 8:40 AM, s.a.s.a.n <[hidden email]> wrote:

thank you for answering . Im gonna use OWL . so you think SQWRL  is better
one ?


The current (beta 5) version of Protege supports DL query (which uses OWL class expressions as query language) and SPARQL. The “Snap SPARQL query” plugin supports SPARQL 1.0 OWL entailment regime. Both are suitable query languages for working with OWL.

With best regards,
Samson 

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



If you reply to this email, your message will be added to the discussion below:
http://protege-project.136.n4.nabble.com/best-choice-for-Query-language-tp4663670p4663678.html
To unsubscribe from best choice for Query language, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: best choice for Query language

Josef Hardi
Hi,

I would suggest you try SPARQL and use the “Snap SPARQL” plugin to experiment your need. As Samson has mentioned the plugin supports OWL entailment regime to accommodate querying OWL ontology.

For example, you have subclass axioms in your OWL ontology.

:Student rdfs:subClassOf :Person
:Professor rdfs:subClassOf :Person
:MasterStudent rdfs:subClassOf :Student

You can ask for all subclasses that belong to class :Person by writing a query:

SELECT ?x
WHERE {
   ?x rdfs:subClassOf :Person .
}

This will give you results:

:Student
:Professor
:MasterStudent

Note: You might need to run first a Reasoner to get those results. In Protege select menu Reasoner > Start reasoner (make sure HermiT is selected).

Note 2: If you have a fresh installation of Protege 5.0-Beta_17, you might need to get the “Snap SPARQL” from download plugin window. To have that select File > Check for plugins… .

A popup window “Automatic Update” will appear, select “Downloads” tab, scroll down the list until you find “Snap SPARQL Query 3.0.0”, tick the checkbox and click Install.

Note 3: You should be able to find the plugin tab in menu Window > Tabs > Snap SPARQL.

Hope I didn’t write you in too much details and good luck!


/Josef


On Oct 12, 2015, at 1:47 AM, s.a.s.a.n <[hidden email]> wrote:

and one more question is how should I get SQWRL tab for protege ?
I have really searched a lot and could nt find the way !
again thanks a lot for guidance

On Sun, Oct 11, 2015 at 11:30 PM, samsontu [via Protege Project] <<a href="x-msg://2/user/SendEmail.jtp?type=node&amp;node=4663680&amp;i=0" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:

On Oct 11, 2015, at 8:40 AM, s.a.s.a.n <[hidden email]> wrote:

thank you for answering . Im gonna use OWL . so you think SQWRL  is better
one ?


The current (beta 5) version of Protege supports DL query (which uses OWL class expressions as query language) and SPARQL. The “Snap SPARQL query” plugin supports SPARQL 1.0 OWL entailment regime. Both are suitable query languages for working with OWL.

With best regards,
Samson 

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



If you reply to this email, your message will be added to the discussion below:
http://protege-project.136.n4.nabble.com/best-choice-for-Query-language-tp4663670p4663678.html
To unsubscribe from best choice for Query language, click here.
NAML



View this message in context: Re: best choice for Query language
Sent from the Protege User mailing list archive at Nabble.com.
_______________________________________________
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: best choice for Query language

Eric Prud'hommeaux
* Josef Hardi <[hidden email]> [2015-10-12 18:41+0000]

> Hi,
>
> I would suggest you try SPARQL and use the “Snap SPARQL” plugin to experiment your need. As Samson has mentioned the plugin supports OWL entailment regime to accommodate querying OWL ontology.
>
> For example, you have subclass axioms in your OWL ontology.
>
> :Student rdfs:subClassOf :Person
> :Professor rdfs:subClassOf :Person
> :MasterStudent rdfs:subClassOf :Student
>
> You can ask for all subclasses that belong to class :Person by writing a query:
>
> PREFIX : <http://example.org/just/a/random/default/prefix/>
> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
> SELECT ?x
> WHERE {
>    ?x rdfs:subClassOf :Person .
> }
>
> This will give you results:
>
> :Student
> :Professor
> :MasterStudent
>
> Note: You might need to run first a Reasoner to get those results. In Protege select menu Reasoner > Start reasoner (make sure HermiT is selected).
>
> Note 2: If you have a fresh installation of Protege 5.0-Beta_17, you might need to get the “Snap SPARQL” from download plugin window. To have that select File > Check for plugins… .
>
> A popup window “Automatic Update” will appear, select “Downloads” tab, scroll down the list until you find “Snap SPARQL Query 3.0.0”, tick the checkbox and click Install.
>
> Note 3: You should be able to find the plugin tab in menu Window > Tabs > Snap SPARQL.

I've not managed to find Snap in the tabs list. The file is present:
  Protege-5.0.0-beta-17/plugins/org.protege.sparql.snap.jar
and stdout indicates that it's being loaded:

[[
Starting Protege Desktop (Version 5.0.0, Build = beta-17)
Platform:
    Java: JVM 1.8.0_40-b26 Memory: 466M
    Language: en, Country: US
    Framework: Apache Software Foundation (1.7)
    OS: linux (3.13.0-65-generic)
    Processor: x86-64
Plugin: owlapi-osgidistribution (3.5.1)
Plugin: Cajun Visualization Library (1.0.2)
Plugin: OWLAPI RDF Library (1.0.2)
Plugin: Guava: Google Core Libraries for Java (18.0.0)
Plugin: snap-sparql-query-plugin (3.0.0.SNAPSHOT)
Plugin: OWL Difference (5.0.0)
Plugin: OWL Code Generation Plug-in (1.0.2)
Plugin: Protege HermiT Integration (1.0.0)
Plugin: Protege Editor OWL (5.0.0.beta-17)
Plugin: DL Query (2.0.2)
Plugin: Protege SPARQL Plugin (1.0.0)
Plugin: Explanation Workbench (2.0.0)
Plugin: OntoGraf (1.0.3)
Plugin: OWL Difference Engine (2.0.0)
Plugin: OWLViz (4.1.4)
        owlapi-osgidistribution Plugin has no plugin.xml resource
        Cajun Visualization Library Plugin has no plugin.xml resource
        OWLAPI RDF Library Plugin has no plugin.xml resource
        Guava: Google Core Libraries for Java Plugin has no plugin.xml resource
        OWL Difference Engine Plugin has no plugin.xml resource
Using OWL API version 3.5.1
Rebuilding entity indices...
... rebuilt in 9 ms
Setting active ontology to OntologyID(OntologyIRI(<http://www.semanticweb.org/eric/ontologies/2015/9/untitled-ontology-9>))
Rebuilding entity indices...
... rebuilt in 2 ms
... active ontology changed
Cannot generate ontology catalog for ontology at http://www.semanticweb.org/eric/ontologies/2015/9/untitled-ontology-9
Setting active ontology to OntologyID(OntologyIRI(<http://www.semanticweb.org/eric/ontologies/2015/9/untitled-ontology-9>))
Rebuilding entity indices...
... rebuilt in 1 ms
... active ontology changed
]]

but it's not visible in Window::Tabs (just the regular Sparql Query
tab). When I check to see my currently loaded version with File::Check
for Plugins::Downloads, I don't see a Current version. When install it
again, I get:

[[
Downloading Snap SPARQL Query
Copying Snap SPARQL Query
Loading Snap SPARQL Query
Exception caught installing plugins
org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: snap-sparql-query-plugin:3.0.0.SNAPSHOT
        at org.apache.felix.framework.BundleImpl.createRevision(BundleImpl.java:1305)
        at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:112)
        at org.apache.felix.framework.Felix.installBundle(Felix.java:2907)
        at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)
        at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:138)
        at org.protege.editor.core.update.PluginInstaller.installPlugin(PluginInstaller.java:260)
        at org.protege.editor.core.update.PluginInstaller.install(PluginInstaller.java:107)
        at org.protege.editor.core.update.PluginInstaller.access$100(PluginInstaller.java:35)
        at org.protege.editor.core.update.PluginInstaller$1.run(PluginInstaller.java:61)
        at java.lang.Thread.run(Thread.java:745)
]]

(I tried a similar path for Existential query but didn't see any
tabs. Don't know if it should should define new tabs, but it seemed
like a reasonable guess.)


> Hope I didn’t write you in too much details and good luck!
>
>
> /Josef
>
>
> On Oct 12, 2015, at 1:47 AM, s.a.s.a.n <[hidden email]<mailto:[hidden email]>> wrote:
>
> and one more question is how should I get SQWRL tab for protege ?
> I have really searched a lot and could nt find the way !
> again thanks a lot for guidance
>
> On Sun, Oct 11, 2015 at 11:30 PM, samsontu [via Protege Project] <[hidden email]<x-msg://2/user/SendEmail.jtp?type=node&node=4663680&i=0>> wrote:
>
> On Oct 11, 2015, at 8:40 AM, s.a.s.a.n <[hidden email]<http://user/SendEmail.jtp?type=node&node=4663678&i=0>> wrote:
>
> thank you for answering . Im gonna use OWL . so you think SQWRL  is better
> one ?
>
>
> The current (beta 5) version of Protege supports DL query (which uses OWL class expressions as query language) and SPARQL. The “Snap SPARQL query” plugin supports SPARQL 1.0 OWL entailment regime. Both are suitable query languages for working with OWL.
>
> With best regards,
> Samson
>
> _______________________________________________
> protege-user mailing list
> [hidden email]<http://user/SendEmail.jtp?type=node&node=4663678&i=1>
> https://mailman.stanford.edu/mailman/listinfo/protege-user
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://protege-project.136.n4.nabble.com/best-choice-for-Query-language-tp4663670p4663678.html
> To unsubscribe from best choice for Query language, click here.
> NAML<http://protege-project.136.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
> ________________________________
> View this message in context: Re: best choice for Query language<http://protege-project.136.n4.nabble.com/best-choice-for-Query-language-tp4663670p4663680.html>
> Sent from the Protege User mailing list archive<http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html> at Nabble.com<http://Nabble.com>.
> _______________________________________________
> protege-user mailing list
> [hidden email]<mailto:[hidden email]>
> https://mailman.stanford.edu/mailman/listinfo/protege-user
>

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


--
-ericP

office: +1.617.599.3509
mobile: +33.6.80.80.35.59

([hidden email])
Feel free to forward this message to any list for any purpose other than
email address distribution.

There are subtle nuances encoded in font variation and clever layout
which can only be seen by printing this message on high-clay paper.
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: best choice for Query language

Josef Hardi
Hi Eric,

try if you can see the plugin in Window > Views > Query views > Snap SPARQL Query ?

If so then select Window > Create new tab… . Put any label you wish, e.g., “Snap SPARQL”. And then select the "Snap SPARQL Query” from the views menu and place the view on the new tab.

Hope this would help.

Cheers!

/Josef


On Oct 12, 2015, at 3:08 PM, Eric Prud'hommeaux <[hidden email]> wrote:

* Josef Hardi <[hidden email]> [2015-10-12 18:41+0000]
Hi,

I would suggest you try SPARQL and use the “Snap SPARQL” plugin to experiment your need. As Samson has mentioned the plugin supports OWL entailment regime to accommodate querying OWL ontology.

For example, you have subclass axioms in your OWL ontology.

:Student rdfs:subClassOf :Person
:Professor rdfs:subClassOf :Person
:MasterStudent rdfs:subClassOf :Student

You can ask for all subclasses that belong to class :Person by writing a query:

PREFIX : <http://example.org/just/a/random/default/prefix/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?x
WHERE {
  ?x rdfs:subClassOf :Person .
}

This will give you results:

:Student
:Professor
:MasterStudent

Note: You might need to run first a Reasoner to get those results. In Protege select menu Reasoner > Start reasoner (make sure HermiT is selected).

Note 2: If you have a fresh installation of Protege 5.0-Beta_17, you might need to get the “Snap SPARQL” from download plugin window. To have that select File > Check for plugins… .

A popup window “Automatic Update” will appear, select “Downloads” tab, scroll down the list until you find “Snap SPARQL Query 3.0.0”, tick the checkbox and click Install.

Note 3: You should be able to find the plugin tab in menu Window > Tabs > Snap SPARQL.

I've not managed to find Snap in the tabs list. The file is present:
 Protege-5.0.0-beta-17/plugins/org.protege.sparql.snap.jar
and stdout indicates that it's being loaded:

[[
Starting Protege Desktop (Version 5.0.0, Build = beta-17)
Platform:
   Java: JVM 1.8.0_40-b26 Memory: 466M
   Language: en, Country: US
   Framework: Apache Software Foundation (1.7)
   OS: linux (3.13.0-65-generic)
   Processor: x86-64
Plugin: owlapi-osgidistribution (3.5.1)
Plugin: Cajun Visualization Library (1.0.2)
Plugin: OWLAPI RDF Library (1.0.2)
Plugin: Guava: Google Core Libraries for Java (18.0.0)
Plugin: snap-sparql-query-plugin (3.0.0.SNAPSHOT)
Plugin: OWL Difference (5.0.0)
Plugin: OWL Code Generation Plug-in (1.0.2)
Plugin: Protege HermiT Integration (1.0.0)
Plugin: Protege Editor OWL (5.0.0.beta-17)
Plugin: DL Query (2.0.2)
Plugin: Protege SPARQL Plugin (1.0.0)
Plugin: Explanation Workbench (2.0.0)
Plugin: OntoGraf (1.0.3)
Plugin: OWL Difference Engine (2.0.0)
Plugin: OWLViz (4.1.4)
owlapi-osgidistribution Plugin has no plugin.xml resource
Cajun Visualization Library Plugin has no plugin.xml resource
OWLAPI RDF Library Plugin has no plugin.xml resource
Guava: Google Core Libraries for Java Plugin has no plugin.xml resource
OWL Difference Engine Plugin has no plugin.xml resource
Using OWL API version 3.5.1
Rebuilding entity indices...
... rebuilt in 9 ms
Setting active ontology to OntologyID(OntologyIRI(<http://www.semanticweb.org/eric/ontologies/2015/9/untitled-ontology-9>))
Rebuilding entity indices...
... rebuilt in 2 ms
... active ontology changed
Cannot generate ontology catalog for ontology at http://www.semanticweb.org/eric/ontologies/2015/9/untitled-ontology-9
Setting active ontology to OntologyID(OntologyIRI(<http://www.semanticweb.org/eric/ontologies/2015/9/untitled-ontology-9>))
Rebuilding entity indices...
... rebuilt in 1 ms
... active ontology changed
]]

but it's not visible in Window::Tabs (just the regular Sparql Query
tab). When I check to see my currently loaded version with File::Check
for Plugins::Downloads, I don't see a Current version. When install it
again, I get:

[[
Downloading Snap SPARQL Query
Copying Snap SPARQL Query
Loading Snap SPARQL Query
Exception caught installing plugins
org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: snap-sparql-query-plugin:3.0.0.SNAPSHOT
at org.apache.felix.framework.BundleImpl.createRevision(BundleImpl.java:1305)
at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:112)
at org.apache.felix.framework.Felix.installBundle(Felix.java:2907)
at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)
at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:138)
at org.protege.editor.core.update.PluginInstaller.installPlugin(PluginInstaller.java:260)
at org.protege.editor.core.update.PluginInstaller.install(PluginInstaller.java:107)
at org.protege.editor.core.update.PluginInstaller.access$100(PluginInstaller.java:35)
at org.protege.editor.core.update.PluginInstaller$1.run(PluginInstaller.java:61)
at java.lang.Thread.run(Thread.java:745)
]]

(I tried a similar path for Existential query but didn't see any
tabs. Don't know if it should should define new tabs, but it seemed
like a reasonable guess.)


Hope I didn’t write you in too much details and good luck!


/Josef


On Oct 12, 2015, at 1:47 AM, s.a.s.a.n <[hidden email]<[hidden email]>> wrote:

and one more question is how should I get SQWRL tab for protege ?
I have really searched a lot and could nt find the way !
again thanks a lot for guidance

On Sun, Oct 11, 2015 at 11:30 PM, samsontu [via Protege Project] <[hidden email]<<a href="x-msg://2/user/SendEmail.jtp?type=node&amp;node=4663680&amp;i=0" class="">x-msg://2/user/SendEmail.jtp?type=node&node=4663680&i=0>> wrote:

On Oct 11, 2015, at 8:40 AM, s.a.s.a.n <[hidden email]<http://user/SendEmail.jtp?type=node&node=4663678&i=0>> wrote:

thank you for answering . Im gonna use OWL . so you think SQWRL  is better
one ?


The current (beta 5) version of Protege supports DL query (which uses OWL class expressions as query language) and SPARQL. The “Snap SPARQL query” plugin supports SPARQL 1.0 OWL entailment regime. Both are suitable query languages for working with OWL.

With best regards,
Samson

_______________________________________________
protege-user mailing list
[hidden email]<http://user/SendEmail.jtp?type=node&node=4663678&i=1>
https://mailman.stanford.edu/mailman/listinfo/protege-user


________________________________
If you reply to this email, your message will be added to the discussion below:
http://protege-project.136.n4.nabble.com/best-choice-for-Query-language-tp4663670p4663678.html
To unsubscribe from best choice for Query language, click here.
NAML<http://protege-project.136.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>


________________________________
View this message in context: Re: best choice for Query language<http://protege-project.136.n4.nabble.com/best-choice-for-Query-language-tp4663670p4663680.html>
Sent from the Protege User mailing list archive<http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html> at Nabble.com<http://Nabble.com>.
_______________________________________________
protege-user mailing list
[hidden email]<[hidden email]>
https://mailman.stanford.edu/mailman/listinfo/protege-user


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


-- 
-ericP

office: +1.617.599.3509
mobile: +33.6.80.80.35.59

([hidden email])
Feel free to forward this message to any list for any purpose other than
email address distribution.

There are subtle nuances encoded in font variation and clever layout
which can only be seen by printing this message on high-clay paper.
_______________________________________________
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: best choice for Query language

Eric Prud'hommeaux
* Josef Hardi <[hidden email]> [2015-10-12 22:35+0000]
> Hi Eric,
>
> try if you can see the plugin in Window > Views > Query views > Snap SPARQL Query ?
>
> If so then select Window > Create new tab… . Put any label you wish, e.g., “Snap SPARQL”. And then select the "Snap SPARQL Query” from the views menu and place the view on the new tab.

yep, worked great; i got a panel with the heading "Snap SPARQL Query:" but where's to [Query] button? In keeping with this thread, I supplied this data:
[[
@prefix : <http://a.example/#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

<http://a.example/> a owl:Ontology .
:Person a owl:Class; rdfs:subClassOf owl:Thing .
:Professor a owl:Class; rdfs:subClassOf owl:Person .
:Student a owl:Class; rdfs:subClassOf :Person .
:MasterStudent a owl:Class; rdfs:subClassOf :Student .
]]

and this query:
[[
prefix : <http://a.example/#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT * {
  ?a rdfs:subClassOf ?b
}
]]

but I haven't figured out how to execute it. PNG attached.


> Hope this would help.
>
> Cheers!
>
> /Josef
>
>
> On Oct 12, 2015, at 3:08 PM, Eric Prud'hommeaux <[hidden email]<mailto:[hidden email]>> wrote:
>
> * Josef Hardi <[hidden email]<mailto:[hidden email]>> [2015-10-12 18:41+0000]
> Hi,
>
> I would suggest you try SPARQL and use the “Snap SPARQL” plugin to experiment your need. As Samson has mentioned the plugin supports OWL entailment regime to accommodate querying OWL ontology.
>
> For example, you have subclass axioms in your OWL ontology.
>
> :Student rdfs:subClassOf :Person
> :Professor rdfs:subClassOf :Person
> :MasterStudent rdfs:subClassOf :Student
>
> You can ask for all subclasses that belong to class :Person by writing a query:
>
> PREFIX : <http://example.org/just/a/random/default/prefix/>
> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
> SELECT ?x
> WHERE {
>   ?x rdfs:subClassOf :Person .
> }
>
> This will give you results:
>
> :Student
> :Professor
> :MasterStudent
>
> Note: You might need to run first a Reasoner to get those results. In Protege select menu Reasoner > Start reasoner (make sure HermiT is selected).
>
> Note 2: If you have a fresh installation of Protege 5.0-Beta_17, you might need to get the “Snap SPARQL” from download plugin window. To have that select File > Check for plugins… .
>
> A popup window “Automatic Update” will appear, select “Downloads” tab, scroll down the list until you find “Snap SPARQL Query 3.0.0”, tick the checkbox and click Install.
>
> Note 3: You should be able to find the plugin tab in menu Window > Tabs > Snap SPARQL.
>
> I've not managed to find Snap in the tabs list. The file is present:
>  Protege-5.0.0-beta-17/plugins/org.protege.sparql.snap.jar
> and stdout indicates that it's being loaded:
>
> [[
> Starting Protege Desktop (Version 5.0.0, Build = beta-17)
> Platform:
>    Java: JVM 1.8.0_40-b26 Memory: 466M
>    Language: en, Country: US
>    Framework: Apache Software Foundation (1.7)
>    OS: linux (3.13.0-65-generic)
>    Processor: x86-64
> Plugin: owlapi-osgidistribution (3.5.1)
> Plugin: Cajun Visualization Library (1.0.2)
> Plugin: OWLAPI RDF Library (1.0.2)
> Plugin: Guava: Google Core Libraries for Java (18.0.0)
> Plugin: snap-sparql-query-plugin (3.0.0.SNAPSHOT)
> Plugin: OWL Difference (5.0.0)
> Plugin: OWL Code Generation Plug-in (1.0.2)
> Plugin: Protege HermiT Integration (1.0.0)
> Plugin: Protege Editor OWL (5.0.0.beta-17)
> Plugin: DL Query (2.0.2)
> Plugin: Protege SPARQL Plugin (1.0.0)
> Plugin: Explanation Workbench (2.0.0)
> Plugin: OntoGraf (1.0.3)
> Plugin: OWL Difference Engine (2.0.0)
> Plugin: OWLViz (4.1.4)
> owlapi-osgidistribution Plugin has no plugin.xml resource
> Cajun Visualization Library Plugin has no plugin.xml resource
> OWLAPI RDF Library Plugin has no plugin.xml resource
> Guava: Google Core Libraries for Java Plugin has no plugin.xml resource
> OWL Difference Engine Plugin has no plugin.xml resource
> Using OWL API version 3.5.1
> Rebuilding entity indices...
> ... rebuilt in 9 ms
> Setting active ontology to OntologyID(OntologyIRI(<http://www.semanticweb.org/eric/ontologies/2015/9/untitled-ontology-9>))
> Rebuilding entity indices...
> ... rebuilt in 2 ms
> ... active ontology changed
> Cannot generate ontology catalog for ontology at http://www.semanticweb.org/eric/ontologies/2015/9/untitled-ontology-9
> Setting active ontology to OntologyID(OntologyIRI(<http://www.semanticweb.org/eric/ontologies/2015/9/untitled-ontology-9>))
> Rebuilding entity indices...
> ... rebuilt in 1 ms
> ... active ontology changed
> ]]
>
> but it's not visible in Window::Tabs (just the regular Sparql Query
> tab). When I check to see my currently loaded version with File::Check
> for Plugins::Downloads, I don't see a Current version. When install it
> again, I get:
>
> [[
> Downloading Snap SPARQL Query
> Copying Snap SPARQL Query
> Loading Snap SPARQL Query
> Exception caught installing plugins
> org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: snap-sparql-query-plugin:3.0.0.SNAPSHOT
> at org.apache.felix.framework.BundleImpl.createRevision(BundleImpl.java:1305)
> at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:112)
> at org.apache.felix.framework.Felix.installBundle(Felix.java:2907)
> at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)
> at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:138)
> at org.protege.editor.core.update.PluginInstaller.installPlugin(PluginInstaller.java:260)
> at org.protege.editor.core.update.PluginInstaller.install(PluginInstaller.java:107)
> at org.protege.editor.core.update.PluginInstaller.access$100(PluginInstaller.java:35)
> at org.protege.editor.core.update.PluginInstaller$1.run(PluginInstaller.java:61)
> at java.lang.Thread.run(Thread.java:745)
> ]]
>
> (I tried a similar path for Existential query but didn't see any
> tabs. Don't know if it should should define new tabs, but it seemed
> like a reasonable guess.)
>
>
> Hope I didn’t write you in too much details and good luck!
>
>
> /Josef
>
>
> On Oct 12, 2015, at 1:47 AM, s.a.s.a.n <[hidden email]<mailto:[hidden email]><mailto:[hidden email]>> wrote:
>
> and one more question is how should I get SQWRL tab for protege ?
> I have really searched a lot and could nt find the way !
> again thanks a lot for guidance
>
> On Sun, Oct 11, 2015 at 11:30 PM, samsontu [via Protege Project] <[hidden email]<x-msg://2/user/SendEmail.jtp?type=node&node=4663680&i=0>> wrote:
>
> On Oct 11, 2015, at 8:40 AM, s.a.s.a.n <[hidden email]<http://user/SendEmail.jtp?type=node&node=4663678&i=0>> wrote:
>
> thank you for answering . Im gonna use OWL . so you think SQWRL  is better
> one ?
>
>
> The current (beta 5) version of Protege supports DL query (which uses OWL class expressions as query language) and SPARQL. The “Snap SPARQL query” plugin supports SPARQL 1.0 OWL entailment regime. Both are suitable query languages for working with OWL.
>
> With best regards,
> Samson
>
> _______________________________________________
> protege-user mailing list
> [hidden email]<http://user/SendEmail.jtp?type=node&node=4663678&i=1>
> https://mailman.stanford.edu/mailman/listinfo/protege-user
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://protege-project.136.n4.nabble.com/best-choice-for-Query-language-tp4663670p4663678.html
> To unsubscribe from best choice for Query language, click here.
> NAML<http://protege-project.136.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
> ________________________________
> View this message in context: Re: best choice for Query language<http://protege-project.136.n4.nabble.com/best-choice-for-Query-language-tp4663670p4663680.html>
> Sent from the Protege User mailing list archive<http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html> at Nabble.com<http://nabble.com/><http://Nabble.com<http://nabble.com/>>.
> _______________________________________________
> protege-user mailing list
> [hidden email]<mailto:[hidden email]><mailto:[hidden email]>
> https://mailman.stanford.edu/mailman/listinfo/protege-user
>
>
> _______________________________________________
> protege-user mailing list
> [hidden email]<mailto:[hidden email]>
> https://mailman.stanford.edu/mailman/listinfo/protege-user
>
>
> --
> -ericP
>
> office: +1.617.599.3509
> mobile: +33.6.80.80.35.59
>
> ([hidden email]<mailto:[hidden email]>)
> Feel free to forward this message to any list for any purpose other than
> email address distribution.
>
> There are subtle nuances encoded in font variation and clever layout
> which can only be seen by printing this message on high-clay paper.
> _______________________________________________
> protege-user mailing list
> [hidden email]<mailto:[hidden email]>
> https://mailman.stanford.edu/mailman/listinfo/protege-user
>

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


--
-ericP

office: +1.617.599.3509
mobile: +33.6.80.80.35.59

([hidden email])
Feel free to forward this message to any list for any purpose other than
email address distribution.

There are subtle nuances encoded in font variation and clever layout
which can only be seen by printing this message on high-clay paper.
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

Snap SPARQL Query panel.png (49K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: best choice for Query language

samsontu
The red double bars underneath “prefix” in your PNG image shows that Snap SPARQL is complaining about some syntax error. The “Execute” button on the right-hand side below the Snap SPARQL Query panel is grayed out.

With best regards,
Samson



On Oct 12, 2015, at 5:14 PM, Eric Prud'hommeaux <[hidden email]> wrote:

* Josef Hardi <[hidden email]> [2015-10-12 22:35+0000]
Hi Eric,

try if you can see the plugin in Window > Views > Query views > Snap SPARQL Query ?

If so then select Window > Create new tab… . Put any label you wish, e.g., “Snap SPARQL”. And then select the "Snap SPARQL Query” from the views menu and place the view on the new tab.

yep, worked great; i got a panel with the heading "Snap SPARQL Query:" but where's to [Query] button? In keeping with this thread, I supplied this data:
[[
@prefix : <http://a.example/#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

<http://a.example/> a owl:Ontology .
:Person a owl:Class; rdfs:subClassOf owl:Thing .
:Professor a owl:Class; rdfs:subClassOf owl:Person .
:Student a owl:Class; rdfs:subClassOf :Person .
:MasterStudent a owl:Class; rdfs:subClassOf :Student .
]]

and this query:
[[
prefix : <http://a.example/#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT * {
 ?a rdfs:subClassOf ?b
}
]]

but I haven't figured out how to execute it. PNG attached.


Hope this would help.

Cheers!

/Josef


On Oct 12, 2015, at 3:08 PM, Eric Prud'hommeaux <[hidden email]<[hidden email]>> wrote:

* Josef Hardi <[hidden email]<[hidden email]>> [2015-10-12 18:41+0000]
Hi,

I would suggest you try SPARQL and use the “Snap SPARQL” plugin to experiment your need. As Samson has mentioned the plugin supports OWL entailment regime to accommodate querying OWL ontology.

For example, you have subclass axioms in your OWL ontology.

:Student rdfs:subClassOf :Person
:Professor rdfs:subClassOf :Person
:MasterStudent rdfs:subClassOf :Student

You can ask for all subclasses that belong to class :Person by writing a query:

PREFIX : <http://example.org/just/a/random/default/prefix/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?x
WHERE {
 ?x rdfs:subClassOf :Person .
}

This will give you results:

:Student
:Professor
:MasterStudent

Note: You might need to run first a Reasoner to get those results. In Protege select menu Reasoner > Start reasoner (make sure HermiT is selected).

Note 2: If you have a fresh installation of Protege 5.0-Beta_17, you might need to get the “Snap SPARQL” from download plugin window. To have that select File > Check for plugins… .

A popup window “Automatic Update” will appear, select “Downloads” tab, scroll down the list until you find “Snap SPARQL Query 3.0.0”, tick the checkbox and click Install.

Note 3: You should be able to find the plugin tab in menu Window > Tabs > Snap SPARQL.

I've not managed to find Snap in the tabs list. The file is present:
Protege-5.0.0-beta-17/plugins/org.protege.sparql.snap.jar
and stdout indicates that it's being loaded:

[[
Starting Protege Desktop (Version 5.0.0, Build = beta-17)
Platform:
  Java: JVM 1.8.0_40-b26 Memory: 466M
  Language: en, Country: US
  Framework: Apache Software Foundation (1.7)
  OS: linux (3.13.0-65-generic)
  Processor: x86-64
Plugin: owlapi-osgidistribution (3.5.1)
Plugin: Cajun Visualization Library (1.0.2)
Plugin: OWLAPI RDF Library (1.0.2)
Plugin: Guava: Google Core Libraries for Java (18.0.0)
Plugin: snap-sparql-query-plugin (3.0.0.SNAPSHOT)
Plugin: OWL Difference (5.0.0)
Plugin: OWL Code Generation Plug-in (1.0.2)
Plugin: Protege HermiT Integration (1.0.0)
Plugin: Protege Editor OWL (5.0.0.beta-17)
Plugin: DL Query (2.0.2)
Plugin: Protege SPARQL Plugin (1.0.0)
Plugin: Explanation Workbench (2.0.0)
Plugin: OntoGraf (1.0.3)
Plugin: OWL Difference Engine (2.0.0)
Plugin: OWLViz (4.1.4)
owlapi-osgidistribution Plugin has no plugin.xml resource
Cajun Visualization Library Plugin has no plugin.xml resource
OWLAPI RDF Library Plugin has no plugin.xml resource
Guava: Google Core Libraries for Java Plugin has no plugin.xml resource
OWL Difference Engine Plugin has no plugin.xml resource
Using OWL API version 3.5.1
Rebuilding entity indices...
... rebuilt in 9 ms
Setting active ontology to OntologyID(OntologyIRI(<http://www.semanticweb.org/eric/ontologies/2015/9/untitled-ontology-9>))
Rebuilding entity indices...
... rebuilt in 2 ms
... active ontology changed
Cannot generate ontology catalog for ontology at http://www.semanticweb.org/eric/ontologies/2015/9/untitled-ontology-9
Setting active ontology to OntologyID(OntologyIRI(<http://www.semanticweb.org/eric/ontologies/2015/9/untitled-ontology-9>))
Rebuilding entity indices...
... rebuilt in 1 ms
... active ontology changed
]]

but it's not visible in Window::Tabs (just the regular Sparql Query
tab). When I check to see my currently loaded version with File::Check
for Plugins::Downloads, I don't see a Current version. When install it
again, I get:

[[
Downloading Snap SPARQL Query
Copying Snap SPARQL Query
Loading Snap SPARQL Query
Exception caught installing plugins
org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: snap-sparql-query-plugin:3.0.0.SNAPSHOT
at org.apache.felix.framework.BundleImpl.createRevision(BundleImpl.java:1305)
at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:112)
at org.apache.felix.framework.Felix.installBundle(Felix.java:2907)
at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)
at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:138)
at org.protege.editor.core.update.PluginInstaller.installPlugin(PluginInstaller.java:260)
at org.protege.editor.core.update.PluginInstaller.install(PluginInstaller.java:107)
at org.protege.editor.core.update.PluginInstaller.access$100(PluginInstaller.java:35)
at org.protege.editor.core.update.PluginInstaller$1.run(PluginInstaller.java:61)
at java.lang.Thread.run(Thread.java:745)
]]

(I tried a similar path for Existential query but didn't see any
tabs. Don't know if it should should define new tabs, but it seemed
like a reasonable guess.)


Hope I didn’t write you in too much details and good luck!


/Josef


On Oct 12, 2015, at 1:47 AM, s.a.s.a.n <[hidden email]<[hidden email]><[hidden email]>> wrote:

and one more question is how should I get SQWRL tab for protege ?
I have really searched a lot and could nt find the way !
again thanks a lot for guidance

On Sun, Oct 11, 2015 at 11:30 PM, samsontu [via Protege Project] <[hidden email]<<a href="x-msg://2/user/SendEmail.jtp?type=node&amp;node=4663680&amp;i=0" class="">x-msg://2/user/SendEmail.jtp?type=node&node=4663680&i=0>> wrote:

On Oct 11, 2015, at 8:40 AM, s.a.s.a.n <[hidden email]<http://user/SendEmail.jtp?type=node&node=4663678&i=0>> wrote:

thank you for answering . Im gonna use OWL . so you think SQWRL  is better
one ?


The current (beta 5) version of Protege supports DL query (which uses OWL class expressions as query language) and SPARQL. The “Snap SPARQL query” plugin supports SPARQL 1.0 OWL entailment regime. Both are suitable query languages for working with OWL.

With best regards,
Samson

_______________________________________________
protege-user mailing list
[hidden email]<http://user/SendEmail.jtp?type=node&node=4663678&i=1>
https://mailman.stanford.edu/mailman/listinfo/protege-user


________________________________
If you reply to this email, your message will be added to the discussion below:
http://protege-project.136.n4.nabble.com/best-choice-for-Query-language-tp4663670p4663678.html
To unsubscribe from best choice for Query language, click here.
NAML<http://protege-project.136.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>


________________________________
View this message in context: Re: best choice for Query language<http://protege-project.136.n4.nabble.com/best-choice-for-Query-language-tp4663670p4663680.html>
Sent from the Protege User mailing list archive<http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html> at Nabble.com<http://nabble.com/><http://Nabble.com<http://nabble.com/>>.
_______________________________________________
protege-user mailing list
[hidden email]<mailto:[hidden email]><mailto:[hidden email]>
https://mailman.stanford.edu/mailman/listinfo/protege-user


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


--
-ericP

office: +1.617.599.3509
mobile: +33.6.80.80.35.59

([hidden email]<mailto:[hidden email]>)
Feel free to forward this message to any list for any purpose other than
email address distribution.

There are subtle nuances encoded in font variation and clever layout
which can only be seen by printing this message on high-clay paper.
_______________________________________________
protege-user mailing list
[hidden email]<mailto:[hidden email]>
https://mailman.stanford.edu/mailman/listinfo/protege-user


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


--
-ericP

office: +1.617.599.3509
mobile: +33.6.80.80.35.59

([hidden email])
Feel free to forward this message to any list for any purpose other than
email address distribution.

There are subtle nuances encoded in font variation and clever layout
which can only be seen by printing this message on high-clay paper.<Snap SPARQL Query panel.png>_______________________________________________
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: best choice for Query language

Eric Prud'hommeaux
* Samson Tu <[hidden email]> [2015-10-13 16:28+0000]
> The red double bars underneath “prefix” in your PNG image shows that Snap SPARQL is complaining about some syntax error. The “Execute” button on the right-hand side below the Snap SPARQL Query panel is grayed out.

quite right. or should I say "QUITE RIGHT".
It turns out the SPARQL parser has case-sensitive keywords and requires "WHERE". Once you grok its sublanguage, it works great! Can this replace the regular SPARQL Query view?

It would also be nice from a UI perspective if results could be greyed out to indicate they were stale when data new data was loaded or the reasoner changed.
(It would also be fab to have a mode where the reasoner ran again whenever it reloaded data.)

If you point me at the source and some build instructions (co repo, cd X, make test), I can try to modernize the SPARQL and Turtle parsers, assuming they're driven by grammars.


> With best regards,
> Samson
>
>
>
> On Oct 12, 2015, at 5:14 PM, Eric Prud'hommeaux <[hidden email]<mailto:[hidden email]>> wrote:
>
> * Josef Hardi <[hidden email]<mailto:[hidden email]>> [2015-10-12 22:35+0000]
> Hi Eric,
>
> try if you can see the plugin in Window > Views > Query views > Snap SPARQL Query ?
>
> If so then select Window > Create new tab… . Put any label you wish, e.g., “Snap SPARQL”. And then select the "Snap SPARQL Query” from the views menu and place the view on the new tab.
>
> yep, worked great; i got a panel with the heading "Snap SPARQL Query:" but where's to [Query] button? In keeping with this thread, I supplied this data:
> [[
> @prefix : <http://a.example/#> .
> @prefix owl: <http://www.w3.org/2002/07/owl#> .
> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
>
> <http://a.example/> a owl:Ontology .
> :Person a owl:Class; rdfs:subClassOf owl:Thing .
> :Professor a owl:Class; rdfs:subClassOf owl:Person .
> :Student a owl:Class; rdfs:subClassOf :Person .
> :MasterStudent a owl:Class; rdfs:subClassOf :Student .
> ]]
>
> and this query:
> [[
> prefix : <http://a.example/#>
> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
> SELECT * {
>  ?a rdfs:subClassOf ?b
> }
> ]]
>
> but I haven't figured out how to execute it. PNG attached.
>
>
> Hope this would help.
>
> Cheers!
>
> /Josef
>
>
> On Oct 12, 2015, at 3:08 PM, Eric Prud'hommeaux <[hidden email]<mailto:[hidden email]><mailto:[hidden email]>> wrote:
>
> * Josef Hardi <[hidden email]<mailto:[hidden email]><mailto:[hidden email]>> [2015-10-12 18:41+0000]
> Hi,
>
> I would suggest you try SPARQL and use the “Snap SPARQL” plugin to experiment your need. As Samson has mentioned the plugin supports OWL entailment regime to accommodate querying OWL ontology.
>
> For example, you have subclass axioms in your OWL ontology.
>
> :Student rdfs:subClassOf :Person
> :Professor rdfs:subClassOf :Person
> :MasterStudent rdfs:subClassOf :Student
>
> You can ask for all subclasses that belong to class :Person by writing a query:
>
> PREFIX : <http://example.org/just/a/random/default/prefix/>
> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
> SELECT ?x
> WHERE {
>  ?x rdfs:subClassOf :Person .
> }
>
> This will give you results:
>
> :Student
> :Professor
> :MasterStudent
>
> Note: You might need to run first a Reasoner to get those results. In Protege select menu Reasoner > Start reasoner (make sure HermiT is selected).
>
> Note 2: If you have a fresh installation of Protege 5.0-Beta_17, you might need to get the “Snap SPARQL” from download plugin window. To have that select File > Check for plugins… .
>
> A popup window “Automatic Update” will appear, select “Downloads” tab, scroll down the list until you find “Snap SPARQL Query 3.0.0”, tick the checkbox and click Install.
>
> Note 3: You should be able to find the plugin tab in menu Window > Tabs > Snap SPARQL.
>
> I've not managed to find Snap in the tabs list. The file is present:
> Protege-5.0.0-beta-17/plugins/org.protege.sparql.snap.jar
> and stdout indicates that it's being loaded:
>
> [[
> Starting Protege Desktop (Version 5.0.0, Build = beta-17)
> Platform:
>   Java: JVM 1.8.0_40-b26 Memory: 466M
>   Language: en, Country: US
>   Framework: Apache Software Foundation (1.7)
>   OS: linux (3.13.0-65-generic)
>   Processor: x86-64
> Plugin: owlapi-osgidistribution (3.5.1)
> Plugin: Cajun Visualization Library (1.0.2)
> Plugin: OWLAPI RDF Library (1.0.2)
> Plugin: Guava: Google Core Libraries for Java (18.0.0)
> Plugin: snap-sparql-query-plugin (3.0.0.SNAPSHOT)
> Plugin: OWL Difference (5.0.0)
> Plugin: OWL Code Generation Plug-in (1.0.2)
> Plugin: Protege HermiT Integration (1.0.0)
> Plugin: Protege Editor OWL (5.0.0.beta-17)
> Plugin: DL Query (2.0.2)
> Plugin: Protege SPARQL Plugin (1.0.0)
> Plugin: Explanation Workbench (2.0.0)
> Plugin: OntoGraf (1.0.3)
> Plugin: OWL Difference Engine (2.0.0)
> Plugin: OWLViz (4.1.4)
> owlapi-osgidistribution Plugin has no plugin.xml resource
> Cajun Visualization Library Plugin has no plugin.xml resource
> OWLAPI RDF Library Plugin has no plugin.xml resource
> Guava: Google Core Libraries for Java Plugin has no plugin.xml resource
> OWL Difference Engine Plugin has no plugin.xml resource
> Using OWL API version 3.5.1
> Rebuilding entity indices...
> ... rebuilt in 9 ms
> Setting active ontology to OntologyID(OntologyIRI(<http://www.semanticweb.org/eric/ontologies/2015/9/untitled-ontology-9>))
> Rebuilding entity indices...
> ... rebuilt in 2 ms
> ... active ontology changed
> Cannot generate ontology catalog for ontology at http://www.semanticweb.org/eric/ontologies/2015/9/untitled-ontology-9
> Setting active ontology to OntologyID(OntologyIRI(<http://www.semanticweb.org/eric/ontologies/2015/9/untitled-ontology-9>))
> Rebuilding entity indices...
> ... rebuilt in 1 ms
> ... active ontology changed
> ]]
>
> but it's not visible in Window::Tabs (just the regular Sparql Query
> tab). When I check to see my currently loaded version with File::Check
> for Plugins::Downloads, I don't see a Current version. When install it
> again, I get:
>
> [[
> Downloading Snap SPARQL Query
> Copying Snap SPARQL Query
> Loading Snap SPARQL Query
> Exception caught installing plugins
> org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: snap-sparql-query-plugin:3.0.0.SNAPSHOT
> at org.apache.felix.framework.BundleImpl.createRevision(BundleImpl.java:1305)
> at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:112)
> at org.apache.felix.framework.Felix.installBundle(Felix.java:2907)
> at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)
> at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:138)
> at org.protege.editor.core.update.PluginInstaller.installPlugin(PluginInstaller.java:260)
> at org.protege.editor.core.update.PluginInstaller.install(PluginInstaller.java:107)
> at org.protege.editor.core.update.PluginInstaller.access$100(PluginInstaller.java:35)
> at org.protege.editor.core.update.PluginInstaller$1.run(PluginInstaller.java:61)
> at java.lang.Thread.run(Thread.java:745)
> ]]
>
> (I tried a similar path for Existential query but didn't see any
> tabs. Don't know if it should should define new tabs, but it seemed
> like a reasonable guess.)
>
>
> Hope I didn’t write you in too much details and good luck!
>
>
> /Josef
>
>
> On Oct 12, 2015, at 1:47 AM, s.a.s.a.n <[hidden email]<mailto:[hidden email]><mailto:[hidden email]><mailto:[hidden email]>> wrote:
>
> and one more question is how should I get SQWRL tab for protege ?
> I have really searched a lot and could nt find the way !
> again thanks a lot for guidance
>
> On Sun, Oct 11, 2015 at 11:30 PM, samsontu [via Protege Project] <[hidden email]<x-msg://2/user/SendEmail.jtp?type=node&node=4663680&i=0>> wrote:
>
> On Oct 11, 2015, at 8:40 AM, s.a.s.a.n <[hidden email]<http://user/SendEmail.jtp?type=node&node=4663678&i=0>> wrote:
>
> thank you for answering . Im gonna use OWL . so you think SQWRL  is better
> one ?
>
>
> The current (beta 5) version of Protege supports DL query (which uses OWL class expressions as query language) and SPARQL. The “Snap SPARQL query” plugin supports SPARQL 1.0 OWL entailment regime. Both are suitable query languages for working with OWL.
>
> With best regards,
> Samson
>
> _______________________________________________
> protege-user mailing list
> [hidden email]<http://user/SendEmail.jtp?type=node&node=4663678&i=1>
> https://mailman.stanford.edu/mailman/listinfo/protege-user
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://protege-project.136.n4.nabble.com/best-choice-for-Query-language-tp4663670p4663678.html
> To unsubscribe from best choice for Query language, click here.
> NAML<http://protege-project.136.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
> ________________________________
> View this message in context: Re: best choice for Query language<http://protege-project.136.n4.nabble.com/best-choice-for-Query-language-tp4663670p4663680.html>
> Sent from the Protege User mailing list archive<http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html> at Nabble.com<http://nabble.com/><http://Nabble.com<http://nabble.com/>>.
> _______________________________________________
> protege-user mailing list
> [hidden email]<mailto:[hidden email]><mailto:[hidden email]>
> https://mailman.stanford.edu/mailman/listinfo/protege-user
>
>
> _______________________________________________
> protege-user mailing list
> [hidden email]<mailto:[hidden email]>
> https://mailman.stanford.edu/mailman/listinfo/protege-user
>
>
> --
> -ericP
>
> office: +1.617.599.3509
> mobile: +33.6.80.80.35.59
>
> ([hidden email]<mailto:[hidden email]>)
> Feel free to forward this message to any list for any purpose other than
> email address distribution.
>
> There are subtle nuances encoded in font variation and clever layout
> which can only be seen by printing this message on high-clay paper.
> _______________________________________________
> protege-user mailing list
> [hidden email]<mailto:[hidden email]>
> https://mailman.stanford.edu/mailman/listinfo/protege-user
>
>
> _______________________________________________
> protege-user mailing list
> [hidden email]<mailto:[hidden email]>
> https://mailman.stanford.edu/mailman/listinfo/protege-user
>
>
> --
> -ericP
>
> office: +1.617.599.3509
> mobile: +33.6.80.80.35.59
>
> ([hidden email]<mailto:[hidden email]>)
> Feel free to forward this message to any list for any purpose other than
> email address distribution.
>
> There are subtle nuances encoded in font variation and clever layout
> which can only be seen by printing this message on high-clay paper.<Snap SPARQL Query panel.png>_______________________________________________
> protege-user mailing list
> [hidden email]<mailto:[hidden email]>
> https://mailman.stanford.edu/mailman/listinfo/protege-user
>

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


--
-ericP

office: +1.617.599.3509
mobile: +33.6.80.80.35.59

([hidden email])
Feel free to forward this message to any list for any purpose other than
email address distribution.

There are subtle nuances encoded in font variation and clever layout
which can only be seen by printing this message on high-clay paper.
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: best choice for Query language

samsontu

On Oct 14, 2015, at 12:39 AM, Eric Prud'hommeaux <[hidden email]> wrote:


If you point me at the source and some build instructions (co repo, cd X, make test), I can try to modernize the SPARQL and Turtle parsers, assuming they're driven by grammars.

The source code is at


I expect standard maven build commands would work.

With best regards,
Samson 

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