Package org.apache.cxf.aegis.type.basic
Class ArrayType
java.lang.Object
org.apache.cxf.aegis.type.AegisType
org.apache.cxf.aegis.type.basic.ArrayType
- Direct Known Subclasses:
CollectionType
An ArrayType.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Collection<Object>Get theAegisTypeof the elements in the array.Return a set of AegisType dependencies.longlongbooleanbooleanbooleanWe need to write a complex type schema for Beans, so return true.booleanisFlat()protected ObjectmakeArray(Class<?> arrayType, Collection<Object> values) protected Collection<Object>readCollection(MessageReader reader, QName flatElementName, Context context) Read the elements of an array or array-like item.readObject(MessageReader reader, QName flatElementName, Context context, boolean asArray) readObject(MessageReader reader, Context context) Read in the XML fragment and create an object.voidsetComponentName(QName componentName) voidsetFlat(boolean flat) voidsetMaxOccurs(long maxOccurs) voidsetMinOccurs(long minOccurs) voidwriteObject(Object values, MessageWriter writer, Context context) Writes the object to the MessageWriter.voidwriteObject(Object values, MessageWriter writer, Context context, QName flatElementName) Write an array type, using the desired element name in the flattened case.voidwriteSchema(org.apache.ws.commons.schema.XmlSchema root) If this type should correspond to a global, named, schema type, here is where the type object adds it to the schema.protected voidwriteValue(Object value, MessageWriter writer, Context context, AegisType type, String name, String ns) Methods inherited from class org.apache.cxf.aegis.type.AegisType
addToSchemaElement, equals, getSchemaType, getType, getTypeClass, getTypeMapping, hashCode, isAbstract, isFlatArray, isNillable, isWriteOuter, setAbstract, setFlatArray, setNillable, setSchemaType, setTypeClass, setTypeMapping, setWriteOuter, toString, usesUtilityTypes, usesXmime
-
Constructor Details
-
ArrayType
public ArrayType()
-
-
Method Details
-
readObject
public Object readObject(MessageReader reader, QName flatElementName, Context context, boolean asArray) throws DatabindingException - Throws:
DatabindingException
-
readObject
Description copied from class:AegisTypeRead in the XML fragment and create an object.- Specified by:
readObjectin classAegisType- Returns:
- Throws:
DatabindingException
-
createCollection
-
readCollection
protected Collection<Object> readCollection(MessageReader reader, QName flatElementName, Context context) throws DatabindingException Read the elements of an array or array-like item.- Parameters:
reader- reader to read from.flatElementName- if flat, the elements we are looking for. When we see something else. we stop.context- context.- Returns:
- a collection of the objects.
- Throws:
DatabindingException
-
makeArray
-
writeObject
public void writeObject(Object values, MessageWriter writer, Context context) throws DatabindingException Description copied from class:AegisTypeWrites the object to the MessageWriter.- Specified by:
writeObjectin classAegisType- Throws:
DatabindingException
-
writeObject
public void writeObject(Object values, MessageWriter writer, Context context, QName flatElementName) throws DatabindingException Write an array type, using the desired element name in the flattened case.- Parameters:
values- values to write.writer- writer to sent it to.context- the aegis context.flatElementName- name to use for the element if flat.- Throws:
DatabindingException
-
writeValue
protected void writeValue(Object value, MessageWriter writer, Context context, AegisType type, String name, String ns) throws DatabindingException - Throws:
DatabindingException
-
writeSchema
public void writeSchema(org.apache.ws.commons.schema.XmlSchema root) 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:
root- root of the XSD document.
-
isComplex
public boolean isComplex()We need to write a complex type schema for Beans, so return true. -
getComponentName
-
setComponentName
-
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 - See Also:
-
getComponentType
Get theAegisTypeof the elements in the array.- Returns:
-
getMaxOccurs
public long getMaxOccurs()- Overrides:
getMaxOccursin classAegisType
-
setMaxOccurs
public void setMaxOccurs(long maxOccurs) -
getMinOccurs
public long getMinOccurs()- Overrides:
getMinOccursin classAegisType
-
setMinOccurs
public void setMinOccurs(long minOccurs) -
isFlat
public boolean isFlat() -
setFlat
public void setFlat(boolean flat) -
hasMaxOccurs
public boolean hasMaxOccurs()- Overrides:
hasMaxOccursin classAegisType
-
hasMinOccurs
public boolean hasMinOccurs()- Overrides:
hasMinOccursin classAegisType
-