Package org.apache.tuscany.core.databinding.impl

Examples of org.apache.tuscany.core.databinding.impl.TransformationContextImpl


     * @see junit.framework.TestCase#setUp()
     */
    protected void setUp() throws Exception {
        super.setUp();
        SDOUtil.registerStaticTypes(SdoFactory.class);
        context = new TransformationContextImpl();
        context.setSourceDataType(getSourceDataType());
        context.setTargetDataType(getTargetDataType());

        reversedContext = new TransformationContextImpl();
        reversedContext.setSourceDataType(getTargetDataType());
        reversedContext.setTargetDataType(getSourceDataType());
       
        PurchaseOrderType po = SdoFactory.INSTANCE.createPurchaseOrderType();
        USAddress address = SdoFactory.INSTANCE.createUSAddress();
View Full Code Here


            InputStream in = getNodeStream(input);
            XMLInputFactory staxFactory = XMLInputFactory.newInstance();
            XMLStreamReader reader = staxFactory.createXMLStreamReader(in);

            XMLStreamReader2XMLDocument transformer = new XMLStreamReader2XMLDocument();
            TransformationContext context = new TransformationContextImpl();
            DataType<QName> binding = new DataType<QName>(DataObject.class, null);
            binding.setMetadata(TypeHelper.class.getName(), callback.getTypeHelper());
            context.setTargetDataType(binding);
            XMLDocument document = transformer.transform(reader, context);

            boolean isWrapped = false;
            return toObjects(document, isWrapped);
        } catch (Exception e) {
View Full Code Here

            XMLInputFactory staxFactory = XMLInputFactory.newInstance(
                "javax.xml.stream.XMLInputFactory", getClass().getClassLoader());
            XMLStreamReader reader = staxFactory.createXMLStreamReader(in);

            XMLStreamReader2XMLDocument transformer = new XMLStreamReader2XMLDocument();
            TransformationContext context = new TransformationContextImpl();
            DataType<QName> binding = new DataType<QName>(DataObject.class, null);
            binding.setMetadata(TypeHelper.class.getName(), callback.getTypeHelper());
            context.setTargetDataType(binding);
            XMLDocument document = transformer.transform(reader, context);

            //boolean isWrapped = true;
            Object[] objects = toObjects(document, true);
View Full Code Here

TOP

Related Classes of org.apache.tuscany.core.databinding.impl.TransformationContextImpl

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.