soaprmi.soap
Class SoapSerializeContextImpl

java.lang.Object
  extended bysoaprmi.soap.SoapSerializeContextImpl
All Implemented Interfaces:
SerializeContext, SoapSerializeContext

public class SoapSerializeContextImpl
extends java.lang.Object
implements SoapSerializeContext

Standard implementation serialization context.

Version:
$Revision: 1.15 $
Author:
Aleksander Slominski

Constructor Summary
SoapSerializeContextImpl(Soap factory_)
           
 
Method Summary
 java.lang.String addId(java.lang.Object value)
          Add object to id-table and return assigned id.
 java.lang.String addRef(Serializer typeSer, EncodingStyle typeEnc, java.lang.Object typeValue, java.lang.String name, java.lang.Class baseClass)
           
 void close()
           
 void done()
           
 void enterStruct()
           
 EncodingStyle getDefaultEncodingStyle()
           
 java.lang.String getId(java.lang.Object value)
          Return id for object or null if object has no id.
 XmlJavaMapping getMapping()
           
 SoapStyle getSoapStyle()
           
 java.io.Writer getWriter()
           
 void init()
           
 void leaveStruct()
           
 Serializer querySerializer(EncodingStyle enc, java.lang.Class klass)
           
 XmlJavaTypeMap queryTypeMap(java.lang.Class javaClass)
           
 void setDefaultEncodingStyle(EncodingStyle enc_)
           
 void setMapping(XmlJavaMapping mapping_)
           
 java.lang.String setObjectId(java.lang.Object value, java.lang.String id)
          Assign to object new id.
 void setSoapStyle(SoapStyle style_)
           
 void setWriter(java.io.Writer writer_)
           
 int structLevel()
           
 void writeEndTag(java.lang.String name)
           
 void writeFloat(float f)
           
 void writeFloat(float f, java.lang.String name)
           
 void writeInt(int i)
           
 void writeInt(int i, java.lang.String name)
           
 void writeNamespaces()
          Write namespaces that are required - should be called on top level element.
 void writeObject(java.lang.Object o)
           
 void writeObject(java.lang.Object o, java.lang.String name)
           
 void writeObject(java.lang.Object o, java.lang.String name, java.lang.Class baseType)
           
 void writeRef(java.lang.String name, java.lang.String href)
           
 java.lang.String writeStartStartTag(java.lang.String name, java.lang.String uri, java.lang.String localName, boolean forceXsiType, java.lang.String id)
           
 java.lang.String writeStartTag(java.lang.String name, java.lang.String uri, java.lang.String localName, boolean forceXsiType, java.lang.String id)
           
 void writeString(java.lang.String s)
           
 void writeString(java.lang.String s, java.lang.String name)
           
 void writeXmlns(java.lang.String prefix, java.lang.String uri)
           
 void writeXmlnsLevel(java.lang.String uri)
           
 void writeXmlnsXsd()
           
 void writeXmlnsXsi()
           
 void writeXsdType(java.lang.String localName)
           
 void writeXsiNull()
           
 void writeXsiNull(java.lang.String name)
           
 void writeXsiNull(java.lang.String name, java.lang.String uri, java.lang.String localName)
           
 void writeXsiType(java.lang.String uri, java.lang.String localName)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SoapSerializeContextImpl

public SoapSerializeContextImpl(Soap factory_)
Method Detail

getDefaultEncodingStyle

public EncodingStyle getDefaultEncodingStyle()
Specified by:
getDefaultEncodingStyle in interface SerializeContext

setDefaultEncodingStyle

public void setDefaultEncodingStyle(EncodingStyle enc_)
Specified by:
setDefaultEncodingStyle in interface SerializeContext

getMapping

public XmlJavaMapping getMapping()
Specified by:
getMapping in interface SerializeContext

setMapping

public void setMapping(XmlJavaMapping mapping_)
Specified by:
setMapping in interface SerializeContext

getWriter

