|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.axiom.om.impl.dom.NodeImpl
org.apache.axiom.om.impl.dom.ChildNode
org.apache.axiom.om.impl.dom.ParentNode
public abstract class ParentNode
Field Summary | |
---|---|
protected ChildNode |
firstChild
|
protected ChildNode |
lastChild
|
Fields inherited from class org.apache.axiom.om.impl.dom.ChildNode |
---|
nextSibling, parentNode, previousSibling |
Fields inherited from class org.apache.axiom.om.impl.dom.NodeImpl |
---|
builder, done, factory, FIRSTCHILD, flags, NORMALIZED, OWNED, ownerNode, READONLY, SPECIFIED |
Fields inherited from interface org.apache.axiom.om.OMNode |
---|
DTD_NODE, PI_NODE, SPACE_NODE |
Constructor Summary | |
---|---|
protected |
ParentNode(DocumentImpl ownerDocument,
OMFactory factory)
|
protected |
ParentNode(OMFactory factory)
|
Method Summary | |
---|---|
void |
addChild(OMNode omNode)
Adds the given node as the last child. |
void |
buildNext()
|
Node |
cloneNode(boolean deep)
|
NodeList |
getChildNodes()
|
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 of child nodes having a given qname. |
Iterator |
getChildrenWithNamespaceURI(String uri)
Returns an iterator for child nodes matching the namespace uri. |
Node |
getFirstChild()
Gets the first child of this Node, or null if none. |
OMElement |
getFirstChildWithName(QName elementQName)
Returns the first OMElement child node. |
OMNode |
getFirstOMChild()
Gets the first child. |
OMNode |
getFirstOMChildIfAvailable()
Get the first child if it is available. |
Node |
getLastChild()
Gets the last child of this Node, or null if none. |
String |
getTextContent()
|
boolean |
hasChildNodes()
|
protected OMNode |
importNode(OMNode child)
This method is intended only to be used by Axiom intenals when merging Objects from different Axiom implementations to the DOOM implementation. |
Node |
insertBefore(Node newChild,
Node refChild)
Inserts newChild before the refChild. |
Node |
removeChild(Node oldChild)
Removes the given child from the DOM Tree. |
Node |
replaceChild(Node newChild,
Node oldChild)
Replaces the oldChild with the newChild. |
void |
setFirstChild(OMNode omNode)
forcefully set the first element in this parent element |
void |
setLastChild(OMNode omNode)
Forcefully set the last child |
void |
setTextContent(String textContent)
|
Methods inherited from class org.apache.axiom.om.impl.dom.ChildNode |
---|
detach, discard, getNextOMSibling, getNextOMSiblingIfAvailable, getNextSibling, getParent, getParentNode, getPreviousOMSibling, getPreviousSibling, insertSiblingAfter, insertSiblingBefore, setNextOMSibling, setParent, setPreviousOMSibling |
Methods inherited from class org.apache.axiom.om.impl.dom.NodeImpl |
---|
appendChild, build, buildWithAttachments, close, compareDocumentPosition, getAttributes, getBaseURI, getFeature, getLength, getLocalName, getNamespaceURI, getNodeValue, getOMFactory, getOwnerDocument, getPrefix, getUserData, hasAttributes, internalSerialize, internalSerializeAndConsume, isComplete, isDefaultNamespace, isEqualNode, isSameNode, isSupported, item, lookupNamespaceURI, lookupPrefix, normalize, serialize, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, setComplete, setNodeValue, setOwnerDocument, setPrefix, setUserData |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.axiom.om.impl.OMContainerEx |
---|
setComplete |
Methods inherited from interface org.apache.axiom.om.OMContainer |
---|
serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume |
Methods inherited from interface org.apache.axiom.om.OMSerializable |
---|
build, close, getOMFactory, isComplete, serialize, serialize, serializeAndConsume |
Methods inherited from interface org.w3c.dom.Node |
---|
getNodeName, getNodeType |
Methods inherited from interface org.apache.axiom.om.impl.OMNodeEx |
---|
internalSerialize, setType |
Methods inherited from interface org.apache.axiom.om.OMNode |
---|
getType |
Field Detail |
---|
protected ChildNode firstChild
protected ChildNode lastChild
Constructor Detail |
---|
protected ParentNode(DocumentImpl ownerDocument, OMFactory factory)
ownerDocument
- protected ParentNode(OMFactory factory)
Method Detail |
---|
public void addChild(OMNode omNode)
OMContainer
addChild
in interface OMContainer
public void buildNext()
buildNext
in interface OMContainer
public Iterator getChildren()
OMContainer
getChildren
in interface OMContainer
Iterator
of children, all of which implement OMNode
.OMContainer.getFirstChildWithName(javax.xml.namespace.QName)
,
OMContainer.getChildrenWithName(javax.xml.namespace.QName)
public Iterator getChildrenWithName(QName elementQName) throws OMException
getChildrenWithName
in interface OMContainer
elementQName
- The QName specifying namespace and local name to match.
OMElement
items that match the given QName
OMException
(javax.xml.namespace.QName)
public Iterator getChildrenWithLocalName(String localName)
OMContainer
getChildrenWithLocalName
in interface OMContainer
OMElement
items that match the given localNamepublic Iterator getChildrenWithNamespaceURI(String uri)
OMContainer
getChildrenWithNamespaceURI
in interface OMContainer
OMElement
items that match the given uripublic OMElement getFirstChildWithName(QName elementQName) throws OMException
getFirstChildWithName
in interface OMContainer
elementQName
- The QName to use for matching.
OMException
- Could indirectly trigger building of child nodes.(javax.xml.namespace.QName)
public OMNode getFirstOMChild()
OMContainer
getFirstOMChild
in interface OMContainer
public OMNode getFirstOMChildIfAvailable()
OMContainerEx
OMSerializable.isComplete()
may return false
when called on the child.
In contrast to OMContainer.getFirstOMChild()
, this method will never modify
the state of the underlying parser.
getFirstOMChildIfAvailable
in interface OMContainerEx
null
if the container has no children or
the builder has not yet started to build the first childpublic void setFirstChild(OMNode omNode)
OMContainerEx
setFirstChild
in interface OMContainerEx
public void setLastChild(OMNode omNode)
setLastChild
in interface OMContainerEx
omNode
- public NodeList getChildNodes()
getChildNodes
in interface Node
getChildNodes
in class NodeImpl
public Node getFirstChild()
NodeImpl
getFirstChild
in interface Node
getFirstChild
in class NodeImpl
ParentNode
public Node getLastChild()
NodeImpl
getLastChild
in interface Node
getLastChild
in class NodeImpl
ParentNode
public boolean hasChildNodes()
hasChildNodes
in interface Node
hasChildNodes
in class NodeImpl
public Node insertBefore(Node newChild, Node refChild) throws DOMException
insertBefore
in interface Node
insertBefore
in class NodeImpl
DOMException
public Node replaceChild(Node newChild, Node oldChild) throws DOMException
replaceChild
in interface Node
replaceChild
in class NodeImpl
DOMException
public Node removeChild(Node oldChild) throws DOMException
removeChild
in interface Node
removeChild
in class NodeImpl
DOMException
public Node cloneNode(boolean deep)
cloneNode
in interface Node
cloneNode
in class ChildNode
protected OMNode importNode(OMNode child)
child
- public String getTextContent() throws DOMException
getTextContent
in interface Node
getTextContent
in class NodeImpl
DOMException
public void setTextContent(String textContent) throws DOMException
setTextContent
in interface Node
setTextContent
in class NodeImpl
DOMException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |