| Modifier and Type | Field and Description |
|---|---|
OMXMLParserWrapper |
builder
Field builder
|
protected boolean |
done
Field done
|
protected OMFactory |
factory
Factory that created this node
|
protected static short |
FIRSTCHILD |
protected short |
flags |
protected static short |
NORMALIZED |
protected static short |
OWNED |
protected DocumentImpl |
ownerNode |
protected static short |
READONLY |
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_NODEDTD_NODE, PI_NODE, SPACE_NODE| Modifier | Constructor and Description |
|---|---|
protected |
NodeImpl(DocumentImpl ownerDocument,
OMFactory factory) |
protected |
NodeImpl(OMFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
Node |
appendChild(Node newChild) |
void |
build()
Builds next element.
|
void |
buildWithAttachments()
Parses this node and builds the object structure in memory.
|
Node |
cloneNode(boolean deep) |
void |
close(boolean build)
If a builder and parser is associated with the node, it is closed.
|
short |
compareDocumentPosition(Node other) |
OMNode |
detach()
Removes a node (and all of its children) from its containing parent.
|
NamedNodeMap |
getAttributes()
Returns the collection of attributes associated with this node, or null if none.
|
String |
getBaseURI() |
NodeList |
getChildNodes() |
Object |
getFeature(String arg0,
String arg1) |
Node |
getFirstChild()
Gets the first child of this Node, or null if none.
|
Node |
getLastChild()
Gets the last child of this Node, or null if none.
|
int |
getLength()
NodeList method: Returns the number of immediate children of this node.
|
String |
getLocalName() |
String |
getNamespaceURI() |
OMNode |
getNextOMSibling()
Default behavior returns null, overriden in ChildNode.
|
OMNode |
getNextOMSiblingIfAvailable()
Get the next sibling if it is available.
|
Node |
getNextSibling()
Returns the next child of this node's parent, or null if none.
|
String |
getNodeValue() |
OMFactory |
getOMFactory()
Returns the
OMFactory that created this node |
Document |
getOwnerDocument()
Finds the document that this Node belongs to (the document in whose context the Node was
created).
|
OMContainer |
getParent()
Returns the parent containing node.
|
Node |
getParentNode() |
String |
getPrefix() |
OMNode |
getPreviousOMSibling()
Default behavior returns null, overriden in ChildNode.
|
Node |
getPreviousSibling()
Returns the previous child of this node's parent, or null if none.
|
String |
getTextContent() |
Object |
getUserData(String key) |
boolean |
hasAttributes() |
boolean |
hasChildNodes() |
Node |
insertBefore(Node newChild,
Node refChild) |
void |
insertSiblingAfter(OMNode sibling)
Inserts a new sibling after the current node.
|
void |
insertSiblingBefore(OMNode sibling)
Inserts a sibling just before the current node.
|
void |
internalSerialize(XMLStreamWriter writer) |
void |
internalSerializeAndConsume(XMLStreamWriter writer) |
boolean |
isComplete()
Indicates whether parser has parsed this information item completely or not.
|
boolean |
isDefaultNamespace(String arg0) |
boolean |
isEqualNode(Node node)
Tests whether two nodes are equal.
|
boolean |
isSameNode(Node node) |
boolean |
isSupported(String feature,
String version) |
Node |
item(int index)
NodeList method: Returns the Nth immediate child of this node, or null if the index is out of
bounds.
|
String |
lookupNamespaceURI(String arg0) |
String |
lookupPrefix(String arg0) |
void |
normalize() |
Node |
removeChild(Node oldChild) |
Node |
replaceChild(Node newChild,
Node oldChild) |
void |
serialize(OutputStream output) |
void |
serialize(OutputStream output,
OMOutputFormat format) |
void |
serialize(Writer writer) |
void |
serialize(Writer writer2,
OMOutputFormat format) |
void |
serialize(XMLStreamWriter xmlWriter)
Serializes the information item with caching.
|
void |
serialize(XMLStreamWriter xmlWriter,
boolean cache)
Serializes the information item.
|
void |
serializeAndConsume(OutputStream output) |
void |
serializeAndConsume(OutputStream output,
OMOutputFormat format) |
void |
serializeAndConsume(Writer writer) |
void |
serializeAndConsume(Writer writer2,
OMOutputFormat format) |
void |
serializeAndConsume(XMLStreamWriter xmlWriter)
Serializes the information item without caching.
|
void |
setComplete(boolean state) |
void |
setNextOMSibling(OMNode previousSibling) |
void |
setNodeValue(String arg0) |
protected void |
setOwnerDocument(DocumentImpl document)
Sets the owner document.
|
void |
setPrefix(String prefix) |
void |
setPreviousOMSibling(OMNode previousSibling) |
void |
setTextContent(String textContent) |
Object |
setUserData(String key,
Object value,
UserDataHandler userDataHandler) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNodeName, getNodeTypeinternalSerialize, setParent, setTypepublic OMXMLParserWrapper builder
protected boolean done
protected DocumentImpl ownerNode
protected final OMFactory factory
protected short flags
protected static final short OWNED
protected static final short FIRSTCHILD
protected static final short READONLY
protected static final short SPECIFIED
protected static final short NORMALIZED
protected NodeImpl(DocumentImpl ownerDocument, OMFactory factory)
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 arg0) throws DOMException
setNodeValue in interface NodeDOMExceptionpublic void setPrefix(String prefix) throws DOMException
setPrefix in interface NodeDOMExceptionpublic Document getOwnerDocument()
getOwnerDocument in interface Nodepublic NamedNodeMap getAttributes()
getAttributes in interface NodeElementImplpublic Node getFirstChild()
getFirstChild in interface NodeParentNodepublic Node getLastChild()
getLastChild in interface NodeParentNodepublic Node getNextSibling()
getNextSibling in interface Nodepublic Node getParentNode()
getParentNode in interface Nodepublic Node getPreviousSibling()
getPreviousSibling in interface Nodepublic NodeList getChildNodes()
getChildNodes in interface Nodepublic boolean isSupported(String feature, String version)
isSupported in interface Nodepublic Node appendChild(Node newChild) throws DOMException
appendChild in interface NodeDOMExceptionpublic Node removeChild(Node oldChild) throws DOMException
removeChild in interface NodeDOMExceptionpublic Node insertBefore(Node newChild, Node refChild) throws DOMException
insertBefore in interface NodeDOMExceptionpublic Node replaceChild(Node newChild, Node oldChild) throws DOMException
replaceChild in interface NodeDOMExceptionpublic int getLength()
getLength in interface NodeListParentNodepublic Node item(int index)
item in interface NodeListindex - ParentNodepublic OMContainer getParent() throws OMException
OMNodeOMDocument or OMElement.getParent in interface OMNodeOMContainer of the node.OMExceptionpublic boolean isComplete()
OMSerializableisComplete in interface OMSerializablepublic void setComplete(boolean state)
setComplete in interface OMNodeExpublic void insertSiblingAfter(OMNode sibling) throws OMException
OMNodeinsertSiblingAfter in interface OMNodesibling - The node that will be added after the current node.OMException - if the current node has no parentpublic void insertSiblingBefore(OMNode sibling) throws OMException
OMNodeinsertSiblingBefore in interface OMNodesibling - The node that will be added before the current node.OMException - if the current node has no parentpublic OMNode getPreviousOMSibling()
getPreviousOMSibling in interface OMNodepublic OMNode getNextOMSibling()
getNextOMSibling in interface OMNodepublic OMNode getNextOMSiblingIfAvailable()
OMNodeExOMSerializable.isComplete() may return false when called on the sibling.
In contrast to OMNode.getNextOMSibling(), this method will never modify
the state of the underlying parser.getNextOMSiblingIfAvailable in interface OMNodeExnull if the node has no next sibling or
the builder has not yet started to build the next siblingpublic void setPreviousOMSibling(OMNode previousSibling)
setPreviousOMSibling in interface OMNodeExpublic void setNextOMSibling(OMNode previousSibling)
setNextOMSibling in interface OMNodeExpublic void build()
build in interface OMSerializablepublic void buildWithAttachments()
buildWithAttachments in interface OMNodepublic void close(boolean build)
OMSerializableclose in interface OMSerializablebuild - if true, the object is built first before closing the builder/parserprotected void setOwnerDocument(DocumentImpl document)
document - public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException
OMSerializableOMSerializable.serialize(XMLStreamWriter, boolean) with cache set to
true.serialize in interface OMSerializableXMLStreamExceptionpublic void serializeAndConsume(XMLStreamWriter xmlWriter) throws XMLStreamException
OMSerializableOMSerializable.serialize(XMLStreamWriter, boolean) with cache set to
false.serializeAndConsume in interface OMSerializableXMLStreamExceptionpublic void serialize(XMLStreamWriter xmlWriter, boolean cache) throws XMLStreamException
OMSerializableserialize in interface OMSerializablecache - indicates if caching should be enabledXMLStreamExceptionpublic OMNode detach()
OMNodepublic 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 arg0)
lookupPrefix in interface Nodepublic boolean isDefaultNamespace(String arg0)
isDefaultNamespace in interface Nodepublic String lookupNamespaceURI(String arg0)
lookupNamespaceURI 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 arg0, String arg1)
getFeature in interface Nodepublic Object setUserData(String key, Object value, UserDataHandler userDataHandler)
setUserData in interface Nodepublic Object getUserData(String key)
getUserData in interface Nodepublic void serialize(OutputStream output) throws XMLStreamException
serialize in interface OMNodeXMLStreamExceptionpublic void serialize(Writer writer) throws XMLStreamException
serialize in interface OMNodeXMLStreamExceptionpublic void serializeAndConsume(OutputStream output) throws XMLStreamException
serializeAndConsume in interface OMNodeXMLStreamExceptionpublic void serializeAndConsume(Writer writer) throws XMLStreamException
serializeAndConsume in interface OMNodeXMLStreamExceptionpublic void serialize(OutputStream output, OMOutputFormat format) throws XMLStreamException
serialize in interface OMNodeXMLStreamExceptionpublic void serialize(Writer writer2, OMOutputFormat format) throws XMLStreamException
serialize in interface OMNodeXMLStreamExceptionpublic void serializeAndConsume(OutputStream output, OMOutputFormat format) throws XMLStreamException
serializeAndConsume in interface OMNodeXMLStreamExceptionpublic void serializeAndConsume(Writer writer2, OMOutputFormat format) throws XMLStreamException
serializeAndConsume in interface OMNodeXMLStreamExceptionpublic OMFactory getOMFactory()
OMFactory that created this nodegetOMFactory in interface OMSerializablepublic void internalSerialize(XMLStreamWriter writer) throws XMLStreamException
internalSerialize in interface OMNodeExXMLStreamExceptionpublic void internalSerializeAndConsume(XMLStreamWriter writer) throws XMLStreamException
internalSerializeAndConsume in interface OMNodeExXMLStreamExceptionCopyright © 2004–2016 The Apache Software Foundation. All rights reserved.