public java.io.Writer getWriter()
Specified by:
getWriter in interface SerializeContext

setWriter

public void setWriter(java.io.Writer writer_)
               throws SerializeException
Specified by:
setWriter in interface SerializeContext
Throws:
SerializeException

getSoapStyle

public SoapStyle getSoapStyle()
Specified by:
getSoapStyle in interface SerializeContext

setSoapStyle

public void setSoapStyle(SoapStyle style_)
Specified by:
setSoapStyle in interface SerializeContext

writeObject

public void writeObject(java.lang.Object o,
                        java.lang.String name,
                        java.lang.Class baseType)
                 throws SerializeException,
                        java.io.IOException
Specified by:
writeObject in interface SerializeContext
Throws:
SerializeException
java.io.IOException

writeObject

public void writeObject(java.lang.Object o,
                        java.lang.String name)
                 throws SerializeException,
                        java.io.IOException
Specified by:
writeObject in interface SerializeContext
Throws:
SerializeException
java.io.IOException

writeObject

public void writeObject(java.lang.Object o)
                 throws SerializeException,
                        java.io.IOException
Specified by:
writeObject in interface SerializeContext
Throws:
SerializeException
java.io.IOException

writeFloat

public void writeFloat(float f,
                       java.lang.String name)
                throws SerializeException,
                       java.io.IOException
Specified by:
writeFloat in interface SerializeContext
Throws:
SerializeException
java.io.IOException

writeFloat

public void writeFloat(float f)
                throws SerializeException,
                       java.io.IOException
Specified by:
writeFloat in interface SerializeContext
Throws:
SerializeException
java.io.IOException

writeInt

public void writeInt(int i,
                     java.lang.String name)
              throws SerializeException,
                     java.io.IOException
Specified by:
writeInt in interface SerializeContext
Throws:
SerializeException
java.io.IOException

writeInt

public void writeInt(int i)
              throws SerializeException,
                     java.io.IOException
Specified by:
writeInt in interface SerializeContext
Throws:
SerializeException
java.io.IOException

writeString

public void writeString(java.lang.String s,
                        java.lang.String name)
                 throws SerializeException,
                        java.io.IOException
Specified by:
writeString in interface SerializeContext
Throws:
SerializeException
java.io.IOException

writeString

public void writeString(java.lang.String s)
                 throws SerializeException,
                        java.io.IOException
Specified by:
writeString in interface SerializeContext
Throws:
SerializeException
java.io.IOException

writeXsiNull

public void writeXsiNull(java.lang.String name,
                         java.lang.String uri,
                         java.lang.String localName)
                  throws SerializeException,
                         java.io.IOException
Specified by:
writeXsiNull in interface SerializeContext
Throws:
SerializeException
java.io.IOException

writeXsiNull

public void writeXsiNull(java.lang.String name)
                  throws SerializeException,
                         java.io.IOException
Specified by:
writeXsiNull in interface SerializeContext
Throws:
SerializeException
java.io.IOException

writeXsiNull

public void writeXsiNull()
                  throws java.io.IOException
Specified by:
writeXsiNull in interface SerializeContext
Throws:
java.io.IOException

writeXsiType

public void writeXsiType(java.lang.String uri,
                         java.lang.String localName)
                  throws java.io.IOException
Specified by:
writeXsiType in interface SerializeContext
Throws:
java.io.IOException

writeXsdType

public void writeXsdType(java.lang.String localName)
                  throws java.io.IOException
Specified by:
writeXsdType in interface SerializeContext
Throws:
java.io.IOException

writeNamespaces

public void writeNamespaces()
                     throws java.io.IOException
Write namespaces that are required - should be called on top level element. If was already called will not write anything.

Specified by:
writeNamespaces in interface SerializeContext
Throws:
java.io.IOException

writeXmlnsXsd

public void writeXmlnsXsd()
                   throws java.io.IOException
Throws:
java.io.IOException

writeXmlnsXsi

