Packageorg.orpheus.xml.bind.helpers
Classpublic class TypeMarshaller

Handles marshalling/unmarshalling of simple types.

A substantial portion of this code is borrowed from mx.rpc.xml.SchemaMarshaller.

Author: Andrew Lewisohn
Version: $Revision: 30 $, $Date: 2009-02-12 16:43:08 -0500 (Thu, 12 Feb 2009) $, $Author: alewisohn $
Since: 0.1



Public Methods
 MethodDefined by
  
Constructor.
TypeMarshaller
  
marshal(value:*, type:String = null):*
This function converts an ActionScript value to a String for XML simple content based on a built-in XML Schema type.
TypeMarshaller
  
marshalBoolean(value:*, type:String = null):String
The boolean schema type allows the string values 'true' or '1' for true values and 'false' or '0' for false values.
TypeMarshaller
  
marshalByteArray(value:*, type:String = null):String
TypeMarshaller
  
marshalDate(value:*, type:String = null):String
TypeMarshaller
  
marshalInt(value:*, type:String = null):String
TypeMarshaller
  
marshalNumber(value:*, type:String = null):String
TypeMarshaller
  
marshalString(value:*, type:String = null):String
TypeMarshaller
  
marshalUint(value:*, type:String = null):String
TypeMarshaller
  
unmarshal(value:*, type:String = null):Object
TypeMarshaller
  
unmarshalBoolean(value:*):Boolean
TypeMarshaller
  
unmarshalByteArray(value:*):ByteArray
TypeMarshaller
  
unmarshalDate(value:*):Date
TypeMarshaller
  
unmarshalInt(value:*):int
TypeMarshaller
  
unmarshalNumber(value:*):Number
TypeMarshaller
  
unmarshalString(value:*):String
TypeMarshaller
  
unmarshalUint(value:*):uint
TypeMarshaller
Constructor detail
TypeMarshaller()constructor
public function TypeMarshaller(constants:MarshallerConstants, datatypes:MarshallerDatatypes)

Constructor.

Parameters
constants:MarshallerConstants
 
datatypes:MarshallerDatatypes
Method detail
marshal()method
public function marshal(value:*, type:String = null):*

This function converts an ActionScript value to a String for XML simple content based on a built-in XML Schema type. If a type is not provided, the anyType is assumed.

Parameters
value:*
 
type:String (default = null)

Returns
*
marshalBoolean()method 
public function marshalBoolean(value:*, type:String = null):String

The boolean schema type allows the string values 'true' or '1' for true values and 'false' or '0' for false values. This marshaller, by default, represents values using 'true' or false. If a String value of '1' or '0' is passed, however, it is preserved.

Parameters
value:*
 
type:String (default = null)

Returns
String
marshalByteArray()method 
public function marshalByteArray(value:*, type:String = null):StringParameters
value:*
 
type:String (default = null)

Returns
String
marshalDate()method 
public function marshalDate(value:*, type:String = null):StringParameters
value:*
 
type:String (default = null)

Returns
String
marshalInt()method 
public function marshalInt(value:*, type:String = null):StringParameters
value:*
 
type:String (default = null)

Returns
String
marshalNumber()method 
public function marshalNumber(value:*, type:String = null):StringParameters
value:*
 
type:String (default = null)

Returns
String
marshalString()method 
public function marshalString(value:*, type:String = null):StringParameters
value:*
 
type:String (default = null)

Returns
String
marshalUint()method 
public function marshalUint(value:*, type:String = null):StringParameters
value:*
 
type:String (default = null)

Returns
String
unmarshal()method 
public function unmarshal(value:*, type:String = null):ObjectParameters
value:*
 
type:String (default = null)

Returns
Object
unmarshalBoolean()method 
public function unmarshalBoolean(value:*):BooleanParameters
value:*

Returns
Boolean
unmarshalByteArray()method 
public function unmarshalByteArray(value:*):ByteArrayParameters
value:*

Returns
ByteArray
unmarshalDate()method 
public function unmarshalDate(value:*):DateParameters
value:*

Returns
Date
unmarshalInt()method 
public function unmarshalInt(value:*):intParameters
value:*

Returns
int
unmarshalNumber()method 
public function unmarshalNumber(value:*):NumberParameters
value:*

Returns
Number
unmarshalString()method 
public function unmarshalString(value:*):StringParameters
value:*

Returns
String
unmarshalUint()method 
public function unmarshalUint(value:*):uintParameters
value:*

Returns
uint