}
+ /**
+ * Test for JAL-2223 - multiple mappings in View Mapping report
+ *
+ * @throws Exception
+ */
+ @Test(groups = { "Functional" })
+ public void noDuplicatePdbMappingsMade() throws Exception
+ {
+ StructureImportSettings.setProcessSecondaryStructure(true);
+ StructureImportSettings.setVisibleChainAnnotation(true);
+ AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(
+ "examples/exampleFile_2_7.jar", DataSourceType.FILE);
+ assertNotNull(af, "Didn't read in the example file correctly.");
+
+ // locate Jmol viewer
+ // count number of PDB mappings the structure selection manager holds -
+ String pdbFile = af.getCurrentView().getStructureSelectionManager()
+ .findFileForPDBId("1A70");
+ assertEquals(
+ af.getCurrentView().getStructureSelectionManager()
+ .getMapping(pdbFile).length,
+ 2, "Expected only two mappings for 1A70");
+
+ }
+
@Test(groups = { "Functional" })
public void viewRefPdbAnnotation() throws Exception
{
String afid = af.getViewport().getSequenceSetId();
// remember reference sequence for each panel
- Map<String, SequenceI> refseqs = new HashMap<String, SequenceI>();
+ Map<String, SequenceI> refseqs = new HashMap<>();
/*
* mark sequence 2, 3, 4.. in panels 1, 2, 3...
* remember representative and hidden sequences marked
* on each panel
*/
- Map<String, SequenceI> repSeqs = new HashMap<String, SequenceI>();
- Map<String, List<String>> hiddenSeqNames = new HashMap<String, List<String>>();
+ Map<String, SequenceI> repSeqs = new HashMap<>();
+ Map<String, List<String>> hiddenSeqNames = new HashMap<>();
/*
* mark sequence 2, 3, 4.. in panels 1, 2, 3...
repIndex = Math.max(repIndex, 1);
SequenceI repSeq = alignment.getSequenceAt(repIndex);
repSeqs.put(ap.getViewName(), repSeq);
- List<String> hiddenNames = new ArrayList<String>();
+ List<String> hiddenNames = new ArrayList<>();
hiddenSeqNames.put(ap.getViewName(), hiddenNames);
/*