EncoderUtils { public static Entity[] generateEntityList(StructureDataInterface structureDataInterface) { int numEntities = structureDataInterface.getNumEntities(); Entity[] outList = new Entity[numEntities]; for (int i=0; i<numEntities;i++) { Entity entity = new Entity(); entity.setChainIndexList(structureDataInterface.getEntityChainIndexList(i)); entity.setDescription(structureDataInterface.getEntityDescription(i)); entity.setSequence(structureDataInterface.getEntitySequence(i)); entity.setType(structureDataInterface.getEntityType(i)); outList[i] = entity; } return outList; }  static Group[] generateGroupList(StructureDataInterface structureDataInterface); static List<BioAssemblyData> generateBioassemblies(StructureDataInterface structureDataInterface); static Entity[] generateEntityList(StructureDataInterface structureDataInterface); static String getTypeFromChainId(StructureDataInterface structureDataInterface, int chainInd); static byte[] encodeByteArr(FloatCodecs inputCodec, float[] inputData, int param); static byte[] encodeByteArr(IntCodecs inputCodec, int[] inputData, int param); static byte[] encodeByteArr(CharCodecs inputCodec, char[] inputData, int param); static byte[] encodeByteArr(StringCodecs inputCodec, String[] inputData, int param); static void transferBioassembly(StructureDataInterface structureDataInterface,
			AdapterToStructureData adapterToStructureData); static final int NULL_PARAM; }
@Test public void testGenerateEntityList() throws IOException, ParseException { StructureDataInterface structureDataInterface = getDefaultFullData(); Entity[] entities = EncoderUtils.generateEntityList(structureDataInterface); assertEquals(entities.length, 4); assertArrayEquals(entities[0].getChainIndexList(), new int[]{0}); assertArrayEquals(entities[1].getChainIndexList(), new int[]{1}); assertArrayEquals(entities[2].getChainIndexList(), new int[]{2, 3, 4}); assertArrayEquals(entities[3].getChainIndexList(), new int[]{5}); assertEquals(entities[0].getDescription(), "BROMODOMAIN ADJACENT TO ZINC FINGER DOMAIN PROTEIN 2B"); assertEquals(entities[1].getDescription(), "4-FLUOROBENZAMIDOXIME"); assertEquals(entities[2].getDescription(), "METHANOL"); assertEquals(entities[3].getDescription(), "water"); assertEquals(entities[0].getSequence(), "SMSVKKPKRDDSKDLALCSMILTEMETHEDAWPFLLPVNLKLVPGYKKVIKKPMDFSTIREKLSSGQYPNLETFALDVRLVFDNCETFNEDDSDIGRAGHNMRKYFEKKWTDTFKVS"); assertEquals(entities[1].getSequence(), ""); assertEquals(entities[2].getSequence(), ""); assertEquals(entities[3].getSequence(), ""); assertEquals(entities[0].getType(), "polymer"); assertEquals(entities[1].getType(), "non-polymer"); assertEquals(entities[2].getType(), "non-polymer"); assertEquals(entities[3].getType(), "water"); }