|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jibx.extras.DocumentModelMapperBase
org.jibx.extras.DomMapperBase
Base implementation for custom marshaller/unmarshallers to DOM representation. This provides the basic code used for both single element and content list handling.
Field Summary | |
protected int |
m_defaultNamespaceIndex
Current default namespace index. |
protected java.lang.String |
m_defaultNamespaceURI
Current default namespace URI ( null if not determined). |
protected org.w3c.dom.Document |
m_document
Actual document instance (required by DOM). |
Fields inherited from class org.jibx.extras.DocumentModelMapperBase |
m_unmarshalContext, m_xmlWriter, XML_NAMESPACE, XMLNS_NAMESPACE |
Constructor Summary | |
protected |
DomMapperBase()
Constructor. |
Method Summary | |
private int |
findNamespaceIndex(java.lang.String prefix,
java.lang.String uri)
Get index number for declared namespace. |
protected void |
marshalContent(org.w3c.dom.NodeList content)
Marshal node list. |
protected void |
marshalElement(org.w3c.dom.Element element)
Marshal element with all attributes and content. |
protected void |
marshalNode(org.w3c.dom.Node node)
Marshal node. |
protected void |
unmarshalContent(org.w3c.dom.Node parent)
Unmarshal node content. |
protected org.w3c.dom.Element |
unmarshalElement()
Unmarshal element with all attributes and content. |
protected org.w3c.dom.Node |
unmarshalNode()
Unmarshal single node. |
Methods inherited from class org.jibx.extras.DocumentModelMapperBase |
accumulateText, getNamespaceUri, getNextNamespaceIndex, isWhitespace |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected org.w3c.dom.Document m_document
protected java.lang.String m_defaultNamespaceURI
null
if not determined).
protected int m_defaultNamespaceIndex
Constructor Detail |
protected DomMapperBase() throws JiBXException
JiBXException
- on error creating documentMethod Detail |
private int findNamespaceIndex(java.lang.String prefix, java.lang.String uri)
prefix
- namespace prefix (null
if none)uri
- namespace URI (empty string if none)
-1
if not declared or
maskedprotected void marshalNode(org.w3c.dom.Node node) throws JiBXException, java.io.IOException
node
- node to be marshalled
JiBXException
- on error in marshalling
java.io.IOException
- on error writing to outputprotected void marshalContent(org.w3c.dom.NodeList content) throws JiBXException, java.io.IOException
content
- list of nodes to marshal
JiBXException
- on error in marshalling
java.io.IOException
- on error writing to outputprotected void marshalElement(org.w3c.dom.Element element) throws JiBXException, java.io.IOException
element
- element to be marshalled
JiBXException
- on error in marshalling
java.io.IOException
- on error writing to outputprotected org.w3c.dom.Node unmarshalNode() throws JiBXException, java.io.IOException
JiBXException
- on error in unmarshalling
java.io.IOException
- on error reading inputprotected void unmarshalContent(org.w3c.dom.Node parent) throws JiBXException, java.io.IOException
parent
- node to which children are to be added
JiBXException
- on error in unmarshalling
java.io.IOException
- on error reading inputprotected org.w3c.dom.Element unmarshalElement() throws JiBXException, java.io.IOException
JiBXException
- on error in unmarshalling
java.io.IOException
- on error reading input
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |