org.apache.cxf.aegis.type.basic
Class ObjectType
java.lang.Object
org.apache.cxf.aegis.type.Type
org.apache.cxf.aegis.type.basic.ObjectType
public class ObjectType
- extends Type
Type for runtime inspection of types. Looks as the class to be written, and
looks to see if there is a type for that class. If there is, it writes out
the value and inserts a xsi:type attribute to signal what the type
of the value is. Can specify an optional set of dependent Type's
in the constructor, in the case that the type is a custom type that may not
have its schema in the WSDL. Can specify whether or not unknown objects
should be serialized as a byte stream.
| Fields inherited from class org.apache.cxf.aegis.type.Type |
typeClass |
| Methods inherited from class org.apache.cxf.aegis.type.Type |
addToSchemaElement, equals, getMaxOccurs, getMinOccurs, getSchemaType, getTypeClass, getTypeMapping, hashCode, hasMaxOccurs, hasMinOccurs, setAbstract, setSchemaType, setTypeClass, setTypeMapping, setWriteOuter, toString, usesUtilityTypes, usesXmime |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
ObjectType
public ObjectType()
ObjectType
public ObjectType(java.util.Set<Type> dependencies)
ObjectType
public ObjectType(boolean serializeWhenUnknown)
ObjectType
public ObjectType(java.util.Set<Type> dependencies,
boolean serializeWhenUnknown)
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
determineType
public Type determineType(Context context,
java.lang.Class clazz)
isReadToDocument
public boolean isReadToDocument()
setReadToDocument
public void setReadToDocument(boolean readToDocument)
isSerializedWhenUnknown
public boolean isSerializedWhenUnknown()
setSerializedWhenUnknown
public void setSerializedWhenUnknown(boolean serializedWhenUnknown)
setDependencies
public void setDependencies(java.util.Set<Type> dependencies)
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
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
isNillable
public boolean isNillable()
- Overrides:
isNillable in class Type
isWriteOuter
public boolean isWriteOuter()
- Overrides:
isWriteOuter in class Type
setNillable
public void setNillable(boolean nillable)
- Overrides:
setNillable in class Type
writeSchema
public void writeSchema(org.apache.ws.commons.schema.XmlSchema 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.
Apache CXF