org.jibx.extras
Class DocumentModelMapperBase

java.lang.Object
  extended byorg.jibx.extras.DocumentModelMapperBase
Direct Known Subclasses:
Dom4JMapperBase, DomMapperBase

public class DocumentModelMapperBase
extends java.lang.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
protected  UnmarshallingContext m_unmarshalContext
          Context being used for unmarshalling.
protected  IXMLWriter m_xmlWriter
          Writer for direct output as XML.
static java.lang.String XML_NAMESPACE
          Fixed XML namespace.
static java.lang.String XMLNS_NAMESPACE
          Fixed XML namespace namespace.
 
Constructor Summary
DocumentModelMapperBase()
           
 
Method Summary
protected  java.lang.String accumulateText()
          Accumulate text content.
protected  java.lang.String getNamespaceUri(int index)
          Get namespace URI for index.
protected  int getNextNamespaceIndex()
          Get next namespace index.
protected  boolean isWhitespace(char chr)
          Check if a character is a space character.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XML_NAMESPACE

public static final java.lang.String XML_NAMESPACE
Fixed XML namespace.

See Also:
Constant Field Values

XMLNS_NAMESPACE

public static final java.lang.String XMLNS_NAMESPACE
Fixed XML namespace namespace.

See Also:
Constant Field Values

m_xmlWriter

protected IXMLWriter m_xmlWriter
Writer for direct output as XML.


m_unmarshalContext

protected UnmarshallingContext m_unmarshalContext
Context being used for unmarshalling.

Constructor Detail

DocumentModelMapperBase

public DocumentModelMapperBase()
Method Detail

getNamespaceUri

protected java.lang.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 java.lang.String accumulateText()
                                   throws JiBXException
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


Project Web Site