org.apache.axiom.om
Interface OMContainer

All Known Subinterfaces:
OMContainerEx, OMDocument, OMElement, SOAPBody, SOAPEnvelope, SOAPFault, SOAPFaultCode, SOAPFaultDetail, SOAPFaultNode, SOAPFaultReason, SOAPFaultRole, SOAPFaultSubCode, SOAPFaultText, SOAPFaultValue, SOAPHeader, SOAPHeaderBlock, SOAPMessage

public interface OMContainer

Captures the operations related to containment shared by both a document and an element.

Exposes the ability to add, find, and iterate over the children of a document or element.


Method Summary
 void addChild(OMNode omNode)
          Adds the given node as the last child.
 void buildNext()
           
 java.util.Iterator getChildren()
          Returns an iterator for the children of the container.
 java.util.Iterator getChildrenWithName(javax.xml.namespace.QName elementQName)
          Returns an iterator for child nodes matching the given QName.
 OMElement getFirstChildWithName(javax.xml.namespace.QName elementQName)
          Returns the first child in document order that matches the given QName

 OMNode getFirstOMChild()
          Gets the first child.
 boolean isComplete()
           
 

Method Detail

addChild

public void addChild(OMNode omNode)
Adds the given node as the last child. One must preserve the order of children, in this operation. Tip : appending the new child is preferred.

Parameters:
omNode -

getChildrenWithName

public java.util.Iterator getChildrenWithName(javax.xml.namespace.QName elementQName)
Returns an iterator for child nodes matching the given QName.

Parameters:
elementQName - The QName specifying namespace and local name to match.
Returns:
Returns an iterator of OMElement items that match the given QName

getFirstChildWithName

public OMElement getFirstChildWithName(javax.xml.namespace.QName elementQName)
                                throws OMException
Returns the first child in document order that matches the given QName

The QName filter is applied as in the function getChildrenWithName(javax.xml.namespace.QName).

Parameters:
elementQName - The QName to use for matching.
Returns:
Returns the first element in document order that matches the elementQName criteria.
Throws:
OMException - Could indirectly trigger building of child nodes.
See Also:
getChildrenWithName(javax.xml.namespace.QName)

getChildren

public java.util.Iterator getChildren()
Returns an iterator for the children of the container.

Returns:
Returns a Iterator of children, all of which implement OMNode.
See Also:
getFirstChildWithName(javax.xml.namespace.QName), getChildrenWithName(javax.xml.namespace.QName)

getFirstOMChild

public OMNode getFirstOMChild()
Gets the first child.

Returns:
Returns the first child. May return null if the container has no children.

isComplete

public boolean isComplete()

buildNext

public void buildNext()


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.