Sunday, August 31, 2008

Biomoby Web Service Display Page

WebServiceRetrieval.js requires:
jquery.pack.js - v1.2.3 or later
jquery.form.js -v2.12 or later

With regards to biomoby rifraf: Progress is made on the BioMoby Web Service Annotation Page. Finished making the javascript file (WebServiceRetrieval.js) to display a Web Service's descriptive information. Because the RDF graph for a Web Service can get pretty deep and because we want to pull out a lot of information, it slows down the query I've noticed and causes timeouts when accessing it remotely the way we're doing it. Had to break down the query into steps.

1) Query using a web service uri to get its immediate service description, organization description and operation uid
2) Query using the operation uid to get the operation task
3) Query using the operation uid to get the operation Input parameters
4) Query using the operation uid to get the operation Output parameters

Using ajax calls to submit a form containning the SPARQL queries, the script executes the Query 1 and pulls out the Operation uid. Query 2-4 use the operation uid and are all called at approximately the same time (as in they don't wait for one to complete before executing the other since they're all their own seperate ajax call)

Using the jquery form plugin to do the ajax calls which allows the script to work in all browsers: Firefox3, Safari, Opera and IE7.

Small catch: Need to talk to the guys who handle the Virtuoso server where I'm getting this Web Service description RDF as JSON from. Because ajax doesn't let you do cross domain requests for json (which we're doing) UNLESS you set datatype: jsonp.

When datatype is set to jsonp, jquery ajax sends an extra 'callback' parameter in the request to the server. This 'callback' parameter is usually has a value like eg. jsonp7120986. The server is suppose to take that and wrap it's response JSON in it like so:
jsonp7120986( {responseJSON} ) and set the response to text/plain.

If the server just sends back {responsJSON} without it being wrapped, it will cause an 'invalid label' error.

Our SPARQLEndpoint currently doesn't do this and I've been getting around it (so that I could keep coding) by making an intermediate java class which would wrap the JSON response in the callback. I'm sure the guys managing our SPARQL Endpoint will be able to help.

Now to make it look intuitive and beautiful...

Tuesday, August 26, 2008

Instructions for installing ED Wiki

Setting up Entity Describer wiki is up. Start with: InstructionsforED

Revisions necessary?


biomoby rifraf

At some point in the next few weeks we will be building/using a customized ED web page to conduct an experimental annotation jamboree on the biomoby web services.  We will be both measuring the differences in collected data between normal social tagging and semantic social tagging and providing a new layer of annotation for the biomoby framework.

The soon-to-be-created biomoby service annotation web page is an example of one application of the ED code (now available on Google code).   We hope that others will find many more uses for it over time.  When its ready, the little web page that could will

  1. Request a JSON representation of the RDF describing a biomoby web service from a new SPARQL endpoint containing the BioMoby service graph.  See here for an RDF/XML rendition of such a service description.
  2. Display the available information about the service in a reasonably intuitive and beautiful fashion.
  3. Allow the user to tag the service with either semantic tags (e.g. from the service ontology or elsewhere) or free text tags.
  4. Send the tagging information to the ED RDF repository.

The question of what exactly to collect and why is still a little vague however.  Why and how would tags, semantic or otherwise, be useful in the biomoby system?

Moby2.0 developer Luke McCarthy requested that the service tags focus on defining what might be reasonable semantic relationships (predicates) between the input and the output of the service.  An example might be for a a basic blast service, service input a) 'is homologous to' service output b).  

Any other suggestions regarding service semantics of interest warmly requested and appreciated.


Monday, August 25, 2008


ED is holding a code license: New BSD License
and a content license: Creative Commons 3.0 BY

The content license comes in BY and BY-SA

This license lets others distribute, remix, tweak, and build upon your work, even commercially, as long as they credit you for the original creation. This is the most accommodating of licenses offered, in terms of what others can do with your works licensed under Attribution.

SA: This license lets others remix, tweak, and build upon your work even for commercial reasons, as long as they credit you and license their new creations under the identical terms. This license is often compared to open source software licenses. All new works based on yours will carry the same license, so any derivatives will also allow commercial use.

For all the licenses:


ED is now recording the aliases for a term. Aliases are being recorded as an rdfs:label attached to the topic (the guid of the term).

Google code

There's the site for ED on google code. The All the code for ED is containned within the surprise surprise 'ED' folder in the trunk. I've also created a new folder within the trunk that contains the javadocs which can be reached at:

which is linked to in the Entity describer google code project home page.

The IcaptureUtils project that the Entity describer uses, I made into a jar file and included it in ED's referenced libraries

Monday, August 18, 2008

Specify your own SPARQL Endpoint for ED

Changed the file to include specification for the SPARQL Endpoint.

SPARQL_EP_query_param_name = query
SPARQL_EP_misc_params = { \
"default-graph-uri": "sandbox", \
"should-sponge": "", \
"format": "text/html", \
"debug": "on" \

SPARQL_EP_url specifies the SPARQL Endpoint URL

SPARQL_EP_query_param_name specifies the name of the query parameter used by the SPARQL Endpoint.
ie. the name in the name/value pairs used when submitting a SPARQL query as a URL parameter

SPARQL_EP_misc_params is a JSON object with all the name/value pairs that the SPARQL Endpoint needs for URL Parameters

These specifications are used to set the same parameters kept in a SPARQL_EP_params JSON object in the ed_connotea_patched.js

Friday, August 15, 2008

Finished the basics for the ED Widget.
It's in two JS files:
-EDwidget (which needs to be included in the html page and handles the adding of all necessary css and javascripts on the fly)
-EDlet (this creates the actual EDlet inside the div with id="EDlet")

To use it: (Haven't deployed it yet, so don't expect to use it right away)

include the:
a script tag in the html head with
type = "text/javascript"
src = ""

include a div somewhere with id="EDlet"

I'm leaving up the stylizing of the EDlet div to the web developer using it in their page, but I have include some basic EDlet API functions to make it easier.

Note: You need to be logged into ED for this to work since it requires a cookie

Wednesday, August 6, 2008

Connotea Seperation

Went through the new ed_connotea.js.template javascript and finished modifying it like I did the previous ed_connotea js so that it works with the Connotea free ED that I'm working on.

Tuesday, August 5, 2008

URL Limit Solution

After having a talk and some code Review with Eddie on Friday, he offered an interesting solution to the URL Limit which doesn't require ajax or any modification to the servlets.

He suggested that I submit the tagging xml to the Tagging Servlets (TagManagerSaveTaggingServlet and SPARQLTaggingServlet) as a file. This would involve submitting the whole form to the TaggingServlets, which would then contain an input specifying file. Great! But... when you create an inputfileElement, it comes with the browse button which allows you to pull files from your computer. We don't want this though. We want to create a file on the fly and feed it into the input stream of which the inputfileElement uses.

I did not find out how to do that.

However, the following solution is still much like the file solution, but instead of making a file on the fly and putting it in a form (also made on the fly) and submitting said form to a url within a designated iframe....

-create a form on the fly with action=TaggingServlet and target=iframe
-create an input of type hidden on the fly with the tagging xml as its value
-attach the hidden input to the form
-attach the form to the body
-submit the form

Surprisingly... this works! I've yet to find (through testing or research) a limit for the size of an input in any browser. Further testing may reveal otherwise, but IE isn't complaining, which is rare.

The other plus side is the tagging Servlets don't need modification since it works in the exact same way as before except the 'tagging' parameter is nolonger in the url, but as part of a form, which as far as the Servlet is concerned, is the same thing!



for now....