Package org.apache.tuscany.sdo.helper

Examples of org.apache.tuscany.sdo.helper.XMLStreamHelper.createXMLStreamReader()


                                                        ROOT_ELEMENT.getLocalPart());
    }

    public XMLStreamReader getReader() throws XMLStreamException {
        XMLStreamHelper streamHelper = SDOUtil.createXMLStreamHelper(helperContext.getTypeHelper());
        return streamHelper.createXMLStreamReader(sourceDocument);
    }

    public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException {
        StreamingOMSerializer serializer = new StreamingOMSerializer();
        serializer.serialize(getReader(), xmlWriter);
View Full Code Here


            XMLStreamHelper streamHelper = SDOUtil.createXMLStreamHelper(helperContext.getTypeHelper());
            QName elementName = SDOContextHelper.getElement(context.getSourceDataType());
            XMLHelper xmlHelper = helperContext.getXMLHelper();
            XMLDocument document =
                    xmlHelper.createDocument(source, elementName.getNamespaceURI(), elementName.getLocalPart());
            return streamHelper.createXMLStreamReader(document);
        } catch (XMLStreamException e) {
            // TODO: Add context to the exception
            throw new TransformationException(e);
        }
    }
View Full Code Here

     */
    public XMLStreamReader transform(XMLDocument source, TransformationContext context) {
        try {
            HelperContext helperContext = SDOContextHelper.getHelperContext(context);
            XMLStreamHelper streamHelper = SDOUtil.createXMLStreamHelper(helperContext.getTypeHelper());
            return streamHelper.createXMLStreamReader(source);
        } catch (XMLStreamException e) {
            throw new TransformationException(e);
        }
    }

View Full Code Here

            XMLStreamHelper streamHelper = SDOUtil.createXMLStreamHelper(helperContext.getTypeHelper());
            QName elementName = SDOContextHelper.getElement(context.getSourceDataType());
            XMLHelper xmlHelper = helperContext.getXMLHelper();
            XMLDocument document =
                    xmlHelper.createDocument(source, elementName.getNamespaceURI(), elementName.getLocalPart());
            return streamHelper.createXMLStreamReader(document);
        } catch (XMLStreamException e) {
            // TODO: Add context to the exception
            throw new TransformationException(e);
        }
    }
View Full Code Here

     */
    public XMLStreamReader transform(XMLDocument source, TransformationContext context) {
        try {
            HelperContext helperContext = SDOContextHelper.getHelperContext(context);
            XMLStreamHelper streamHelper = SDOUtil.createXMLStreamHelper(helperContext.getTypeHelper());
            return streamHelper.createXMLStreamReader(source);
        } catch (XMLStreamException e) {
            throw new TransformationException(e);
        }
    }

View Full Code Here

            QName elementName =
                    (logicalType instanceof QName) ? (QName) logicalType : new QName("commonj.sdo", "dataObject");
            XMLHelper xmlHelper = SDOUtil.createXMLHelper(typeHelper);
            XMLDocument document =
                    xmlHelper.createDocument(source, elementName.getNamespaceURI(), elementName.getLocalPart());
            return streamHelper.createXMLStreamReader(document);
        } catch (XMLStreamException e) {
            // TODO: Add context to the exception
            throw new TransformationException(e);
        }
    }
View Full Code Here

     */
    public XMLStreamReader transform(XMLDocument source, TransformationContext context) {
        try {
            TypeHelper typeHelper = SDODataTypeHelper.getTypeHelper(context);
            XMLStreamHelper streamHelper = SDOUtil.createXMLStreamHelper(typeHelper);
            return streamHelper.createXMLStreamReader(source);
        } catch (XMLStreamException e) {
            throw new TransformationException(e);
        }
    }

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.