Package org.apache.axis2.om.impl.dom

Examples of org.apache.axis2.om.impl.dom.DocumentImpl


     * Returns a new document impl.
     *
     * @see javax.xml.parsers.DocumentBuilder#newDocument()
     */
    public Document newDocument() {
        DocumentImpl documentImpl = new DocumentImpl();
        documentImpl.setComplete(true);
        return documentImpl;
    }
View Full Code Here


            OMDOMFactory factory = new OMDOMFactory();
            // Not really sure whether this will work :-?
            XMLStreamReader reader = XMLInputFactory.newInstance()
                    .createXMLStreamReader(inputSource.getCharacterStream());
            StAXOMBuilder builder = new StAXOMBuilder(factory, reader);
            DocumentImpl doc = (DocumentImpl) builder.getDocument();
            ((ElementImpl) doc.getDocumentElement()).build();
            return (DocumentImpl) builder.getDocument();
        } catch (XMLStreamException e) {
            throw new SAXException(e);
        }
    }
View Full Code Here

        this.document = doc;
    }

    public OMDocument createOMDocument() {
        if (this.document == null)
            this.document = new DocumentImpl();

        return this.document;
    }
View Full Code Here

                    .getOwnerDocument(), localName, (NamespaceImpl) ns);
            parentElem.appendChild(elem);
            return elem;

        case Node.DOCUMENT_NODE:
            DocumentImpl docImpl = (DocumentImpl) parent;
            ElementImpl elem2 = new ElementImpl(docImpl, localName,
                    (NamespaceImpl) ns);
            return elem2;

        case Node.DOCUMENT_FRAGMENT_NODE:
View Full Code Here

            ElementImpl elem = new ElementImpl((DocumentImpl) parentElem
                    .getOwnerDocument(), localName, (NamespaceImpl) ns, builder);
            parentElem.appendChild(elem);
            return elem;
        case Node.DOCUMENT_NODE:
            DocumentImpl docImpl = (DocumentImpl) parent;
            ElementImpl elem2 = new ElementImpl(docImpl, localName,
                    (NamespaceImpl) ns, builder);
            docImpl.appendChild(elem2);
            return elem2;

        case Node.DOCUMENT_FRAGMENT_NODE:
            DocumentFragmentimpl docFragImpl = (DocumentFragmentimpl) parent;
            ElementImpl elem3 = new ElementImpl((DocumentImpl) docFragImpl
View Full Code Here

        // TODO
        throw new UnsupportedOperationException("TODO");
    }

    public OMComment createOMComment(OMContainer parent, String content) {
        DocumentImpl doc = null;
        if (parent instanceof DocumentImpl) {
            doc = (DocumentImpl) parent;
        } else {
            doc = (DocumentImpl) ((ParentNode) parent).getOwnerDocument();
        }
View Full Code Here

    public DocumentImpl getDocument() {
        return (DocumentImpl) this.createOMDocument();
    }

    public OMDocument createOMDocument(OMXMLParserWrapper builder) {
        this.document = new DocumentImpl(builder);
        return this.document;
    }
View Full Code Here

            String charSetEncoding = BuilderUtil.getCharSetEncoding(contentTypeStr);
            msgContext.setProperty(
                    Constants.Configuration.CHARACTER_SET_ENCODING, charSetEncoding);
            boolean eprFound = false;
            if (endpointsConfiguration != null) {
                URLEndpoint epr = endpointsConfiguration.getEndpoint(request.getRequestLine().getUri());
                if (epr != null) {
                    eprFound = true;
                    String type = TransportUtils.getContentType(contentTypeStr, msgContext);
                    msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE, type);
                    epr.setParameters(msgContext);

                    Builder builder = epr.getBuilder(type);
                    if (HTTPTransportUtils.isRESTRequest(contentTypeStr)) {
                        RESTUtil.processPOSTRequest(msgContext, is, os,
                                request.getRequestLine().getUri(), contentType, builder, isRestDispatching);
                    } else {
View Full Code Here

            String contentTypeStr = contentType != null ?
                    contentType.getValue() : inferContentType();

            boolean eprFound = false;
            if (endpointsConfiguration != null) {
                URLEndpoint epr = endpointsConfiguration.getEndpoint(request.getRequestLine().getUri());
                if (epr != null) {
                    eprFound = true;
                    String type = TransportUtils.getContentType(contentTypeStr, msgContext);
                    msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE, type);

                    epr.setParameters(msgContext);

                    Builder builder = epr.getBuilder(type);
                    RESTUtil.processGetAndDeleteRequest(
                            msgContext, os, request.getRequestLine().getUri(),
                            request.getFirstHeader(HTTP.CONTENT_TYPE), builder,
                            method, isRestDispatching);
                }
View Full Code Here

        params = getListenerParameters();


        param = transportIn.getParameter(NhttpConstants.ENDPOINTS_CONFIGURATION);
        if (param != null && param.getValue() != null) {
            endpoints = new URLEndpointsConfigurationFactory().create(param.getValue().toString());
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.axis2.om.impl.dom.DocumentImpl

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.