|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.axiom.om.impl.llom.OMSerializableImpl
org.apache.axiom.om.impl.llom.OMDocumentImpl
public class OMDocumentImpl
Class OMDocumentImpl
Field Summary | |
---|---|
protected String |
charSetEncoding
Field charSetEncoding Default : UTF-8 |
protected OMElement |
documentElement
Field documentElement |
protected OMNode |
firstChild
Field firstChild |
protected String |
isStandalone
|
protected OMNode |
lastChild
Field lastChild |
protected String |
xmlVersion
Field xmlVersion |
Fields inherited from class org.apache.axiom.om.impl.llom.OMSerializableImpl |
---|
builder, done, factory |
Fields inherited from interface org.apache.axiom.om.OMDocument |
---|
XML_10, XML_11 |
Constructor Summary | |
---|---|
OMDocumentImpl(OMElement documentElement,
OMXMLParserWrapper parserWrapper,
OMFactory factory)
Create the OMDoucment with the factory and set the given OMElement
as the document element |
|
OMDocumentImpl(OMFactory factory)
Create a OMDocument given the OMFactory |
|
OMDocumentImpl(OMXMLParserWrapper parserWrapper,
OMFactory factory)
Create the OMDocument with the factory |
Method Summary | |
---|---|
void |
addChild(OMNode child)
Adds child to the element. |
void |
buildNext()
Forces the parser to proceed, if parser has not yet finished with the XML input. |
String |
getCharsetEncoding()
Returns the character set encoding scheme to be used. |
Iterator |
getChildren()
Returns a collection of this element. |
Iterator |
getChildrenWithLocalName(String localName)
Returns an iterator for child nodes matching the local name. |
Iterator |
getChildrenWithName(QName elementQName)
Searches for children with a given QName and returns an iterator to traverse through the OMNodes. |
Iterator |
getChildrenWithNamespaceURI(String uri)
Returns an iterator for child nodes matching the namespace uri. |
OMElement |
getFirstChildWithName(QName elementQName)
Method getFirstChildWithName. |
OMNode |
getFirstOMChild()
Method getFirstOMChild. |
OMNode |
getFirstOMChildIfAvailable()
Get the first child if it is available. |
OMElement |
getOMDocumentElement()
Method getDocumentElement. |
String |
getXMLVersion()
Returns the XML version. |
void |
internalSerialize(XMLStreamWriter writer)
Serializes the document with cache. |
void |
internalSerialize(XMLStreamWriter writer,
boolean cache)
Serializes the node. |
protected void |
internalSerialize(XMLStreamWriter writer,
boolean cache,
boolean includeXMLDeclaration)
|
void |
internalSerializeAndConsume(XMLStreamWriter writer)
Serializes the document with the XML declaration. |
String |
isStandalone()
XML standalone value. |
void |
setCharsetEncoding(String charEncoding)
Sets the character set encoding scheme. |
void |
setComplete(boolean state)
Method setComplete. |
void |
setFirstChild(OMNode firstChild)
Method setFirstChild. |
void |
setLastChild(OMNode omNode)
Forcefully set the last child |
void |
setOMDocumentElement(OMElement documentElement)
Method setDocumentElement. |
void |
setStandalone(String isStandalone)
|
void |
setXMLVersion(String xmlVersion)
Sets the XML version. |
Methods inherited from class org.apache.axiom.om.impl.llom.OMSerializableImpl |
---|
build, close, getOMFactory, isComplete, serialize, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.axiom.om.OMContainer |
---|
serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume |
Methods inherited from interface org.apache.axiom.om.OMSerializable |
---|
build, close, getOMFactory, isComplete, serialize, serialize, serializeAndConsume |
Methods inherited from interface org.apache.axiom.om.OMContainer |
---|
serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume |
Methods inherited from interface org.apache.axiom.om.OMSerializable |
---|
build, close, getOMFactory, isComplete, serialize, serialize, serializeAndConsume |
Field Detail |
---|
protected OMElement documentElement
protected OMNode firstChild
protected OMNode lastChild
protected String charSetEncoding
protected String xmlVersion
protected String isStandalone
Constructor Detail |
---|
public OMDocumentImpl(OMFactory factory)
OMDocument
given the OMFactory
factory
- The OMFactory
that created this instacepublic OMDocumentImpl(OMXMLParserWrapper parserWrapper, OMFactory factory)
OMDocument
with the factory
parserWrapper
- factory
- public OMDocumentImpl(OMElement documentElement, OMXMLParserWrapper parserWrapper, OMFactory factory)
OMDoucment
with the factory and set the given OMElement
as the document element
documentElement
- parserWrapper
- factory
- Method Detail |
---|
public OMElement getOMDocumentElement()
getOMDocumentElement
in interface OMDocument
public void setOMDocumentElement(OMElement documentElement)
setOMDocumentElement
in interface OMDocument
documentElement
- public void setComplete(boolean state)
setComplete
in interface OMContainerEx
setComplete
in class OMSerializableImpl
state
- public void buildNext()
buildNext
in interface OMContainer
public void addChild(OMNode child)
addChild
in interface OMContainer
child
- public Iterator getChildren()
getChildren
in interface OMContainer
OMContainer.getFirstChildWithName(javax.xml.namespace.QName)
,
OMContainer.getChildrenWithName(javax.xml.namespace.QName)
public Iterator getChildrenWithName(QName elementQName)
getChildrenWithName
in interface OMContainer
elementQName
-
OMException
public Iterator getChildrenWithLocalName(String localName)
OMContainer
getChildrenWithLocalName
in interface OMContainer
OMElement
items that match the given localNamepublic Iterator getChildrenWithNamespaceURI(String uri)
OMContainer
getChildrenWithNamespaceURI
in interface OMContainer
OMElement
items that match the given uripublic OMNode getFirstOMChild()
getFirstOMChild
in interface OMContainer
public OMNode getFirstOMChildIfAvailable()
OMContainerEx
OMSerializable.isComplete()
may return false
when called on the child.
In contrast to OMContainer.getFirstOMChild()
, this method will never modify
the state of the underlying parser.
getFirstOMChildIfAvailable
in interface OMContainerEx
null
if the container has no children or
the builder has not yet started to build the first childpublic OMElement getFirstChildWithName(QName elementQName) throws OMException
getFirstChildWithName
in interface OMContainer
elementQName
-
OMException
OMContainer.getChildrenWithName(javax.xml.namespace.QName)
public void setFirstChild(OMNode firstChild)
setFirstChild
in interface OMContainerEx
firstChild
- public void setLastChild(OMNode omNode)
setLastChild
in interface OMContainerEx
omNode
- public String getCharsetEncoding()
getCharsetEncoding
in interface OMDocument
public void setCharsetEncoding(String charEncoding)
setCharsetEncoding
in interface OMDocument
charEncoding
- public String isStandalone()
OMDocument
isStandalone
in interface OMDocument
public void setStandalone(String isStandalone)
setStandalone
in interface OMDocument
public String getXMLVersion()
OMDocument
getXMLVersion
in interface OMDocument
public void setXMLVersion(String xmlVersion)
OMDocument
setXMLVersion
in interface OMDocument
XML 1.0
,
XML 1.1
public void internalSerialize(XMLStreamWriter writer, boolean cache) throws XMLStreamException
OMSerializableImpl
internalSerialize
in class OMSerializableImpl
XMLStreamException
protected void internalSerialize(XMLStreamWriter writer, boolean cache, boolean includeXMLDeclaration) throws XMLStreamException
XMLStreamException
public void internalSerializeAndConsume(XMLStreamWriter writer) throws XMLStreamException
XMLStreamException
public void internalSerialize(XMLStreamWriter writer) throws XMLStreamException
XMLStreamException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |