Question on sparql query tab and view settings

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

Question on sparql query tab and view settings

Bill Dyla
I'm noticing some behavior in the sparql query that I don't completely understand.  I'm not getting inconsistent results between DL query rewritten in sparql (eliminating the use of inferred axioms ; only using declared axioms). It seems as though sparql does not cross the ontology boundary when multiple are opened.
When executing a sparql query does it observe the menu settings View -> show all loaded ontologies?
And/or the other view settings (show imports closure, show only the active )?


AdvTHANKSance

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

Re: Question on sparql query tab and view settings

Bill Dyla
Not getting consistent results
Sorry

Sent from my iPhone

> On Jul 6, 2016, at 11:33, Bill Dyla <[hidden email]> wrote:
>
> I'm noticing some behavior in the sparql query that I don't completely understand.  I'm not getting inconsistent results between DL query rewritten in sparql (eliminating the use of inferred axioms ; only using declared axioms). It seems as though sparql does not cross the ontology boundary when multiple are opened.
> When executing a sparql query does it observe the menu settings View -> show all loaded ontologies?
> And/or the other view settings (show imports closure, show only the active )?
>
>
> AdvTHANKSance
>
> Sent from my iPhone
> _______________________________________________
> 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: Question on sparql query tab and view settings

Rafael Gonçalves
In reply to this post by Bill Dyla
Hi Bill,

See reply inline.

> On Jul 6, 2016, at 08:33, Bill Dyla <[hidden email]> wrote:
>
> I'm noticing some behavior in the sparql query that I don't completely understand.  I'm not getting inconsistent results between DL query rewritten in sparql (eliminating the use of inferred axioms ; only using declared axioms).

Could you provide us with the queries that you’re putting in the DL Query tab and in the SPARQL Query tab, the results you’re getting, and what you expected the results to be.

> It seems as though sparql does not cross the ontology boundary when multiple are opened.

I don’t follow.

> When executing a sparql query does it observe the menu settings View -> show all loaded ontologies?
> And/or the other view settings (show imports closure, show only the active )?

These menu items are not related to the query plugins.

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

Re: Question on sparql query tab and view settings

Lorenz Buehmann
Hello Rafael,

isn't the DL query with reasoning and the SPARQL query plugin without
(only Snap SPARQL supports reasoning)? This would explain differences.

Kind regards,
Lorenz

> Hi Bill,
>
> See reply inline.
>
>> On Jul 6, 2016, at 08:33, Bill Dyla <[hidden email]> wrote:
>>
>> I'm noticing some behavior in the sparql query that I don't completely understand.  I'm not getting inconsistent results between DL query rewritten in sparql (eliminating the use of inferred axioms ; only using declared axioms).
> Could you provide us with the queries that you’re putting in the DL Query tab and in the SPARQL Query tab, the results you’re getting, and what you expected the results to be.
>
>> It seems as though sparql does not cross the ontology boundary when multiple are opened.
> I don’t follow.
>
>> When executing a sparql query does it observe the menu settings View -> show all loaded ontologies?
>> And/or the other view settings (show imports closure, show only the active )?
> These menu items are not related to the query plugins.
>
> Cheers,
> Rafael
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user
>
>
--
Lorenz Bühmann
AKSW group, University of Leipzig
Group: http://aksw.org - semantic web research center

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

Re: Question on sparql query tab and view settings

Bill Dyla
In reply to this post by Rafael Gonçalves
Rafael, thanks for your help

Background:

The overall structure is related to provenance information between several source systems that feed sequentially. Each source system has an ontology (separate owl file) that is like a data-dictionary for a particular database. And mapping between data dictionaries are in an ontology (separate owl files).  My example queries use three data dictionaries (FDS, GCDS and Calico) and two mapping ontologies (FDS-GCDS and GCDS-Calico)

 

