OpenCSV HeaderColumnNameMappingStrategy と MyCustomBean の作業セットアップ (ところで、groovy を使用) があります。
def file = new FileReader(new File("sample.csv"))
def csvReader = new CSVReader(file)
def strategy = new HeaderColumnNameMappingStrategy<MyCustomBean>()
strategy.setType(MyCustomBean)
ヘッダーからコレクション(マップだと思います)を解析できるかどうか、興味があります。
サンプル csv
priority,subject,description,customFields[4]
1,first,foo,X-7
2,second,hoo,X-8
マップされた Bean
class MyCustomBean {
def subject
def description
def priority
def customFields
}