test_class.declarator: currentLine = 0
test_class.modifier: private static
test_class.original_string: private static int currentLine = 0;
test_class.type: int
test_class.var_name: currentLine
test_class.declarator: currentExpected
test_class.modifier: private static
test_class.original_string: private static String currentExpected;
test_class.type: String
test_class.var_name: currentExpected
test_class.declarator: currentActual
test_class.modifier: private static
test_class.original_string: private static String currentActual;
test_class.type: String
test_class.var_name: currentActual
test_class.file: singa-structure/src/test/java/bio/singa/structure/parser/pdb/structures/StructureRepresentationTest.java
test_class.identifier: StructureRepresentationTest
test_case.body: @Test
      void shouldRepresentMultipleChains() throws IOException {
          String fileLocation = Resources.getResourceAsFileLocation("1brr_multi_chain.pdb");
          List<String> expectedLines = Files.readAllLines(Paths.get(fileLocation));
          Structure structure = StructureParser.local()
                  .fileLocation(fileLocation)
                  .parse();
          String pdbRepresentation = StructureRepresentation.composePdbRepresentation(structure);
          List<String> actualLines = Arrays.asList(pdbRepresentation.split(System.lineSeparator()));
          assertPDBLinesEqual(expectedLines, actualLines);
      }
test_case.class_method_signature: StructureRepresentationTest.shouldRepresentMultipleChains()
test_case.full_signature: @Test void shouldRepresentMultipleChains()
test_case.identifier: shouldRepresentMultipleChains
test_case.invocations: getResourceAsFileLocation readAllLines get parse fileLocation local composePdbRepresentation asList split lineSeparator assertPDBLinesEqual
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldRepresentMultipleChains()
focal_class.declarator: consecutiveRecords
focal_class.modifier: private final
focal_class.original_string: private final List<String> consecutiveRecords;
focal_class.type: List<String>
focal_class.var_name: consecutiveRecords
focal_class.declarator: terminateRecord
focal_class.modifier: private final
focal_class.original_string: private final String terminateRecord;
focal_class.type: String
focal_class.var_name: terminateRecord
focal_class.declarator: nonConsecutiveLeafs
focal_class.modifier: private final
focal_class.original_string: private final List<LeafSubstructure<?>> nonConsecutiveLeafs;
focal_class.type: List<LeafSubstructure<?>>
focal_class.var_name: nonConsecutiveLeafs
focal_class.file: singa-structure/src/main/java/bio/singa/structure/parser/pdb/structures/StructureRepresentation.java
focal_class.identifier: StructureRepresentation
focal_class.class_method_signature: StructureRepresentation.StructureRepresentation(OakChain chain)
focal_class.full_signature: private  StructureRepresentation(OakChain chain)
focal_class.identifier: StructureRepresentation
focal_class.modifiers: private
focal_class.parameters: (OakChain chain)
focal_class.signature:  StructureRepresentation(OakChain chain)
focal_class.class_method_signature: StructureRepresentation.composePdbRepresentation(Structure structure)
focal_class.full_signature: public static String composePdbRepresentation(Structure structure)
focal_class.identifier: composePdbRepresentation
focal_class.modifiers: public static
focal_class.parameters: (Structure structure)
focal_class.return: String
focal_class.signature: String composePdbRepresentation(Structure structure)
focal_class.class_method_signature: StructureRepresentation.composePdbRepresentation(List<LeafSubstructure<?>> leaves)
focal_class.full_signature: public static String composePdbRepresentation(List<LeafSubstructure<?>> leaves)
focal_class.identifier: composePdbRepresentation
focal_class.modifiers: public static
focal_class.parameters: (List<LeafSubstructure<?>> leaves)
focal_class.return: String
focal_class.signature: String composePdbRepresentation(List<LeafSubstructure<?>> leaves)
focal_class.class_method_signature: StructureRepresentation.appendChainRepresentations(StringBuilder sb, OakModel structuralModel)
focal_class.full_signature: private static void appendChainRepresentations(StringBuilder sb, OakModel structuralModel)
focal_class.identifier: appendChainRepresentations
focal_class.modifiers: private static
focal_class.parameters: (StringBuilder sb, OakModel structuralModel)
focal_class.return: void
focal_class.signature: void appendChainRepresentations(StringBuilder sb, OakModel structuralModel)
focal_class.class_method_signature: StructureRepresentation.composePdbRepresentation(OakModel structuralModel)
focal_class.full_signature: public static String composePdbRepresentation(OakModel structuralModel)
focal_class.identifier: composePdbRepresentation
focal_class.modifiers: public static
focal_class.parameters: (OakModel structuralModel)
focal_class.return: String
focal_class.signature: String composePdbRepresentation(OakModel structuralModel)
focal_class.class_method_signature: StructureRepresentation.composePdbRepresentationOfNonConsecutiveRecords(List<LeafSubstructure<?>> nonConsecutiveLeafs)
focal_class.full_signature: private static String composePdbRepresentationOfNonConsecutiveRecords(List<LeafSubstructure<?>> nonConsecutiveLeafs)
focal_class.identifier: composePdbRepresentationOfNonConsecutiveRecords
focal_class.modifiers: private static
focal_class.parameters: (List<LeafSubstructure<?>> nonConsecutiveLeafs)
focal_class.return: String
focal_class.signature: String composePdbRepresentationOfNonConsecutiveRecords(List<LeafSubstructure<?>> nonConsecutiveLeafs)
focal_class.class_method_signature: StructureRepresentation.getPreamble(String pdbIdentifier, String title)
focal_class.full_signature: private static String getPreamble(String pdbIdentifier, String title)
focal_class.identifier: getPreamble
focal_class.modifiers: private static
focal_class.parameters: (String pdbIdentifier, String title)
focal_class.return: String
focal_class.signature: String getPreamble(String pdbIdentifier, String title)
focal_class.class_method_signature: StructureRepresentation.getPostamble()
focal_class.full_signature: private static String getPostamble()
focal_class.identifier: getPostamble
focal_class.modifiers: private static
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getPostamble()
focal_class.class_method_signature: StructureRepresentation.getPdbLines(Collection<LeafSubstructure<?>> leafSubstructures)
focal_class.full_signature: private List<String> getPdbLines(Collection<LeafSubstructure<?>> leafSubstructures)
focal_class.identifier: getPdbLines
focal_class.modifiers: private
focal_class.parameters: (Collection<LeafSubstructure<?>> leafSubstructures)
focal_class.return: List<String>
focal_class.signature: List<String> getPdbLines(Collection<LeafSubstructure<?>> leafSubstructures)
focal_class.class_method_signature: StructureRepresentation.getConsecutiveRepresentation()
focal_class.full_signature: private String getConsecutiveRepresentation()
focal_class.identifier: getConsecutiveRepresentation
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getConsecutiveRepresentation()
focal_class.class_method_signature: StructureRepresentation.getTerminateRecord()
focal_class.full_signature: private String getTerminateRecord()
focal_class.identifier: getTerminateRecord
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getTerminateRecord()
focal_class.class_method_signature: StructureRepresentation.getNonConsecutiveLeafSubstructures()
focal_class.full_signature: private List<LeafSubstructure<?>> getNonConsecutiveLeafSubstructures()
focal_class.identifier: getNonConsecutiveLeafSubstructures
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: List<LeafSubstructure<?>>
focal_class.signature: List<LeafSubstructure<?>> getNonConsecutiveLeafSubstructures()
focal_method.body: public static String composePdbRepresentation(Structure structure) {
          StringBuilder sb = new StringBuilder();
          // add preamble
          sb.append(getPreamble(structure.getPdbIdentifier(), structure.getTitle()));
          // get all models
          List<OakModel> allModels = structure.getAllModels().stream()
                  .map(OakModel.class::cast)
                  .collect(Collectors.toList());
          // if there is only one model
          if (allModels.size() == 1) {
              // get it
              OakModel structuralModel = allModels.iterator().next();
              appendChainRepresentations(sb, structuralModel);
          } else {
              for (OakModel model : allModels) {
                  sb.append("MODEL ").append(String.format("%5d", model.getModelIdentifier())).append(System.lineSeparator());
                  appendChainRepresentations(sb, model);
                  sb.append("ENDMDL").append(System.lineSeparator());
              }
          }
          // add postamble
          sb.append(getPostamble());
          return sb.toString();
      }
focal_method.class_method_signature: StructureRepresentation.composePdbRepresentation(Structure structure)
focal_method.full_signature: public static String composePdbRepresentation(Structure structure)
focal_method.identifier: composePdbRepresentation
focal_method.invocations: append getPreamble getPdbIdentifier getTitle collect map stream getAllModels toList size next iterator appendChainRepresentations append append append format getModelIdentifier lineSeparator appendChainRepresentations append append lineSeparator append getPostamble toString
focal_method.modifiers: public static
focal_method.parameters: (Structure structure)
focal_method.return: String
focal_method.signature: String composePdbRepresentation(Structure structure)