Package org.switchyard.common.io.pull

Examples of org.switchyard.common.io.pull.ElementPuller


     * Safely constructs a Model from a Document.
     * @param document the Model Document
     * @return the Model, or null if document is null
     */
    public M pull(Document document) {
        return pull(new ElementPuller().pull(document));
    }
View Full Code Here


     * Safely pulls (constructs) a basic Model from a qualified name.
     * @param qname the qualified name
     * @return the model, or null if the qualified name is null
     */
    public M pull(QName qname) {
        return pull(new ElementPuller().pull(qname));
    }
View Full Code Here

    private Element _element;
    private Element _parent_element;
    private DOMConfiguration _parent_config;

    DOMConfiguration(Element element) {
        _element = new ElementPuller().pull(element);
        getParent(); // initializes parent
    }
View Full Code Here

        _element = new ElementPuller().pull(element);
        getParent(); // initializes parent
    }

    private DOMConfiguration(Element element, boolean normalize) {
        _element = new ElementPuller().pull(element, normalize);
        getParent(); // initializes parent
    }
View Full Code Here

    private DOMConfiguration(Configuration from) {
        DOMConfiguration config;
        if (from instanceof DOMConfiguration) {
            config = (DOMConfiguration)from;
        } else {
            Element element = new ElementPuller().pull(from.getQName());
            config = new DOMConfiguration(element);
            for (QName qname : from.getAttributeQNames()) {
                config.setAttribute(qname, from.getAttribute(qname));
            }
            for (Configuration grandchild : from.getChildren()) {
View Full Code Here

    }

    @Test
    public void testDOM() throws Exception {
        final String expectedXML = "<inspection code=\"123\"><state>NY</state></inspection>";
        final Element expectedDOM = new ElementPuller().pull(new StringReader(expectedXML));
        Car car = new Car();
        car.setInspection(expectedDOM);
        car = serDeser(car, Car.class);
        final Element actualDOM = car.getInspection();
        final String actualXML = XMLHelper.toString(actualDOM);
View Full Code Here

    }

    @Test
    public void testDOM() throws Exception {
        final String expectedXML = "<inspection code=\"123\"><state>NY</state></inspection>";
        final Element expectedDOM = new ElementPuller().pull(new StringReader(expectedXML));
        Car car = new Car();
        car.setInspection(expectedDOM);
        car = serDeser(car, Car.class);
        final Element actualDOM = car.getInspection();
        final String actualXML = XMLHelper.toString(actualDOM);
View Full Code Here

TOP

Related Classes of org.switchyard.common.io.pull.ElementPuller

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.