org.apache.cxf.aegis.type
Class Type

java.lang.Object
  extended by org.apache.cxf.aegis.type.Type
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

public abstract class Type
extends java.lang.Object

A Type reads and writes XML fragments to create and write objects.

Author:
Dan Diephouse

Field Summary
protected  java.lang.Class typeClass
           
 
Constructor Summary
Type()
           
 
Method Summary
 void addToSchemaElement(org.jdom.Element schemaElement)
          If the type object merely wants to contribute attributes to the xsd:element element, it can implement this.
 boolean equals(java.lang.Object obj)
           
 java.util.Set<Type> getDependencies()
          Return a set of Type dependencies.
 long getMaxOccurs()
           
 long getMinOccurs()
           
 javax.xml.namespace.QName getSchemaType()
           
 java.lang.Class getTypeClass()
           
 TypeMapping getTypeMapping()
           
 int hashCode()
           
 boolean hasMaxOccurs()
           
 boolean hasMinOccurs()
           
 boolean isAbstract()
           
 boolean isComplex()
           
 boolean isNillable()
           
 boolean isWriteOuter()
           
abstract  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)
           
 java.lang.String toString()
           
 boolean usesUtilityTypes()
          True if this type requires the import of the aegisTypes schema.
 boolean usesXmime()
           
abstract  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 java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

typeClass

protected java.lang.Class typeClass
Constructor Detail

Type

public Type()
Method Detail

readObject

public abstract java.lang.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(java.lang.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.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.

Parameters:
root - root of the XSD document.

addToSchemaElement

public void addToSchemaElement(org.jdom.Element schemaElement)
If the type object merely wants to contribute attributes to the xsd:element element, it can implement this.

Parameters:
schemaElement -

getTypeMapping

public TypeMapping getTypeMapping()
Returns:
Returns the typeMapping.

setTypeMapping

public void setTypeMapping(TypeMapping typeMapping)
Parameters:
typeMapping - The typeMapping to set.

getTypeClass

public java.lang.Class getTypeClass()
Returns:
Returns the typeClass.

setTypeClass

public void setTypeClass(java.lang.Class typeClass)
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

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

Returns:
Set of Type dependencies

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getSchemaType

public javax.xml.namespace.QName getSchemaType()
Returns:
Get the schema type.

setSchemaType

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

isWriteOuter

public boolean isWriteOuter()

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

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Apache CXF