Class SoapRefType
- java.lang.Object
-
- org.apache.cxf.aegis.type.AegisType
-
- 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.
-
-
Constructor Summary
Constructors Constructor Description SoapRefType(AegisType baseType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<AegisType>getDependencies()Return a set of AegisType dependencies.QNamegetSchemaType()Class<?>getTypeClass()TypeMappinggetTypeMapping()booleanisAbstract()booleanisComplex()booleanisNillable()booleanisWriteOuter()Defaults to true.ObjectreadObject(MessageReader reader, Context context)Read in the XML fragment and create an object.voidsetAbstract(boolean ab)voidsetNillable(boolean nillable)voidsetSchemaType(QName name)voidsetTypeClass(Class<?> typeClass)voidsetTypeMapping(TypeMapping typeMapping)voidsetWriteOuter(boolean writeOuter)voidwriteObject(Object object, MessageWriter writer, Context context)Writes the object to the MessageWriter.voidwriteSchema(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
-
-
-
-
Constructor Detail
-
SoapRefType
public SoapRefType(AegisType baseType)
-
-
Method Detail
-
readObject
public Object readObject(MessageReader reader, Context context) throws DatabindingException
Description copied from class:AegisTypeRead in the XML fragment and create an object.- Specified by:
readObjectin classAegisType- Returns:
- Throws:
DatabindingException
-
writeObject
public void writeObject(Object object, MessageWriter writer, Context context) throws DatabindingException
Description copied from class:AegisTypeWrites the object to the MessageWriter.- Specified by:
writeObjectin classAegisType- Throws:
DatabindingException
-
writeSchema
public void writeSchema(org.apache.ws.commons.schema.XmlSchema schema)
Description copied from class:AegisTypeIf this type should correspond to a global, named, schema type, here is where the type object adds it to the schema.- Overrides:
writeSchemain classAegisType- Parameters:
schema- root of the XSD document.
-
getTypeMapping
public TypeMapping getTypeMapping()
- Overrides:
getTypeMappingin classAegisType- Returns:
- Returns the typeMapping.
-
setTypeMapping
public void setTypeMapping(TypeMapping typeMapping)
- Overrides:
setTypeMappingin classAegisType- Parameters:
typeMapping- The typeMapping to set.
-
getTypeClass
public Class<?> getTypeClass()
- Overrides:
getTypeClassin classAegisType- 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()
-
isAbstract
public boolean isAbstract()
- Overrides:
isAbstractin classAegisType
-
setAbstract
public void setAbstract(boolean ab)
- Overrides:
setAbstractin classAegisType
-
isNillable
public boolean isNillable()
- Overrides:
isNillablein classAegisType
-
setNillable
public void setNillable(boolean nillable)
- Overrides:
setNillablein classAegisType
-
getDependencies
public Set<AegisType> getDependencies()
Description copied from class:AegisTypeReturn a set of AegisType dependencies. Returns null if this type has no dependencies.- Overrides:
getDependenciesin classAegisType- Returns:
- Set of
AegisTypedependencies
-
getSchemaType
public QName getSchemaType()
- Overrides:
getSchemaTypein classAegisType- Returns:
- Get the schema type.
-
setSchemaType
public void setSchemaType(QName name)
- Overrides:
setSchemaTypein classAegisType- Parameters:
name- The qName to set.
-
isWriteOuter
public boolean isWriteOuter()
Description copied from class:AegisTypeDefaults to true. False for types that disappear entirely when null, even when nillable.- Overrides:
isWriteOuterin classAegisType- Returns:
- whether to write xsi:nil for null values.
-
setWriteOuter
public void setWriteOuter(boolean writeOuter)
- Overrides:
setWriteOuterin classAegisType
-
-