Class OMDocumentImpl

  • All Implemented Interfaces:
    org.apache.axiom.om.impl.OMContainerEx, org.apache.axiom.om.OMContainer, org.apache.axiom.om.OMDocument, org.apache.axiom.om.OMSerializable
    Direct Known Subclasses:
    SOAPMessageImpl

    public class OMDocumentImpl
    extends OMSerializableImpl
    implements org.apache.axiom.om.OMDocument, org.apache.axiom.om.impl.OMContainerEx
    Class OMDocumentImpl
    • Field Detail

      • documentElement

        protected org.apache.axiom.om.OMElement documentElement
        Field documentElement
      • firstChild

        protected org.apache.axiom.om.OMNode firstChild
        Field firstChild
      • lastChild

        protected org.apache.axiom.om.OMNode lastChild
        Field lastChild
      • charSetEncoding

        protected String charSetEncoding
        Field charSetEncoding Default : UTF-8
      • xmlVersion

        protected String xmlVersion
        Field xmlVersion
      • isStandalone

        protected String isStandalone
    • Constructor Detail

      • OMDocumentImpl

        public OMDocumentImpl​(org.apache.axiom.om.OMFactory factory)
        Create a OMDocument given the OMFactory
        Parameters:
        factory - The OMFactory that created this instace
      • OMDocumentImpl

        public OMDocumentImpl​(org.apache.axiom.om.OMXMLParserWrapper parserWrapper,
                              org.apache.axiom.om.OMFactory factory)
        Create the OMDocument with the factory
        Parameters:
        parserWrapper -
        factory -
      • OMDocumentImpl

        public OMDocumentImpl​(org.apache.axiom.om.OMElement documentElement,
                              org.apache.axiom.om.OMXMLParserWrapper parserWrapper,
                              org.apache.axiom.om.OMFactory factory)
        Create the OMDoucment with the factory and set the given OMElement as the document element
        Parameters:
        documentElement -
        parserWrapper -
        factory -
    • Method Detail

      • getBuilder

        public org.apache.axiom.om.OMXMLParserWrapper getBuilder()
        Specified by:
        getBuilder in interface org.apache.axiom.om.OMContainer
      • getOMDocumentElement

        public org.apache.axiom.om.OMElement getOMDocumentElement()
        Method getDocumentElement.
        Specified by:
        getOMDocumentElement in interface org.apache.axiom.om.OMDocument
        Returns:
        Returns OMElement.
      • setOMDocumentElement

        public void setOMDocumentElement​(org.apache.axiom.om.OMElement documentElement)
        Method setDocumentElement.
        Specified by:
        setOMDocumentElement in interface org.apache.axiom.om.OMDocument
        Parameters:
        documentElement -
      • setComplete

        public void setComplete​(boolean state)
        Method setComplete.
        Specified by:
        setComplete in interface org.apache.axiom.om.impl.OMContainerEx
        Specified by:
        setComplete in class OMSerializableImpl
        Parameters:
        state -
      • buildNext

        public void buildNext()
        Forces the parser to proceed, if parser has not yet finished with the XML input.
        Specified by:
        buildNext in interface org.apache.axiom.om.OMContainer
      • addChild

        public void addChild​(org.apache.axiom.om.OMNode child)
        Adds child to the element. One can decide whether to append the child or to add to the front of the children list.
        Specified by:
        addChild in interface org.apache.axiom.om.OMContainer
        Parameters:
        child -
      • getChildren

        public Iterator getChildren()
        Returns a collection of this element. Children can be of types OMElement, OMText.
        Specified by:
        getChildren in interface org.apache.axiom.om.OMContainer
        Returns:
        Returns iterator.
      • getChildrenWithName

        public Iterator getChildrenWithName​(QName elementQName)
        Searches for children with a given QName and returns an iterator to traverse through the OMNodes. The QName can contain any combination of prefix, localname and URI.
        Specified by:
        getChildrenWithName in interface org.apache.axiom.om.OMContainer
        Parameters:
        elementQName -
        Returns:
        Returns Iterator.
        Throws:
        org.apache.axiom.om.OMException
      • getChildrenWithLocalName

        public Iterator getChildrenWithLocalName​(String localName)
        Specified by:
        getChildrenWithLocalName in interface org.apache.axiom.om.OMContainer
      • getChildrenWithNamespaceURI

        public Iterator getChildrenWithNamespaceURI​(String uri)
        Specified by:
        getChildrenWithNamespaceURI in interface org.apache.axiom.om.OMContainer
      • getFirstOMChild

        public org.apache.axiom.om.OMNode getFirstOMChild()
        Method getFirstOMChild.
        Specified by:
        getFirstOMChild in interface org.apache.axiom.om.OMContainer
        Returns:
        Returns first om child.
      • getFirstOMChildIfAvailable

        public org.apache.axiom.om.OMNode getFirstOMChildIfAvailable()
        Specified by:
        getFirstOMChildIfAvailable in interface org.apache.axiom.om.impl.OMContainerEx
      • getFirstChildWithName

        public org.apache.axiom.om.OMElement getFirstChildWithName​(QName elementQName)
                                                            throws org.apache.axiom.om.OMException
        Method getFirstChildWithName.
        Specified by:
        getFirstChildWithName in interface org.apache.axiom.om.OMContainer
        Parameters:
        elementQName -
        Returns:
        Returns OMElement.
        Throws:
        org.apache.axiom.om.OMException
      • setFirstChild

        public void setFirstChild​(org.apache.axiom.om.OMNode firstChild)
        Method setFirstChild.
        Specified by:
        setFirstChild in interface org.apache.axiom.om.impl.OMContainerEx
        Parameters:
        firstChild -
      • setLastChild

        public void setLastChild​(org.apache.axiom.om.OMNode omNode)
        Forcefully set the last child
        Specified by:
        setLastChild in interface org.apache.axiom.om.impl.OMContainerEx
        Parameters:
        omNode -
      • getCharsetEncoding

        public String getCharsetEncoding()
        Returns the character set encoding scheme to be used.
        Specified by:
        getCharsetEncoding in interface org.apache.axiom.om.OMDocument
        Returns:
        Returns charset.
      • setCharsetEncoding

        public void setCharsetEncoding​(String charEncoding)
        Sets the character set encoding scheme.
        Specified by:
        setCharsetEncoding in interface org.apache.axiom.om.OMDocument
        Parameters:
        charEncoding -
      • isStandalone

        public String isStandalone()
        Specified by:
        isStandalone in interface org.apache.axiom.om.OMDocument
      • setStandalone

        public void setStandalone​(String isStandalone)
        Specified by:
        setStandalone in interface org.apache.axiom.om.OMDocument
      • getXMLVersion

        public String getXMLVersion()
        Specified by:
        getXMLVersion in interface org.apache.axiom.om.OMDocument
      • setXMLVersion

        public void setXMLVersion​(String xmlVersion)
        Specified by:
        setXMLVersion in interface org.apache.axiom.om.OMDocument
      • getXMLStreamReader

        public XMLStreamReader getXMLStreamReader()
        Specified by:
        getXMLStreamReader in interface org.apache.axiom.om.OMContainer
      • getXMLStreamReaderWithoutCaching

        public XMLStreamReader getXMLStreamReaderWithoutCaching()
        Specified by:
        getXMLStreamReaderWithoutCaching in interface org.apache.axiom.om.OMContainer
      • getXMLStreamReader

        public XMLStreamReader getXMLStreamReader​(boolean cache)
        Specified by:
        getXMLStreamReader in interface org.apache.axiom.om.OMContainer