X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fgui%2FJalview2XML.java;h=5318889e55b43a369e61fdf5455525651105f05c;hb=8edebdd9789b2d93fb8f9db24b8be2c1e6317690;hp=e4ec30b0230346e8d89290a3d0fa3b237b141084;hpb=f8ce78dc02ce9d96129fcc4882749f43869928ff;p=jalview.git diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index e4ec30b..5318889 100644 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -20,6 +20,7 @@ */ package jalview.gui; +import jalview.analysis.AlignSeq; import jalview.api.structures.JalviewStructureDisplayI; import jalview.bin.Cache; import jalview.datamodel.AlignedCodonFrame; @@ -34,6 +35,7 @@ import jalview.datamodel.StructureViewerModel; import jalview.datamodel.StructureViewerModel.StructureData; import jalview.ext.varna.RnaModel; import jalview.gui.StructureViewer.ViewerType; +import jalview.io.AppletFormatAdapter; import jalview.schemabinding.version2.AlcodMap; import jalview.schemabinding.version2.AlcodonFrame; import jalview.schemabinding.version2.Annotation; @@ -76,6 +78,8 @@ import jalview.schemes.ResidueProperties; import jalview.schemes.UserColourScheme; import jalview.structure.StructureSelectionManager; import jalview.structures.models.AAStructureBindingModel; +import jalview.util.Comparison; +import jalview.util.MapList; import jalview.util.MessageManager; import jalview.util.Platform; import jalview.util.jarInputStreamProvider; @@ -629,10 +633,10 @@ public class Jalview2XML object.setVamsasModel(new jalview.schemabinding.version2.VamsasModel()); object.setCreationDate(new java.util.Date(System.currentTimeMillis())); - object.setVersion(jalview.bin.Cache.getDefault("VERSION", + object.setVersion(Cache.getDefault("VERSION", "Development Build")); - jalview.datamodel.AlignmentI jal = av.getAlignment(); + AlignmentI jal = av.getAlignment(); if (av.hasHiddenRows()) { @@ -1372,10 +1376,6 @@ public class Jalview2XML final SequenceI jds, List viewIds, AlignmentPanel ap, boolean storeDataset) { - if (Desktop.desktop == null) - { - return; - } JInternalFrame[] frames = Desktop.desktop.getAllFrames(); for (int f = frames.length - 1; f > -1; f--) { @@ -1978,7 +1978,7 @@ public class Jalview2XML { mp = new Mapping(); - jalview.util.MapList mlst = jmp.getMap(); + MapList mlst = jmp.getMap(); List r = mlst.getFromRanges(); for (int[] range : r) { @@ -2024,12 +2024,12 @@ public class Jalview2XML mpc.setDseqFor(jmpid); if (!seqRefIds.containsKey(mpc.getDseqFor())) { - jalview.bin.Cache.log.debug("creatign new DseqFor ID"); + Cache.log.debug("creatign new DseqFor ID"); seqRefIds.put(mpc.getDseqFor(), ps); } else { - jalview.bin.Cache.log.debug("reusing DseqFor ID"); + Cache.log.debug("reusing DseqFor ID"); } } mp.setMappingChoice(mpc); @@ -2622,7 +2622,7 @@ public class Jalview2XML /** * persisted version of annotation row from which to take vis properties */ - public jalview.datamodel.AlignmentAnnotation template; + public AlignmentAnnotation template; /** * original position of the annotation row in the alignment @@ -2947,7 +2947,7 @@ public class Jalview2XML } } } - jalview.datamodel.AlignmentAnnotation jaa = null; + AlignmentAnnotation jaa = null; if (annotation.getGraph()) { @@ -2955,7 +2955,7 @@ public class Jalview2XML // if (autoForView || an[i].isAutoCalculated()) { // hlim=11f; // } - jaa = new jalview.datamodel.AlignmentAnnotation( + jaa = new AlignmentAnnotation( annotation.getLabel(), annotation.getDescription(), anot, llim, hlim, annotation.getGraphType()); @@ -2978,7 +2978,7 @@ public class Jalview2XML } else { - jaa = new jalview.datamodel.AlignmentAnnotation(an[i].getLabel(), + jaa = new AlignmentAnnotation(an[i].getLabel(), an[i].getDescription(), anot); jaa._linecolour = firstColour; } @@ -3008,11 +3008,11 @@ public class Jalview2XML // and make a note of any group association if (an[i].getGroupRef() != null && an[i].getGroupRef().length() > 0) { - List aal = groupAnnotRefs + List aal = groupAnnotRefs .get(an[i].getGroupRef()); if (aal == null) { - aal = new ArrayList(); + aal = new ArrayList(); groupAnnotRefs.put(an[i].getGroupRef(), aal); } aal.add(jaa); @@ -3972,7 +3972,7 @@ public class Jalview2XML String pdbFile = filedat.getFilePath(); SequenceI[] seq = filedat.getSeqList().toArray(new SequenceI[0]); binding.getSsm().setMapping(seq, null, pdbFile, - jalview.io.AppletFormatAdapter.FILE); + AppletFormatAdapter.FILE); binding.addSequenceForStructFile(pdbFile, seq); } // and add the AlignmentPanel's reference to the view panel @@ -4597,7 +4597,7 @@ public class Jalview2XML List remains = new ArrayList(visan.keySet()); for (int h = 0; h < hSize; h++) { - jalview.datamodel.AlignmentAnnotation jalan = al + AlignmentAnnotation jalan = al .getAlignmentAnnotation()[h]; if (jalan.autoCalculated) { @@ -4654,7 +4654,7 @@ public class Jalview2XML srt[s++] = jvar.order; } reorder.clear(); - jalview.util.QuickSort.sort(srt, rws); + jalview.util.QuickSort.sortInt(srt, rws); // and re-insert the annotation at its correct position for (JvAnnotRow jvar : rws) { @@ -4843,8 +4843,8 @@ public class Jalview2XML if (sq != dsq) { // StringBuffer sb = new StringBuffer(); - String newres = jalview.analysis.AlignSeq.extractGaps( - jalview.util.Comparison.GapChars, sq.getSequenceAsString()); + String newres = AlignSeq.extractGaps( + Comparison.GapChars, sq.getSequenceAsString()); if (!newres.equalsIgnoreCase(dsq.getSequenceAsString()) && newres.length() > dsq.getLength()) { @@ -5028,7 +5028,7 @@ public class Jalview2XML seqRefIds.put(sqid, djs); } - jalview.bin.Cache.log.debug("about to recurse on addDBRefs."); + Cache.log.debug("about to recurse on addDBRefs."); addDBRefs(djs, ms); } @@ -5206,7 +5206,7 @@ public class Jalview2XML seqRefIds.put(jv2vobj.get(jvobj).toString(), (SequenceI) jvobj); seqsToIds.put((SequenceI) jvobj, id); } - else if (jvobj instanceof jalview.datamodel.AlignmentAnnotation) + else if (jvobj instanceof AlignmentAnnotation) { String anid; AlignmentAnnotation jvann = (AlignmentAnnotation) jvobj;