Examples of CollectionType


Examples of org.apache.cxf.aegis.type.collection.CollectionType

        Type type = creator.createType(m, -1);
        tm.register(type);
        assertTrue(type instanceof CollectionType);

        CollectionType colType = (CollectionType)type;
        QName componentName = colType.getSchemaType();

        assertEquals("ArrayOfArrayOfString", componentName.getLocalPart());

        type = colType.getComponentType();
        assertNotNull(type);
        assertTrue(type instanceof CollectionType);

        CollectionType colType2 = (CollectionType)type;
        componentName = colType2.getSchemaType();

        assertEquals("ArrayOfString", componentName.getLocalPart());

        type = colType2.getComponentType();
        assertTrue(type.getTypeClass().isAssignableFrom(String.class));
    }
View Full Code Here

Examples of org.apache.cxf.aegis.type.collection.CollectionType

            .getPropertyDescriptors()[0];
        Type type = creator.createType(pd);
        tm.register(type);
        assertTrue(type instanceof CollectionType);

        CollectionType colType = (CollectionType)type;

        type = colType.getComponentType();
        assertNotNull(type);
        assertTrue(type.getTypeClass().isAssignableFrom(String.class));
    }
View Full Code Here

Examples of org.apache.cxf.aegis.type.collection.CollectionType

        Type type = (Type)deps.iterator().next();

        assertTrue(type instanceof CollectionType);

        CollectionType colType = (CollectionType)type;

        deps = dto.getDependencies();
        assertEquals(1, deps.size());

        Type comType = colType.getComponentType();
        assertEquals(String.class, comType.getTypeClass());
    }
View Full Code Here

Examples of org.apache.cxf.aegis.type.collection.CollectionType

        Type type = (Type)deps.iterator().next();

        assertTrue(type instanceof CollectionType);

        CollectionType colType = (CollectionType)type;

        deps = dto.getDependencies();
        assertEquals(1, deps.size());

        Type comType = colType.getComponentType();
        assertEquals(Object.class, comType.getTypeClass());
    }
View Full Code Here

Examples of org.apache.cxf.aegis.type.collection.CollectionType

    }

    protected AegisType createCollectionTypeFromGeneric(TypeClassInfo info) {
        AegisType component = getOrCreateGenericType(info);

        CollectionType type = new CollectionType(component);
        type.setTypeMapping(getTypeMapping());

        QName name = info.getTypeName();
        if (name == null) {
            name = createCollectionQName(info, component);
        }

        type.setSchemaType(name);

        type.setTypeClass(info.getType());

        if (info.getMinOccurs() != -1) {
            type.setMinOccurs(info.getMinOccurs());
        }
        if (info.getMaxOccurs() != -1) {
            type.setMaxOccurs(info.getMaxOccurs());
        }
       
        type.setFlat(info.isFlat());

        return type;
    }
View Full Code Here

Examples of org.beangle.model.entity.types.CollectionType

    }
    names.clear();
    names.addAll(collectionTypes.keySet());
    Collections.sort(names);
    for (final String collectionName : names) {
      CollectionType collectionType = (CollectionType) collectionTypes.get(collectionName);
      logger.debug("collection:{}", collectionType.getName());
      logger.debug("class:{}", collectionType.getCollectionClass());
      logger.debug("elementType:{}", collectionType.getElementType().getReturnedClass());
    }
  }
View Full Code Here

Examples of org.beangle.model.entity.types.CollectionType

      }
    } else {
      elementType = new EntityType(type.getReturnedClass());
    }

    CollectionType collectionType = new CollectionType();
    collectionType.setElementType(elementType);
    collectionType.setArray(cm.isArray());
    collectionType.setCollectionClass(collectionClass);
    if (!collectionTypes.containsKey(collectionType.getName())) {
      collectionTypes.put(collectionType.getName(), collectionType);
    }
    return collectionType;
  }
View Full Code Here

Examples of org.codehaus.jackson.map.type.CollectionType

    }

    @Override
    @SuppressWarnings({"unchecked"})
    public <T extends Collection<E>, E> T convertValue(Object fromValue, Class<T> collectionType, Class<E> elementType) throws IllegalArgumentException {
        CollectionType colType = objectMapper.getTypeFactory().constructCollectionType(collectionType, elementType);

        return (T)objectMapper.convertValue(fromValue, colType);
    }
View Full Code Here

Examples of org.codehaus.xfire.aegis.type.collection.CollectionType

       
        Type type = creator.createType(m, -1);
        tm.register(type);
        assertTrue( type instanceof CollectionType );
       
        CollectionType colType = (CollectionType) type;
        QName componentName = colType.getSchemaType();
    
        assertEquals("ArrayOfString", componentName.getLocalPart());
        assertEquals("ArrayOfString", componentName.getLocalPart());
       
        type = colType.getComponentType();
        assertNotNull(type);
        assertTrue(type.getTypeClass().isAssignableFrom(String.class));
    }
View Full Code Here

Examples of org.codehaus.xfire.aegis.type.collection.CollectionType

       
        Type type = creator.createType(m, -1);
        tm.register(type);
        assertTrue( type instanceof CollectionType );
       
        CollectionType colType = (CollectionType) type;
        QName componentName = colType.getSchemaType();
    
        assertEquals("ArrayOfArrayOfString", componentName.getLocalPart());
       
        type = colType.getComponentType();
        assertNotNull(type);
        assertTrue( type instanceof CollectionType );
       
        CollectionType colType2 = (CollectionType) type;
        componentName = colType2.getSchemaType();
    
        assertEquals("ArrayOfString", componentName.getLocalPart());
       
        type = colType2.getComponentType();
        assertTrue(type.getTypeClass().isAssignableFrom(String.class));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.