Package org.apache.camel.model.dataformat

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


    }

    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            public void configure() throws Exception {
                JaxbDataFormat jaxbDf = new JaxbDataFormat();
                jaxbDf.setContextPath( "org.kie.camel.testdomain" );

                from( "direct:exec" ).policy( new KiePolicy() ).unmarshal( dataformat ).to( "kie://ksession1" ).marshal( dataformat );
                from( "direct:execWithLookup" ).policy( new KiePolicy() ).unmarshal( dataformat ).to( "kie://dynamic" ).marshal( dataformat );
                from( "direct:unmarshal" ).policy( new KiePolicy() ).unmarshal( dataformat );
                from( "direct:marshal" ).policy( new KiePolicy() ).marshal( dataformat );
View Full Code Here


                dformatDefinition = new XStreamDataFormat();
                ((XStreamDataFormat) dformatDefinition).setDriver( "json" );
            } else if ( "xstream".equals( ref ) ) {
                dformatDefinition = new XStreamDataFormat();
            } else if ( "jaxb".equals( ref ) ) {
                dformatDefinition = new JaxbDataFormat();
            } else {
                dformatDefinition = routeContext.getCamelContext().resolveDataFormatDefinition( ref );
            }
        }
View Full Code Here

    /**
     * Uses the JAXB data format
     */
    public T jaxb() {
        return dataFormat(new JaxbDataFormat());
    }
View Full Code Here

    /**
     * Uses the JAXB data format with context path
     */
    public T jaxb(String contextPath) {
        JaxbDataFormat dataFormat = new JaxbDataFormat();
        dataFormat.setContextPath(contextPath);
        return dataFormat(dataFormat);
    }
View Full Code Here

    /**
     * Uses the JAXB data format turning pretty printing on or off
     */
    public T jaxb(boolean prettyPrint) {
        return dataFormat(new JaxbDataFormat(prettyPrint));
    }
View Full Code Here

        CamelContext camelContext = new DefaultCamelContext(context);
        camelContext.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {         
                JaxbDataFormat jdf = new JaxbDataFormat();
                jdf.setContextPath("org.drools.camel.testdomain");
                jdf.setPrettyPrint(true);

                from("direct:test-session").policy(new DroolsPolicy())
                        .unmarshal(jdf)
                        .to("drools://testnode/ksession")
                        .marshal(jdf);
View Full Code Here

    /**
     * Uses the JAXB data format
     */
    public T jaxb() {
        return dataFormat(new JaxbDataFormat());
    }
View Full Code Here

    /**
     * Uses the JAXB data format turning pretty printing on or off
     */
    public T jaxb(boolean prettyPrint) {
        return dataFormat(new JaxbDataFormat(prettyPrint));
    }
View Full Code Here

    /**
     * Uses the JAXB data format
     */
    public T jaxb() {
        return dataFormat(new JaxbDataFormat());
    }
View Full Code Here

    /**
     * Uses the JAXB data format turning pretty printing on or off
     */
    public T jaxb(boolean prettyPrint) {
        return dataFormat(new JaxbDataFormat(prettyPrint));
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.model.dataformat.JaxbDataFormat

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.