Quantcast

SPARQL Query Export Techniques?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

SPARQL Query Export Techniques?

sizedam
Is there a way to export SPARQL results and retain a field & record delimited (tabular) format? At work, we are still on version 5.0.0(beta-17) and I cannot even get my SPARQL results into a copy buffer (Cmd-C on Mac). At home, I have version 5.1 and I am at least able to cut/paste results as an ordered list of IRIs (example below). Is there a way to at least do that in 5.0.0(beta-17) or some alternative technique? (Upgrading software at my company is an arduous process.)

http://www.someSite.com/myOnt.owl#Part1Name
http://www.someSite.com/myOnt.owl#Part1Quantity
http://www.someSite.com/myOnt.owl#Part2Name
http://www.someSite.com/myOnt.owl#Part2Quantity
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SPARQL Query Export Techniques?

Csongor Nyulas
Administrator
The copy paste from the results table has been fixed in the versions of the "(Protege) SPARQL" and "Snap SPARQL" plugins that were bundled in the Protege 5.0.0 release. [1]

However, if you are unable to get Protege 5.0.0 (or even better the latest 5.2.0 version), you can install the following plugins to your Protege installation:
- the latest Snap SPARQL plugin (4.2.0) - using the auto-update mechanism (File -> Check for plugins...)
and/or
- version 2.0.1 of the Protege SPARQL plugin [2] together with version 2.0.2 of the OWLAPI RDF Library [3]

Csongor

[1] https://github.com/protegeproject/protege/issues/424
[2] https://github.com/protegeproject/sparql-query-plugin/releases/tag/sparql-query-plugin-2.0.1
[3] https://github.com/protegeproject/rdf-library/releases/tag/rdf-library-2.0.2





On 04/14/2017 08:29 AM, sizedam wrote:
Is there a way to export SPARQL results and retain a field & record delimited
(tabular) format? At work, we are still on version 5.0.0(beta-17) and I
cannot even get my SPARQL results into a copy buffer (Cmd-C on Mac). At
home, I have version 5.1 and I am at least able to cut/paste results as an
ordered list of IRIs (example below). Is there a way to at least do that in
5.0.0(beta-17) or some alternative technique? (Upgrading software at my
company is an arduous process.)

http://www.someSite.com/myOnt.owl#Part1Name
http://www.someSite.com/myOnt.owl#Part1Quantity
http://www.someSite.com/myOnt.owl#Part2Name
http://www.someSite.com/myOnt.owl#Part2Quantity



--
View this message in context: http://protege-project.136.n4.nabble.com/SPARQL-Query-Export-Techniques-tp4668135.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


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

Re: SPARQL Query Export Techniques?

sizedam
This post was updated on .
Csongor,

Firewall at work won't allow plugin updates but I tried upgrading at home and ended up corrupting my SPARQL Query tab. When I close and reopen Protege 5.1, everything seems fine at first but as soon as I open one of my ontologies, the SPARQL Query tab closes and when I try to reopen it, it opens without panes and and an alert which points to log errors (log attached). Please advise. (In the meantime, I am preparing to restore from a Time Machine backup)

protege.log

Broken SPARQL Query Tab


<quote author="Csongor Nyulas">
The copy paste from the results table has been fixed in the versions of
the "(Protege) SPARQL" and "Snap SPARQL" plugins that were bundled in
the Protege 5.0.0 release. [1]

However, if you are unable to get Protege 5.0.0 (or even better the
latest 5.2.0 version), you can install the following plugins to your
Protege installation:
- the latest Snap SPARQL plugin (4.2.0) - using the auto-update
mechanism (File -> Check for plugins...)
and/or
- version 2.0.1 of the Protege SPARQL plugin [2] *together with* version
2.0.2 of the OWLAPI RDF Library [3]

Csongor
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SPARQL Query Export Techniques?

sizedam
This post was updated on .
Update: I couldn't easily restore 5.1 so just upgraded to 5.2 and am fine for now. Curious though ... how can I see what versions of all plug-ins are installed? "Check for plug-ins ..." only shows missing/outdated ones.

Also, is there anything in the works for something like a tab-delimited *.csv export from SPARQL Query tab?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SPARQL Query Export Techniques?

samsontu
In reply to this post by sizedam
Did you install the specific versions Csongor pointed out?

>> version 2.0.1 of the Protege SPARQL plugin [2] together with version 2.0.2 of the OWLAPI RDF Library [3]


