Package example.model

Examples of example.model.Order


        // Create and initilise the XMLBinding instance...
        XMLBinding xmlBinding = new XMLBinding().add("smooks-config.xml");
        xmlBinding.intiailize();

        // Read the order XML into the Order Object model...
        Order order = xmlBinding.fromXML(new StringSource(orderXMLMessage), Order.class);

        // Do something with the order....

        // Write the Order object model instance back out to XML...
        String outXML = xmlBinding.toXML(order)// (Note: There's also a version of toXML() that takes a Writer)
View Full Code Here


        this.smooks = smooks;
    }
   
    public Order filter(final String input)
    {
        Order order = ExampleUtil.performFiltering(input, smooks);
        return order;
    }
View Full Code Here

       
        final Injector injector = Guice.createInjector(osgiModule(context), new SmooksModule());
        final Pojo pojo = injector.getInstance(Pojo.class);
       
        final String inputFile = (String) context.getBundle().getHeaders().get("Smooks-Input-File");
        final Order order = pojo.filter(inputFile);
       
        ExampleUtil.printOrder(order);
       
    }
View Full Code Here

        ExecutionContext executionContext = smooks.createExecutionContext();
        JavaResult result = new JavaResult();
        StreamSource source = new StreamSource(new ByteArrayInputStream(readFileContents(input)));
        smooks.filterSource(executionContext, source, result);
           
        Order order = (Order) result.getBean("order");
        printOrder(order);
    }
View Full Code Here

        XMLBinding xmlBindingV2 = new XMLBinding().add("v2-binding-config.xml");
        xmlBindingV1.intiailize();
        xmlBindingV2.intiailize();

        // Read the v1 order XML into the Order Object model...
        Order order = xmlBindingV1.fromXML(new StringSource(orderV1XMLMessage), Order.class);

        // Write the Order object model instance back out to XML using the v2 XMLBinding instance...
        String outXML = xmlBindingV2.toXML(order)// (Note: There's also a version of toXML() that takes a Writer)

        // Display read/write info to the example user...
View Full Code Here

TOP

Related Classes of example.model.Order

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.