public abstract class NodeImpl extends Object implements Node
| Modifier and Type | Field and Description |
|---|---|
protected OMFactory |
factory
Factory that created this node
|
protected static short |
FIRSTCHILD |
protected short |
flags |
protected static short |
HAS_PARENT
Used by
ChildNode to determine the meaning of the ownerNode attribute. |
protected static short |
SPECIFIED |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE| Modifier | Constructor and Description |
|---|---|
protected |
NodeImpl(OMFactory factory) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitappendChild, getChildNodes, getNextSibling, getNodeName, getNodeType, insertBefore, lookupNamespaceURI, removeChild, replaceChildprotected OMFactory factory
protected short flags
protected static final short HAS_PARENT
ChildNode to determine the meaning of the ownerNode attribute.
If the flag is set, then the attribute contains the reference to the parent node. If the flag
is not set, then the node has no parent and the attribute stores a reference to the owner
document (which may be null if the owner document has not been created yet).protected static final short FIRSTCHILD
protected static final short SPECIFIED
protected NodeImpl(OMFactory factory)
public boolean hasAttributes()
hasAttributes in interface Nodepublic boolean hasChildNodes()
hasChildNodes in interface Nodepublic String getLocalName()
getLocalName in interface Nodepublic String getNamespaceURI()
getNamespaceURI in interface Nodepublic String getNodeValue() throws DOMException
getNodeValue in interface NodeDOMExceptionpublic void setNodeValue(String nodeValue) throws DOMException
setNodeValue in interface NodeDOMExceptionpublic void setPrefix(String prefix) throws DOMException
setPrefix in interface NodeDOMExceptionpublic NamedNodeMap getAttributes()
getAttributes in interface NodeElementImplpublic Node getFirstChild()
getFirstChild in interface NodeParentNodepublic Node getLastChild()
getLastChild in interface NodeParentNodepublic boolean isSupported(String feature, String version)
isSupported in interface Nodepublic String getBaseURI()
getBaseURI in interface Nodepublic short compareDocumentPosition(Node other) throws DOMException
compareDocumentPosition in interface NodeDOMExceptionpublic String getTextContent() throws DOMException
getTextContent in interface NodeDOMExceptionpublic void setTextContent(String textContent) throws DOMException
setTextContent in interface NodeDOMExceptionpublic boolean isSameNode(Node node)
isSameNode in interface Nodepublic String lookupPrefix(String namespaceURI)
lookupPrefix in interface Nodepublic boolean isDefaultNamespace(String namespaceURI)
isDefaultNamespace in interface Nodepublic boolean isEqualNode(Node node)
Node.isSameNode(). All nodes that are the same will also be equal, though the
reverse may not be true. nodeName, localName,
namespaceURI, prefix, nodeValue . This is: they are
both null, or they have the same length and are character for character
identical. attributes NamedNodeMaps are equal. This
is: they are both null, or they have the same length and for each node that
exists in one map there is a node that exists in the other map and is equal, although not
necessarily at the same index. childNodes NodeLists
are equal. This is: they are both null, or they have the same length and contain
equal nodes at the same index. Note that normalization can affect equality; to avoid this,
nodes should be normalized before being compared. DocumentType nodes to be equal, the following conditions must also be satisfied:
publicId,
systemId, internalSubset. entities
NamedNodeMaps are equal. notations
NamedNodeMaps are equal. ownerDocument, baseURI, and
parentNode attributes, the specified attribute for
Attr nodes, the schemaTypeInfo attribute for Attr and
Element nodes, the Text.isElementContentWhitespace attribute for
Text nodes, as well as any user data or event listeners registered on the nodes.
Note: As a general rule, anything not mentioned in the description above is not significant in consideration of equality checking. Note that future versions of this specification may take into account more attributes and implementations conform to this specification are expected to be updated accordingly.
isEqualNode in interface Nodenode - The node to compare equality with.true if the nodes are equal, false otherwise.public Object getFeature(String feature, String version)
getFeature in interface Nodepublic Object setUserData(String key, Object value, UserDataHandler userDataHandler)
setUserData in interface Nodepublic Object getUserData(String key)
getUserData in interface Nodepublic OMFactory getOMFactory()
OMFactory that created this nodepublic Document getOwnerDocument()
getOwnerDocument in interface Nodepublic final OMNode getNextOMSiblingIfAvailable()
public final OMNode getPreviousOMSibling()
public final Node getPreviousSibling()
getPreviousSibling in interface Nodepublic final void setNextOMSibling(OMNode node)
public final void setPreviousOMSibling(OMNode node)
public final OMContainer getParent() throws OMException
OMExceptionpublic Node getParentNode()
getParentNode in interface Nodepublic final void setParent(OMContainer element)
protected void setParent(ParentNode parent, boolean useDomSemantics)
public OMNode detach() throws OMException
OMExceptionpublic void insertSiblingAfter(OMNode sibling) throws OMException
OMExceptionpublic void insertSiblingBefore(OMNode sibling) throws OMException
OMExceptionpublic abstract OMXMLParserWrapper getBuilder()
public abstract void setComplete(boolean state)
public abstract boolean isComplete()
public void buildWithAttachments()
public void close(boolean build)
public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException
XMLStreamExceptionpublic void serializeAndConsume(XMLStreamWriter xmlWriter) throws XMLStreamException
XMLStreamExceptionpublic void serialize(XMLStreamWriter xmlWriter, boolean cache) throws XMLStreamException
XMLStreamExceptionpublic void serialize(OutputStream output) throws XMLStreamException
XMLStreamExceptionpublic void serialize(Writer writer) throws XMLStreamException
XMLStreamExceptionpublic void serializeAndConsume(OutputStream output) throws XMLStreamException
XMLStreamExceptionpublic void serializeAndConsume(Writer writer) throws XMLStreamException
XMLStreamExceptionpublic void serialize(OutputStream output, OMOutputFormat format) throws XMLStreamException
XMLStreamExceptionpublic void serialize(Writer writer2, OMOutputFormat format) throws XMLStreamException
XMLStreamExceptionpublic void serializeAndConsume(OutputStream output, OMOutputFormat format) throws XMLStreamException
XMLStreamExceptionpublic void serializeAndConsume(Writer writer2, OMOutputFormat format) throws XMLStreamException
XMLStreamExceptionpublic void internalSerialize(XMLStreamWriter writer) throws XMLStreamException
XMLStreamExceptionpublic void internalSerializeAndConsume(XMLStreamWriter writer) throws XMLStreamException
XMLStreamExceptionpublic abstract void internalSerialize(XMLStreamWriter writer, boolean cache) throws XMLStreamException
XMLStreamExceptionpublic final OMInformationItem clone(OMCloneOptions options)
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.