org.apache.cxf.aegis.type.encoded
Class SoapRefType

java.lang.Object
  extended by org.apache.cxf.aegis.type.AegisType
      extended by org.apache.cxf.aegis.type.encoded.SoapRefType

public class SoapRefType
extends AegisType

SoapRefType reads and writes SoapRef objects.

When reading, this class checks for a SOAP ref attribute, and if present creates SoapRef and registers it with the SoapRefRegistry. If the SOAP ref attribute is not present, this class delegates to the baseType specified in the constructor. Regardless of the element containing SOAP ref or not, a SoapRef object is returned. In the case of an inline object the SoapRef will contain a null value.

When writing, the class always writes an element containing a SOAP ref attribute. The actual object instance is registered with the MarshalRegistry, and is written at the end of the message body by the TrailingBlocks class.


Field Summary
 
Fields inherited from class org.apache.cxf.aegis.type.AegisType
typeClass
 
Constructor Summary
SoapRefType(AegisType baseType)
           
 
Method Summary
 Set<AegisType> getDependencies()
          Return a set of AegisType dependencies.
 QName getSchemaType()
           
 Class getTypeClass()
           
 TypeMapping getTypeMapping()
           
 boolean isAbstract()
           
 boolean isComplex()
           
 boolean isNillable()
           
 boolean isWriteOuter()
          Defaults to true.
 Object readObject(MessageReader reader, Context context)
          Read in the XML fragment and create an object.
 void setAbstract(boolean ab)
           
 void setNillable(boolean nillable)
           
 void setSchemaType(QName name)
           
 void setTypeClass(Class typeClass)
           
 void setTypeMapping(TypeMapping typeMapping)
           
 void setWriteOuter(boolean writeOuter)
           
 void writeObject(Object object, MessageWriter writer, Context context)
          Writes the object to the MessageWriter.
 void writeSchema(org.apache.ws.commons.schema.XmlSchema schema)
          If this type should correspond to a global, named, schema type, here is where the type object adds it to the schema.
 
Methods inherited from class org.apache.cxf.aegis.type.AegisType
addToSchemaElement, equals, getMaxOccurs, getMinOccurs, getType, hashCode, hasMaxOccurs, hasMinOccurs, isFlatArray, setFlatArray, setTypeClass, toString, usesUtilityTypes, usesXmime
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SoapRefType

public SoapRefType(AegisType baseType)
Method Detail

readObject

public Object readObject(MessageReader reader,
                         Context context)
                  throws DatabindingException
Description copied from class: AegisType
Read in the XML fragment and create an object.

Specified by:
readObject in class AegisType
Returns:
Throws:
DatabindingException

writeObject

public void writeObject(Object object,
                        MessageWriter writer,
                        Context context)
                 throws DatabindingException
Description copied from class: AegisType
Writes the object to the MessageWriter.

Specified by:
writeObject in class AegisType
Throws:
DatabindingException

writeSchema

public void writeSchema(org.apache.ws.commons.schema.XmlSchema schema)
Description copied from class: AegisType
If this type should correspond to a global, named, schema type, here is where the type object adds it to the schema.

Overrides:
writeSchema in class AegisType
Parameters:
schema - root of the XSD document.

getTypeMapping

public TypeMapping getTypeMapping()
Overrides:
getTypeMapping in class AegisType
Returns:
Returns the typeMapping.

setTypeMapping

public void setTypeMapping(TypeMapping typeMapping)
Overrides:
setTypeMapping in class AegisType
Parameters:
typeMapping - The typeMapping to set.

getTypeClass

public Class getTypeClass()
Overrides:
getTypeClass in class AegisType
Returns:
Returns the java type as a Class. For a generic, return the raw type. For something truly exotic, return null.

setTypeClass

public void setTypeClass(Class typeClass)

isComplex

public boolean isComplex()
Overrides:
isComplex in class AegisType
Returns:
True if a complex type schema must be written.

isAbstract

public boolean isAbstract()
Overrides:
isAbstract in class AegisType

setAbstract

public void setAbstract(boolean ab)
Overrides:
setAbstract in class AegisType

isNillable

public boolean isNillable()
Overrides:
isNillable in class AegisType

setNillable

public void setNillable(boolean nillable)
Overrides:
setNillable in class AegisType

getDependencies

public Set<AegisType> getDependencies()
Description copied from class: AegisType
Return a set of AegisType dependencies. Returns null if this type has no dependencies.

Overrides:
getDependencies in class AegisType
Returns:
Set of AegisType dependencies

getSchemaType

public QName getSchemaType()
Overrides:
getSchemaType in class AegisType
Returns:
Get the schema type.

setSchemaType

public void setSchemaType(QName name)
Overrides:
setSchemaType in class AegisType
Parameters:
name - The qName to set.

isWriteOuter

public boolean isWriteOuter()
Description copied from class: AegisType
Defaults to true. False for types that disappear entirely when null, even when nillable.

Overrides:
isWriteOuter in class AegisType
Returns:
whether to write xsi:nil for null values.

setWriteOuter

public void setWriteOuter(boolean writeOuter)
Overrides:
setWriteOuter in class AegisType


Apache CXF