Package org.jibx.extras
Class DocumentModelMapperBase
java.lang.Object
org.jibx.extras.DocumentModelMapperBase
- Direct Known Subclasses:
Dom4JMapperBase
,DomMapperBase
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
FieldsModifier and TypeFieldDescriptionprotected UnmarshallingContext
Context being used for unmarshalling.protected IXMLWriter
Writer for direct output as XML.static final String
Fixed XML namespace.static final String
Fixed XML namespace namespace. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
Accumulate text content.protected String
getNamespaceUri
(int index) Get namespace URI for index.protected int
Get next namespace index.protected boolean
isWhitespace
(char chr) Check if a character is a space character.
-
Field Details
-
XML_NAMESPACE
Fixed XML namespace.- See Also:
-
XMLNS_NAMESPACE
Fixed XML namespace namespace.- See Also:
-
m_xmlWriter
Writer for direct output as XML. -
m_unmarshalContext
Context being used for unmarshalling.
-
-
Constructor Details
-
DocumentModelMapperBase
public DocumentModelMapperBase()
-
-
Method Details
-
getNamespaceUri
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
Accumulate text content. This consolidates consecutive text and entities to a single string.- Returns:
- consolidated text string
- Throws:
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:
true
if whitespace,false
if not
-