org.apache.axis.encoding
Class SerializationContext

java.lang.Object
  |
  +--org.apache.axis.encoding.SerializationContext

public class SerializationContext
extends java.lang.Object

Manage a serialization, including keeping track of namespace mappings and element stacks. WARNING : HIGHLY PRELIMINARY!!!

Author:
Glen Daniels (gdaniels@macromedia.com)

Field Summary
 NSStack nsStack
           
 
Constructor Summary
SerializationContext(java.io.Writer writer, MessageContext msgContext)
           
 
Method Summary
 void endElement()
           
 void endPrefix(java.lang.String prefix)
           
 java.lang.String getPrefixForURI(java.lang.String uri)
           
 QName getQNameForClass(java.lang.Class cls)
           
 ServiceDescription getServiceDescription()
           
 TypeMappingRegistry getTypeMappingRegistry()
           
 boolean isPrimitive(java.lang.Object value)
          Classes which are known to not require multi-ref.
 void outputMultiRefs()
           
 java.lang.String qName2String(QName qName)
           
 void registerPrefixForURI(java.lang.String prefix, java.lang.String uri)
           
 void serialize(QName qName, org.xml.sax.Attributes attributes, java.lang.Object value)
           
 void startElement(QName qName, org.xml.sax.Attributes attributes)
           
 void writeChars(char[] p1, int p2, int p3)
           
 void writeDOMElement(org.w3c.dom.Element el)
          Output a DOM representation to a SerializationContext
 void writeSafeString(java.lang.String string)
           
 void writeString(java.lang.String string)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nsStack

public NSStack nsStack
Constructor Detail

SerializationContext

public SerializationContext(java.io.Writer writer,
                            MessageContext msgContext)
Method Detail

getServiceDescription

public ServiceDescription getServiceDescription()

getTypeMappingRegistry

public TypeMappingRegistry getTypeMappingRegistry()

getPrefixForURI

public java.lang.String getPrefixForURI(java.lang.String uri)

registerPrefixForURI

public void registerPrefixForURI(java.lang.String prefix,
                                 java.lang.String uri)

endPrefix

public void endPrefix(java.lang.String prefix)

qName2String

public java.lang.String qName2String(QName qName)

getQNameForClass

public QName getQNameForClass(java.lang.Class cls)

isPrimitive

public boolean isPrimitive(java.lang.Object value)
Classes which are known to not require multi-ref. As multi-ref requires additional parsing overhead and not all implementations support this, only use this function when there is a possibility of circular references.

serialize

public void serialize(QName qName,
                      org.xml.sax.Attributes attributes,
                      java.lang.Object value)
               throws java.io.IOException

outputMultiRefs

public void outputMultiRefs()
                     throws java.io.IOException

startElement

public void startElement(QName qName,
                         org.xml.sax.Attributes attributes)
                  throws java.io.IOException

endElement

public void endElement()
                throws java.io.IOException

writeChars

public void writeChars(char[] p1,
                       int p2,
                       int p3)
                throws java.io.IOException

writeString

public void writeString(java.lang.String string)
                 throws java.io.IOException

writeSafeString

public void writeSafeString(java.lang.String string)
                     throws java.io.IOException

writeDOMElement

public void writeDOMElement(org.w3c.dom.Element el)
                     throws java.io.IOException
Output a DOM representation to a SerializationContext


Copyright © 2001 Apache XML Project. All Rights Reserved.