Search in sources :

Example 1 with ByteType

use of org.apache.cxf.aegis.type.basic.ByteType in project cxf by apache.

the class DefaultTypeMapping method fillStandardMappings.

private static void fillStandardMappings(TypeMapping tm, boolean defaultNillable, boolean enableMtomXmime, boolean enableJDOM) {
    defaultRegister(tm, defaultNillable, BigDecimal.class, Constants.XSD_DECIMAL, new BigDecimalType());
    defaultRegister(tm, defaultNillable, BigInteger.class, Constants.XSD_INTEGER, new BigIntegerType());
    defaultRegister(tm, defaultNillable, Boolean.class, Constants.XSD_BOOLEAN, new BooleanType());
    defaultRegister(tm, defaultNillable, Calendar.class, Constants.XSD_DATETIME, new CalendarType());
    defaultRegister(tm, defaultNillable, Date.class, Constants.XSD_DATETIME, new DateTimeType());
    defaultRegister(tm, defaultNillable, Float.class, Constants.XSD_FLOAT, new FloatType());
    defaultRegister(tm, defaultNillable, Double.class, Constants.XSD_DOUBLE, new DoubleType());
    defaultRegister(tm, defaultNillable, Integer.class, Constants.XSD_INT, new IntType());
    defaultRegister(tm, defaultNillable, Long.class, Constants.XSD_LONG, new LongType());
    defaultRegister(tm, defaultNillable, Object.class, Constants.XSD_ANYTYPE, new ObjectType());
    defaultRegister(tm, defaultNillable, Byte.class, Constants.XSD_BYTE, new ByteType());
    defaultRegister(tm, defaultNillable, Short.class, Constants.XSD_SHORT, new ShortType());
    defaultRegister(tm, defaultNillable, Source.class, Constants.XSD_ANYTYPE, new SourceType());
    defaultRegister(tm, defaultNillable, String.class, Constants.XSD_STRING, new StringType());
    defaultRegister(tm, defaultNillable, Time.class, Constants.XSD_TIME, new TimeType());
    defaultRegister(tm, defaultNillable, Timestamp.class, Constants.XSD_DATETIME, new TimestampType());
    defaultRegister(tm, defaultNillable, URI.class, Constants.XSD_ANYURI, new URIType());
    defaultRegister(tm, defaultNillable, XMLStreamReader.class, Constants.XSD_ANYTYPE, new XMLStreamReaderType());
    defaultRegister(tm, defaultNillable, boolean.class, Constants.XSD_BOOLEAN, new BooleanType());
    defaultRegister(tm, defaultNillable, byte[].class, Constants.XSD_BASE64, new Base64Type());
    defaultRegister(tm, defaultNillable, double.class, Constants.XSD_DOUBLE, new DoubleType());
    defaultRegister(tm, defaultNillable, float.class, Constants.XSD_FLOAT, new FloatType());
    defaultRegister(tm, defaultNillable, int.class, Constants.XSD_INT, new IntType());
    defaultRegister(tm, defaultNillable, short.class, Constants.XSD_SHORT, new ShortType());
    defaultRegister(tm, defaultNillable, byte.class, Constants.XSD_BYTE, new ByteType());
    defaultRegister(tm, defaultNillable, long.class, Constants.XSD_LONG, new LongType());
    defaultRegister(tm, defaultNillable, java.sql.Date.class, Constants.XSD_DATETIME, new SqlDateType());
    defaultRegister(tm, defaultNillable, java.sql.Date.class, Constants.XSD_DATE, new SqlDateType());
    defaultRegister(tm, defaultNillable, Number.class, Constants.XSD_DECIMAL, new BigDecimalType());
    QName mtomBase64 = Constants.XSD_BASE64;
    if (enableMtomXmime) {
        mtomBase64 = AbstractXOPType.XML_MIME_BASE64;
    }
    defaultRegister(tm, defaultNillable, DataSource.class, mtomBase64, new DataSourceType(enableMtomXmime, null));
    defaultRegister(tm, defaultNillable, DataHandler.class, mtomBase64, new DataHandlerType(enableMtomXmime, null));
    defaultRegister(tm, defaultNillable, Document.class, Constants.XSD_ANYTYPE, new DocumentType());
    if (enableJDOM) {
        registerJDOMTypes(tm, defaultNillable);
    }
}
Also used : LongType(org.apache.cxf.aegis.type.basic.LongType) StringType(org.apache.cxf.aegis.type.basic.StringType) CharacterAsStringType(org.apache.cxf.aegis.type.basic.CharacterAsStringType) DataSourceType(org.apache.cxf.aegis.type.mtom.DataSourceType) SourceType(org.apache.cxf.aegis.type.xml.SourceType) ByteType(org.apache.cxf.aegis.type.basic.ByteType) Base64Type(org.apache.cxf.aegis.type.basic.Base64Type) FloatType(org.apache.cxf.aegis.type.basic.FloatType) IntType(org.apache.cxf.aegis.type.basic.IntType) TimeType(org.apache.cxf.aegis.type.basic.TimeType) DateTimeType(org.apache.cxf.aegis.type.basic.DateTimeType) ObjectType(org.apache.cxf.aegis.type.basic.ObjectType) DataHandlerType(org.apache.cxf.aegis.type.mtom.DataHandlerType) DataSourceType(org.apache.cxf.aegis.type.mtom.DataSourceType) TimestampType(org.apache.cxf.aegis.type.basic.TimestampType) XMLStreamReaderType(org.apache.cxf.aegis.type.xml.XMLStreamReaderType) QName(javax.xml.namespace.QName) ShortType(org.apache.cxf.aegis.type.basic.ShortType) BooleanType(org.apache.cxf.aegis.type.basic.BooleanType) DocumentType(org.apache.cxf.aegis.type.xml.DocumentType) JDOMDocumentType(org.apache.cxf.aegis.type.xml.JDOMDocumentType) URIType(org.apache.cxf.aegis.type.basic.URIType) DateTimeType(org.apache.cxf.aegis.type.basic.DateTimeType) SqlDateType(org.apache.cxf.aegis.type.basic.SqlDateType) BigIntegerType(org.apache.cxf.aegis.type.basic.BigIntegerType) DoubleType(org.apache.cxf.aegis.type.basic.DoubleType) BigDecimalType(org.apache.cxf.aegis.type.basic.BigDecimalType) CalendarType(org.apache.cxf.aegis.type.basic.CalendarType)

