Package org.apache.cxf.aegis.type
Class AegisType
java.lang.Object
org.apache.cxf.aegis.type.AegisType
- Direct Known Subclasses:
AbstractXOPType,ArrayType,Base64Type,BeanType,BigDecimalType,BigIntegerType,BooleanType,ByteType,CalendarType,CharacterAsStringType,CharacterType,DateTimeType,DateType,DocumentType,DoubleType,DurationType,EnumType,FloatType,IntType,JDOMDocumentType,JDOMElementType,LongType,MapType,ObjectType,ShortType,SoapArrayType,SoapRefType,SourceType,StringType,TimestampType,TimeType,URIType,XMLGregorianCalendarType,XMLStreamReaderType
Aegis abstraction for a object. Types are responsible for reading and writing the contents
of objects, but not, almost always, their own outermost XML element.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToSchemaElement(org.apache.ws.commons.schema.XmlSchemaElement schemaElement) If the type object merely wants to contribute attributes to the xsd:element element, it can implement this.booleanReturn a set of AegisType dependencies.longlonggetType()Class<?>inthashCode()booleanbooleanbooleanbooleanbooleanbooleanbooleanDefaults to true.abstract ObjectreadObject(MessageReader reader, Context context) Read in the XML fragment and create an object.voidsetAbstract(boolean ab) voidsetFlatArray(boolean flatArray) voidsetNillable(boolean nillable) voidsetSchemaType(QName name) voidsetTypeClass(Type typeClass) voidsetTypeMapping(TypeMapping typeMapping) voidsetWriteOuter(boolean writeOuter) toString()booleanTrue if this type requires the import of the aegisTypes schema.booleanabstract voidwriteObject(Object object, MessageWriter writer, Context context) Writes the object to the MessageWriter.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.
-
Field Details
-
typeClass
-
-
Constructor Details
-
AegisType
public AegisType()
-
-
Method Details
-
readObject
public abstract Object readObject(MessageReader reader, Context context) throws DatabindingException Read in the XML fragment and create an object.- Parameters:
reader-context-- Returns:
- Throws:
DatabindingException
-
writeObject
public abstract void writeObject(Object object, MessageWriter writer, Context context) throws DatabindingException Writes the object to the MessageWriter.- Parameters:
object-writer-context-- Throws:
DatabindingException
-
writeSchema
public void writeSchema(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.- Parameters:
root- root of the XSD document.
-
addToSchemaElement
public void addToSchemaElement(org.apache.ws.commons.schema.XmlSchemaElement schemaElement) If the type object merely wants to contribute attributes to the xsd:element element, it can implement this.- Parameters:
schemaElement-
-
getTypeMapping
- Returns:
- Returns the typeMapping.
-
setTypeMapping
- Parameters:
typeMapping- The typeMapping to set.
-
getTypeClass
- Returns:
- Returns the java type as a Class. For a generic, return the raw type. For something truly exotic, return null.
-
getType
- Returns:
- Return the Java type.
-
setTypeClass
- Parameters:
typeClass- The typeClass to set.
-
isComplex
public boolean isComplex()- Returns:
- True if a complex type schema must be written.
-
isAbstract
public boolean isAbstract() -
setAbstract
public void setAbstract(boolean ab) -
isNillable
public boolean isNillable() -
setNillable
public void setNillable(boolean nillable) -
getDependencies
Return a set of AegisType dependencies. Returns null if this type has no dependencies.- Returns:
- Set of
AegisTypedependencies
-
equals
-
hashCode
public int hashCode() -
getSchemaType
- Returns:
- Get the schema type.
-
setSchemaType
- Parameters:
name- The qName to set.
-
isWriteOuter
public boolean isWriteOuter()Defaults to true. False for types that disappear entirely when null, even when nillable.- Returns:
- whether to write xsi:nil for null values.
-
setWriteOuter
public void setWriteOuter(boolean writeOuter) -
usesXmime
public boolean usesXmime() -
usesUtilityTypes
public boolean usesUtilityTypes()True if this type requires the import of the aegisTypes schema.- Returns:
-
hasMinOccurs
public boolean hasMinOccurs() -
hasMaxOccurs
public boolean hasMaxOccurs() -
getMinOccurs
public long getMinOccurs() -
getMaxOccurs
public long getMaxOccurs() -
toString
-
isFlatArray
public boolean isFlatArray() -
setFlatArray
public void setFlatArray(boolean flatArray)
-