Examples of OMContainer


Examples of org.apache.axiom.om.OMContainer

  }

  @Override
  public void startElement(String uri, String localName, String qName,
      Attributes attributes) throws SAXException {
    OMContainer parent = getParent();
    OMNamespace ns = factory.createOMNamespace(uri,
        QNameUtils.toQName(uri, qName).getPrefix());
    OMElement element = factory.createOMElement(localName, ns, parent);

    // declare namespaces
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

  }

  @Override
  public void characters(char ch[], int start, int length) throws SAXException {
    String data = new String(ch, start, length);
    OMContainer parent = getParent();
    factory.createOMText(parent, data, charactersType);
  }
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

    charactersType = XMLStreamConstants.CHARACTERS;
  }

  @Override
  public void processingInstruction(String target, String data) throws SAXException {
    OMContainer parent = getParent();
    factory.createOMProcessingInstruction(parent, target, data);
  }
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

  }

  @Override
  public void comment(char ch[], int start, int length) throws SAXException {
    String content = new String(ch, start, length);
    OMContainer parent = getParent();
    factory.createOMComment(parent, content);
  }
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

        String elementName = parser.getLocalName();
        if (lastNode == null) {
            node = constructNode(null, elementName, true);
            setSOAPEnvelope(node);
        } else if (lastNode.isComplete()) {
            OMContainer parent = lastNode.getParent();
            if (parent == document) {
                // If we get here, this means that we found the SOAP envelope, but that it was
                // preceded by a comment node. Since constructNode will create a new document
                // based on the SOAP version of the envelope, we simply discard the last node
                // and do as if we just encountered the first node in the document.
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

       
        if (log.isDebugEnabled()) {
            log.debug("Invoking CustomBuilder, " + customBuilder.toString() +
                      ", to the OMNode for {" + namespace + "}" + localPart);
        }
        OMContainer parent = null;
        if (lastNode != null) {
            if (lastNode.isComplete()) {
                parent = lastNode.getParent();
            } else {
                parent = (OMContainer)lastNode;
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

    private Map getAllNamespaces(OMSerializable contextNode) {
        if (contextNode == null) {
            return Collections.EMPTY_MAP;
        }
        OMContainer context;
        if (contextNode instanceof OMContainer) {
            context = (OMContainer)contextNode;
        } else {
            context = ((OMNode)contextNode).getParent();
        }
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

                addNamespace((OMNamespace)it.next());
            }
            if (preserveNamespaceContext && lastNode == rootNode) {
                OMElement element = (OMElement)lastNode;
                while (true) {
                    OMContainer container = element.getParent();
                    if (container instanceof OMElement) {
                        element = (OMElement)container;
                        decl: for (Iterator it = element.getAllDeclaredNamespaces(); it.hasNext(); ) {
                            OMNamespace ns = (OMNamespace)it.next();
                            String prefix = ns.getPrefix();
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

    private Map getAllNamespaces(OMSerializable contextNode) {
        if (contextNode == null) {
            return Collections.EMPTY_MAP;
        }
        OMContainer context;
        if (contextNode instanceof OMContainer) {
            context = (OMContainer)contextNode;
        } else {
            context = ((OMNode)contextNode).getParent();
        }
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

        } else {
            if (next instanceof OMDocument) {
                next = null;
            } else {
                OMNode nextNode = (OMNode)next;
                OMContainer parent = nextNode.getParent();
                OMNode nextSibling = getNextSibling(nextNode);
                if (nextSibling != null) {
                    next = nextSibling;
                } else if ((parent != null) && parent.isComplete()) {
                    next = parent;
                    backtracked = true;
                } else {
                    next = null;
                }
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.