3 import jalview.bin.Cache;
4 import jalview.datamodel.AlignmentAnnotation;
5 import jalview.datamodel.SequenceI;
7 import java.time.Instant;
10 import org.testng.annotations.AfterClass;
11 import org.testng.annotations.BeforeClass;
13 public class Jalview2xmlBase
17 * @throws java.lang.Exception
19 @BeforeClass(alwaysRun = true)
20 public static void setUpBeforeClass() throws Exception
22 jalview.bin.Jalview.main(new String[] { "-props",
23 "test/jalview/io/testProps.jvprops" });
24 jalview.bin.Cache.setProperty(
25 "JALVIEW_NEWS_RSS_LASTMODIFIED",
26 Cache.date_format.format(Date.from(Instant.now().plusSeconds(
31 * @throws java.lang.Exception
33 @AfterClass(alwaysRun = true)
34 public static void tearDownAfterClass() throws Exception
36 jalview.gui.Desktop.instance.closeAll_actionPerformed(null);
39 public int countDsAnn(jalview.viewmodel.AlignmentViewport avp)
42 for (SequenceI sq : avp.getAlignment().getDataset().getSequences())
44 if (sq.getAnnotation() != null)
46 for (AlignmentAnnotation dssa : sq.getAnnotation())
48 if (dssa.isValidStruc())