X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FJalview2XML_V1.java;h=9263cd982d475cec57f86abedea3433394902a60;hb=6752a167ac486ce6edb2ac0314618e2072f29cd3;hp=b470974c0cafba3e67dd70c28b2a9a9ac7b8e385;hpb=b2f9a8d7bce642ff4011bc6d49e02bb0569fbb11;p=jalview.git
diff --git a/src/jalview/gui/Jalview2XML_V1.java b/src/jalview/gui/Jalview2XML_V1.java
index b470974..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.1)
+ * 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]));
}