AWOB Task 002

MPDL,GAVO

General Information
Grouping: AWOB resource management: Fits files Short description: Enable automatic recognition of fits files, display fits files in Aladin

Links
JIRA Task/Comments

Discussion
AV: (Copy from master table:) First attempt: Recognition by extension. Later on, fits files recognition should be intelligent and
 * test if a file is a real fits file or only has the suffix .fits
 * recognize fits files not ending on .fits

email AWOB-346, 2011-12-19
I think it must be possible to do what we want with the Aladin applet.

I just tried the following: 1. log in to AWOB 2. copy download URL of FITS file from my FitsWCS project: http://awob.mpg.de:8081/documents/15051/15164/1904-66_ARC.fits 3. within AWOB, go to the ALADIN tool. 4. paste the url in the aladin location and click Enter Result: This aladin applet shows the fits file, i.e. was able to download this protected document.

To test the security I have then gone directly to the Aladin applet at the CDS website: http://aladin.u-strasbg.fr/java/nph-aladin.pl When now pasting the URL in aladin I get an HTTP 403.

So what this tells me is that the web browser recognizes my AWOB "authorization session" ALSO when making a request on behalf of an applet that is opened from within the same session. This is the same behaviour I have seen in the past using the VOPlot applet. It is browser dependent, though I have only seen this fail on Konqueror, which one should not use anyway.

This seems to be all we need. Now the solution that Jai Won and I devised for the GAVO MAXI service should work here as well.

Use Case, Scenario (?)
GL I see this working as follows. The Files browser in AWOB shows a bunch of files. For each file there is currently already a button on the right side that when clicked opens a menu woth various functions available. I think the simples would be to add to this menu an item "open in aladin" (or something like that) for those files that the system has recognised as Fits files. When clicking that menu item, the corresponding file is "sent to aladin".

This could mean the following which is a direct copy of the functionality in the GAVO MAXI site. See for example http://gavo.mpe.mpg.de/MAXI/druid/2 There one can select a button "Open in Aladin". When done so there is javascript code run that first checks whether a web page is open that goes by some special name, say "Show Aladin". If so, a DOM call is made to the Aladin applet object on that page, a URL to the FITS file is sent to it (in some complex way) and Aladin does the rest, downloading the file from the URL and displaying it. If the page can NOT be found, it is first opened. Then the previous steps can be followed.

In AWOB we could start with also having the Aladin applet on a separate static page, not "inside AWOB". This is mainly because it is easier I think to talk to such a page than to a page/iframe/... inside Liferay.

The main problem I see is this. In contrast to the GAVO/MAXI case, the URL identifying the file will normally require authentication to be accessed. This works in AWOB because I am in a session where I have logged in. It must be tested though if, when Aladin makes its request for the file using that URL it will be doing so in the same "authentication context". This may depend on the browser as well as possibly on the authentication mechanism. I have in the past had problems with something like this when using the VOPlot applet in a similar manner. It all worked well for standard browsers, but KDE's Konqueror did not support this properly. This was using Basic Authentication, which is possibly simpler than that used by Liferay?

Conclusions
(Vlad, please add to this.)

Vlad has created an implementation in 8086. It adds to projects a new page labelled Aladin, reachable from the top menu. The page shows on the left side all files (FITS only? --Makarenko 13:22, 13 January 2012 (CET): It shows all files, but only FITS files have Aladin action buttons). On the right it loads the Aladin applet. The FITS files have the usual Actions button, which now includes an item: "Open in Aladin". Clicking this item induces the applet to load the corresponding FITS file. This works nicely. One disadvantage is that when leaving the page to check for example some other part of the project and returning means that the page must be reloaded and the formerly loaded FITS images have disappeared from the applet. A work around for this is that one can open the Aladin page in a new tab (right-click on olink, "Open in new tab" or "Open in new window"). --Makarenko 13:57, 13 January 2012 (CET): Open in the new window/tab can be programmed for the Aladin page with velocity template in theme. No: Vlad created a version that would open a page with only the Aladin applet in a seperate page which avoids this. Disadvantage of that is that one needs to go elsewhere to see the images show up. The first version is nicer.

However the Aladin applet approach is somewhat flaky. The Aladin Java code must be updated to be able to deal with LR authentication properly and be able to retrieve files (might need more investigation if we stay on this course). --Makarenko 13:57, 13 January 2012 (CET): 1) Aladin code (I put into the AWOB svn repo) should be always revised after new release version. Current version is 7; 2) I signed the Aladin rebuilt code with AWOB certificate which is expired after 6 months. To be created proper one.

However as we already have said earlier, ultimately we do not want to rely on Aladin, but start using SMAP and allow people to load images in desktop applications of their choice (as long as they understand SAMP). This is more work and the Galforomd project offers to investigate this further and transfer the solution to AWOB.

Vlad and I concluded that for now we have reached as far as we can go. We propose to use the single page solution basically as-is as a show case in version 0.5 and Vlad can start concentrating on other tasks.

Changes and improvements for AWOB release 0.6
New Aladin view has been added into the list of views of Liferay Document Library: new "A" icon the list of views:
 * When users are seeing page "Resources" (in Tasks or Projects workspace) they will have additionally the possibility to "switch" to Aladin-view with the new Aladin view icon "A"
 * When users select i.e. switch to this view, a new Document Library view is opened. This view will enable selection of only files which are .FITS extension to show in Aladin Applet
 * Switching back to other views (icon, list etc..) wil remove the Aladin Applet and show the resources(document library) as per selected view

Related Links

 * JIRA Ticket AWOB-117: Integrate Document Library portlet with Aladin via JavaScript