X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FJalview2XML_V1.java;h=9263cd982d475cec57f86abedea3433394902a60;hb=6752a167ac486ce6edb2ac0314618e2072f29cd3;hp=e50c14940a04c4541c9b4ff4172e029462034968;hpb=59d682209891099d46b960509907c79e3fb276fe;p=jalview.git
diff --git a/src/jalview/gui/Jalview2XML_V1.java b/src/jalview/gui/Jalview2XML_V1.java
index e50c149..9263cd9 100755
--- a/src/jalview/gui/Jalview2XML_V1.java
+++ b/src/jalview/gui/Jalview2XML_V1.java
@@ -1,33 +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.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.net.*;
-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!
@@ -117,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++;
@@ -136,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);
}
});
@@ -154,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);
}
});
@@ -216,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);
}
}
@@ -309,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]));
}