Package org.apache.camel.dataformat.beanio

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


        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

        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

        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

    @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

TOP

Related Classes of org.apache.camel.dataformat.beanio.BeanIODataFormat

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.