public class DocumentFragmentImpl extends RootNode implements DocumentFragment, IContainer
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.
|
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, setTextContentbuildWithAttachments, 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, 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, getOMFactorygetFirstOMChildIfAvailablepublic DocumentFragmentImpl(OMFactory factory)
ownerDocument - public short getNodeType()
getNodeType in interface Nodepublic String getNodeName()
getNodeName in interface Nodepublic void internalSerialize(XMLStreamWriter writer, boolean cache) throws XMLStreamException
internalSerialize in class NodeImplXMLStreamExceptionpublic void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException
OMSerializableOMSerializable.serialize(XMLStreamWriter, boolean) with cache set to
true.serialize in interface OMSerializableserialize in class NodeImplXMLStreamExceptionpublic void serializeAndConsume(XMLStreamWriter xmlWriter) throws XMLStreamException
OMSerializableOMSerializable.serialize(XMLStreamWriter, boolean) with cache set to
false.serializeAndConsume in interface OMSerializableserializeAndConsume in class NodeImplXMLStreamExceptionpublic 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 OMSerializablepublic final Node getNextSibling()
getNextSibling in interface 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 String lookupNamespaceURI(String specifiedPrefix)
lookupNamespaceURI in interface NodeCopyright © 2004–2024 The Apache Software Foundation. All rights reserved.