|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weblogic.apache.xerces.dom.NodeImpl | +--weblogic.apache.xerces.dom.ChildNode | +--weblogic.apache.xerces.dom.ChildAndParentNode
If we had multiple inheritance ChildAndParentNode would simply inherit both from ChildNode and ParentNode. In this case it only inherits from ChildNode and all the code of ParentNode is duplicated here (bummer :-(
This class is based on an implementation from the Apache XML Project. In future releases the XML parser, XSLT processor, and associated classes will likely be updated to be based on a later version of the Apache implementations. Since Apache does not guarantee backwards compatibility between versions of their software, we cannot guarantee backwards compatibility of any of the classes contained in the weblogic.apache package or sub-packages.
Field Summary | |
protected ChildNode |
firstChild
First child. |
protected int |
nodeListIndex
Last requested node index. |
protected int |
nodeListLength
Cached node list length. |
protected ChildNode |
nodeListNode
Last requested node. |
protected DocumentImpl |
ownerDocument
Owner document. |
Fields inherited from class weblogic.apache.xerces.dom.ChildNode |
nextSibling,
previousSibling |
Fields inherited from class weblogic.apache.xerces.dom.NodeImpl |
ELEMENT_DEFINITION_NODE,
FIRSTCHILD,
flags,
IGNORABLEWS,
MUTATION_AGGREGATE,
MUTATION_ALL,
MUTATION_LOCAL,
MUTATION_NONE,
MUTATIONEVENTS,
OWNED,
ownerNode,
READONLY,
SETVALUE,
SPECIFIED,
SYNCCHILDREN,
SYNCDATA |
Constructor Summary | |
|
ChildAndParentNode()
Constructor for serialization. |
protected |
ChildAndParentNode(DocumentImpl ownerDocument)
No public constructor; only subclasses of ParentNode should be instantiated, and those normally via a Document's factory methods |
Method Summary | |
org.w3c.dom.Node |
cloneNode(boolean deep)
Returns a duplicate of a given node. |
org.w3c.dom.NodeList |
getChildNodes()
Obtain a NodeList enumerating all children of this node. |
org.w3c.dom.Node |
getFirstChild()
The first child of this Node, or null if none. |
org.w3c.dom.Node |
getLastChild()
The last child of this Node, or null if none. |
int |
getLength()
NodeList method: Count the immediate children of this node |
org.w3c.dom.Document |
getOwnerDocument()
Find the Document that this Node belongs to (the document in whose context the Node was created). |
boolean |
hasChildNodes()
Test whether this node has any children. |
org.w3c.dom.Node |
insertBefore(org.w3c.dom.Node newChild,
org.w3c.dom.Node refChild)
Move one or more node(s) to our list of children. |
org.w3c.dom.Node |
item(int index)
NodeList method: Return the Nth immediate child of this node, or null if the index is out of bounds. |
void |
normalize()
Override default behavior to call normalize() on this Node's children. |
org.w3c.dom.Node |
removeChild(org.w3c.dom.Node oldChild)
Remove a child from this Node. |
org.w3c.dom.Node |
replaceChild(org.w3c.dom.Node newChild,
org.w3c.dom.Node oldChild)
Make newChild occupy the location that oldChild used to have. |
void |
setReadOnly(boolean readOnly,
boolean deep)
Override default behavior so that if deep is true, children are also toggled. |
protected void |
synchronizeChildren()
Override this method in subclass to hook in efficient internal data structure. |
protected void |
synchronizeChildren(int nodeIndex)
Synchronizes the node's children with the internal structure. |
Methods inherited from class weblogic.apache.xerces.dom.ChildNode |
getNextSibling,
getParentNode,
getPreviousSibling |
Methods inherited from class weblogic.apache.xerces.dom.NodeImpl |
addEventListener,
appendChild,
changed,
changes,
dispatchEvent,
getAttributes,
getLocalName,
getNamespaceURI,
getNodeName,
getNodeType,
getNodeValue,
getPrefix,
getReadOnly,
getUserData,
hasAttributes,
removeEventListener,
setNodeValue,
setPrefix,
setUserData,
supports,
synchronizeData,
toString |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected DocumentImpl ownerDocument
protected ChildNode firstChild
protected transient int nodeListLength
protected transient ChildNode nodeListNode
protected transient int nodeListIndex
Constructor Detail |
protected ChildAndParentNode(DocumentImpl ownerDocument)
public ChildAndParentNode()
Method Detail |
public org.w3c.dom.Node cloneNode(boolean deep)
Example: Cloning a Text node will copy both the node and the text it contains.
Example: Cloning something that has children -- Element or Attr, for example -- will _not_ clone those children unless a "deep clone" has been requested. A shallow clone of an Attr node will yield an empty Attr of the same name.
NOTE: Clones will always be read/write, even if the node being cloned is read-only, to permit applications using only the DOM API to obtain editable copies of locked portions of the tree.
public org.w3c.dom.Document getOwnerDocument()
public boolean hasChildNodes()
public org.w3c.dom.NodeList getChildNodes()
NodeLists are "live"; as children are added/removed the NodeList will immediately reflect those changes. Also, the NodeList refers to the actual nodes, so changes to those nodes made via the DOM tree will be reflected in the NodeList and vice versa.
In this implementation, Nodes implement the NodeList interface and provide their own getChildNodes() support. Other DOMs may solve this differently.
public org.w3c.dom.Node getFirstChild()
public org.w3c.dom.Node getLastChild()
public org.w3c.dom.Node insertBefore(org.w3c.dom.Node newChild, org.w3c.dom.Node refChild) throws org.w3c.dom.DOMException
newChild
- The Node to be moved to our subtree. As a
convenience feature, inserting a DocumentNode will instead insert
all its children.refChild
- Current child which newChild should be placed
immediately before. If refChild is null, the insertion occurs
after all existing Nodes, like appendChild().public org.w3c.dom.Node removeChild(org.w3c.dom.Node oldChild) throws org.w3c.dom.DOMException
public org.w3c.dom.Node replaceChild(org.w3c.dom.Node newChild, org.w3c.dom.Node oldChild) throws org.w3c.dom.DOMException
public int getLength()
public org.w3c.dom.Node item(int index)
Index
- intpublic void normalize()
public void setReadOnly(boolean readOnly, boolean deep)
Note: this will not change the state of an EntityReference or its children, which are always read-only.
protected void synchronizeChildren()
protected final void synchronizeChildren(int nodeIndex)
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs60 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |