Package org.jibx.extras
Class DocumentModelMapperBase
- java.lang.Object
-
- org.jibx.extras.DocumentModelMapperBase
-
- Direct Known Subclasses:
Dom4JMapperBase,DomMapperBase
public class DocumentModelMapperBase extends Object
Base implementation for custom marshaller/unmarshallers to any document model representation. This class just provides a few basic operations that are used by the representation-specific subclasses.
- Version:
- 1.0
- Author:
- Dennis M. Sosnoski
-
-
Field Summary
Fields Modifier and Type Field Description protected org.jibx.runtime.impl.UnmarshallingContextm_unmarshalContextContext being used for unmarshalling.protected org.jibx.runtime.IXMLWriterm_xmlWriterWriter for direct output as XML.static StringXML_NAMESPACEFixed XML namespace.static StringXMLNS_NAMESPACEFixed XML namespace namespace.
-
Constructor Summary
Constructors Constructor Description DocumentModelMapperBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringaccumulateText()Accumulate text content.protected StringgetNamespaceUri(int index)Get namespace URI for index.protected intgetNextNamespaceIndex()Get next namespace index.protected booleanisWhitespace(char chr)Check if a character is a space character.
-
-
-
Field Detail
-
XML_NAMESPACE
public static final String XML_NAMESPACE
Fixed XML namespace.- See Also:
- Constant Field Values
-
XMLNS_NAMESPACE
public static final String XMLNS_NAMESPACE
Fixed XML namespace namespace.- See Also:
- Constant Field Values
-
m_xmlWriter
protected org.jibx.runtime.IXMLWriter m_xmlWriter
Writer for direct output as XML.
-
m_unmarshalContext
protected org.jibx.runtime.impl.UnmarshallingContext m_unmarshalContext
Context being used for unmarshalling.
-
-
Method Detail
-
getNamespaceUri
protected String getNamespaceUri(int index)
Get namespace URI for index.- Parameters:
index- namespace index to look up- Returns:
- uri namespace URI at index position
-
getNextNamespaceIndex
protected int getNextNamespaceIndex()
Get next namespace index.- Returns:
- next namespace index
-
accumulateText
protected String accumulateText() throws org.jibx.runtime.JiBXException
Accumulate text content. This consolidates consecutive text and entities to a single string.- Returns:
- consolidated text string
- Throws:
org.jibx.runtime.JiBXException- on error in unmarshalling
-
isWhitespace
protected boolean isWhitespace(char chr)
Check if a character is a space character.- Parameters:
chr- character to be checked- Returns:
trueif whitespace,falseif not
-
-