SPARQL Query 2.0.2 and OWLAPI RDF Library 2.0.3 you get from “Check for plugins…” works with Protege 5.2.

With best regards,
Samson



On Apr 14, 2017, at 12:50 PM, sizedam <[hidden email]> wrote:

Csongor,

Firewall at work won't allow plugin updates but I tried upgrading at home
and ended up corrupting my SPARQL Query tab. When I close and reopen Protege
5.1, everything seems fine at first but as soon as I open one of my
ontologies, the SPARQL Query tab closes and when I try to reopen it, it
opens without panes and and an alert which points to log errors (log
attached). Please advise. (In the meantime, I am preparing to restore from a
Time Machine backup)

protege.log
<http://protege-project.136.n4.nabble.com/file/n4668139/protege.log>  

<http://protege-project.136.n4.nabble.com/file/n4668139/SPARQL-Tab-broken.png> 


The copy paste from the results table has been fixed in the versions of 
the "(Protege) SPARQL" and "Snap SPARQL" plugins that were bundled in 
the Protege 5.0.0 release. [1]

However, if you are unable to get Protege 5.0.0 (or even better the 
latest 5.2.0 version), you can install the following plugins to your 
Protege installation:
- the latest Snap SPARQL plugin (4.2.0) - using the auto-update 
mechanism (File -> Check for plugins...)
and/or
- version 2.0.1 of the Protege SPARQL plugin [2] *together with* version 
2.0.2 of the OWLAPI RDF Library [3]

Csongor



--
View this message in context: http://protege-project.136.n4.nabble.com/SPARQL-Query-Export-Techniques-tp4668135p4668139.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

-- 
Samson Tu                                                      email: [hidden email]
Senior Research Engineer                              web: www.stanford.edu/~swt/
Center for Biomedical Informatics Research  phone: 1-650-725-3391
Stanford University                                          fax: 1-650-725-7944




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

Re: SPARQL Query Export Techniques?

sizedam
So sorry ... I should have taken a screenshot of the table that comes up when you check for plug-ins. I just thought it would be a good idea to upgrade to the newest SPARQL Query and OWLAPI RDF Library plug-ins. When I click on the alert (red exclamation mark) I get the below log entry items in a pop-up window which seem to attest that I did in fact upgrade to exactly the versions Csongor suggested. In addition, though, I upgraded the snap-sparql-query-plugin to 4.2.0 since it seemed to be related. Not sure if that's the problem.

Level:       INFO
Time:        1492202722631
Message:     Plugin: OWLAPI RDF Library (2.0.3)

Level:       INFO
Time:        1492202722631
Message:     Plugin: SPARQL Query Plugin (2.0.2)

Level:       INFO
Time:        1492202722632
Message:     Plugin: snap-sparql-query-plugin (4.2.0)

<quote author="samsontu">
Did you install the specific versions Csongor pointed out?

samsontu wrote
Did you install the specific versions Csongor pointed out?

>> version 2.0.1 of the Protege SPARQL plugin [2] together with version 2.0.2 of the OWLAPI RDF Library [3]


SPARQL Query 2.0.2 and OWLAPI RDF Library 2.0.3 you get from “Check for plugins…” works with Protege 5.2.

With best regards,
Samson
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SPARQL Query Export Techniques?

Csongor Nyulas
Administrator
In reply to this post by sizedam
You can check what plug-ins you have installed using the Help -> About menu.

The following configurations all work for me:
Protege 5.0.0



Protege 5.1.0


Protege 5.2.0



BTW, "Protege SPARQL Plugin" (called "SPARQL Query Plugin" in latest version) is dependent on the "OWLAPI RDF Library". The "Snap SPARQL Query" plugin is an independent plugin that has several advantages (syntax highlighting, auto-completion, integration with reasoners, etc), and some disadvantages.

Csongor



On 04/14/2017 01:22 PM, sizedam wrote:
Update: I couldn't easily restore 5.1 so just upgraded to 5.2 and am fine for
now. Curious though ... how can I see what versions of all plug-ins are
installed. "Check for plug-ins ..." only shows missing/outdated ones.

Also, is there anything in the works for something like a tab-delimited
*.csv export from SPARQL Query tab?



--
View this message in context: http://protege-project.136.n4.nabble.com/SPARQL-Query-Export-Techniques-tp4668135p4668140.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


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

Re: SPARQL Query Export Techniques?

