X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FJalview2XML_V1.java;h=9263cd982d475cec57f86abedea3433394902a60;hb=6e0dc75fa4251c831606d00cee1c01de5733890a;hp=9d838f8d9dcd066244a8a36fd95f795afa6e9577;hpb=2f4f1d8fb6878271b64f327bc58c895f458137af;p=jalview.git diff --git a/src/jalview/gui/Jalview2XML_V1.java b/src/jalview/gui/Jalview2XML_V1.java index 9d838f8..9263cd9 100755 --- a/src/jalview/gui/Jalview2XML_V1.java +++ b/src/jalview/gui/Jalview2XML_V1.java @@ -1,35 +1,56 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1) + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2) * Copyright (C) 2014 The Jalview Authors * * This file is part of Jalview. * * Jalview is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. * * Jalview is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along with Jalview. If not, see . + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . * The Jalview Authors are detailed in the 'AUTHORS' file. */ package jalview.gui; -import java.io.*; -import java.util.*; -import java.util.jar.*; - -import javax.swing.*; - -import org.exolab.castor.xml.*; -import jalview.binding.*; -import jalview.schemes.*; +import jalview.binding.Annotation; +import jalview.binding.AnnotationElement; +import jalview.binding.Features; +import jalview.binding.JGroup; +import jalview.binding.JSeq; +import jalview.binding.JalviewModel; +import jalview.binding.JalviewModelSequence; +import jalview.binding.Pdbids; +import jalview.binding.Sequence; +import jalview.binding.SequenceSet; +import jalview.binding.Setting; +import jalview.binding.Tree; +import jalview.binding.UserColours; +import jalview.binding.Viewport; +import jalview.schemes.ColourSchemeI; +import jalview.schemes.ColourSchemeProperty; +import jalview.schemes.ResidueProperties; +import jalview.structure.StructureSelectionManager; import jalview.util.MessageManager; import jalview.util.jarInputStreamProvider; +import java.io.InputStreamReader; +import java.util.Hashtable; +import java.util.Vector; +import java.util.jar.JarEntry; +import java.util.jar.JarInputStream; + +import javax.swing.JOptionPane; + +import org.exolab.castor.xml.IDResolver; + /** * DOCUMENT ME! * @@ -118,7 +139,7 @@ public class Jalview2XML_V1 InputStreamReader in = new InputStreamReader(jin, "UTF-8"); JalviewModel object = new JalviewModel(); - object = (JalviewModel) object.unmarshal(in); + object = object.unmarshal(in); af = LoadFromObject(object, file); entryCount++; @@ -137,8 +158,10 @@ public class Jalview2XML_V1 System.err.println("Couldn't locate Jalview XML file : " + ex + "\n"); JOptionPane.showInternalMessageDialog(Desktop.desktop, - MessageManager.formatMessage("label.couldnt_locate", new String[]{file}), - MessageManager.getString("label.url_not_found"), + MessageManager.formatMessage("label.couldnt_locate", + new String[] + { file }), MessageManager + .getString("label.url_not_found"), JOptionPane.WARNING_MESSAGE); } }); @@ -156,7 +179,7 @@ public class Jalview2XML_V1 { JOptionPane.showInternalMessageDialog(Desktop.desktop, - "Error loading " + file, "Error loading Jalview file", + MessageManager.formatMessage("label.error_loading_file_params", new String[]{file}), MessageManager.getString("label.error_loading_jalview_file"), JOptionPane.WARNING_MESSAGE); } }); @@ -218,6 +241,8 @@ public class Jalview2XML_V1 entry.setId(ids[p].getId()); entry.setType(ids[p].getType()); al.getSequenceAt(i).getDatasetSequence().addPDBId(entry); + StructureSelectionManager.getStructureSelectionManager( + Desktop.instance).registerPDBEntry(entry); } } @@ -311,7 +336,7 @@ public class Jalview2XML_V1 for (int s = 0; s < ids.length; s++) { - seqs.addElement((jalview.datamodel.SequenceI) seqids + seqs.addElement(seqids .elementAt(ids[s])); }