org.apache.axiom.om
Interface OMContainer

All Superinterfaces:
OMSerializable
All Known Subinterfaces:
OMContainerEx, OMDocument, OMElement, OMSourcedElement, SOAPBody, SOAPEnvelope, SOAPFault, SOAPFaultClassifier, SOAPFaultCode, SOAPFaultDetail, SOAPFaultNode, SOAPFaultReason, SOAPFaultRole, SOAPFaultSubCode, SOAPFaultText, SOAPFaultValue, SOAPHeader, SOAPHeaderBlock, SOAPMessage
All Known Implementing Classes:
DocumentFragmentImpl, DocumentImpl, ElementImpl, OMDocumentImpl, OMElementImpl, OMSourcedElementImpl, ParentNode, SOAP11BodyImpl, SOAP11BodyImpl, SOAP11FaultCodeImpl, SOAP11FaultCodeImpl, SOAP11FaultDetailImpl, SOAP11FaultDetailImpl, SOAP11FaultImpl, SOAP11FaultImpl, SOAP11FaultReasonImpl, SOAP11FaultReasonImpl, SOAP11FaultRoleImpl, SOAP11FaultRoleImpl, SOAP11FaultSubCodeImpl, SOAP11FaultSubCodeImpl, SOAP11FaultTextImpl, SOAP11FaultTextImpl, SOAP11FaultValueImpl, SOAP11FaultValueImpl, SOAP11HeaderBlockImpl, SOAP11HeaderBlockImpl, SOAP11HeaderImpl, SOAP11HeaderImpl, SOAP12BodyImpl, SOAP12BodyImpl, SOAP12FaultCodeImpl, SOAP12FaultCodeImpl, SOAP12FaultDetailImpl, SOAP12FaultDetailImpl, SOAP12FaultImpl, SOAP12FaultImpl, SOAP12FaultNodeImpl, SOAP12FaultNodeImpl, SOAP12FaultReasonImpl, SOAP12FaultReasonImpl, SOAP12FaultRoleImpl, SOAP12FaultRoleImpl, SOAP12FaultSubCodeImpl, SOAP12FaultSubCodeImpl, SOAP12FaultTextImpl, SOAP12FaultTextImpl, SOAP12FaultValueImpl, SOAP12FaultValueImpl, SOAP12HeaderBlockImpl, SOAP12HeaderBlockImpl, SOAP12HeaderImpl, SOAP12HeaderImpl, SOAPBodyImpl, SOAPBodyImpl, SOAPElement, SOAPElement, SOAPEnvelopeImpl, SOAPEnvelopeImpl, SOAPFaultCodeImpl, SOAPFaultCodeImpl, SOAPFaultDetailImpl, SOAPFaultDetailImpl, SOAPFaultImpl, SOAPFaultImpl, SOAPFaultNodeImpl, SOAPFaultNodeImpl, SOAPFaultReasonImpl, SOAPFaultReasonImpl, SOAPFaultRoleImpl, SOAPFaultRoleImpl, SOAPFaultSubCodeImpl, SOAPFaultSubCodeImpl, SOAPFaultTextImpl, SOAPFaultTextImpl, SOAPFaultValueImpl, SOAPFaultValueImpl, SOAPHeaderBlockImpl, SOAPHeaderBlockImpl, SOAPHeaderImpl, SOAPHeaderImpl, SOAPMessageImpl, SOAPMessageImpl, SOAPTextImpl, SOAPTextImpl

public interface OMContainer
extends OMSerializable

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()
           
 Iterator getChildren()
          Returns an iterator for the children of the container.
 Iterator getChildrenWithLocalName(String localName)
          Returns an iterator for child nodes matching the local name.
 Iterator getChildrenWithName(QName elementQName)
          Returns an iterator for child nodes matching the given QName.
 Iterator getChildrenWithNamespaceURI(String uri)
          Returns an iterator for child nodes matching the namespace uri.
 OMElement getFirstChildWithName(QName elementQName)
          Returns the first child in document order that matches the given QName

 OMNode getFirstOMChild()
          Gets the first child.
 void serialize(OutputStream output)
          Serializes the node with caching.
 void serialize(OutputStream output, OMOutputFormat format)
          Serializes the node with caching.
 void serialize(Writer writer)
          Serializes the node with caching.
 void serialize(Writer writer, OMOutputFormat format)
          Serializes the node with caching.
 void serializeAndConsume(OutputStream output)
          Serializes the node without caching.
 void serializeAndConsume(OutputStream output, OMOutputFormat format)
          Serializes the node without caching.
 void serializeAndConsume(Writer writer)
          Serializes the node without caching.
 void serializeAndConsume(Writer writer, OMOutputFormat format)
          Serializes the node without caching.
 
Methods inherited from interface org.apache.axiom.om.OMSerializable
build, close, getOMFactory, isComplete, serialize, serialize, serializeAndConsume
 

Method Detail

addChild

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

Iterator getChildrenWithName(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

getChildrenWithLocalName

Iterator getChildrenWithLocalName(String localName)
Returns an iterator for child nodes matching the local name.

Parameters:
localName -
Returns:
Returns an iterator of OMElement items that match the given localName

getChildrenWithNamespaceURI

Iterator getChildrenWithNamespaceURI(String uri)
Returns an iterator for child nodes matching the namespace uri.

Parameters:
uri -
Returns:
Returns an iterator of OMElement items that match the given uri

getFirstChildWithName

OMElement getFirstChildWithName(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

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

OMNode getFirstOMChild()
Gets the first child.

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

serialize

void serialize(OutputStream output)
               throws XMLStreamException
Serializes the node with caching.

Parameters:
output -
Throws:
XMLStreamException

serialize

void serialize(Writer writer)
               throws XMLStreamException
Serializes the node with caching.

Parameters:
writer -
Throws:
XMLStreamException

serialize

void serialize(OutputStream output,
               OMOutputFormat format)
               throws XMLStreamException
Serializes the node with caching.

Parameters:
output -
format -
Throws:
XMLStreamException

serialize

void serialize(Writer writer,
               OMOutputFormat format)
               throws XMLStreamException
Serializes the node with caching.

Parameters:
writer -
format -
Throws:
XMLStreamException

serializeAndConsume

void serializeAndConsume(OutputStream output)
                         throws XMLStreamException
Serializes the node without caching.

Parameters:
output -
Throws:
XMLStreamException

serializeAndConsume

void serializeAndConsume(Writer writer)
                         throws XMLStreamException
Serializes the node without caching.

Parameters:
writer -
Throws:
XMLStreamException

serializeAndConsume

void serializeAndConsume(OutputStream output,
                         OMOutputFormat format)
                         throws XMLStreamException
Serializes the node without caching.

Parameters:
output -
format -
Throws:
XMLStreamException

serializeAndConsume

void serializeAndConsume(Writer writer,
                         OMOutputFormat format)
                         throws XMLStreamException
Serializes the node without caching.

Parameters:
writer -
format -
Throws:
XMLStreamException

buildNext

void buildNext()


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.