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

public abstract class AegisType extends Object
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 Details

    • typeClass

      protected Type 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

      public TypeMapping getTypeMapping()
      Returns:
      Returns the typeMapping.
    • setTypeMapping

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

      public Class<?> getTypeClass()
      Returns:
      Returns the java type as a Class. For a generic, return the raw type. For something truly exotic, return null.
    • getType

      public Type getType()
      Returns:
      Return the Java type.
    • setTypeClass

      public void setTypeClass(Type 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 Set<AegisType> getDependencies()
      Return a set of AegisType dependencies. Returns null if this type has no dependencies.
      Returns:
      Set of AegisType dependencies
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
      See Also:
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getSchemaType

      public QName getSchemaType()
      Returns:
      Get the schema type.
    • setSchemaType

      public void setSchemaType(QName name)
      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

      public String toString()
      Overrides:
      toString in class Object
    • isFlatArray

      public boolean isFlatArray()
    • setFlatArray

      public void setFlatArray(boolean flatArray)