Examples of BeanioDataFormat


Examples of org.apache.camel.dataformat.beanio.BeanIODataFormat

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                DataFormat format = new BeanIODataFormat(
                        "org/apache/camel/itest/osgi/beanio/mappings.xml",
                        "employeeFile");

                from("direct:unmarshal").unmarshal(format)
                        .split(simple("body")).to("mock:beanio-unmarshal");
View Full Code Here

Examples of org.apache.camel.dataformat.beanio.BeanIODataFormat

        return new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                // START SNIPPET: e1
                // setup beanio data format using the mapping file, loaded from the classpath
                DataFormat format = new BeanIODataFormat(
                        "org/apache/camel/dataformat/beanio/csv/mappings.xml",
                        "stream1");

                // a route which uses the bean io data format to format a CSV data
                // to java objects
View Full Code Here

Examples of org.apache.camel.dataformat.beanio.BeanIODataFormat

        return new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                // START SNIPPET: e1
                // setup beanio data format using the mapping file, loaded from the classpath
                BeanIODataFormat format = new BeanIODataFormat(
                        "org/apache/camel/dataformat/beanio/csv/mappingsWithProperties.xml",
                        "stream1");
                Properties properties = new Properties();
                properties.setProperty("field1", "firstName");
                properties.setProperty("field2", "lastName");
               
                format.setProperties(properties);

                // a route which uses the bean io data format to format a CSV data
                // to java objects
                from("direct:unmarshal")
                        .unmarshal(format)
View Full Code Here

Examples of org.apache.camel.dataformat.beanio.BeanIODataFormat

        return new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                // START SNIPPET: e1
                // setup beanio data format using the mapping file, loaded from the classpath
                DataFormat format = new BeanIODataFormat(
                        "org/apache/camel/dataformat/beanio/csv/mappings.xml",
                        "stream1");

                // a route which uses the bean io data format to format a CSV data
                // to java objects
View Full Code Here

Examples of org.apache.camel.dataformat.beanio.BeanIODataFormat

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                DataFormat format = new BeanIODataFormat(
                        "org/apache/camel/itest/osgi/beanio/mappings.xml",
                        "employeeFile");

                from("direct:unmarshal").unmarshal(format)
                        .split(simple("body")).to("mock:beanio-unmarshal");
View Full Code Here

Examples of org.apache.camel.model.dataformat.BeanioDataFormat

public class CamelBeanioTest extends AbstractFeatureTest {

    public static final String COMPONENT = extractName(CamelBeanioTest.class);
   
    protected DataFormatDefinition createDataformatDefinition(String format) {       
        return new BeanioDataFormat();
    }
View Full Code Here

Examples of org.apache.camel.model.dataformat.BeanioDataFormat

    /**
     * Uses the beanio data format
     */
    public T beanio(String mapping, String streamName) {
        BeanioDataFormat dataFormat = new BeanioDataFormat();
        dataFormat.setMapping(mapping);
        dataFormat.setStreamName(streamName);
        return dataFormat(dataFormat);
    }
View Full Code Here

Examples of org.apache.camel.model.dataformat.BeanioDataFormat

    /**
     * Uses the beanio data format
     */
    public T beanio(String mapping, String streamName, String encoding) {
        BeanioDataFormat dataFormat = new BeanioDataFormat();
        dataFormat.setMapping(mapping);
        dataFormat.setStreamName(streamName);
        dataFormat.setEncoding(encoding);
        return dataFormat(dataFormat);
    }
View Full Code Here

Examples of org.apache.camel.model.dataformat.BeanioDataFormat

    /**
     * Uses the beanio data format
     */
    public T beanio(String mapping, String streamName, String encoding,
                    boolean ignoreUnidentifiedRecords, boolean ignoreUnexpectedRecords, boolean ignoreInvalidRecords) {
        BeanioDataFormat dataFormat = new BeanioDataFormat();
        dataFormat.setMapping(mapping);
        dataFormat.setStreamName(streamName);
        dataFormat.setEncoding(encoding);
        dataFormat.setIgnoreInvalidRecords(ignoreInvalidRecords);
        dataFormat.setIgnoreUnexpectedRecords(ignoreUnexpectedRecords);
        dataFormat.setIgnoreInvalidRecords(ignoreInvalidRecords);
        return dataFormat(dataFormat);
    }
View Full Code Here

Examples of org.apache.camel.model.dataformat.BeanioDataFormat

    /**
     * Uses the beanio data format
     */
    public T beanio(String mapping, String streamName) {
        BeanioDataFormat dataFormat = new BeanioDataFormat();
        dataFormat.setMapping(mapping);
        dataFormat.setStreamName(streamName);
        return dataFormat(dataFormat);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.