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

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

public class SoapRefType
extends Type

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.Type
typeClass
 
Constructor Summary
SoapRefType(Type baseType)
           
 
Method Summary
 java.util.Set<Type> getDependencies()
          Return a set of Type dependencies.
 javax.xml.namespace.QName getSchemaType()
           
 java.lang.Class getTypeClass()
           
 TypeMapping getTypeMapping()
           
 boolean isAbstract()
           
 boolean isComplex()
           
 boolean isNillable()
           
 boolean isWriteOuter()
           
 java.lang.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(javax.xml.namespace.QName name)
           
 void setTypeClass(java.lang.Class typeClass)
           
 void setTypeMapping(TypeMapping typeMapping)
           
 void setWriteOuter(boolean writeOuter)
           
 void writeObject(java.lang.Object object, MessageWriter writer, Context context)
          Writes the object to the MessageWriter.
 void writeSchema(org.jdom.Element root)
          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.Type
addToSchemaElement, equals, getMaxOccurs, getMinOccurs, hashCode, hasMaxOccurs, hasMinOccurs, toString, usesUtilityTypes, usesXmime
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SoapRefType

public SoapRefType(Type baseType)
Method Detail

readObject

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

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

writeObject

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

Specified by:
writeObject in class Type
Throws:
DatabindingException

writeSchema

public void writeSchema(org.jdom.Element root)
Description copied from class: Type
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 Type
Parameters:
root - root of the XSD document.

getTypeMapping

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

setTypeMapping

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

getTypeClass

public java.lang.Class getTypeClass()
Overrides:
getTypeClass in class Type
Returns:
Returns the typeClass.

setTypeClass

public void setTypeClass(java.lang.Class typeClass)
Overrides:
setTypeClass in class Type
Parameters:
typeClass - The typeClass to set.

isComplex

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

isAbstract

public boolean isAbstract()
Overrides:
isAbstract in class Type

setAbstract

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

isNillable

public boolean isNillable()
Overrides:
isNillable in class Type

setNillable

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

getDependencies

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

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

getSchemaType

public javax.xml.namespace.QName getSchemaType()
Overrides:
getSchemaType in class Type
Returns:
Get the schema type.

setSchemaType

public void setSchemaType(javax.xml.namespace.QName name)
Overrides:
setSchemaType in class Type
Parameters:
name - The qName to set.

isWriteOuter

public boolean isWriteOuter()
Overrides:
isWriteOuter in class Type

setWriteOuter

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


Apache CXF