import javax.xml.stream.XMLStreamReader;
/**
- * Write out the current jalview desktop state as a Jalview XML stream.
- *
- * Note: the vamsas objects referred to here are primitive versions of the
- * VAMSAS project schema elements - they are not the same and most likely never
- * will be :)
- *
- * @author $author$
- * @version $Revision: 1.134 $
+ * Provides methods to read in or write out the Jalview desktop state as a
+ * Jalview XML model, as one or more entries in a .jar archive. The jar file may
+ * include additional data file entries, such as
+ * <ul>
+ * <li>PDB structure data files</li>
+ * <li>session state for one or more Jmol, Chimera or Varna structure
+ * viewers</li>
+ * </ul>
*/
public class Jalview2XML
{
}
al.addAnnotation(jda);
-
+ addedAnnotation.add(jda);
continue;
}
// Construct new annotation from model.
assertFalse(anns[3].visible);
/*
+ * make a new view of the alignment (uses project save/load code)
+ * and verify annotations are ordered the same
+ */
+ AlignmentPanel newPanel = af.newView("new", true);
+ AlignmentAnnotation[] newAnns = newPanel.getAlignment()
+ .getAlignmentAnnotation();
+ assertEquals(newAnns.length, 4);
+ assertEquals(newAnns[0].label, "Occupancy");
+ assertEquals(newAnns[1].label, "hello");
+ assertEquals(newAnns[2].label, "Conservation");
+ assertEquals(newAnns[3].label, "world");
+ assertEquals(newAnns[0].graphHeight, 60);
+ assertEquals(newAnns[1].graphHeight, 70);
+ assertEquals(newAnns[2].graphHeight, 80);
+ assertEquals(newAnns[3].graphHeight, 90);
+ assertFalse(newAnns[0].visible);
+ assertTrue(newAnns[1].visible);
+ assertTrue(newAnns[2].visible);
+ assertFalse(newAnns[3].visible);
+ newPanel.closePanel();
+
+ /*
* reload the project with Preferences set to not create Occupancy;
* this should still appear, as it is in the saved project
*/