org.codehaus.xfire.castor
Class CastorType

java.lang.Object
  extended by org.codehaus.xfire.aegis.type.Type
      extended by org.codehaus.xfire.castor.CastorType
All Implemented Interfaces:
SchemaType

public class CastorType
extends Type

XFire Type class for marshalling beans and demarshalling XML using Castor.

Author:
Adam Kramer, Paul Saxman

Constructor Summary
CastorType(java.lang.Class clazz, Mapping mapping)
          Constructor that sets the Castor mapping to use for de/marshalling and sets the schema type for the castor type.
 
Method Summary
 javax.xml.namespace.QName getSchemaType()
          The schema type that this SchemaType represents.
 void initType()
           
 boolean isComplex()
          Whether or not this a complex type.
 boolean isWriteOuter()
           
 java.lang.Object readObject(MessageReader reader, MessageContext context)
          Read in the XML fragment and create an object.
 void writeObject(java.lang.Object object, MessageWriter writer, MessageContext context)
          Writes the object to the MessageWriter.
 
Methods inherited from class org.codehaus.xfire.aegis.type.Type
equals, getDependencies, getTypeClass, getTypeMapping, hashCode, isAbstract, isNillable, setAbstract, setNillable, setSchemaType, setTypeClass, setTypeMapping, setWriteOuter, toString, writeSchema
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CastorType

public CastorType(java.lang.Class clazz,
                  Mapping mapping)
Constructor that sets the Castor mapping to use for de/marshalling and sets the schema type for the castor type.

Parameters:
class - The Class of the castor type.
mapping - The Castor mapping file used for de/marshalling which presently needs to be in the classpath.
Method Detail

getSchemaType

public javax.xml.namespace.QName getSchemaType()
Description copied from interface: SchemaType
The schema type that this SchemaType represents.

Specified by:
getSchemaType in interface SchemaType
Overrides:
getSchemaType in class Type
Returns:
Get the schema type.
See Also:
SchemaType.getSchemaType()

readObject

public java.lang.Object readObject(MessageReader reader,
                                   MessageContext context)
                            throws XFireFault
Description copied from class: Type
Read in the XML fragment and create an object.

Specified by:
readObject in class Type
Returns:
Throws:
XFireFault
See Also:
Type.readObject(org.codehaus.xfire.aegis.MessageReader, org.codehaus.xfire.MessageContext)

writeObject

public void writeObject(java.lang.Object object,
                        MessageWriter writer,
                        MessageContext context)
                 throws XFireFault
Description copied from class: Type
Writes the object to the MessageWriter.

Specified by:
writeObject in class Type
Throws:
XFireFault
See Also:
Type.writeObject(java.lang.Object, org.codehaus.xfire.aegis.MessageWriter, org.codehaus.xfire.MessageContext)

isComplex

public boolean isComplex()
Description copied from interface: SchemaType
Whether or not this a complex type. If true then the schema for this type is written out.

Specified by:
isComplex in interface SchemaType
Overrides:
isComplex in class Type
Returns:
True if a complex type schema must be written.

isWriteOuter

public boolean isWriteOuter()
Specified by:
isWriteOuter in interface SchemaType
Overrides:
isWriteOuter in class Type

initType

public void initType()


Copyright © 2004-2006 Envoi Solutions LLC. All Rights Reserved.