Package org.apache.tuscany.sca.databinding.xml

Examples of org.apache.tuscany.sca.databinding.xml.Node2String


    public final void testTransform1() throws XMLStreamException {
        XMLStreamReader reader = new DataObject2XMLStreamReader().transform(dataObject, context);
        XMLStreamReader2Node t2 = new XMLStreamReader2Node(new DefaultExtensionPointRegistry());
        org.w3c.dom.Node node = t2.transform(reader, context);
        assertNotNull(node);
        Node2String t3 = new Node2String(new DefaultExtensionPointRegistry());
        String xml = t3.transform(node, context);
        assertTrue(xml.contains("xmlns:xsi"));
    }
View Full Code Here


        DataBindingExtensionPoint dataBindingRegistry = new DefaultDataBindingExtensionPoint(extensionPointRegistry);
        TransformerExtensionPoint registry = new DefaultTransformerExtensionPoint(extensionPointRegistry);

        registry.addTransformer(new String2SAX(), true);
        registry.addTransformer(new SAX2DOMPipe(extensionPointRegistry), true);
        registry.addTransformer(new Node2String(extensionPointRegistry), true);
        registry.addTransformer(new Node2Writer(extensionPointRegistry), true);

        mediator = new MediatorImpl(dataBindingRegistry, registry);
    }
View Full Code Here

        transformers.addTransformer(new InputStream2Node());
        transformers.addTransformer(new InputStream2SAX());

        transformers.addTransformer(new DOMNode2JavaBeanTransformer());
        transformers.addTransformer(new Node2OutputStream());
        transformers.addTransformer(new Node2String());
        transformers.addTransformer(new Node2Writer());
        transformers.addTransformer(new Node2XMLStreamReader());

        transformers.addTransformer(new JavaBean2DOMNodeTransformer());
        transformers.addTransformer(new Reader2Node());
View Full Code Here

        DataBindingExtensionPoint dataBindingRegistry = new DefaultDataBindingExtensionPoint();
        TransformerExtensionPoint registry = new DefaultTransformerExtensionPoint(dataBindingRegistry);

        registry.addTransformer(new String2SAX());
        registry.addTransformer(new SAX2DOMPipe());
        registry.addTransformer(new Node2String());
        registry.addTransformer(new Node2Writer());

        mediator = new MediatorImpl(dataBindingRegistry, registry);
    }
View Full Code Here

        // System.out.println(bos.toString());

        ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
        FastInfoset2Node t2 = new FastInfoset2Node();
        Node node = t2.transform(bis, null);
        String xml = new Node2String().transform(node, null);

        // System.out.println(xml);

    }
View Full Code Here

public class JAXBReflectionTestCase extends TestCase {

    public void testGenerateSchema() throws Exception {
        JAXBContext context = JAXBContext.newInstance("com.example.ipo.jaxb");
        Node schema = JAXBContextHelper.generateSchema(context);
        System.out.println(new Node2String().transform(schema, null));
    }
View Full Code Here

    public final void testTransform1() throws XMLStreamException {
        XMLStreamReader reader = new DataObject2XMLStreamReader().transform(dataObject, context);
        XMLStreamReader2Node t2 = new XMLStreamReader2Node();
        org.w3c.dom.Node node = t2.transform(reader, context);
        assertNotNull(node);
        Node2String t3 = new Node2String();
        String xml = t3.transform(node, context);
        assertTrue(xml.contains("xmlns:xsi"));
    }
View Full Code Here

        // System.out.println(bos.toString());

        ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
        FastInfoset2Node t2 = new FastInfoset2Node();
        Node node = t2.transform(bis, null);
        String xml = new Node2String().transform(node, null);

        System.out.println(xml);

    }
View Full Code Here

        DataBindingExtensionPoint dataBindingRegistry = new DefaultDataBindingExtensionPoint();
        TransformerExtensionPoint registry = new DefaultTransformerExtensionPoint(null);

        registry.addTransformer(new String2SAX(), true);
        registry.addTransformer(new SAX2DOMPipe(), true);
        registry.addTransformer(new Node2String(), true);
        registry.addTransformer(new Node2Writer(), true);

        mediator = new MediatorImpl(dataBindingRegistry, registry);
    }
View Full Code Here

        DataBindingExtensionPoint dataBindingRegistry = new DefaultDataBindingExtensionPoint();
        TransformerExtensionPoint registry = new DefaultTransformerExtensionPoint();

        registry.addTransformer(new String2SAX(), true);
        registry.addTransformer(new SAX2DOMPipe(), true);
        registry.addTransformer(new Node2String(), true);
        registry.addTransformer(new Node2Writer(), true);

        mediator = new MediatorImpl(dataBindingRegistry, registry);
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.databinding.xml.Node2String

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.