sizedam
Thanks Csongor. I have the same plug-in versions you've highlighted, but I'm still getting the error in 5.1 (5.2 is fine.) It's not critical since I've got 5.2 working, but it would be 'nice' to gain confidence experimenting with plug-ins, including debugging when things go wrong (like this) and rolling back.

The following 3 files were added to my .protege/plugins folder when I upgraded per your advice:
org.protege.editor.owl.jar
org.protege.owl.rdf.jar
snap.sparql.query-plugin.jar

And this is the detailed error in my log:
2017-04-14 15:34:12.244 [AWT-EventQueue-0] ERROR ProtegeApplication    Uncaught Exception in thread 'AWT-EventQueue-0'
java.lang.NoSuchMethodError: org.semanticweb.owlapi.rdf.model.AbstractTranslator.<init>(Lorg/semanticweb/owlapi/model/OWLOntologyManager;Lorg/semanticweb/owlapi/model/OWLOntology;ZLorg/semanticweb/owlapi/util/IndividualAppearance;Lorg/semanticweb/owlapi/util/AxiomAppearance;Ljava/util/concurrent/atomic/AtomicInteger;)V
	at org.protege.owl.rdf.impl.RDFTranslator.<init>(RDFTranslator.java:93) ~[na:na]
	at org.protege.owl.rdf.impl.RDFTranslator.translate(RDFTranslator.java:55) ~[na:na]
	at org.protege.owl.rdf.impl.OwlTripleStoreImpl.addAxiom(OwlTripleStoreImpl.java:99) ~[na:na]
	at org.protege.owl.rdf.Utilities.loadOwlTripleStore(Utilities.java:48) ~[na:na]
	at org.protege.owl.rdf.Utilities.getOwlTripleStore(Utilities.java:32) ~[na:na]
	at org.protege.editor.owl.rdf.repository.BasicSparqlReasoner.precalculate(BasicSparqlReasoner.java:54) ~[na:na]
	at org.protege.editor.owl.rdf.SparqlQueryView.initializeReasoner(SparqlQueryView.java:36) ~[na:na]
	at org.protege.editor.owl.rdf.SparqlQueryView.initialiseOWLView(SparqlQueryView.java:26) ~[na:na]
	at org.protege.editor.owl.ui.view.AbstractOWLViewComponent.initialise(AbstractOWLViewComponent.java:43) ~[na:na]
	at org.protege.editor.core.ui.view.View.createContent(View.java:424) ~[na:na]
	at org.protege.editor.core.ui.view.View.createUI(View.java:217) ~[na:na]
	at org.protege.editor.core.ui.view.View$1.hierarchyChanged(View.java:123) ~[na:na]
	at java.awt.Component.processHierarchyEvent(Component.java:6692) ~[na:1.8.0_40]
	at java.awt.Component.processEvent(Component.java:6311) ~[na:1.8.0_40]
	at java.awt.Container.processEvent(Container.java:2234) ~[na:1.8.0_40]
	at java.awt.Component.dispatchEventImpl(Component.java:4881) ~[na:1.8.0_40]
	at java.awt.Container.dispatchEventImpl(Container.java:2292) ~[na:1.8.0_40]
	at java.awt.Component.dispatchEvent(Component.java:4703) ~[na:1.8.0_40]
	at java.awt.Component.createHierarchyEvents(Component.java:5541) ~[na:1.8.0_40]
	at java.awt.Container.createHierarchyEvents(Container.java:1443) ~[na:1.8.0_40]
	at java.awt.Container.createHierarchyEvents(Container.java:1439) ~[na:1.8.0_40]
	at java.awt.Container.createHierarchyEvents(Container.java:1439) ~[na:1.8.0_40]
	at java.awt.Container.createHierarchyEvents(Container.java:1439) ~[na:1.8.0_40]
	at java.awt.Container.createHierarchyEvents(Container.java:1439) ~[na:1.8.0_40]
	at java.awt.Component.show(Component.java:1622) ~[na:1.8.0_40]
	at java.awt.Component.show(Component.java:1654) ~[na:1.8.0_40]
	at java.awt.Component.setVisible(Component.java:1606) ~[na:1.8.0_40]
	at javax.swing.JComponent.setVisible(JComponent.java:2644) ~[na:1.8.0_40]
	at javax.swing.JTabbedPane.fireStateChanged(JTabbedPane.java:394) ~[na:1.8.0_40]
	at javax.swing.JTabbedPane$ModelListener.stateChanged(JTabbedPane.java:270) ~[na:1.8.0_40]
	at javax.swing.DefaultSingleSelectionModel.fireStateChanged(DefaultSingleSelectionModel.java:132) ~[na:1.8.0_40]
	at javax.swing.DefaultSingleSelectionModel.setSelectedIndex(DefaultSingleSelectionModel.java:67) ~[na:1.8.0_40]
	at javax.swing.JTabbedPane.setSelectedIndexImpl(JTabbedPane.java:616) ~[na:1.8.0_40]
	at javax.swing.JTabbedPane.setSelectedIndex(JTabbedPane.java:591) ~[na:1.8.0_40]
	at javax.swing.plaf.basic.BasicTabbedPaneUI$Handler.mousePressed(BasicTabbedPaneUI.java:3647) ~[na:1.8.0_40]
	at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:280) ~[na:1.8.0_40]
	at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) ~[na:1.8.0_40]
	at java.awt.Component.processMouseEvent(Component.java:6522) ~[na:1.8.0_40]
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) ~[na:1.8.0_40]
	at java.awt.Component.processEvent(Component.java:6290) ~[na:1.8.0_40]
	at java.awt.Container.processEvent(Container.java:2234) ~[na:1.8.0_40]
	at java.awt.Component.dispatchEventImpl(Component.java:4881) ~[na:1.8.0_40]
	at java.awt.Container.dispatchEventImpl(Container.java:2292) ~[na:1.8.0_40]
	at java.awt.Component.dispatchEvent(Component.java:4703) ~[na:1.8.0_40]
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898) ~[na:1.8.0_40]
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4530) ~[na:1.8.0_40]
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462) ~[na:1.8.0_40]
	at java.awt.Container.dispatchEventImpl(Container.java:2278) ~[na:1.8.0_40]
	at java.awt.Window.dispatchEventImpl(Window.java:2750) ~[na:1.8.0_40]
	at java.awt.Component.dispatchEvent(Component.java:4703) ~[na:1.8.0_40]
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:751) ~[na:1.8.0_40]
	at java.awt.EventQueue.access$500(EventQueue.java:97) ~[na:1.8.0_40]
	at java.awt.EventQueue$3.run(EventQueue.java:702) ~[na:1.8.0_40]
	at java.awt.EventQueue$3.run(EventQueue.java:696) ~[na:1.8.0_40]
	at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_40]
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) ~[na:1.8.0_40]
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86) ~[na:1.8.0_40]
	at java.awt.EventQueue$4.run(EventQueue.java:724) ~[na:1.8.0_40]
	at java.awt.EventQueue$4.run(EventQueue.java:722) ~[na:1.8.0_40]
	at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_40]
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) ~[na:1.8.0_40]
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:721) ~[na:1.8.0_40]
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) [na:1.8.0_40]
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) [na:1.8.0_40]
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) [na:1.8.0_40]
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [na:1.8.0_40]
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) [na:1.8.0_40]
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) [na:1.8.0_40]


