Package org.milyn.javabean

Examples of org.milyn.javabean.Value


      @Override
      public void configure() throws Exception
      {
                from("direct:a")
                .process(new SmooksProcessor(new Smooks().setExports(new Exports(JavaResult.class)), context)
                .addVisitor(new Value("customer", "/order/header/customer", String.class)));
      }
     
    });
    enableJMX();
    context.start();
View Full Code Here


      @Override
      public void configure() throws Exception
      {
                from("direct:a")
                .process(new SmooksProcessor(new Smooks().setExports(new Exports(JavaResult.class)), context)
                .addVisitor(new Value("x", "/coord/@x", Integer.class)));
      }
     
    });
    enableJMX();
    context.start();
View Full Code Here

    context.addRoutes(new RouteBuilder() {
      @Override
      public void configure() throws Exception
      {
                from("direct:b").process(new SmooksProcessor(new Smooks().setExports(new Exports(JavaResult.class)), context).
                    addVisitor(new Value("x", "/coord/@x", Integer.class)).
                    addVisitor(new Value("y", "/coord/@y", Double.class)));
      }
    });
    context.start();
        Exchange response = template.request("direct:b", new Processor() {
            public void process(Exchange exchange) throws Exception {
View Full Code Here

  public void test_01() {

    Smooks smooks = new Smooks();

    smooks.addVisitor(new Value("customerName", "customer"));
    smooks.addVisitor(new Value("customerNumber", "customer/@number")
                .setDecoder(new IntegerDecoder()));
    smooks.addVisitor(new Value("privatePerson", "privatePerson")
                .setDecoder(new BooleanDecoder())
                .setDefaultValue("true"));

    JavaResult result = new JavaResult();
        smooks.filterSource(new StreamSource(getClass().getResourceAsStream("../order-01.xml")), result);
View Full Code Here

  public void test_02() {

    Smooks smooks = new Smooks();

    smooks.addVisitor(new Value("customerNumber1", "customer/@number", Integer.class));
    smooks.addVisitor(new Value("customerNumber2", "customer/@number").setType(Integer.class));

    JavaResult result = new JavaResult();
        smooks.filterSource(new StreamSource(getClass().getResourceAsStream("../order-01.xml")), result);

    assertEquals(123123, result.getBean("customerNumber1"));
View Full Code Here

TOP

Related Classes of org.milyn.javabean.Value

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.