Search in sources :

Example 1 with CharacterAsStringType

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

the class DefaultTypeMapping method createDefaultTypeMapping.

/**
 * Create a set of default type mappings.
 * @param defaultNillable whether elements are nillable by default.
 * @param enableMtomXmime whether to enable XMIME annotations on MTOM.
 * @param enableJDOM whether to map JDOM types.
 * @return
 */
public static DefaultTypeMapping createDefaultTypeMapping(boolean defaultNillable, boolean enableMtomXmime, boolean enableJDOM) {
    // by convention, the default mapping is against the XML schema URI.
    DefaultTypeMapping tm = new DefaultTypeMapping(Constants.URI_2001_SCHEMA_XSD);
    fillStandardMappings(tm, defaultNillable, enableMtomXmime, enableJDOM);
    defaultRegister(tm, defaultNillable, Character.class, CharacterAsStringType.CHARACTER_AS_STRING_TYPE_QNAME, new CharacterAsStringType());
    defaultRegister(tm, defaultNillable, char.class, CharacterAsStringType.CHARACTER_AS_STRING_TYPE_QNAME, new CharacterAsStringType());
    defaultRegister(tm, defaultNillable, javax.xml.datatype.Duration.class, Constants.XSD_DURATION, new org.apache.cxf.aegis.type.java5.DurationType());
    defaultRegister(tm, defaultNillable, javax.xml.datatype.XMLGregorianCalendar.class, Constants.XSD_DATE, new org.apache.cxf.aegis.type.java5.XMLGregorianCalendarType());
    defaultRegister(tm, defaultNillable, javax.xml.datatype.XMLGregorianCalendar.class, Constants.XSD_TIME, new org.apache.cxf.aegis.type.java5.XMLGregorianCalendarType());
    defaultRegister(tm, defaultNillable, javax.xml.datatype.XMLGregorianCalendar.class, Constants.XSD_DAY, new org.apache.cxf.aegis.type.java5.XMLGregorianCalendarType());
    defaultRegister(tm, defaultNillable, javax.xml.datatype.XMLGregorianCalendar.class, Constants.XSD_MONTH, new org.apache.cxf.aegis.type.java5.XMLGregorianCalendarType());
    defaultRegister(tm, defaultNillable, javax.xml.datatype.XMLGregorianCalendar.class, Constants.XSD_MONTHDAY, new org.apache.cxf.aegis.type.java5.XMLGregorianCalendarType());
    defaultRegister(tm, defaultNillable, javax.xml.datatype.XMLGregorianCalendar.class, Constants.XSD_YEAR, new org.apache.cxf.aegis.type.java5.XMLGregorianCalendarType());
    defaultRegister(tm, defaultNillable, javax.xml.datatype.XMLGregorianCalendar.class, Constants.XSD_YEARMONTH, new org.apache.cxf.aegis.type.java5.XMLGregorianCalendarType());
    defaultRegister(tm, defaultNillable, javax.xml.datatype.XMLGregorianCalendar.class, Constants.XSD_DATETIME, new org.apache.cxf.aegis.type.java5.XMLGregorianCalendarType());
    return tm;
}
Also used : CharacterAsStringType(org.apache.cxf.aegis.type.basic.CharacterAsStringType)

Aggregations

CharacterAsStringType (org.apache.cxf.aegis.type.basic.CharacterAsStringType)1