public class Dom4JMapperBase extends DocumentModelMapperBase
Base implementation for custom marshaller/unmarshallers to dom4j representation. This provides the basic code used for both single element and content list handling.
Modifier and Type | Field and Description |
---|---|
protected int |
m_defaultNamespaceIndex
Current default namespace index.
|
protected java.lang.String |
m_defaultNamespaceURI
Current default namespace URI (
null if not determined). |
private static org.dom4j.DocumentFactory |
s_factory
dom4j component construction factory.
|
m_unmarshalContext, m_xmlWriter, XML_NAMESPACE, XMLNS_NAMESPACE
Constructor and Description |
---|
Dom4JMapperBase() |
Modifier and Type | Method and Description |
---|---|
private int |
findNamespaceIndex(org.dom4j.Namespace ns)
Get index number for declared namespace.
|
protected void |
marshalContent(java.util.List content)
Marshal content list.
|
protected void |
marshalElement(org.dom4j.Element element)
Marshal element with all attributes and content.
|
protected void |
unmarshalContent(java.util.List content)
Unmarshal element content.
|
protected org.dom4j.Element |
unmarshalElement()
Unmarshal element with all attributes and content.
|
accumulateText, getNamespaceUri, getNextNamespaceIndex, isWhitespace
private static org.dom4j.DocumentFactory s_factory
protected java.lang.String m_defaultNamespaceURI
null
if not determined).protected int m_defaultNamespaceIndex
private int findNamespaceIndex(org.dom4j.Namespace ns)
ns
- namespace of interest-1
if not declared or
maskedprotected void marshalContent(java.util.List content) throws JiBXException, java.io.IOException
content
- list of content items to marshalJiBXException
- on error in marshallingjava.io.IOException
- on error writing to outputprotected void marshalElement(org.dom4j.Element element) throws JiBXException, java.io.IOException
element
- element to be marshalledJiBXException
- on error in marshallingjava.io.IOException
- on error writing to outputprotected void unmarshalContent(java.util.List content) throws JiBXException, java.io.IOException
content
- list for unmarshalled contentJiBXException
- on error in unmarshallingjava.io.IOException
- on error reading inputprotected org.dom4j.Element unmarshalElement() throws JiBXException, java.io.IOException
JiBXException
- on error in unmarshallingjava.io.IOException
- on error reading input