public class DocumentFragmentImpl extends RootNode implements org.w3c.dom.DocumentFragment, IContainer
| Modifier and Type | Field and Description |
|---|---|
private ParentNode |
ownerNode |
firstChild, lastChildfactory, FIRSTCHILD, flags, HAS_PARENT, SPECIFIEDATTRIBUTE_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_NODECOMPLETE, 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.
|
org.w3c.dom.Node |
getNextSibling() |
java.lang.String |
getNodeName() |
short |
getNodeType() |
int |
getState() |
(package private) ParentNode |
internalGetOwnerNode()
Get the parent or the owner document of the node.
|
void |
internalSerialize(javax.xml.stream.XMLStreamWriter writer,
boolean cache) |
(package private) void |
internalSetOwnerNode(ParentNode ownerNode) |
boolean |
isComplete()
Indicates whether parser has parsed this information item completely or not.
|
java.lang.String |
lookupNamespaceURI(java.lang.String specifiedPrefix) |
void |
removeChildren()
Remove all children from this container.
|
void |
serialize(javax.xml.stream.XMLStreamWriter xmlWriter)
Serializes the information item with caching.
|
void |
serializeAndConsume(javax.xml.stream.XMLStreamWriter xmlWriter)
Serializes the information item without caching.
|
void |
setComplete(boolean state) |
(package private) ParentNode |
shallowClone(OMCloneOptions options,
ParentNode targetParent,
boolean namespaceRepairing) |
internalGetNextSibling, internalGetPreviousSibling, internalSetNextSibling, internalSetPreviousSiblingaddChild, addChild, appendChild, clone, getChildNodes, getChildren, getChildrenWithLocalName, getChildrenWithName, getChildrenWithNamespaceURI, getDescendants, getFirstChild, getFirstChildWithName, getFirstOMChild, getFirstOMChildIfAvailable, getLastChild, getLastKnownOMChild, getLength, getSAXSource, getTextContent, getTextContent, getXMLStreamReader, getXMLStreamReader, getXMLStreamReader, getXMLStreamReaderWithoutCaching, hasChildNodes, insertBefore, internalAppendChild, item, normalize, notifyChildComplete, removeChild, replaceChild, setFirstChild, setLastChild, setTextContentbuildWithAttachments, checkSameOwnerDocument, clone, cloneNode, close, compareDocumentPosition, detach, detach, getAttributes, getBaseURI, getFeature, getLocalName, getNamespaceURI, getNextOMSiblingIfAvailable, getNodeValue, getOMFactory, getOwnerDocument, getParent, getParentNode, getPrefix, getPreviousOMSibling, getPreviousSibling, getUserData, hasAttributes, hasParent, hasParent, insertSiblingAfter, insertSiblingBefore, internalSerialize, internalSerializeAndConsume, isDefaultNamespace, isEqualNode, isFirstChild, isFirstChild, isSameNode, isSpecified, isSpecified, isSupported, lookupPrefix, normalize, ownerDocument, parentNode, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, setNextOMSibling, setNodeValue, setOwnerDocument, setParent, setParent, setPrefix, setPreviousOMSibling, setUserDataclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitappendChild, 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, setUserDatagetLastKnownOMChild, setFirstChild, setLastChildaddChildaddChild, getChildren, getChildrenWithLocalName, getChildrenWithName, getChildrenWithNamespaceURI, getDescendants, getFirstChildWithName, getFirstOMChild, getSAXSource, getXMLStreamReader, getXMLStreamReader, getXMLStreamReader, getXMLStreamReaderWithoutCaching, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsumeclose, serializeclone, getOMFactorygetFirstOMChildIfAvailableprivate ParentNode ownerNode
public DocumentFragmentImpl(OMFactory factory)
ownerDocument - final ParentNode internalGetOwnerNode()
NodeImplNodeImpl.HAS_PARENT flag.internalGetOwnerNode in class NodeImplfinal void internalSetOwnerNode(ParentNode ownerNode)
internalSetOwnerNode in class NodeImplpublic short getNodeType()
getNodeType in interface org.w3c.dom.Nodepublic java.lang.String getNodeName()
getNodeName in interface org.w3c.dom.Nodepublic void internalSerialize(javax.xml.stream.XMLStreamWriter writer,
boolean cache)
throws javax.xml.stream.XMLStreamException
internalSerialize in class NodeImpljavax.xml.stream.XMLStreamExceptionpublic void serialize(javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException
OMSerializableOMSerializable.serialize(XMLStreamWriter, boolean) with cache set to
true.serialize in interface OMSerializableserialize in class NodeImpljavax.xml.stream.XMLStreamExceptionpublic void serializeAndConsume(javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException
OMSerializableOMSerializable.serialize(XMLStreamWriter, boolean) with cache set to
false.serializeAndConsume in interface OMSerializableserializeAndConsume in class NodeImpljavax.xml.stream.XMLStreamExceptionParentNode shallowClone(OMCloneOptions options, ParentNode targetParent, boolean namespaceRepairing)
shallowClone in class ParentNodepublic final OMXMLParserWrapper getBuilder()
OMContainergetBuilder in interface IParentNodegetBuilder in interface OMContainergetBuilder in class NodeImplpublic final int getState()
getState in interface IParentNodepublic final boolean isComplete()
OMSerializableisComplete in interface IParentNodeisComplete in interface OMSerializableisComplete in class NodeImplpublic final void setComplete(boolean state)
setComplete in interface OMContainerExsetComplete in class NodeImplpublic final void discarded()
discarded in interface OMContainerExpublic final void build()
OMSerializablebuild in interface OMSerializablebuild in class NodeImplpublic final org.w3c.dom.Node getNextSibling()
getNextSibling in interface org.w3c.dom.Nodepublic 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 OMContainerpublic final java.lang.String lookupNamespaceURI(java.lang.String specifiedPrefix)
lookupNamespaceURI in interface org.w3c.dom.Node