// Path: camel-blueprint-csv/src/main/java/org/darugna/camel/csv/formatters/BigDecimalFormatter.java
// public class BigDecimalFormatter implements Format<BigDecimal> {
// 
//     private final MathContext mathContext = new MathContext(4);
//     
//     @Override
//     public String format(BigDecimal object) throws Exception {
//         return object.toPlainString();
//     }
// 
//     @Override
//     public BigDecimal parse(String string) throws Exception {
//         // handle special case: value not available
//         if ("n/a".equals(string)) {
//             return null;
//         }
//         
//         return new BigDecimal(string, mathContext);
//     }
// 
// }
// 
// Path: camel-blueprint-csv/src/main/java/org/darugna/camel/csv/formatters/SectionFormatter.java
// public class SectionFormatter implements Format<Sector> {
// 
//     private final Map<String, Sector> stringToSector;
//     private final Map<Sector, String> sectorToString;
//     
//     public SectionFormatter() {
//         stringToSector = new HashMap<>();
//         sectorToString = new HashMap<>();
//         addMapping("n/a", Sector.NotAvailable);
//         addMapping("Technology", Sector.Technology);
//         addMapping("Health Care", Sector.HealthCare);
//         addMapping("Consumer Services", Sector.ConsumerServices);
//         addMapping("Capital Goods", Sector.CapitalGoods);
//         addMapping("Consumer Durables", Sector.ConsumerDurables);
//         addMapping("Finance", Sector.Finance);
//         addMapping("Consumer Non-Durables", Sector.ConsumerNonDurables);
//         addMapping("Public Utilities", Sector.PublicUtilities);
//         addMapping("Basic Industries", Sector.BasicIndustries);
//         addMapping("Energy", Sector.Energy);
//         addMapping("Miscellaneous", Sector.Miscellaneous);
//         addMapping("Transportation", Sector.Transportation);
//     }
//     
//     @Override
//     public String format(Sector t) throws Exception {
//         String sectorString = sectorToString.get(t);
//         if (sectorString == null) {
//             throw new IllegalArgumentException("Cannot format Sector '" + t.toString() + "'");
//         }
//         return sectorString;
//     }
// 
//     @Override
//     public Sector parse(String string) throws Exception {
//         Sector sector = stringToSector.get(string);
//         if (sector == null) {
//             throw new IllegalArgumentException("Cannot parse Sector '" + string + "'");
//         }
//         return sector;
//     }
//     
//     private void addMapping(String name, Sector sector) {
//         stringToSector.put(name, sector);
//         sectorToString.put(sector, name);
//     }
// 
// }


import java.math.BigDecimal;
import org.apache.camel.dataformat.bindy.annotation.BindyConverter;
import org.apache.camel.dataformat.bindy.annotation.CsvRecord;
import org.apache.camel.dataformat.bindy.annotation.DataField;
import org.darugna.camel.csv.formatters.BigDecimalFormatter;
import org.darugna.camel.csv.formatters.SectionFormatter;
package org.darugna.camel.csv.dto;


@CsvRecord(separator = ",", skipFirstLine = true)
public class Company {
    
    @DataField(pos = 1)
    String symbol;
    
    @DataField(pos = 2)
    String name;
    
    @DataField(pos = 3)
    @BindyConverter(BigDecimalFormatter.class)
    BigDecimal lastSale;
    
    @DataField(pos = 4)
// Path: camel-blueprint-csv/src/main/java/org/darugna/camel/csv/formatters/BigDecimalFormatter.java
// public class BigDecimalFormatter implements Format<BigDecimal> {
// 
//     private final MathContext mathContext = new MathContext(4);
//     
//     @Override
//     public String format(BigDecimal object) throws Exception {
//         return object.toPlainString();
//     }
// 
//     @Override
//     public BigDecimal parse(String string) throws Exception {
//         // handle special case: value not available
//         if ("n/a".equals(string)) {
//             return null;
//         }
//         
//         return new BigDecimal(string, mathContext);
//     }
// 
// }
// 
// Path: camel-blueprint-csv/src/main/java/org/darugna/camel/csv/formatters/SectionFormatter.java
// public class SectionFormatter implements Format<Sector> {
// 
//     private final Map<String, Sector> stringToSector;
//     private final Map<Sector, String> sectorToString;
//     
//     public SectionFormatter() {
//         stringToSector = new HashMap<>();
//         sectorToString = new HashMap<>();
//         addMapping("n/a", Sector.NotAvailable);
//         addMapping("Technology", Sector.Technology);
//         addMapping("Health Care", Sector.HealthCare);
//         addMapping("Consumer Services", Sector.ConsumerServices);
//         addMapping("Capital Goods", Sector.CapitalGoods);
//         addMapping("Consumer Durables", Sector.ConsumerDurables);
//         addMapping("Finance", Sector.Finance);
//         addMapping("Consumer Non-Durables", Sector.ConsumerNonDurables);
//         addMapping("Public Utilities", Sector.PublicUtilities);
//         addMapping("Basic Industries", Sector.BasicIndustries);
//         addMapping("Energy", Sector.Energy);
//         addMapping("Miscellaneous", Sector.Miscellaneous);
//         addMapping("Transportation", Sector.Transportation);
//     }
//     
//     @Override
//     public String format(Sector t) throws Exception {
//         String sectorString = sectorToString.get(t);
//         if (sectorString == null) {
//             throw new IllegalArgumentException("Cannot format Sector '" + t.toString() + "'");
//         }
//         return sectorString;
//     }
// 
//     @Override
//     public Sector parse(String string) throws Exception {
//         Sector sector = stringToSector.get(string);
//         if (sector == null) {
//             throw new IllegalArgumentException("Cannot parse Sector '" + string + "'");
//         }
//         return sector;
//     }
//     
//     private void addMapping(String name, Sector sector) {
//         stringToSector.put(name, sector);
//         sectorToString.put(sector, name);
//     }
// 
// }


// Path: camel-blueprint-csv/src/main/java/org/darugna/camel/csv/dto/Company.java
import java.math.BigDecimal;
import org.apache.camel.dataformat.bindy.annotation.BindyConverter;
import org.apache.camel.dataformat.bindy.annotation.CsvRecord;
import org.apache.camel.dataformat.bindy.annotation.DataField;
import org.darugna.camel.csv.formatters.BigDecimalFormatter;
import org.darugna.camel.csv.formatters.SectionFormatter;

package org.darugna.camel.csv.dto;


@CsvRecord(separator = ",", skipFirstLine = true)
public class Company {
    
    @DataField(pos = 1)
    String symbol;
    
    @DataField(pos = 2)
    String name;
    
    @DataField(pos = 3)
    @BindyConverter(BigDecimalFormatter.class)
    BigDecimal lastSale;
    
    @DataField(pos = 4)
    @BindyConverter(BigDecimalFormatter.class)