org.jbind.xml.core.bridge
Class MarshalVisitor

java.lang.Object
  extended byorg.jbind.xml.core.bridge.MarshalVisitor
All Implemented Interfaces:
IDataImplVisitor

public class MarshalVisitor
extends java.lang.Object
implements IDataImplVisitor


Constructor Summary
MarshalVisitor()
           
 
Method Summary
 void marshal(IImpl anImpl, java.io.Writer aWriter, java.util.Map aNamespaceToPrefixMapping, java.util.Map aTopLevelAttributes)
          Marshals a data implementation.
 void visitElementImplEnd(IElementImpl anImpl)
           
 void visitElementImplStart(IElementImpl anImpl)
           
 void visitTextImpl(ITextImpl anImpl)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarshalVisitor

public MarshalVisitor()
Method Detail

visitElementImplStart

public void visitElementImplStart(IElementImpl anImpl)
                           throws XmlException
Specified by:
visitElementImplStart in interface IDataImplVisitor
Throws:
XmlException

visitElementImplEnd

public void visitElementImplEnd(IElementImpl anImpl)
                         throws XmlException
Specified by:
visitElementImplEnd in interface IDataImplVisitor
Throws:
XmlException

visitTextImpl

public void visitTextImpl(ITextImpl anImpl)
                   throws XmlException
Specified by:
visitTextImpl in interface IDataImplVisitor
Throws:
XmlException

marshal

public void marshal(IImpl anImpl,
                    java.io.Writer aWriter,
                    java.util.Map aNamespaceToPrefixMapping,
                    java.util.Map aTopLevelAttributes)
             throws XmlException
Marshals a data implementation. The marshalling starts straight with the root element, i.e. any XML prolog must be written in advance.

Parameters:
anImpl - (required). The data implementation to marshal.
aWriter - (required).
aNamespaceToPrefixMapping - (optional). An initial mapping.
aTopLevelAttributes - (optional). Additional attributes that are added to the top level element. This can be used to add schema location attributes.
Throws:
XmlException