public class DocumentFragmentImpl extends RootNode implements DocumentFragment, IContainer
firstChild, lastChild
factory, FIRSTCHILD, flags, HAS_PARENT, 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
COMPLETE, DISCARDED, INCOMPLETE
Constructor and Description |
---|
DocumentFragmentImpl(OMFactory factory) |
Modifier and Type | Method and Description |
---|---|
void |
build()
Builds itself.
|
void |
discarded() |
OMXMLParserWrapper |
getBuilder()
Returns the builder object.
|
Node |
getNextSibling() |
String |
getNodeName() |
short |
getNodeType() |
int |
getState() |
void |
internalSerialize(XMLStreamWriter writer,
boolean cache) |
boolean |
isComplete()
Indicates whether parser has parsed this information item completely or not.
|
String |
lookupNamespaceURI(String specifiedPrefix) |
void |
removeChildren()
Remove all children from this container.
|
void |
serialize(XMLStreamWriter xmlWriter)
Serializes the information item with caching.
|
void |
serializeAndConsume(XMLStreamWriter xmlWriter)
Serializes the information item without caching.
|
void |
setComplete(boolean state) |
addChild, addChild, appendChild, getChildNodes, getChildren, getChildrenWithLocalName, getChildrenWithName, getChildrenWithNamespaceURI, getDescendants, getFirstChild, getFirstChildWithName, getFirstOMChild, getFirstOMChildIfAvailable, getLastChild, getLastKnownOMChild, getLength, getSAXSource, getTextContent, getXMLStreamReader, getXMLStreamReader, getXMLStreamReader, getXMLStreamReaderWithoutCaching, hasChildNodes, insertBefore, item, removeChild, replaceChild, setFirstChild, setLastChild, setTextContent
buildWithAttachments, clone, cloneNode, close, compareDocumentPosition, detach, getAttributes, getBaseURI, getFeature, getLocalName, getNamespaceURI, getNextOMSiblingIfAvailable, getNodeValue, getOMFactory, getOwnerDocument, getParent, getParentNode, getPrefix, getPreviousOMSibling, getPreviousSibling, getUserData, hasAttributes, insertSiblingAfter, insertSiblingBefore, internalSerialize, internalSerializeAndConsume, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupPrefix, normalize, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, setNextOMSibling, setNodeValue, setParent, setParent, setPrefix, setPreviousOMSibling, setUserData
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
getLastKnownOMChild, setFirstChild, setLastChild
addChild
addChild, getChildren, getChildrenWithLocalName, getChildrenWithName, getChildrenWithNamespaceURI, getDescendants, getFirstChildWithName, getFirstOMChild, getSAXSource, getXMLStreamReader, getXMLStreamReader, getXMLStreamReader, getXMLStreamReaderWithoutCaching, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume
close, serialize
clone, getOMFactory
getFirstOMChildIfAvailable
public DocumentFragmentImpl(OMFactory factory)
ownerDocument
- public short getNodeType()
getNodeType
in interface Node
public String getNodeName()
getNodeName
in interface Node
public void internalSerialize(XMLStreamWriter writer, boolean cache) throws XMLStreamException
internalSerialize
in class NodeImpl
XMLStreamException
public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException
OMSerializable
OMSerializable.serialize(XMLStreamWriter, boolean)
with cache
set to
true
.serialize
in interface OMSerializable
serialize
in class NodeImpl
XMLStreamException
public void serializeAndConsume(XMLStreamWriter xmlWriter) throws XMLStreamException
OMSerializable
OMSerializable.serialize(XMLStreamWriter, boolean)
with cache
set to
false
.serializeAndConsume
in interface OMSerializable
serializeAndConsume
in class NodeImpl
XMLStreamException
public final OMXMLParserWrapper getBuilder()
OMContainer
getBuilder
in interface IParentNode
getBuilder
in interface OMContainer
getBuilder
in class NodeImpl
public final int getState()
getState
in interface IParentNode
public final boolean isComplete()
OMSerializable
isComplete
in interface IParentNode
isComplete
in interface OMSerializable
isComplete
in class NodeImpl
public final void setComplete(boolean state)
setComplete
in interface OMContainerEx
setComplete
in class NodeImpl
public final void discarded()
discarded
in interface OMContainerEx
public final void build()
OMSerializable
build
in interface OMSerializable
public final Node getNextSibling()
getNextSibling
in interface Node
public void removeChildren()
OMContainer
for (Iterator it = container.getChildren(); it.hasNext(); ) { it.next(); it.remove(); }However, the implementation may do this in an optimized way. In particular, if the node is incomplete, it may choose not to instantiate child node that would become unreachable anyway.
removeChildren
in interface OMContainer
public final String lookupNamespaceURI(String specifiedPrefix)
lookupNamespaceURI
in interface Node
Copyright © 2004–2022 The Apache Software Foundation. All rights reserved.