Aggregations

QName (javax.xml.namespace.QName)1 Base64Type (org.apache.cxf.aegis.type.basic.Base64Type)1 BigDecimalType (org.apache.cxf.aegis.type.basic.BigDecimalType)1 BigIntegerType (org.apache.cxf.aegis.type.basic.BigIntegerType)1 BooleanType (org.apache.cxf.aegis.type.basic.BooleanType)1 ByteType (org.apache.cxf.aegis.type.basic.ByteType)1 CalendarType (org.apache.cxf.aegis.type.basic.CalendarType)1 CharacterAsStringType (org.apache.cxf.aegis.type.basic.CharacterAsStringType)1 DateTimeType (org.apache.cxf.aegis.type.basic.DateTimeType)1 DoubleType (org.apache.cxf.aegis.type.basic.DoubleType)1 FloatType (org.apache.cxf.aegis.type.basic.FloatType)1 IntType (org.apache.cxf.aegis.type.basic.IntType)1 LongType (org.apache.cxf.aegis.type.basic.LongType)1 ObjectType (org.apache.cxf.aegis.type.basic.ObjectType)1 ShortType (org.apache.cxf.aegis.type.basic.ShortType)1 SqlDateType (org.apache.cxf.aegis.type.basic.SqlDateType)1 StringType (org.apache.cxf.aegis.type.basic.StringType)1 TimeType (org.apache.cxf.aegis.type.basic.TimeType)1 TimestampType (org.apache.cxf.aegis.type.basic.TimestampType)1 URIType (org.apache.cxf.aegis.type.basic.URIType)1