Flex: SPARQL Browser – Semantic Web Explorer v0.0.2
I have updated my SPARQL browser application.

It’s possible to specify a different endpoint other than just dbPedia now. I have not tested this exhaustively but I know it works against the GovTrack endpoint as well.
I have separated the PREFIX definitions into a separate tab. This is to make the main query text area a bit tidier and since they are reused each time you make a query it makes sense (to me at least). The whole interface is a bit experimental.
Old FB2 source code here otherwise right-click on the application to view the source (FB3 only folks). By default the project is setup to run in standalone mode. This is a FlexBuilder2 project.
Even if you aren’t interested in SPARQL there are quite a few features about this application which you may find useful.
- Uses Cairngorm framework
- Uses flexvizgraphlib for the graph component. The graph is built from a GML string built from data parsed from the resultset XML
- Uses the IFrame to render any URI’s which point to a web page
- I have implemented a proxy to fetch the result set. This is a Python script and has some other goodies which were developed as part of gTraffic such as a logging singleton. This is placed into the CGI area of your web space and referenced through the HTTPService definition. I could probably devote a whole post to how this works but have a look at the code. If you need a proxy then feel free to modify the once bundled here
- The application accepts SPARQL queries and parses the returned XML for results to display. The parser is not particularly sophisticated: for each result block it will attempt to generate top level node from the first URI it finds and then generate child nodes for subsequent literals and any further URIs. Any result node which shares a child URI with another result node will be connected in the graph. In this way it is possible (or so I hope) to see multiple connections between results in a way that a table wouldn’t show. The success of this approach does depend in the query and I am not an expert on SPARQL but I think it might have some merit.
- You need a full URL for the endpoint. This includes the “http://” part.
- You will usually find the PREFIX definitions on the endpoint web page
- The LIMIT can be switched off but try keeping it until you are happy the result set isn’t too
large
- You can find a list of endpoints here. Some of these no longer work.
Update #1
I have tried these endpoints and they work (after a fashion, some of the URIs go nowhere).
URL: http://revyu.com/sparql
Welcome/Docs: http://revyu.com/sparql/welcome
URL: http://www.govtrack.us/sparql
Doc/webform: http://www.govtrack.us/sparql.xpd
I’ll add to this list as I try them
Update #2
I have updated the application
- Uses the latest version of the Birdeye graphing component(as of 19/08/08).
- Displays tuples in result grid
- Directed edges
- Edge labels for binding names
- New node renderer uses colour codes to indicate type. Blue is primary result URI, red is a litera and green a URI which you can click on and view in the Browse tab.
Comments
10 Responses to “Flex: SPARQL Browser – Semantic Web Explorer v0.0.2”
Leave a Reply
hi, i liked your application?
can you tell me how you worked with the browse tab to show html on flex?
i have been trying to figure that one out for a while now
thanks and regards
sandeep
Sandeep, The html is displayed in my version of the Flex IFrame component. Go here for details and examples.
http://ccgi.arutherford.plus.com/blog/wordpress/?page_id=132
Al.
Thank you for posting this. I have a simple graph of companies I loaded into another viz tool that I’d like to port over to Sparql, your notes are good although to the uninitiated they get us excited but need to figure out how to format input file to display on screen. Will check it out and see what it takes.
Nice tool!
Can you not process SPARQL DESCRIBE and CONSTRUCT Queries?
Kingsley Idehen
Hello! It looks really nice
I tried it with the Jamendo end-point at http://dbtune.org:2105/sparql/ but no luck: it seems to hang (it works fine with other sparql clients).
Cheers, and many thanks!
y
Did you use a custom build of the flexvizgraphlib for this project? I’m using the latest flexvizgraphlib from svn, and an getting this error:
Error: Got too many components:2 but only:1 nodes visible
at org.un.flex.graphLayout.visual::VisualGraph/createVNodeComponent()[C:\flexvizgraphlib-read-only_NEW\graphLayout\org\un\flex\graphLayout\visual\VisualGraph.as:1480]
at org.un.flex.graphLayout.visual::VisualGraph/setNodeVisibility()[C:\flexvizgraphlib-read-only_NEW\graphLayout\org\un\flex\graphLayout\visual\VisualGraph.as:2241]
at org.un.flex.graphLayout.visual::VisualGraph/updateVisibility()[C:\flexvizgraphlib-read-only_NEW\graphLayout\org\un\flex\graphLayout\visual\VisualGraph.as:2143]
at org.un.flex.graphLayout.visual::VisualGraph/set _262422109currentRootVNode()[C:\flexvizgraphlib-read-only_NEW\graphLayout\org\un\flex\graphLayout\visual\VisualGraph.as:718]
at org.un.flex.graphLayout.visual::VisualGraph/set currentRootVNode()[C:\flexvizgraphlib-read-only_NEW\graphLayout\org\un\flex\graphLayout\visual\VisualGraph.as:2221]
but then it renders fine
Thanks for the help.
Jay,
Yes. I had to comment out the lines at about line 1480:
/*
if(_componentCounter > (_noVisibleVNodes)) {
throw Error(”Got too many components:”+_componentCounter+” but only:”+_noVisibleVNodes
+” nodes visible”);
}
*/
I was getting the same error. I think these are just debug statements. If you pick up the libs from this source distribution then you will have this change built in. Better still the libs for the social graph browser have the fix for the drag-end not being detected as well. Have a look at the graph forum for posts by me ‘www.netthreads.co.uk’. I should maybe have pointed this out (slips away slopy shouldered)
Thanks for the response. I commented out those lines, and sure enough it worked perfectly.
I actually created a new edge renderer that adds a arrow head to the end of the edge, and was testing it out in your sparql viewer.
THanks for the help.
Jay
Hi,
This is pretty good stuff. Do you happen the link to download the source? It looks like download for source is broken.
Thanks a lot.
Chandra
Chandra, right-click on the application and you will be able to download the source.