test_class.declarator: log = LoggerFactory.getLogger(EbtsBuilderTest.class)
test_class.modifier: private static final
test_class.original_string: private static final Logger log = LoggerFactory.getLogger(EbtsBuilderTest.class);
test_class.type: Logger
test_class.var_name: log
test_class.file: Jet/src/test/java/org/mitre/jet/ebts/EbtsBuilderTest.java
test_class.identifier: EbtsBuilderTest
test_case.body: @Test
      public void idcCreationTest() throws Exception {
          Ebts ebts = new Ebts();
          GenericRecord type1 = new GenericRecord(1);
          type1.setField(3, new Field("0400"));
          type1.setField(8, new Field("WVMEDS001"));
  
          GenericRecord type2 = new GenericRecord(2);
          type2.setField(2, new Field("04"));
          type2.setField(19, new Field("Smith,John"));
  
          GenericRecord type10 = new GenericRecord(10);
          ebts.addRecord(type1);
          ebts.addRecord(type2);
          ebts.addRecord(type10);
          ebts.addRecord(type10);
          ebts.addRecord(type10);
  
          byte[] data = new EbtsBuilder().build(ebts);
          ebts = new EbtsParser().parse(data);
  
  
      }
test_case.class_method_signature: EbtsBuilderTest.idcCreationTest()
test_case.full_signature: @Test public void idcCreationTest()
test_case.identifier: idcCreationTest
test_case.invocations: setField setField setField setField addRecord addRecord addRecord addRecord addRecord build parse
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void idcCreationTest()
focal_class.declarator: minLength = 2
focal_class.modifier: private
focal_class.original_string: private int minLength = 2;
focal_class.type: int
focal_class.var_name: minLength
focal_class.declarator: binaryHeaderTypes = EbtsUtils.getBinaryHeaderTypes()
focal_class.modifier: private static final
focal_class.original_string: private static final Set<Integer> binaryHeaderTypes = EbtsUtils.getBinaryHeaderTypes();
focal_class.type: Set<Integer>
focal_class.var_name: binaryHeaderTypes
focal_class.declarator: genericTypes = EbtsUtils.getGenericRecordTypes()
focal_class.modifier: private static final
focal_class.original_string: private static final Set<Integer> genericTypes = EbtsUtils.getGenericRecordTypes();
focal_class.type: Set<Integer>
focal_class.var_name: genericTypes
focal_class.declarator: ebts
focal_class.modifier: private
focal_class.original_string: private Ebts ebts;
focal_class.type: Ebts
focal_class.var_name: ebts
focal_class.file: Jet/src/main/java/org/mitre/jet/ebts/EbtsBuilder.java
focal_class.identifier: EbtsBuilder
focal_class.class_method_signature: EbtsBuilder.EbtsBuilder()
focal_class.full_signature: public  EbtsBuilder()
focal_class.identifier: EbtsBuilder
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  EbtsBuilder()
focal_class.class_method_signature: EbtsBuilder.EbtsBuilder(final int precedingZeros)
focal_class.full_signature: public  EbtsBuilder(final int precedingZeros)
focal_class.identifier: EbtsBuilder
focal_class.modifiers: public
focal_class.parameters: (final int precedingZeros)
focal_class.signature:  EbtsBuilder(final int precedingZeros)
focal_class.class_method_signature: EbtsBuilder.fixCountField(final GenericRecord record)
focal_class.full_signature: private void fixCountField(final GenericRecord record)
focal_class.identifier: fixCountField
focal_class.modifiers: private
focal_class.parameters: (final GenericRecord record)
focal_class.return: void
focal_class.signature: void fixCountField(final GenericRecord record)
focal_class.class_method_signature: EbtsBuilder.getNextAvailableIDC()
focal_class.full_signature: private int getNextAvailableIDC()
focal_class.identifier: getNextAvailableIDC
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getNextAvailableIDC()
focal_class.class_method_signature: EbtsBuilder.genericBuilder(final GenericRecord record, final ByteArrayOutputStream baos)
focal_class.full_signature: private void genericBuilder(final GenericRecord record, final ByteArrayOutputStream baos)
focal_class.identifier: genericBuilder
focal_class.modifiers: private
focal_class.parameters: (final GenericRecord record, final ByteArrayOutputStream baos)
focal_class.return: void
focal_class.signature: void genericBuilder(final GenericRecord record, final ByteArrayOutputStream baos)
focal_class.class_method_signature: EbtsBuilder.binaryHeaderBuilder(final BinaryHeaderImageRecord record, final ByteArrayOutputStream baos)
focal_class.full_signature: private static void binaryHeaderBuilder(final BinaryHeaderImageRecord record, final ByteArrayOutputStream baos)
focal_class.identifier: binaryHeaderBuilder
focal_class.modifiers: private static
focal_class.parameters: (final BinaryHeaderImageRecord record, final ByteArrayOutputStream baos)
focal_class.return: void
focal_class.signature: void binaryHeaderBuilder(final BinaryHeaderImageRecord record, final ByteArrayOutputStream baos)
focal_class.class_method_signature: EbtsBuilder.setPrecedingZeros(final int precedingZeros)
focal_class.full_signature: public void setPrecedingZeros(final int precedingZeros)
focal_class.identifier: setPrecedingZeros
focal_class.modifiers: public
focal_class.parameters: (final int precedingZeros)
focal_class.return: void
focal_class.signature: void setPrecedingZeros(final int precedingZeros)
focal_class.class_method_signature: EbtsBuilder.build(final Ebts ebts)
focal_class.full_signature: public byte[] build(final Ebts ebts)
focal_class.identifier: build
focal_class.modifiers: public
focal_class.parameters: (final Ebts ebts)
focal_class.return: byte[]
focal_class.signature: byte[] build(final Ebts ebts)
focal_method.body: public byte[] build(final Ebts ebts) throws EbtsBuildingException {
          this.ebts = ebts;
          //Create the auto-expanding output stream
          final ByteArrayOutputStream baos = new ByteArrayOutputStream();
          //Get list of all records
          //Overwrite CNT field(1.03)
          final List<LogicalRecord> records = ebts.getAllRecords();
          for (final LogicalRecord record : records) {
  
              if (genericTypes.contains(record.getRecordType())) {
                  genericBuilder((GenericRecord)record,baos);
              } else if (binaryHeaderTypes.contains(record.getRecordType())) {
                  binaryHeaderBuilder((BinaryHeaderImageRecord)record,baos);
              }
          }
          return baos.toByteArray();
      }
focal_method.class_method_signature: EbtsBuilder.build(final Ebts ebts)
focal_method.full_signature: public byte[] build(final Ebts ebts)
focal_method.identifier: build
focal_method.invocations: getAllRecords contains getRecordType genericBuilder contains getRecordType binaryHeaderBuilder toByteArray
focal_method.modifiers: public
focal_method.parameters: (final Ebts ebts)
focal_method.return: byte[]
focal_method.signature: byte[] build(final Ebts ebts)