The queries below look for Attributes (individuals in FDS) that had a primary source (individual classified as GCDS.owl#TRANSACTION) that had a primary source (individual classified as Traceability.owl#Entity); transitive relationship; yes; see note below.

 

 

Both the queries below work if I create an ontology and import everything that is needed.

 

If I don’t import, but rather open each ontology.

The DL query seems to work (returns results that I’ve not verified)

The SPARQL does not return any results.

 

DL Query:

Attribute and hadPrimarySource some ('GCDS Attribute' and hadPrimarySource some Entity)

 

SPARQL:

SELECT DISTINCT ?fds_attrib ?gcds_attrib ?calico_attrib

                WHERE {?fds_attrib a <http://semantic.db.com/FDS.owl#Attribute> .

?fds_attrib <http://semantic.db.com/Traceability.owl#hadPrimarySource> ?gcds_attrib  .

 

                                ?gcds_attrib a <http://semantic.db.com/GCDS.owl#TRANSACTION> .

                                ?gcds_attrib <http://semantic.db.com/Traceability.owl#hadPrimarySource> ?calico_attrib .

                                ?calico_attrib a <http://semantic.db.com/Traceability.owl#Entity> .

                                }

order by ?fds_attrib ?gcds_attrib ?calico_attrib

 

 

BTW: I know I could have set the hadPrimarySource property to be transitive; and simplified. My problem is: after the reasoners (pellet, fact++ and hermit) initialize (which takes a long time; hermit the longest at 10 minutes) Protégé becomes very slow (if only to show an individual)

 

 




Sent from my iPhone

On Jul 6, 2016, at 14:12, Rafael Gonçalves <[hidden email]> wrote:

Hi Bill,

See reply inline.

On Jul 6, 2016, at 08:33, Bill Dyla <[hidden email]> wrote:

I'm noticing some behavior in the sparql query that I don't completely understand.  I'm not getting inconsistent results between DL query rewritten in sparql (eliminating the use of inferred axioms ; only using declared axioms).

Could you provide us with the queries that you’re putting in the DL Query tab and in the SPARQL Query tab, the results you’re getting, and what you expected the results to be.

It seems as though sparql does not cross the ontology boundary when multiple are opened.

I don’t follow.

When executing a sparql query does it observe the menu settings View -> show all loaded ontologies?
And/or the other view settings (show imports closure, show only the active )?

These menu items are not related to the query plugins.

Cheers,
Rafael
_______________________________________________
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: Question on sparql query tab and view settings

Csongor Nyulas
Administrator
Hi Bill,

All plugins, including DL Query, SPARQL Query and Snap SPARQL, are working on a single ontology at a time, the one that is currently selected in the ontology drop-down list at the top. If the selected ontology has OWL imports, those imported ontologies become part of the importing ontology, and because of this the queries will be run on everything that is included in the ontology. So the correct way (and only way I can think of) to achieve what you want, would be to have an ontology that imports all your component ontologies and run DL queries and SPARQL queries on that main ontologies. As Lorenz correctly mentioned, if you want the SPARQL query results to include inferred knowledge as well, you should use the Snap SPARQL plugin instead the default SPARQL Query plugin.

I hope this helps,
Csongor


On 07/07/2016 10:47 AM, Bill Dyla wrote:
Rafael, thanks for your help

Background:

The overall structure is related to provenance information between several source systems that feed sequentially. Each source system has an ontology (separate owl file) that is like a data-dictionary for a particular database. And mapping between data dictionaries are in an ontology (separate owl files).  My example queries use three data dictionaries (FDS, GCDS and Calico) and two mapping ontologies (FDS-GCDS and GCDS-Calico)

 

The queries below look for Attributes (individuals in FDS) that had a primary source (individual classified as GCDS.owl#TRANSACTION) that had a primary source (individual classified as Traceability.owl#Entity); transitive relationship; yes; see note below.

 

 

Both the queries below work if I create an ontology and import everything that is needed.

 

If I don’t import, but rather open each ontology.

The DL query seems to work (returns results that I’ve not verified)

The SPARQL does not return any results.

 

DL Query:

Attribute and hadPrimarySource some ('GCDS Attribute' and hadPrimarySource some Entity)

 

SPARQL:

SELECT DISTINCT ?fds_attrib ?gcds_attrib ?calico_attrib

                WHERE {?fds_attrib a <http://semantic.db.com/FDS.owl#Attribute> .

?fds_attrib <http://semantic.db.com/Traceability.owl#hadPrimarySource> ?gcds_attrib  .

 

                                ?gcds_attrib a <http://semantic.db.com/GCDS.owl#TRANSACTION> .

                                ?gcds_attrib <http://semantic.db.com/Traceability.owl#hadPrimarySource> ?calico_attrib .

                                ?calico_attrib a <http://semantic.db.com/Traceability.owl#Entity> .

                                }

order by ?fds_attrib ?gcds_attrib ?calico_attrib

 

 

BTW: I know I could have set the hadPrimarySource property to be transitive; and simplified. My problem is: after the reasoners (pellet, fact++ and hermit) initialize (which takes a long time; hermit the longest at 10 minutes) Protégé becomes very slow (if only to show an individual)

 

 




Sent from my iPhone

On Jul 6, 2016, at 14:12, Rafael Gonçalves <[hidden email]> wrote:

Hi Bill,

See reply inline.

On Jul 6, 2016, at 08:33, Bill Dyla <[hidden email]> wrote:

I'm noticing some behavior in the sparql query that I don't completely understand.  I'm not getting inconsistent results between DL query rewritten in sparql (eliminating the use of inferred axioms ; only using declared axioms).

Could you provide us with the queries that you’re putting in the DL Query tab and in the SPARQL Query tab, the results you’re getting, and what you expected the results to be.

It seems as though sparql does not cross the ontology boundary when multiple are opened.

I don’t follow.

When executing a sparql query does it observe the menu settings View -> show all loaded ontologies?
And/or the other view settings (show imports closure, show only the active )?

These menu items are not related to the query plugins.

Cheers,
Rafael
_______________________________________________
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


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

Re: Question on sparql query tab and view settings

Lorenz Buehmann
In reply to this post by Bill Dyla
Hello Bill,

is there any individual in the knowledge base such that the needed information from your SPARQL query is explicitly contained in the knowledge base?

Kind regards,
Lorenz

Rafael, thanks for your help

Background:

The overall structure is related to provenance information between several source systems that feed sequentially. Each source system has an ontology (separate owl file) that is like a data-dictionary for a particular database. And mapping between data dictionaries are in an ontology (separate owl files).  My example queries use three data dictionaries (FDS, GCDS and Calico) and two mapping ontologies (FDS-GCDS and GCDS-Calico)

 

The queries below look for Attributes (individuals in FDS) that had a primary source (individual classified as GCDS.owl#TRANSACTION) that had a primary source (individual classified as Traceability.owl#Entity); transitive relationship; yes; see note below.

 

 

Both the queries below work if I create an ontology and import everything that is needed.

 

If I don’t import, but rather open each ontology.

The DL query seems to work (returns results that I’ve not verified)

The SPARQL does not return any results.

 

DL Query:

Attribute and hadPrimarySource some ('GCDS Attribute' and hadPrimarySource some Entity)

 

SPARQL:

SELECT DISTINCT ?fds_attrib ?gcds_attrib ?calico_attrib

                WHERE {?fds_attrib a <http://semantic.db.com/FDS.owl#Attribute> .

?fds_attrib <http://semantic.db.com/Traceability.owl#hadPrimarySource> ?gcds_attrib  .

 

                                ?gcds_attrib a <http://semantic.db.com/GCDS.owl#TRANSACTION> .

                                ?gcds_attrib <http://semantic.db.com/Traceability.owl#hadPrimarySource> ?calico_attrib .

                                ?calico_attrib a <http://semantic.db.com/Traceability.owl#Entity> .

                                }

order by ?fds_attrib ?gcds_attrib ?calico_attrib

 

 

BTW: I know I could have set the hadPrimarySource property to be transitive; and simplified. My problem is: after the reasoners (pellet, fact++ and hermit) initialize (which takes a long time; hermit the longest at 10 minutes) Protégé becomes very slow (if only to show an individual)

 

 




Sent from my iPhone

On Jul 6, 2016, at 14:12, Rafael Gonçalves <[hidden email]> wrote:

Hi Bill,

See reply inline.

On Jul 6, 2016, at 08:33, Bill Dyla <[hidden email]> wrote:

I'm noticing some behavior in the sparql query that I don't completely understand.  I'm not getting inconsistent results between DL query rewritten in sparql (eliminating the use of inferred axioms ; only using declared axioms).

Could you provide us with the queries that you’re putting in the DL Query tab and in the SPARQL Query tab, the results you’re getting, and what you expected the results to be.

It seems as though sparql does not cross the ontology boundary when multiple are opened.

I don’t follow.

When executing a sparql query does it observe the menu settings View -> show all loaded ontologies?
And/or the other view settings (show imports closure, show only the active )?

These menu items are not related to the query plugins.

Cheers,
Rafael
_______________________________________________
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
-- 
Lorenz Bühmann
AKSW group, University of Leipzig
Group: http://aksw.org - semantic web research center

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

Re: Question on sparql query tab and view settings

Bill Dyla
I was switching between ontologies and getting different results. The mapping ontologies don't have any individuals. 

This is what prompted me to reach out to the forum.


Sent from my iPhone

On Jul 8, 2016, at 03:33, Lorenz B. <[hidden email]> wrote:

Hello Bill,

is there any individual in the knowledge base such that the needed information from your SPARQL query is explicitly contained in the knowledge base?

Kind regards,
Lorenz

Rafael, thanks for your help

Background:

The overall structure is related to provenance information between several source systems that feed sequentially. Each source system has an ontology (separate owl file) that is like a data-dictionary for a particular database. And mapping between data dictionaries are in an ontology (separate owl files).  My example queries use three data dictionaries (FDS, GCDS and Calico) and two mapping ontologies (FDS-GCDS and GCDS-Calico)

 

The queries below look for Attributes (individuals in FDS) that had a primary source (individual classified as GCDS.owl#TRANSACTION) that had a primary source (individual classified as Traceability.owl#Entity); transitive relationship; yes; see note below.

 

 

Both the queries below work if I create an ontology and import everything that is needed.

 

If I don’t import, but rather open each ontology.

The DL query seems to work (returns results that I’ve not verified)

The SPARQL does not return any results.

 

DL Query:

Attribute and hadPrimarySource some ('GCDS Attribute' and hadPrimarySource some Entity)

 

SPARQL:

SELECT DISTINCT ?fds_attrib ?gcds_attrib ?calico_attrib

                WHERE {?fds_attrib a <http://semantic.db.com/FDS.owl#Attribute> .

?fds_attrib <http://semantic.db.com/Traceability.owl#hadPrimarySource> ?gcds_attrib  .

 

                                ?gcds_attrib a <http://semantic.db.com/GCDS.owl#TRANSACTION> .

                                ?gcds_attrib <http://semantic.db.com/Traceability.owl#hadPrimarySource> ?calico_attrib .

                                ?calico_attrib a <http://semantic.db.com/Traceability.owl#Entity> .

                                }

order by ?fds_attrib ?gcds_attrib ?calico_attrib

 

 

BTW: I know I could have set the hadPrimarySource property to be transitive; and simplified. My problem is: after the reasoners (pellet, fact++ and hermit) initialize (which takes a long time; hermit the longest at 10 minutes) Protégé becomes very slow (if only to show an individual)

 

 




Sent from my iPhone

On Jul 6, 2016, at 14:12, Rafael Gonçalves <[hidden email][hidden email]> wrote:

Hi Bill,

See reply inline.

On Jul 6, 2016, at 08:33, Bill Dyla <[hidden email]> wrote:

I'm noticing some behavior in the sparql query that I don't completely understand.  I'm not getting inconsistent results between DL query rewritten in sparql (eliminating the use of inferred axioms ; only using declared axioms).

Could you provide us with the queries that you’re putting in the DL Query tab and in the SPARQL Query tab, the results you’re getting, and what you expected the results to be.

It seems as though sparql does not cross the ontology boundary when multiple are opened.

I don’t follow.

When executing a sparql query does it observe the menu settings View -> show all loaded ontologies?
And/or the other view settings (show imports closure, show only the active )?

These menu items are not related to the query plugins.

Cheers,
Rafael
_______________________________________________
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
-- 
Lorenz Bühmann
AKSW group, University of Leipzig
Group: http://aksw.org - semantic web research center
_______________________________________________
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