Csongor Nyulas wrote
You can check what plug-ins you have installed using the Help -> About menu.

The following configurations all work for me:
Protege 5.0.0
Protege 5.1.0
Protege 5.2.0
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SPARQL Query Export Techniques?

Lorenz B.
You still have the wrong OWL API RDF lib version in your Protege. This was a bug and has been fixed, see [1]

[1] https://github.com/protegeproject/protege/issues/625#issuecomment-293424694


Thanks Csongor. I have the same plug-in versions you've highlighted, but I'm
still getting the error in 5.1 (5.2 is fine.) It's not critical since I've
got 5.2 working, but it would be 'nice' to gain confidence experimenting
with plug-ins, including debugging when things go wrong (like this) and
rolling back. 

The following 3 files were added to my .protege/plugins folder when I
upgraded per your advice:
org.protege.editor.owl.jar
org.protege.owl.rdf.jar
snap.sparql.query-plugin.jar

And this is the detailed error in my log:




Csongor Nyulas wrote
You can check what plug-ins you have installed using the Help -> About
menu.

The following configurations all work for me:
Protege 5.0.0
Protege 5.1.0
Protege 5.2.0




--
View this message in context: http://protege-project.136.n4.nabble.com/SPARQL-Query-Export-Techniques-tp4668135p4668151.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

-- 
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
Loading...