Package org.milyn.csv

Examples of org.milyn.csv.CSVRecordParserConfigurator


        AssertArgument.isNotNullAndNotEmpty(fields, "fields");
        AssertArgument.isNotNull(recordType, "recordType");

        smooks = new Smooks();
        smooks.setFilterSettings(FilterSettings.DEFAULT_SAX);
        smooks.setReaderConfig(new CSVRecordParserConfigurator(fields)
                .setBinding(new Binding(beanId, recordType, BindingType.LIST)));
    }
View Full Code Here


        AssertArgument.isNotNull(recordType, "recordType");
        AssertArgument.isNotNullAndNotEmpty(keyField, "keyField");

        smooks = new Smooks();
        smooks.setFilterSettings(FilterSettings.DEFAULT_SAX);
        smooks.setReaderConfig(new CSVRecordParserConfigurator(fields)
                .setBinding(new Binding(beanId, recordType, BindingType.MAP).setKeyField(keyField)));
    }
View Full Code Here

        try {
            // ****
            // And here's the configuration... configuring the CSV reader and the direct
            // binding config to create a List of Person objects (List<Person>)...
            // ****
            smooks.setReaderConfig(new CSVRecordParserConfigurator("firstName,lastName,gender,age,country")
                    .setBinding(new Binding("customerList", Customer.class, BindingType.LIST)));

            // Configure the execution context to generate a report...
            ExecutionContext executionContext = smooks.createExecutionContext();
            executionContext.setEventListener(new HtmlReportGenerator("target/report/report.html"));
View Full Code Here

TOP

Related Classes of org.milyn.csv.CSVRecordParserConfigurator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.