2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
3 * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
11 * Jalview is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
20 import jalview.bin.Cache;
21 import jalview.datamodel.AlignmentI;
22 import jalview.datamodel.ColumnSelection;
23 import jalview.datamodel.SequenceGroup;
24 import jalview.datamodel.SequenceI;
25 import jalview.io.VamsasAppDatastore;
26 import jalview.structure.SelectionListener;
27 import jalview.structure.SelectionSource;
28 import jalview.structure.StructureSelectionManager;
29 import jalview.structure.VamsasListener;
30 import jalview.structure.VamsasSource;
32 import java.beans.PropertyChangeEvent;
33 import java.beans.PropertyChangeListener;
35 import java.io.IOException;
36 import java.util.Enumeration;
37 import java.util.Hashtable;
38 import java.util.IdentityHashMap;
39 import java.util.Iterator;
41 import javax.swing.JInternalFrame;
42 import javax.swing.JOptionPane;
44 import uk.ac.vamsas.client.ClientHandle;
45 import uk.ac.vamsas.client.IClient;
46 import uk.ac.vamsas.client.IClientDocument;
47 import uk.ac.vamsas.client.InvalidSessionDocumentException;
48 import uk.ac.vamsas.client.NoDefaultSessionException;
49 import uk.ac.vamsas.client.UserHandle;
50 import uk.ac.vamsas.client.VorbaId;
51 import uk.ac.vamsas.client.picking.IMessageHandler;
52 import uk.ac.vamsas.client.picking.IPickManager;
53 import uk.ac.vamsas.client.picking.Message;
54 import uk.ac.vamsas.client.picking.MouseOverMessage;
55 import uk.ac.vamsas.client.picking.SelectionMessage;
56 import uk.ac.vamsas.objects.core.Entry;
57 import uk.ac.vamsas.objects.core.Input;
58 import uk.ac.vamsas.objects.core.Pos;
59 import uk.ac.vamsas.objects.core.Seg;
65 public class VamsasApplication implements SelectionSource,VamsasSource
67 IClient vclient = null;
69 ClientHandle app = null;
71 UserHandle user = null;
73 Desktop jdesktop = null; // our jalview desktop reference
75 private boolean inInitialUpdate = true;
77 // Cache.preferences for vamsas client session arena
78 // preferences for check for default session at startup.
79 // user and organisation stuff.
80 public VamsasApplication(Desktop jdesktop, File sessionPath,
84 // we should create a session URI from the sessionPath and pass it to
85 // the clientFactory - but the vamsas api doesn't cope with that yet.
86 this.jdesktop = jdesktop;
87 initClientSession(null, sessionPath, sessionName);
90 private static uk.ac.vamsas.client.IClientFactory getClientFactory()
93 return new uk.ac.vamsas.client.simpleclient.SimpleClientFactory();
97 * Start a new vamsas session
101 public VamsasApplication(Desktop jdesktop)
103 this.jdesktop = jdesktop;
104 initClientSession(null, null);
108 * init a connection to the session at the given url
113 public VamsasApplication(Desktop jdesktop, String sessionUrl)
115 this.jdesktop = jdesktop;
116 initClientSession(sessionUrl, null);
120 * @throws IOException
121 * or other if clientfactory instantiation failed.
122 * @return list of current sessions or null if no session exists.
124 public static String[] getSessionList() throws Exception
126 return getClientFactory().getCurrentSessions();
130 * initialise, possibly with either a valid session url or a file for a new
134 * null or a valid session url
135 * @param vamsasDocument
136 * null or a valid vamsas document file
137 * @return false if no vamsas connection was made
139 private void initClientSession(String sess, File vamsasDocument)
141 initClientSession(sess, vamsasDocument, null);
144 private boolean initClientSession(String sess, File vamsasDocument,
145 String newDocSessionName)
149 // Only need to tell the library what the application is here
150 app = getJalviewHandle();
151 uk.ac.vamsas.client.IClientFactory clientfactory = getClientFactory();
152 if (vamsasDocument != null)
157 "Implementation Error - cannot import existing vamsas document into an existing session, Yet!");
161 if (newDocSessionName != null)
163 vclient = clientfactory.openAsNewSessionIClient(app,
164 vamsasDocument, newDocSessionName);
168 vclient = clientfactory.openAsNewSessionIClient(app,
171 } catch (InvalidSessionDocumentException e)
174 .showInternalMessageDialog(
177 "VAMSAS Document could not be opened as a new session - please choose another",
178 "VAMSAS Document Import Failed",
179 JOptionPane.ERROR_MESSAGE);
185 // join existing or create a new session
188 vclient = clientfactory.getNewSessionIClient(app);
192 vclient = clientfactory.getIClient(app, sess);
195 // set some properties for our VAMSAS interaction
197 user = vclient.getUserHandle();
199 } catch (Exception e)
201 jalview.bin.Cache.log
202 .error("Couldn't instantiate vamsas client !", e);
208 private void setVclientConfig()
216 if (vclient instanceof uk.ac.vamsas.client.simpleclient.SimpleClient)
218 uk.ac.vamsas.client.simpleclient.SimpleClientConfig cfg = ((uk.ac.vamsas.client.simpleclient.SimpleClient) vclient)
219 .getSimpleClientConfig();
220 cfg._validatemergedroots = false;
221 cfg._validateupdatedroots = true; // we may write rubbish otherwise.
226 .warn("Probable SERIOUS VAMSAS client incompatibility - carrying on regardless",
228 } catch (Exception e)
231 .warn("Probable VAMSAS client incompatibility - carrying on regardless",
237 * make the appHandle for Jalview
241 private ClientHandle getJalviewHandle()
243 return new ClientHandle("jalview.bin.Jalview",
244 jalview.bin.Cache.getProperty("VERSION"));
249 * @return true if we are registered in a vamsas session
251 public boolean inSession()
253 return (vclient != null);
257 * called to connect to session inits handlers, does an initial document
260 public void initial_update()
265 "Impementation error! Vamsas Operations when client not initialised and connected.");
267 addDocumentUpdateHandler();
268 addStoreDocumentHandler();
270 inInitialUpdate = true;
272 .debug("Jalview loading the Vamsas Session for the first time.");
273 dealWithDocumentUpdate(false); // we don't push an update out to the
274 inInitialUpdate = false;
276 Cache.log.debug("... finished update for the first time.");
280 * Update all windows after a vamsas datamodel change. this could go on the
284 protected void updateJalviewGui()
286 JInternalFrame[] frames = jdesktop.getAllFrames();
296 for (int i = frames.length - 1; i > -1; i--)
298 if (frames[i] instanceof AlignFrame)
300 AlignFrame af = (AlignFrame) frames[i];
301 af.alignPanel.alignmentChanged();
304 } catch (Exception e)
307 .warn("Exception whilst refreshing jalview windows after a vamsas document update.",
312 public void push_update()
314 Thread udthread = new Thread(new Runnable()
319 Cache.log.info("Jalview updating to the Vamsas Session.");
321 dealWithDocumentUpdate(true);
322 Cache.log.info("Jalview finished updating to the Vamsas Session.");
330 * leave a session, prompting the user to save if necessary
332 public void end_session()
337 private boolean promptUser = true;
340 * leave a session, optionally prompting the user to save if necessary
343 * when true enable prompting by this application
346 public void end_session(boolean promptUser)
349 throw new Error("Jalview not connected to Vamsas session.");
350 Cache.log.info("Jalview disconnecting from the Vamsas Session.");
355 boolean ourprompt = this.promptUser;
356 this.promptUser = promptUser;
357 vclient.finalizeClient();
358 Cache.log.info("Jalview has left the session.");
359 this.promptUser = ourprompt; // restore default value
364 .warn("JV Client leaving a session that's its not joined yet.");
366 joinedSession = false;
372 } catch (Exception e)
374 Cache.log.error("Vamsas Session finalization threw exceptions!", e);
378 public void updateJalview(IClientDocument cdoc)
380 Cache.log.debug("Jalview updating from sesion document ..");
382 VamsasAppDatastore vds = new VamsasAppDatastore(cdoc, vobj2jv, jv2vobj,
383 baseProvEntry(), alRedoState);
386 vds.updateToJalview();
387 } catch (Exception e)
389 Cache.log.error("Failed to update Jalview from vamsas document.", e);
395 vds.updateJalviewFromAppdata();
396 // Comment this out to repeatedly read in data from JalviewAppData
397 // firstUpdate=false;
399 } catch (Exception e)
402 "Exception when updating Jalview settings from Appdata.", e);
404 Cache.log.debug(".. finished updating from sesion document.");
408 boolean firstUpdate = false;
410 private void ensureJvVamsas()
414 jv2vobj = new IdentityHashMap();
415 vobj2jv = new Hashtable();
416 alRedoState = new Hashtable();
422 * jalview object binding to VorbaIds
424 IdentityHashMap jv2vobj = null;
426 Hashtable vobj2jv = null;
428 Hashtable alRedoState = null;
430 boolean errorsDuringUpdate = false;
432 boolean errorsDuringAppUpdate = false;
435 * update the document accessed through doc. A backup of the current object
439 * @return number of views stored in document (updated and new views)
441 public int updateVamsasDocument(IClientDocument doc)
445 errorsDuringUpdate = false;
446 errorsDuringAppUpdate = false;
447 backup_objectMapping();
448 VamsasAppDatastore vds = new VamsasAppDatastore(doc, vobj2jv, jv2vobj,
449 baseProvEntry(), alRedoState);
450 // wander through frames
451 JInternalFrame[] frames = Desktop.desktop.getAllFrames();
457 Hashtable skipList = new Hashtable();
458 Hashtable viewset = new Hashtable();
463 for (int i = frames.length - 1; i > -1; i--)
465 if (frames[i] instanceof AlignFrame)
467 AlignFrame af = (AlignFrame) frames[i];
468 if (!viewset.containsKey(af.getViewport().getSequenceSetId()))
470 // update alignment and root from frame.
471 boolean stored = false;
474 stored = vds.storeVAMSAS(af.getViewport(), af.getTitle());
475 } catch (Exception e)
477 errorsDuringUpdate = true;
478 Cache.log.error("Exception synchronizing "
481 + (af.getViewport().viewName == null ? "" : " view "
482 + af.getViewport().viewName)
483 + " to document.", e);
487 { // record skip in skipList
488 skipList.put(af.getViewport().getSequenceSetId(), af);
493 // could try to eliminate sequenceSetId from skiplist ..
494 // (skipList.containsKey(af.getViewport().getSequenceSetId()))
495 // remember sequenceSetId so we can skip all the other views on
497 viewset.put(af.getViewport().getSequenceSetId(), af);
503 // for (int i = frames.length - 1; i > -1; i--)
505 // if (frames[i] instanceof AlignFrame)
507 // AlignFrame af = (AlignFrame) frames[i];
508 Iterator aframes = viewset.values().iterator();
509 while (aframes.hasNext())
511 AlignFrame af = (AlignFrame) aframes.next();
512 // add any AlignedCodonFrame mappings on this alignment to any other.
513 vds.storeSequenceMappings(af.getViewport(), af.getTitle());
515 } catch (Exception e)
517 Cache.log.error("Exception synchronizing Views to Document :", e);
518 errorsDuringUpdate = true;
523 if (viewset.size() > 0)
525 // Alignment views were synchronized, so store their state in the
527 // The skipList ensures we don't write out any alignments not actually
529 vds.setSkipList(skipList);
530 vds.updateJalviewClientAppdata();
532 } catch (Exception e)
534 Cache.log.error("Client Appdata Write exception", e);
535 errorsDuringAppUpdate = true;
541 private Entry baseProvEntry()
543 uk.ac.vamsas.objects.core.Entry pentry = new uk.ac.vamsas.objects.core.Entry();
544 pentry.setUser(user.getFullName());
545 pentry.setApp(app.getClientUrn());
546 pentry.setDate(new java.util.Date());
547 pentry.setAction("created");
552 * do a vamsas document update or update jalview from the vamsas document
555 * true to update from jalview to the vamsas document
556 * @return total number of stored alignments in the document after the update
558 protected int dealWithDocumentUpdate(boolean fromJalview)
561 // called by update handler for document update.
562 Cache.log.debug("Updating jalview from changed vamsas document.");
566 long time = System.currentTimeMillis();
567 IClientDocument cdoc = vclient.getClientDocument();
568 if (Cache.log.isDebugEnabled())
570 Cache.log.debug("Time taken to get ClientDocument = "
571 + (System.currentTimeMillis() - time));
572 time = System.currentTimeMillis();
576 storedviews += updateVamsasDocument(cdoc);
577 if (Cache.log.isDebugEnabled())
580 .debug("Time taken to update Vamsas Document from jalview\t= "
581 + (System.currentTimeMillis() - time));
582 time = System.currentTimeMillis();
584 cdoc.setVamsasRoots(cdoc.getVamsasRoots());
585 if (Cache.log.isDebugEnabled())
587 Cache.log.debug("Time taken to set Document Roots\t\t= "
588 + (System.currentTimeMillis() - time));
589 time = System.currentTimeMillis();
595 if (Cache.log.isDebugEnabled())
598 .debug("Time taken to update Jalview from vamsas document Roots\t= "
599 + (System.currentTimeMillis() - time));
600 time = System.currentTimeMillis();
604 vclient.updateDocument(cdoc);
605 if (Cache.log.isDebugEnabled())
607 Cache.log.debug("Time taken to update Session Document\t= "
608 + (System.currentTimeMillis() - time));
609 time = System.currentTimeMillis();
612 } catch (Exception ee)
614 System.err.println("Exception whilst updating :");
615 ee.printStackTrace(System.err);
616 // recover object map backup, since its probably corrupted with references
617 // to Vobjects that don't exist anymore.
618 recover_objectMappingBackup();
621 Cache.log.debug("Finished updating from document change.");
626 private void addDocumentUpdateHandler()
628 final VamsasApplication client = this;
629 vclient.addDocumentUpdateHandler(new PropertyChangeListener()
631 public void propertyChange(PropertyChangeEvent evt)
633 Cache.log.debug("Dealing with document update event.");
634 client.dealWithDocumentUpdate(false);
635 Cache.log.debug("finished dealing with event.");
638 Cache.log.debug("Added Jalview handler for vamsas document updates.");
641 private void addStoreDocumentHandler()
643 final VamsasApplication client = this;
644 vclient.addVorbaEventHandler(
645 uk.ac.vamsas.client.Events.DOCUMENT_REQUESTTOCLOSE,
646 new PropertyChangeListener()
648 public void propertyChange(PropertyChangeEvent evt)
650 if (client.promptUser)
653 .debug("Asking user if the vamsas session should be stored.");
654 int reply = JOptionPane
655 .showInternalConfirmDialog(
657 "The current VAMSAS session has unsaved data - do you want to save it ?",
658 "VAMSAS Session Shutdown",
659 JOptionPane.YES_NO_OPTION,
660 JOptionPane.QUESTION_MESSAGE);
662 if (reply == JOptionPane.YES_OPTION)
664 Cache.log.debug("Prompting for vamsas store filename.");
665 Desktop.instance.vamsasSave_actionPerformed(null);
667 .debug("Finished attempt at storing document.");
670 .debug("finished dealing with REQUESTTOCLOSE event.");
675 .debug("Ignoring store document request (promptUser==false)");
679 Cache.log.debug("Added Jalview handler for vamsas document updates.");
682 public void disableGui(boolean b)
684 Desktop.instance.setVamsasUpdate(b);
687 Hashtable _backup_vobj2jv;
689 IdentityHashMap _backup_jv2vobj;
692 * make a backup of the object mappings (vobj2jv and jv2vobj)
694 public void backup_objectMapping()
696 _backup_vobj2jv = new Hashtable(vobj2jv);
697 _backup_jv2vobj = new IdentityHashMap(jv2vobj);
701 * recover original object mappings from the object mapping backup if document
705 * if backup_objectMapping was not called.
707 public void recover_objectMappingBackup()
709 if (_backup_vobj2jv == null)
713 // nothing to recover so just
718 "IMPLEMENTATION ERROR: Cannot recover vamsas object mappings - no backup was made.");
721 Iterator el = _backup_jv2vobj.entrySet().iterator();
724 java.util.Map.Entry mp = (java.util.Map.Entry) el.next();
725 jv2vobj.put(mp.getKey(), mp.getValue());
727 el = _backup_vobj2jv.entrySet().iterator();
730 java.util.Map.Entry mp = (java.util.Map.Entry) el.next();
731 vobj2jv.put(mp.getKey(), mp.getValue());
735 private boolean joinedSession = false;
737 private VamsasListener picker = null;
739 private SelectionListener selecter;
741 private void startSession()
747 vclient.joinSession();
748 joinedSession = true;
749 } catch (Exception e)
752 Cache.log.error("Failed to join vamsas session.", e);
757 final IPickManager pm = vclient.getPickManager();
758 final StructureSelectionManager ssm = StructureSelectionManager
759 .getStructureSelectionManager();
760 final VamsasApplication me = this;
761 pm.registerMessageHandler(new IMessageHandler()
765 public void handleMessage(Message message)
769 // we are not in a session yet.
772 if (message instanceof MouseOverMessage)
774 MouseOverMessage mm = (MouseOverMessage) message;
775 String mstring = mm.getVorbaID() + " " + mm.getPosition();
776 if (last != null && mstring.equals(last))
780 // if (Cache.log.isDebugEnabled())
782 // Cache.log.debug("Received MouseOverMessage "+mm.getVorbaID()+"
783 // "+mm.getPosition());
785 Object jvobj = vobj2jv.get(mm.getVorbaID());
786 if (jvobj != null && jvobj instanceof SequenceI)
789 // Cache.log.debug("Handling Mouse over "+mm.getVorbaID()+"
790 // bound to "+jvobj+" at "+mm.getPosition());
791 // position is character position in aligned sequence
792 ssm.mouseOverVamsasSequence((SequenceI) jvobj,
793 mm.getPosition(), me);
796 if (message instanceof uk.ac.vamsas.client.picking.SelectionMessage)
798 // we only care about AlignmentSequence selections
799 SelectionMessage sm = (SelectionMessage) message;
801 System.err.println("Received\n" + sm.getRawMessage());
802 Object[] jvobjs = sm.getVorbaIDs() == null ? null
803 : new Object[sm.getVorbaIDs().length];
806 // TODO: rationalise : can only clear a selection over a
807 // referred to object
808 ssm.sendSelection(null, null, me);
813 for (int o = 0; o < jvobjs.length; o++)
815 jvobjs[o] = vobj2jv.get(sm.getVorbaIDs()[o]);
816 if (jvobjs[o] == null)
818 // can't cope with selections for unmapped objects
823 type = jvobjs[o].getClass();
826 if (type != jvobjs[o].getClass())
829 // discard - can't cope with selections over mixed objects
833 SequenceGroup jselection = null;
834 ColumnSelection colsel = null;
835 if (type == jalview.datamodel.Alignment.class)
837 if (jvobjs.length == 1)
839 // TODO if (sm.isNone())// send a message to select the
840 // specified columns over the
847 if (type == jalview.datamodel.Sequence.class)
851 boolean aligned = ((jalview.datamodel.Sequence) jvobjs[0])
852 .getDatasetSequence() != null;
856 jselection = new SequenceGroup();
857 jselection.addSequence(
858 seq = (jalview.datamodel.Sequence) jvobjs[0],
860 maxWidth = seq.getLength();
862 for (int c = 1; aligned && jvobjs.length > 1
863 && c < jvobjs.length; c++)
865 if (((jalview.datamodel.Sequence) jvobjs[c])
866 .getDatasetSequence() == null)
873 jselection.addSequence(
874 seq = (jalview.datamodel.Sequence) jvobjs[c],
876 if (maxWidth < seq.getLength())
878 maxWidth = seq.getLength();
886 // if cardinality is greater than one then verify all
887 // sequences are alignment sequences.
888 if (jvobjs.length == 1)
890 // find all instances of this dataset sequence in the
891 // displayed alignments containing the associated range and
897 jselection.setStartRes(0);
898 jselection.setEndRes(maxWidth);
899 // locate the alignment containing the given sequences and
900 // select the associated ranges on them.
901 if (sm.getRanges() != null)
903 int[] prange = uk.ac.vamsas.objects.utils.Range
904 .getBounds(sm.getRanges());
905 jselection.setStartRes(prange[0] - 1);
906 jselection.setEndRes(prange[1] - 1);
907 prange = uk.ac.vamsas.objects.utils.Range
908 .getIntervals(sm.getRanges());
909 colsel = new ColumnSelection();
910 for (int p = 0; p < prange.length; p += 2)
912 int d = (prange[p] <= prange[p + 1]) ? 1 : -1;
913 // try to join up adjacent columns to make a larger
915 // lower and upper bounds
916 int l = (d < 0) ? 1 : 0;
917 int u = (d > 0) ? 1 : 0;
919 if (jselection.getStartRes() > 0
920 && prange[p + l] == jselection.getStartRes())
922 jselection.setStartRes(prange[p + l] - 1);
924 if (jselection.getEndRes() <= maxWidth
925 && prange[p + u] == (jselection.getEndRes() + 2))
927 jselection.setEndRes(prange[p + u] - 1);
929 // mark all the columns in the range.
930 for (int sr = prange[p], er = prange[p + 1], de = er
931 + d; sr != de; sr += d)
933 colsel.addElement(sr - 1);
942 ssm.sendSelection(jselection, colsel, me);
945 for (int c = 0; c < jvobjs.length; c++)
955 picker = new VamsasListener()
957 SequenceI last = null;
961 public void mouseOver(SequenceI seq, int index, VamsasSource source)
965 if (seq != last || i != index)
967 VorbaId v = (VorbaId) jv2vobj.get(seq);
970 // this should really be a trace message.
971 // Cache.log.debug("Mouse over " + v.getId() + " bound to "
972 // + seq + " at " + index);
975 MouseOverMessage message = new MouseOverMessage(v.getId(),
977 pm.sendMessage(message);
982 selecter = new SelectionListener()
985 public void selection(SequenceGroup seqsel,
986 ColumnSelection colsel, SelectionSource source)
991 .warn("Selection listener still active for dead session.");
997 AlignmentI visal = null;
998 if (source instanceof AlignViewport)
1000 visal = ((AlignViewport) source).getAlignment();
1002 SelectionMessage sm = null;
1003 if ((seqsel == null || seqsel.getSize() == 0)
1004 && (colsel == null || colsel.getSelected() == null || colsel
1005 .getSelected().size() == 0))
1007 if (source instanceof AlignViewport)
1009 // the empty selection.
1010 sm = new SelectionMessage("jalview", new String[]
1011 { ((AlignViewport) source).getSequenceSetId() }, null,
1016 // the empty selection.
1017 sm = new SelectionMessage("jalview", null, null, true);
1022 String[] vobj = new String[seqsel.getSize()];
1024 Enumeration sels = seqsel.getSequences(null).elements();
1025 while (sels.hasMoreElements())
1027 SequenceI sel = (SequenceI) sels.nextElement();
1028 VorbaId v = (VorbaId) jv2vobj.get(sel);
1031 vobj[o++] = v.toString();
1034 if (o < vobj.length)
1037 vobj = new String[o];
1038 System.arraycopy(t, 0, vobj, 0, o);
1042 if (seqsel != null && colsel != null)
1044 // deparse the colsel into positions on the vamsas alignment
1046 range = new Input();
1047 if (colsel.getSelected() != null
1048 && colsel.getSelected().size() > 0
1050 && seqsel.getSize() == visal.getHeight())
1052 // gather selected columns outwith the sequence positions
1054 Enumeration cols = colsel.getSelected().elements();
1055 while (cols.hasMoreElements())
1057 int ival = ((Integer) cols.nextElement()).intValue();
1065 int[] intervals = colsel.getVisibleContigs(
1066 seqsel.getStartRes(), seqsel.getEndRes() + 1);
1067 for (int iv = 0; iv < intervals.length; iv += 2)
1070 s.setStart(intervals[iv] + 1); // vamsas indices begin at
1072 s.setEnd(intervals[iv + 1] + 1);
1073 s.setInclusive(true);
1078 if (vobj.length > 0)
1080 sm = new SelectionMessage("jalview", vobj, range);
1089 sm.validate(); // debug
1090 Cache.log.debug("Selection Message\n" + sm.getRawMessage());
1097 ssm.addStructureViewerListener(picker); // better method here
1098 ssm.addSelectionListener(selecter);
1099 } catch (Exception e)
1101 Cache.log.error("Failed to init Vamsas Picking", e);
1106 public String getCurrentSession()
1108 if (vclient != null)
1110 return (vclient.getSessionUrn());