Package org.apache.tuscany.databinding.sdo

Examples of org.apache.tuscany.databinding.sdo.XMLStreamReader2XMLDocument


        transformers.add(new DataObject2XMLStreamReader());
        transformers.add(new XMLStreamReader2DataObject());

        transformers.add(new XMLDocument2XMLStreamReader());
        transformers.add(new XMLStreamReader2XMLDocument());

        transformers.add(new String2XMLStreamReader());
        transformers.add(new XMLStreamReader2String());

        transformers.add(new String2Node());
View Full Code Here


        try {
            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) {
            //REVISIT: better handling of exceptions
View Full Code Here

            InputStream in = getNodeStream(nd);
            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);

            if (callback.hasInOut()) {
View Full Code Here

TOP

Related Classes of org.apache.tuscany.databinding.sdo.XMLStreamReader2XMLDocument

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.