|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OMNode
Defines the base interface used by most of the XML object model within Axis.
This tree model for XML captures the idea of deferring the construction of child nodes until they are needed. TheisComplete
function identifies whether or not a particular node has
been fully parsed. A node may not be fully parsed, for example, if all of the children of an
element have not yet been parsed.
In comparison to DOM, in this model, you will not find document fragments, or entities. In
addition, while OMDocument
and OMAttribute
exist, neither is an extension of
OMNode
.
Field Summary | |
---|---|
static short |
CDATA_SECTION_NODE
The node is a CDATASection . |
static short |
COMMENT_NODE
The node is a Comment . |
static short |
DTD_NODE
This node is a DTD . |
static short |
ELEMENT_NODE
The node is an Element . |
static short |
ENTITY_REFERENCE_NODE
This node is an Entity Reference . |
static short |
PI_NODE
This node is a ProcessingInstruction . |
static short |
SPACE_NODE
This node is an Entity Reference . |
static short |
TEXT_NODE
The node is a Text node. |
Method Summary | |
---|---|
void |
build()
Builds itself. |
void |
buildWithAttachments()
Builds itself with the OMText binary content. |
void |
close(boolean build)
If a builder and parser is associated with the node, it is closed. |
OMNode |
detach()
Removes a node (and all of its children) from its containing parent. |
void |
discard()
Discards a node. |
OMNode |
getNextOMSibling()
Returns the next sibling in document order. |
OMFactory |
getOMFactory()
Returns the OMFactory that created this object |
OMContainer |
getParent()
Returns the parent containing node. |
OMNode |
getPreviousOMSibling()
Gets the previous sibling. |
int |
getType()
Returns the type of node. |
void |
insertSiblingAfter(OMNode sibling)
Inserts a new sibling after the current node. |
void |
insertSiblingBefore(OMNode sibling)
Inserts a sibling just before the current node. |
boolean |
isComplete()
Indicates whether parser has parsed this information item completely or not. |
void |
serialize(OutputStream output)
Serializes the node with caching. |
void |
serialize(OutputStream output,
OMOutputFormat format)
Serializes the node with caching. |
void |
serialize(Writer writer)
Serializes the node with caching. |
void |
serialize(Writer writer,
OMOutputFormat format)
Serializes the node with caching. |
void |
serialize(javax.xml.stream.XMLStreamWriter xmlWriter)
Serializes the node with caching. |
void |
serializeAndConsume(OutputStream output)
Serializes the node without caching. |
void |
serializeAndConsume(OutputStream output,
OMOutputFormat format)
Serializes the node without caching. |
void |
serializeAndConsume(Writer writer)
Serializes the node without caching. |
void |
serializeAndConsume(Writer writer,
OMOutputFormat format)
Serializes the node without caching. |
void |
serializeAndConsume(javax.xml.stream.XMLStreamWriter xmlWriter)
Serializes the node without caching. |
Field Detail |
---|
static final short ELEMENT_NODE
Element
.
getType()
,
Constant Field Valuesstatic final short TEXT_NODE
Text
node.
getType()
,
Constant Field Valuesstatic final short CDATA_SECTION_NODE
CDATASection
.
getType()
,
Constant Field Valuesstatic final short COMMENT_NODE
Comment
.
getType()
,
Constant Field Valuesstatic final short DTD_NODE
DTD
.
getType()
,
Constant Field Valuesstatic final short PI_NODE
ProcessingInstruction
.
getType()
,
Constant Field Valuesstatic final short ENTITY_REFERENCE_NODE
Entity Reference
.
getType()
,
Constant Field Valuesstatic final short SPACE_NODE
Entity Reference
.
getType()
,
Constant Field ValuesMethod Detail |
---|
OMContainer getParent()
OMDocument
or OMElement
.
OMContainer
of the node.OMNode getNextOMSibling() throws OMException
OMException
boolean isComplete()
OMNode detach() throws OMException
OMException
- If a node is not complete, the detach can trigger further parsing, which may
cause an exception.void discard() throws OMException
OMException
void insertSiblingAfter(OMNode sibling) throws OMException
sibling
- The node that will be added after the current node.
OMException
void insertSiblingBefore(OMNode sibling) throws OMException
sibling
- The node that will be added before the current node.
OMException
int getType()
ELEMENT_NODE
, TEXT_NODE
, CDATA_SECTION_NODE
,
COMMENT_NODE
, DTD_NODE
, PI_NODE
, ENTITY_REFERENCE_NODE
, SPACE_NODE
, or TEXT_NODE
.OMNode getPreviousOMSibling()
void serialize(javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException
xmlWriter
-
javax.xml.stream.XMLStreamException
void serialize(OutputStream output) throws javax.xml.stream.XMLStreamException
output
-
javax.xml.stream.XMLStreamException
void serialize(Writer writer) throws javax.xml.stream.XMLStreamException
writer
-
javax.xml.stream.XMLStreamException
void serialize(OutputStream output, OMOutputFormat format) throws javax.xml.stream.XMLStreamException
output
- format
-
javax.xml.stream.XMLStreamException
void serialize(Writer writer, OMOutputFormat format) throws javax.xml.stream.XMLStreamException
writer
- format
-
javax.xml.stream.XMLStreamException
void serializeAndConsume(javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException
xmlWriter
-
javax.xml.stream.XMLStreamException
void serializeAndConsume(OutputStream output) throws javax.xml.stream.XMLStreamException
output
-
javax.xml.stream.XMLStreamException
void serializeAndConsume(Writer writer) throws javax.xml.stream.XMLStreamException
writer
-
javax.xml.stream.XMLStreamException
void serializeAndConsume(OutputStream output, OMOutputFormat format) throws javax.xml.stream.XMLStreamException
output
- format
-
javax.xml.stream.XMLStreamException
void serializeAndConsume(Writer writer, OMOutputFormat format) throws javax.xml.stream.XMLStreamException
writer
- format
-
javax.xml.stream.XMLStreamException
void build()
void buildWithAttachments()
void close(boolean build)
build
- if true, the object is built first before closing the builder/parserOMFactory getOMFactory()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |