X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FJalview2XML_V1.java;h=9e4a8ec4e0f977bd0591b795d3a1e1858dbc58dc;hb=ab43013b7e357b84b4abade0dba949668dfb2a0e;hp=639b9b20ac0feacafc1f4a69b7861a93bb538fc2;hpb=ad20cd92225f2ee8c251d39b00b90555d382a616;p=jalview.git diff --git a/src/jalview/gui/Jalview2XML_V1.java b/src/jalview/gui/Jalview2XML_V1.java index 639b9b2..9e4a8ec 100755 --- a/src/jalview/gui/Jalview2XML_V1.java +++ b/src/jalview/gui/Jalview2XML_V1.java @@ -1,32 +1,55 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8) - * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1) + * 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 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 javax.swing.*; +import java.io.InputStreamReader; +import java.util.Hashtable; +import java.util.Vector; +import java.util.jar.JarEntry; +import java.util.jar.JarInputStream; -import org.exolab.castor.xml.*; -import jalview.binding.*; -import jalview.schemes.*; -import jalview.util.jarInputStreamProvider; +import javax.swing.JOptionPane; + +import org.exolab.castor.xml.IDResolver; /** * DOCUMENT ME! @@ -116,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++; @@ -135,7 +158,10 @@ public class Jalview2XML_V1 System.err.println("Couldn't locate Jalview XML file : " + ex + "\n"); JOptionPane.showInternalMessageDialog(Desktop.desktop, - "Couldn't locate " + file, "URL not found", + MessageManager.formatMessage("label.couldnt_locate", + new String[] + { file }), MessageManager + .getString("label.url_not_found"), JOptionPane.WARNING_MESSAGE); } }); @@ -153,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); } }); @@ -215,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); } } @@ -308,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])); }