public void writeXmlnsXsi()
                   throws java.io.IOException
Throws:
java.io.IOException

writeXmlns

public void writeXmlns(java.lang.String prefix,
                       java.lang.String uri)
                throws java.io.IOException
Specified by:
writeXmlns in interface SerializeContext
Throws:
java.io.IOException

writeXmlnsLevel

public void writeXmlnsLevel(java.lang.String uri)
                     throws java.io.IOException
Specified by:
writeXmlnsLevel in interface SerializeContext
Throws:
java.io.IOException

writeRef

public void writeRef(java.lang.String name,
                     java.lang.String href)
              throws SerializeException,
                     java.io.IOException
Specified by:
writeRef in interface SerializeContext
Throws:
SerializeException
java.io.IOException

writeStartStartTag

public java.lang.String writeStartStartTag(java.lang.String name,
                                           java.lang.String uri,
                                           java.lang.String localName,
                                           boolean forceXsiType,
                                           java.lang.String id)
                                    throws SerializeException,
                                           java.io.IOException
Specified by:
writeStartStartTag in interface SerializeContext
Throws:
SerializeException
java.io.IOException

writeStartTag

public java.lang.String writeStartTag(java.lang.String name,
                                      java.lang.String uri,
                                      java.lang.String localName,
                                      boolean forceXsiType,
                                      java.lang.String id)
                               throws SerializeException,
                                      java.io.IOException
Specified by:
writeStartTag in interface SerializeContext
Throws:
SerializeException
java.io.IOException

writeEndTag

public void writeEndTag(java.lang.String name)
                 throws java.io.IOException
Specified by:
writeEndTag in interface SerializeContext
Throws:
java.io.IOException

init

public void init()

done

public void done()
          throws java.io.IOException,
                 SerializeException
Specified by:
done in interface SerializeContext
Throws:
java.io.IOException
SerializeException

close

public void close()
           throws SerializeException,
                  java.io.IOException
Specified by:
close in interface SerializeContext
Throws:
SerializeException
java.io.IOException

queryTypeMap

public XmlJavaTypeMap queryTypeMap(java.lang.Class javaClass)
                            throws SerializeException,
                                   XmlMapException
Specified by:
queryTypeMap in interface SerializeContext
Throws:
SerializeException
XmlMapException

querySerializer

public Serializer querySerializer(EncodingStyle enc,
                                  java.lang.Class klass)
                           throws SerializeException,
                                  java.io.IOException
Specified by:
querySerializer in interface SerializeContext
Throws:
SerializeException
java.io.IOException

enterStruct

public void enterStruct()
Specified by:
enterStruct in interface SerializeContext

leaveStruct

public void leaveStruct()
Specified by:
leaveStruct in interface SerializeContext

structLevel

public int structLevel()
Specified by:
structLevel in interface SerializeContext

addRef

public java.lang.String addRef(Serializer typeSer,
                               EncodingStyle typeEnc,
                               java.lang.Object typeValue,
                               java.lang.String name,
                               java.lang.Class baseClass)
Specified by:
addRef in interface SerializeContext

addId

public java.lang.String addId(java.lang.Object value)
Description copied from interface: SerializeContext
Add object to id-table and return assigned id. This function can be call multiple times and always returns the same id.

Specified by:
addId in interface SerializeContext
Parameters:
value - must be not null
Returns:
id assigned to object

getId

public java.lang.String getId(java.lang.Object value)
Description copied from interface: SerializeContext
Return id for object or null if object has no id.

Specified by:
getId in interface SerializeContext

setObjectId

public java.lang.String setObjectId(java.lang.Object value,
                                    java.lang.String id)
Description copied from interface: SerializeContext
Assign to object new id.

Specified by:
setObjectId in interface SerializeContext
Parameters:
value - must be not null
id - assigned to object
Returns:
previous id or null if object had no id previously


Copyright (c) 2004 IU Extreme! Lab http://www.extreme.indiana.edu/ All Rights Reserved.