Almost there

I am happy to report that after two weeks I’ve updated the arachnolingua pages in a meaningful way.  I have switched to a java servlet based backend rather than just trying to make queries work with javascript and a SPARQL endpoint.  The ‘ethogram’ form on the front page now does something, though it isn’t an ethogram yet – it calls the taxon service which will return a JSON string that is then translated into a table listing the OBO purl based on the NCBI identifier for the taxon whose name is typed into the ethogram box.  All Arachnids known to NCBI (at least up to a year ago) will produce a table in response (as will nodes subsuming Arachnida, such as Metazoa).  The test page has been trimmed to reflect queries that are relevant in the new environment – so taxon and publication services are tested and the resulting tables displayed.  Also have a look at the ‘About’ page, as it contains a sort of ‘Easter egg’ – where the first behavior annotations will appear, which should be shortly – they are already in the knowledge base up on the server.

 

Like the first strands that lead to an web, here are the first links from annotation to application and API support.  I hope you will find this web useful.

Advertisement

Problem fixed (and a peak under the hood)

So, the Sesame status queries were broken as a result of the Sesame upgrade, but the problem was not due to Sesame itself.  In order for these jquery-based status buttons to work, a solution to the cross-origin resource sharing restriction is necessary.  One solution to this would be simply to return everything via wrapped JSON (a protocol called JSONP).  There are several places in the tools I work with in my day job where people have used the JSONP approach and I gave serious thought to going this way when I got back to implementing the sesame queries.  Virtuoso, another triple-store (used by Phenoscape and several other projects) has a configuration to disable the cross-origin restriction, but I was never able to get it to work (either it wasn’t available in the version I could get to run on ubuntu, or there were other problems with my configuration – I suspect the later).

However, I’m serving triples with Sesame, hosted under Tomcat, so there turns out to be another option – a filter called CORS Filter, that can be (relatively) easily installed and configured in a tomcat (or other java servlet container) installation.  If anyone knows any more about this module, please do leave a comment, otherwise I’m using it because it works.  If it phones home or something nefarious, all it’s sharing is a bunch of annotations of spider behavior, so I’m not worried about that.

In any case, the installation involves adding some elements to the target service’s web.xml file.  Since the target service is sesame-rdf, not spider-behavior (the top level web package), I had to go in and modify the web.xml file after uploading the .war file into tomcat.  Adding the two required elements and restarting tomcat resolved the problem (try it).

Updated Sesame

Updated Sesame to 2.7.3 this morning. The update went fine, and there are some improvements to the rdf-workbench page (sparql queries are no longer giving authorization errors). The new workbench seems to support user authentication, which is good, but will require some more configuration work. Sadly, the jquery callbacks on the arachb test page have stopped working. Will have to debug later.