From: jprocter Date: Wed, 13 Sep 2006 14:23:45 +0000 (+0000) Subject: ongoign vamsas session debugging X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8fa9d08c44b3ba0aaa357ab9ed41b893b904a63f;p=jalview.git ongoign vamsas session debugging --- diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 78f34cb..f6dd6dd 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -2418,7 +2418,18 @@ public class AlignFrame */ public TreePanel ShowNewickTree(NewickFile nf, String title, int w,int h,int x, int y) { - TreePanel tp = null; + return ShowNewickTree(nf,title, null, w,h,x, y); + } + /** + * DOCUMENT ME! + * + * @param nf DOCUMENT ME! + * @param title DOCUMENT ME! + * + * @return DOCUMENT ME! + */ + public TreePanel ShowNewickTree(NewickFile nf, String title, AlignmentView input, int w,int h,int x, int y) { + TreePanel tp = null; try { @@ -2429,10 +2440,9 @@ public class AlignFrame tp = new TreePanel(viewport, "FromFile", title, - nf); - + nf, input); tp.setSize(w,h); - + if(x>0 && y>0) tp.setLocation(x,y); diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index eb480a1..d218a5b 100755 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -686,6 +686,7 @@ public class Desktop extends jalview.jbgui.GDesktop this.vamsasLoad.setText("Session Update"); this.vamsasStop.setVisible(true); v_client.initial_update(); + v_client.startWatcher(); } } else { // store current data in session. @@ -700,5 +701,15 @@ public class Desktop extends jalview.jbgui.GDesktop this.vamsasLoad.setText("Start Vamsas Session..."); } } + /** + * hide vamsas user gui bits when a vamsas document event is being handled. + * @param b true to hide gui, false to reveal gui + */ + public void setVamsasUpdate(boolean b) { + jalview.bin.Cache.log.debug("Setting gui for Vamsas update "+(b ? "in progress" : "finished")); + vamsasLoad.setVisible(!b); + vamsasStop.setVisible(!b); + + } } diff --git a/src/jalview/gui/TreePanel.java b/src/jalview/gui/TreePanel.java index cc3209e..e257e50 100755 --- a/src/jalview/gui/TreePanel.java +++ b/src/jalview/gui/TreePanel.java @@ -68,7 +68,7 @@ public class TreePanel extends GTreePanel public TreePanel(AlignViewport av, String type, String pwtype) { super(); - initTreePanel(av, type, pwtype, null); + initTreePanel(av, type, pwtype, null,null); // We know this tree has distances. JBPNote TODO: prolly should add this as a userdefined default // showDistances(true); @@ -89,7 +89,14 @@ public class TreePanel extends GTreePanel NewickFile newtree) { super(); - initTreePanel(av, type, pwtype, newtree); + initTreePanel(av, type, pwtype, newtree,null); + } + public TreePanel(AlignViewport av, + String type, + String pwtype, + NewickFile newtree, AlignmentView inputData) { + super(); + initTreePanel(av,type,pwtype,newtree,inputData); } public AlignmentI getAlignment() @@ -99,7 +106,7 @@ public class TreePanel extends GTreePanel void initTreePanel(AlignViewport av, String type, String pwtype, - NewickFile newTree) + NewickFile newTree, AlignmentView inputData) { this.type = type; @@ -130,6 +137,8 @@ public class TreePanel extends GTreePanel TreeLoader tl = new TreeLoader(newTree); + if (inputData!=null) + tl.odata=inputData; tl.start(); } diff --git a/src/jalview/gui/VamsasClient.java b/src/jalview/gui/VamsasClient.java index 76e9599..250fdde 100755 --- a/src/jalview/gui/VamsasClient.java +++ b/src/jalview/gui/VamsasClient.java @@ -15,11 +15,13 @@ import java.util.jar.JarOutputStream; import javax.swing.JInternalFrame; import jalview.bin.Cache; +import jalview.io.VamsasDatastore; import org.vamsas.client.UserHandle; import org.vamsas.client.simpleclient.FileWatcher; import org.vamsas.client.simpleclient.VamsasArchive; import org.vamsas.client.simpleclient.VamsasFile; +import org.vamsas.objects.core.Entry; import org.vamsas.objects.core.VamsasDocument; import org.vamsas.test.simpleclient.ArchiveClient; import org.vamsas.test.simpleclient.ClientDoc; @@ -29,7 +31,6 @@ import org.vamsas.test.simpleclient.ClientDoc; * */ public class VamsasClient extends ArchiveClient { - Desktop us; // Cache.preferences for vamsas client session arena // preferences for check for default session at startup. // user and organisation stuff. @@ -37,19 +38,40 @@ public class VamsasClient extends ArchiveClient { File sessionPath) { super(System.getProperty("user.name"),System.getProperty("host.name"), "jalview","2.7", sessionPath); - us=jdesktop; } public void initial_update() { Cache.log.info("Jalview loading the Vamsas Session."); // load in the vamsas archive for the first time ClientDoc cdoc = this.getUpdateable(); updateJalview(cdoc); - - } - /** + JInternalFrame[] frames = Desktop.desktop.getAllFrames(); + + if (frames == null) + { + return; + } + + try + { + //REVERSE ORDER + for (int i = frames.length - 1; i > -1; i--) + { + if (frames[i] instanceof AlignFrame) + { + AlignFrame af = (AlignFrame) frames[i]; + af.alignmentChanged(); + } + } + } catch (Exception e) { + Cache.log.warn("Exception whilst refreshing jalview windows after a vamsas document update.", e); + } + doUpdate(cdoc); + cdoc.closeDoc(); + } + /** * this will close all windows currently in Jalview. * - */ + protected void closeWindows() { JInternalFrame[] frames = Desktop.desktop.getAllFrames(); @@ -68,24 +90,60 @@ public class VamsasClient extends ArchiveClient { } } + public void get_update(VamsasArchive doc) { // Close windows - load update. Cache.log.info("Jalview updating from Vamsas Session."); } + */ + VamsasClientWatcher watcher=null; public void push_update() { + watchForChange=false; + try { + Thread.sleep(WATCH_SLEEP); + } catch (Exception e) { + + }; + ClientDoc cdoc = getUpdateable(); + updateVamsasDocument(cdoc); + doUpdate(cdoc); + cdoc.closeDoc(); + cdoc=null; + watchForChange=true; + if (watcher!=null) { + Thread wthread = new Thread() { + public void run() { + watcher.run(); + } + }; + wthread.start(); + + } // collect all uncached alignments and put them into the vamsas dataset. // store them. Cache.log.info("Jalview updating the Vamsas Session."); } public void end_session() { - // stop any update/watcher thread. - Cache.log.info("Jalview disconnecting from the Vamsas Session."); + // stop any update/watcher thread. + watchForChange=false; // this makes any watch(long) loops return. + // we should also wait arount for this.WATCH_SLEEP to really make sure the watcher thread has stopped. + try { + Thread.sleep(WATCH_SLEEP); + } catch (Exception e) { + + }; + Cache.log.info("Jalview disconnecting from the Vamsas Session."); } public void updateJalview(ClientDoc cdoc) { - + ensureJvVamsas(); + VamsasDatastore vds = new VamsasDatastore(cdoc, vobj2jv, jv2vobj, baseProvEntry()); + vds.updateToJalview(); } - protected void _updateAlignFrame(ClientDoc cdoc, AlignFrame av) { - + private void ensureJvVamsas() { + if (jv2vobj==null) { + jv2vobj = new IdentityHashMap(); + vobj2jv = new Hashtable(); + } } /** * jalview object binding to VorbaIds @@ -93,11 +151,9 @@ public class VamsasClient extends ArchiveClient { IdentityHashMap jv2vobj = null; Hashtable vobj2jv = null; public void updateVamsasDocument(ClientDoc doc) { - if (jv2vobj==null) { - jv2vobj = new IdentityHashMap(); - vobj2jv = new Hashtable(); - } - // wander through frames + ensureJvVamsas(); + VamsasDatastore vds = new VamsasDatastore(doc, vobj2jv, jv2vobj, baseProvEntry()); + // wander through frames JInternalFrame[] frames = Desktop.desktop.getAllFrames(); if (frames == null) @@ -107,13 +163,6 @@ public class VamsasClient extends ArchiveClient { try { - // Mapping - // Alignframe.alignment (non-null dataset)==alignment - // alignframe .alignment (dataset==null) = VAMAS[] - // Tree.alignment = vamsas[].tree (vamsas[] given by dataset, alignment given by local ref] - - Vector shortNames = new Vector(); - //REVERSE ORDER for (int i = frames.length - 1; i > -1; i--) { @@ -121,10 +170,8 @@ public class VamsasClient extends ArchiveClient { { AlignFrame af = (AlignFrame) frames[i]; - // check if this frame has an associated alignment object ? - // update alignment and root from frame. - + vds.storeVAMSAS(af.getViewport()); } } } @@ -132,7 +179,15 @@ public class VamsasClient extends ArchiveClient { Cache.log.error("Vamsas Document store exception",e); } } - protected class VamsasClientWatcher extends Thread implements Runnable { + private Entry baseProvEntry() { + org.vamsas.objects.core.Entry pentry = new org.vamsas.objects.core.Entry(); + pentry.setUser(this.getProvenanceUser()); + pentry.setApp(this.getClientHandle().getClientName()); + pentry.setDate(new org.exolab.castor.types.Date(new java.util.Date())); + pentry.setAction("created"); + return pentry; + } + protected class VamsasClientWatcher extends Thread implements Runnable { /* (non-Javadoc) * @see java.lang.Thread#run() */ @@ -140,9 +195,23 @@ public class VamsasClient extends ArchiveClient { VamsasClientWatcher(VamsasClient client) { this.client = client; } + boolean running=false; public void run() { - ClientDoc docio = client.watch(0); - + running=true; + while (client.watchForChange) { + ClientDoc docio = client.watch(0); + if (docio!=null) { + client.disableGui(true); + Cache.log.debug("Updating jalview from changed vamsas document."); + client.updateJalview(docio); + Cache.log.debug("Finished updating from document change."); + docio.closeDoc(); + docio=null; + client.disableGui(false); + } + } + running=false; + } } @@ -153,5 +222,18 @@ public class VamsasClient extends ArchiveClient { // TODO Auto-generated method stub } + public void disableGui(boolean b) { + Desktop.instance.setVamsasUpdate(b); + } + public void startWatcher() { + if (watcher==null) + watcher=new VamsasClientWatcher(this); + Thread thr = new Thread() { + public void run() { + watcher.start(); + } + }; + thr.start(); + } } diff --git a/src/jalview/io/VamsasDatastore.java b/src/jalview/io/VamsasDatastore.java index a9735be..279a4c4 100755 --- a/src/jalview/io/VamsasDatastore.java +++ b/src/jalview/io/VamsasDatastore.java @@ -64,26 +64,13 @@ public class VamsasDatastore { Hashtable vobj2jv; - Hashtable root2jv; - IdentityHashMap jv2vobj; - IdentityHashMap jv2root; - public VamsasDatastore(ClientDoc cdoc, Hashtable vobj2jv, IdentityHashMap jv2vobj, Entry provEntry) { - this(cdoc, vobj2jv, jv2vobj, provEntry, new Hashtable(), - new IdentityHashMap()); - } - - public VamsasDatastore(ClientDoc cdoc, Hashtable vobj2jv, - IdentityHashMap jv2vobj, Entry provEntry, Hashtable root2jv, - IdentityHashMap jv2root) { - this.cdoc = cdoc; + this.cdoc = cdoc; this.vobj2jv = vobj2jv; this.jv2vobj = jv2vobj; - this.root2jv = root2jv; - this.jv2root = jv2root; this.provEntry = provEntry; } @@ -108,7 +95,7 @@ public class VamsasDatastore { */ protected Vobject getjv2vObj(Object jvobj) { if (jv2vobj.containsKey(jvobj)) - return cdoc.getObject(((VorbaId) jv2vobj.get(jvobj))); + return cdoc.getObject((VorbaId) jv2vobj.get(jvobj)); return null; } @@ -127,7 +114,7 @@ public class VamsasDatastore { return null; } if (vobj2jv.containsKey(vobj.getVorbaId())) - return vobj2jv.get(id); + return vobj2jv.get(vobj.getVorbaId()); return null; } @@ -136,10 +123,12 @@ public class VamsasDatastore { if (id == null) { id = cdoc.registerObject(vobj); + if (id==null || vobj.getVorbaId()==null) + Cache.log.error("Failed to get id for "+(vobj.isRegisterable() ? "registerable" : "unregisterable") +" object "+vobj); } if (vobj2jv.containsKey(vobj.getVorbaId()) || jv2vobj.containsKey(jvobj)) { - Cache.log.error("Duplicate object binding!"); + Cache.log.error("Duplicate object binding! "+vobj+" id " +vobj.getVorbaId().getId()+" to "+jvobj); } else { @@ -292,7 +281,7 @@ public class VamsasDatastore { if (alignment == null) { alignment = new Alignment(); - bindjvvobj(jal, alignment); + bindjvvobj(av, alignment); if (alignment.getProvenance() == null) alignment.setProvenance(new Provenance()); addProvenance(alignment.getProvenance(), "added"); // TODO: insert some @@ -399,13 +388,22 @@ public class VamsasDatastore { if (an == null) { an = new org.vamsas.objects.core.AlignmentSequenceAnnotation(); + Seg vSeg = new Seg(); + vSeg.setStart(1); + vSeg.setInclusive(true); + vSeg.setEnd(gapMap.length); + an.addSeg(vSeg); + an.setType("jalview:SecondaryStructurePrediction");// TODO: better fix this rough guess ;) alsref.addAlignmentSequenceAnnotation(an); + bindjvvobj(aa[i],an); // LATER: much of this is verbatim from the alignmentAnnotation // method below. suggests refactoring to make rangeAnnotation the // base class an.setDescription(aa[i].description); if (aa[i].graph > 0) an.setGraph(true); // aa[i].graph); + else + an.setGraph(false); an.setLabel(aa[i].label); an.setProvenance(dummyProvenance()); // get provenance as user // created, or jnet, or @@ -438,7 +436,7 @@ public class VamsasDatastore { // utf8 // translation ae.addValue(aa[i].annotations[a].value); - ae.setPosition(gapMap[a]); // position w.r.t. AlignmentSequence + ae.setPosition(gapMap[a]+1); // position w.r.t. AlignmentSequence // symbols if (aa[i].annotations[a].secondaryStructure != ' ') { @@ -476,21 +474,31 @@ public class VamsasDatastore { if (an == null) { an = new org.vamsas.objects.core.AlignmentAnnotation(); + an.setType("jalview:AnnotationRow"); an.setDescription(aa[i].description); alignment.addAlignmentAnnotation(an); + Seg vSeg = new Seg(); + vSeg.setStart(1); + vSeg.setInclusive(true); + vSeg.setEnd(jal.getWidth()); + an.addSeg(vSeg); if (aa[i].graph > 0) an.setGraph(true); // aa[i].graph); an.setLabel(aa[i].label); an.setProvenance(dummyProvenance()); - an.setGroup(Integer.toString(aa[i].graphGroup)); // // JBPNote - - // originally we + if (aa[i].graph!=aa[i].NO_GRAPH) { + an.setGroup(Integer.toString(aa[i].graphGroup)); // // JBPNote - + // originally we // were going to // store // graphGroup in // the Jalview // specific // bits. - + an.setGraph(true); + } else { + an.setGraph(false); + } AnnotationElement ae; for (int a = 0; a < aa[i].annotations.length; a++) @@ -512,7 +520,7 @@ public class VamsasDatastore { // utf8 // translation ae.addValue(aa[i].annotations[a].value); - ae.setPosition(a); + ae.setPosition(a+1); if (aa[i].annotations[a].secondaryStructure != ' ') { Glyph ss = new Glyph(); @@ -576,10 +584,6 @@ public class VamsasDatastore { if (tp.getAlignment() == jal) { - // LATER: can recover alignment and Vamsas Alignment for an - // associated tree using the getjv2vObj() so we could pass through - // the tree list just once rather than many times - Tree tree = (Tree) getjv2vObj(tp); if (tree == null) { @@ -647,6 +651,7 @@ public class VamsasDatastore { Seg vSeg = new Seg(); vSeg.setStart(feature.getBegin()); vSeg.setEnd(feature.getEnd()); + vSeg.setInclusive(true); dsa.addSeg(vSeg); dsa.setDescription(feature.getDescription()); dsa.setStatus(feature.getStatus()); @@ -681,15 +686,27 @@ public class VamsasDatastore { * @return */ private Provenance makeTreeProvenance(AlignmentI jal, TreePanel tp) { - Input vInput = new Input(); - // LATER: check to see if tree input data is contained in this alignment - - // or just correctly resolve the tree's seqData to the correct alignment in - // the document. - vInput.setObjRef(getjv2vObj(jal)); - Provenance prov = dummyProvenance(); + Provenance prov = new Provenance(); + prov.addEntry(new Entry()); + prov.getEntry(0).setAction("imported "+tp.getTitle()); + prov.getEntry(0).setUser(provEntry.getUser()); + prov.getEntry(0).setApp(provEntry.getApp()); + prov.getEntry(0).setDate(provEntry.getDate()); if (tp.getTree().hasOriginalSequenceData()) { + Input vInput = new Input(); + // LATER: check to see if tree input data is contained in this alignment - + // or just correctly resolve the tree's seqData to the correct alignment in + // the document. + vInput.setObjRef(getjv2vObj(jal)); + prov.getEntry(0).setAction("created "+tp.getTitle()); prov.getEntry(0).addInput(vInput); + vInput.setName("jalview:seqdist"); + prov.getEntry(0).addParam(new Param()); + prov.getEntry(0).getParam(0).setName("treeType"); + prov.getEntry(0).getParam(0).setType("utf8"); + prov.getEntry(0).getParam(0).setContent("NJ"); + int ranges[] = tp.getTree().seqData.getVisibleContigs(); for (int r = 0; r < ranges.length; r += 2) { @@ -700,7 +717,7 @@ public class VamsasDatastore { vInput.addSeg(visSeg); } } - return null; + return prov; } /** @@ -768,7 +785,7 @@ public class VamsasDatastore { int pol = (visSeg.getStart() <= visSeg.getEnd()) ? 1 : -1; // polarity of // region. int start = visSeg.getStart() + (incl ? 0 : pol); - int end = visSeg.getEnd() + (incl ? -pol : 0); + int end = visSeg.getEnd() + (incl ? 0 : -pol); if (ensureDirection && pol==-1) { // jalview doesn't deal with inverted ranges, yet. @@ -805,7 +822,7 @@ public class VamsasDatastore { { if (frames[t] instanceof AlignFrame) { if (((AlignFrame) frames[t]).getViewport()==av) - return (AlignFrame) frames[t]; + return (AlignFrame) frames[t]; } } } @@ -962,7 +979,8 @@ public class VamsasDatastore { if (asa==null) { int se[] = getBounds(vasannot[a]); asa = getjAlignmentAnnotation(jal, vasannot[a]); - asa.createSequenceMapping(alseq, se[0], false); // TODO: verify that positions in alseqAnnotation correspond to ungapped residue positions. + asa.sequenceRef=alseq; + asa.createSequenceMapping(alseq, alseq.getStart()+se[0], false); // TODO: verify that positions in alseqAnnotation correspond to ungapped residue positions. bindjvvobj(asa, vasannot[a]); newasAnnots.add(asa); } else { @@ -974,7 +992,7 @@ public class VamsasDatastore { // int se[] = getBounds(vasannot[a]); // asa.update(getjAlignmentAnnotation(jal, vasannot[a])); // update from another annotation object in place. // asa.createSequenceMapping(alseq, se[0], false); - + } } } @@ -988,7 +1006,6 @@ public class VamsasDatastore { } jal = new jalview.datamodel.Alignment(seqs); Cache.log.debug("New vamsas alignment imported into jalview "+alignment.getVorbaId().getId()); - bindjvvobj(jal, alignment); jal.setDataset(jdataset); } if (newasAnnots!=null && newasAnnots.size()>0) { @@ -1015,7 +1032,7 @@ public class VamsasDatastore { // TODO: should at least replace with a new one - otherwise things will break // basically do this: // jan.update(getjAlignmentAnnotation(jal, an[a])); // update from another annotation object in place. - + Cache.log.debug("update from vamsas alignment annotation to existing jalview alignment annotation."); if (an[i].getModifiable()) { // TODO: user defined annotation is totally mutable... - so load it up or throw away if locally edited. @@ -1032,14 +1049,16 @@ public class VamsasDatastore { } AlignFrame alignFrame; if (av==null) { - // /////////////////////////////// + Cache.log.debug("New alignframe for alignment "+alignment.getVorbaId()); + // /////////////////////////////// // construct alignment view alignFrame = new AlignFrame(jal); av=alignFrame.getViewport(); // TODO: automatically create meaningful title for a vamsas alignment using its provenance. - jalview.gui.Desktop.addInternalFrame(alignFrame, alignment.getProvenance().getEntry(alignment.getProvenance().getEntryCount()-1).toString(), + jalview.gui.Desktop.addInternalFrame(alignFrame, alignment.getProvenance().getEntry(alignment.getProvenance().getEntryCount()-1).getAction(), AlignFrame.NEW_WINDOW_WIDTH, AlignFrame.NEW_WINDOW_HEIGHT); + bindjvvobj(av, alignment); } else { // find the alignFrame for jal. // TODO: fix this so we retrieve the alignFrame handing av *directly* @@ -1049,7 +1068,7 @@ public class VamsasDatastore { // ///////////////////////////////////// if (alignment.getTreeCount() > 0) { - + for (int t = 0; t < alignment.getTreeCount(); t++) { Tree tree = alignment.getTree(t); @@ -1060,18 +1079,15 @@ public class VamsasDatastore { // make a new tree Object[] idata = this.recoverInputData(tree.getProvenance()); try { - + AlignmentView inputData=null; + if (idata!=null && idata[0]!=null) + inputData = (AlignmentView) idata[0]; tp = alignFrame.ShowNewickTree( new jalview.io.NewickFile(tree.getNewick(0).getContent()), - tree.getNewick(0).getTitle(), + tree.getNewick(0).getTitle(),inputData, 600, 500, t * 20 + 50, t * 20 + 50); bindjvvobj(tp, tree); - if (idata!=null) { - // add it to tp. - check jalview_2xml that it isn't an out of date version. - } - } catch (Exception e) { Cache.log.warn("Problems parsing treefile '"+tree.getNewick(0).getContent()+"'",e); } @@ -1109,13 +1125,13 @@ public class VamsasDatastore { new jalview.datamodel.Annotation[rangeMap.length] }; boolean mergeable=true; //false if 'after positions cant be placed on same annotation row as positions. - + if (annotation.getAnnotationElementCount()>0) { AnnotationElement ae[] = annotation.getAnnotationElement(); for (int aa = 0; aa < ae.length; aa++) { - int pos = ae[aa].getPosition(); - if (pos>=0 && pos=0 && pos0) { Glyph[] glyphs = ae[aa].getGlyph(); for (int g=0; g0) { Cache.log.warn("Ignoring "+annotation.getLinkCount()+"links added to AlignmentAnnotation."); @@ -1356,7 +1384,8 @@ public class VamsasDatastore { for (int s = 0, sSize = dseta.getSegCount(); s < sSize; s++) { se = getSegRange(dseta.getSeg(s), false); - for (int p=se[se[2]]; p!=se[1-se[2]]; p+=se[2]==0 ? 1 : -1 ) { + int se_end=se[1-se[2]]+(se[2]==0 ? 1 : -1); + for (int p=se[se[2]]; p!=se_end; p+=se[2]==0 ? 1 : -1 ) { posList.add(Integer.valueOf(p)); } } @@ -1381,8 +1410,8 @@ public class VamsasDatastore { } return null; } -/* not needed now. - * Provenance getVamsasProvenance(jalview.datamodel.Provenance jprov) { + /* not needed now. + * Provenance getVamsasProvenance(jalview.datamodel.Provenance jprov) { jalview.datamodel.ProvenanceEntry[] entries = null; // TODO: fix App and Action here. Provenance prov = new Provenance(); @@ -1423,7 +1452,7 @@ public class VamsasDatastore { return prov; } - */ + */ jalview.datamodel.Provenance getJalviewProvenance(Provenance prov) { // TODO: fix App and Action entries and check use of provenance in jalview. jalview.datamodel.Provenance jprov = new jalview.datamodel.Provenance(); @@ -1447,13 +1476,13 @@ public class VamsasDatastore { Entry dummyPEntry(String action) { Entry entry = new Entry(); - entry.setApp("Jalview"); + entry.setApp(this.provEntry.getApp()); if (action != null) entry.setAction(action); else entry.setAction("created."); entry.setDate(new org.exolab.castor.types.Date(new java.util.Date())); - entry.setUser(System.getProperty("user.name")); + entry.setUser(this.provEntry.getUser()); return entry; }