Search in sources :

Example 11 with DefaultTypeMapping

use of org.apache.cxf.aegis.type.DefaultTypeMapping in project cxf by apache.

the class EnumTypeTest method setUp.

@Before
public void setUp() throws Exception {
    super.setUp();
    tm = new DefaultTypeMapping();
    Java5TypeCreator creator = new Java5TypeCreator();
    creator.setConfiguration(new TypeCreationOptions());
    tm.setTypeCreator(creator);
}
Also used : DefaultTypeMapping(org.apache.cxf.aegis.type.DefaultTypeMapping) TypeCreationOptions(org.apache.cxf.aegis.type.TypeCreationOptions) Before(org.junit.Before)

Example 12 with DefaultTypeMapping

use of org.apache.cxf.aegis.type.DefaultTypeMapping in project cxf by apache.

the class JaxbXmlParamTypeTest method setUp.

@Before
public void setUp() throws Exception {
    super.setUp();
    tm = new DefaultTypeMapping(null, DefaultTypeMapping.createDefaultTypeMapping(false, false));
    creator = new Java5TypeCreator();
    creator.setNextCreator(new DefaultTypeCreator());
    creator.setConfiguration(new TypeCreationOptions());
    tm.setTypeCreator(creator);
}
Also used : DefaultTypeMapping(org.apache.cxf.aegis.type.DefaultTypeMapping) DefaultTypeCreator(org.apache.cxf.aegis.type.DefaultTypeCreator) TypeCreationOptions(org.apache.cxf.aegis.type.TypeCreationOptions) Before(org.junit.Before)

Example 13 with DefaultTypeMapping

use of org.apache.cxf.aegis.type.DefaultTypeMapping in project cxf by apache.

the class NoNamespaceAegisElementProvider method getAegisContext.

@Override
protected AegisContext getAegisContext(Class<?> plainClass, Type genericType) {
    AegisContext context = new AegisContext();
    context.setWriteXsiTypes(writeXsiType);
    context.setReadXsiTypes(readXsiType);
    TypeCreationOptions tco = new TypeCreationOptions();
    tco.setQualifyElements(false);
    Set<java.lang.reflect.Type> rootClasses = new HashSet<java.lang.reflect.Type>();
    rootClasses.add(genericType);
    context.setTypeCreationOptions(tco);
    context.setRootClasses(rootClasses);
    TypeMapping baseMapping = DefaultTypeMapping.createSoap11TypeMapping(true, false, false);
    DefaultTypeMapping mapping = new DefaultTypeMapping(Constants.URI_2001_SCHEMA_XSD, baseMapping);
    TypeCreator stockTypeCreator = createTypeCreator(tco);
    mapping.setTypeCreator(stockTypeCreator);
    context.setTypeMapping(mapping);
    context.initialize();
    return context;
}
Also used : Type(java.lang.reflect.Type) DefaultTypeMapping(org.apache.cxf.aegis.type.DefaultTypeMapping) AegisContext(org.apache.cxf.aegis.AegisContext) DefaultTypeMapping(org.apache.cxf.aegis.type.DefaultTypeMapping) TypeMapping(org.apache.cxf.aegis.type.TypeMapping) TypeCreationOptions(org.apache.cxf.aegis.type.TypeCreationOptions) XMLTypeCreator(org.apache.cxf.aegis.type.XMLTypeCreator) TypeCreator(org.apache.cxf.aegis.type.TypeCreator) AbstractTypeCreator(org.apache.cxf.aegis.type.AbstractTypeCreator) Java5TypeCreator(org.apache.cxf.aegis.type.java5.Java5TypeCreator) HashSet(java.util.HashSet)

Aggregations

DefaultTypeMapping (org.apache.cxf.aegis.type.DefaultTypeMapping)13 TypeCreationOptions (org.apache.cxf.aegis.type.TypeCreationOptions)10 Before (org.junit.Before)8 TypeMapping (org.apache.cxf.aegis.type.TypeMapping)4 AbstractAegisTest (org.apache.cxf.aegis.AbstractAegisTest)3 AegisContext (org.apache.cxf.aegis.AegisContext)3 AegisType (org.apache.cxf.aegis.type.AegisType)3 DefaultTypeCreator (org.apache.cxf.aegis.type.DefaultTypeCreator)3 Test (org.junit.Test)3 CollectionType (org.apache.cxf.aegis.type.collection.CollectionType)2 Type (java.lang.reflect.Type)1 HashSet (java.util.HashSet)1 QName (javax.xml.namespace.QName)1 AbstractTypeCreator (org.apache.cxf.aegis.type.AbstractTypeCreator)1 TypeCreator (org.apache.cxf.aegis.type.TypeCreator)1 XMLTypeCreator (org.apache.cxf.aegis.type.XMLTypeCreator)1 MapType (org.apache.cxf.aegis.type.collection.MapType)1 Java5TypeCreator (org.apache.cxf.aegis.type.java5.Java5TypeCreator)1 XMLStreamReaderType (org.apache.cxf.aegis.type.xml.XMLStreamReaderType)1