btinfo.setDefaultMinOccurs(getConfiguration().getDefaultMinOccurs()); btinfo.setDefaultNillable(getConfiguration().isDefaultNillable());
btinfo.setDefaultMinOccurs(getConfiguration().getDefaultMinOccurs()); btinfo.setDefaultNillable(getConfiguration().isDefaultNillable());
protected AegisType createArrayType(TypeClassInfo info) { ArrayType type = new ArrayType(); type.setTypeMapping(getTypeMapping()); type.setTypeClass(info.getType()); type.setSchemaType(createCollectionQName(info, type.getComponentType())); if (info.getMinOccurs() != -1) { type.setMinOccurs(info.getMinOccurs()); } else { type.setMinOccurs(typeConfiguration.getDefaultMinOccurs()); } if (info.getMaxOccurs() != -1) { type.setMaxOccurs(info.getMaxOccurs()); } type.setFlat(info.isFlat()); return type; }
protected AegisType createArrayType(TypeClassInfo info) { ArrayType type = new ArrayType(); type.setTypeMapping(getTypeMapping()); type.setTypeClass(info.getType()); type.setSchemaType(createCollectionQName(info, type.getComponentType())); if (info.getMinOccurs() != -1) { type.setMinOccurs(info.getMinOccurs()); } else { type.setMinOccurs(typeConfiguration.getDefaultMinOccurs()); } if (info.getMaxOccurs() != -1) { type.setMaxOccurs(info.getMaxOccurs()); } type.setFlat(info.isFlat()); return type; }
@Override public AegisType createDefaultType(TypeClassInfo info) { BeanType type = new BeanType(); /* * As of this point, we refuse to do this for generics in general. * This might be revisited ... it might turn out to 'just work'. */ Class<?> typeClass = TypeUtil.getTypeClass(info.getType(), false); if (typeClass == null) { throw new DatabindingException("Unable to map generic type " + info.getType()); } type.setSchemaType(createQName(typeClass)); type.setTypeClass(typeClass); type.setTypeMapping(getTypeMapping()); BeanTypeInfo typeInfo = type.getTypeInfo(); typeInfo.setDefaultMinOccurs(getConfiguration().getDefaultMinOccurs()); typeInfo.setExtensibleAttributes(getConfiguration().isDefaultExtensibleAttributes()); typeInfo.setExtensibleElements(getConfiguration().isDefaultExtensibleElements()); return type; } protected AegisType getOrCreateMapKeyType(TypeClassInfo info) {
@Override public AegisType createDefaultType(TypeClassInfo info) { QName typeName = info.getTypeName(); Class<?> relatedClass = TypeUtil.getTypeRelatedClass(info.getType()); if (typeName == null) { typeName = createQName(relatedClass); } AnnotatedTypeInfo typeInfo = new AnnotatedTypeInfo( getTypeMapping(), relatedClass, typeName.getNamespaceURI(), getConfiguration()); typeInfo.setExtensibleElements(annotationReader.isExtensibleElements( relatedClass, getConfiguration().isDefaultExtensibleElements())); typeInfo.setExtensibleAttributes(annotationReader.isExtensibleAttributes( relatedClass, getConfiguration().isDefaultExtensibleAttributes())); typeInfo.setDefaultMinOccurs(getConfiguration().getDefaultMinOccurs()); typeInfo.setDefaultNillable(getConfiguration().isDefaultNillable()); BeanType type = new BeanType(typeInfo); type.setTypeMapping(getTypeMapping()); type.setSchemaType(typeName); return type; }
@Override public AegisType createDefaultType(TypeClassInfo info) { QName typeName = info.getTypeName(); Class<?> relatedClass = TypeUtil.getTypeRelatedClass(info.getType()); if (typeName == null) { typeName = createQName(relatedClass); } AnnotatedTypeInfo typeInfo = new AnnotatedTypeInfo( getTypeMapping(), relatedClass, typeName.getNamespaceURI(), getConfiguration()); typeInfo.setExtensibleElements(annotationReader.isExtensibleElements( relatedClass, getConfiguration().isDefaultExtensibleElements())); typeInfo.setExtensibleAttributes(annotationReader.isExtensibleAttributes( relatedClass, getConfiguration().isDefaultExtensibleAttributes())); typeInfo.setDefaultMinOccurs(getConfiguration().getDefaultMinOccurs()); typeInfo.setDefaultNillable(getConfiguration().isDefaultNillable()); BeanType type = new BeanType(typeInfo); type.setTypeMapping(getTypeMapping()); type.setSchemaType(typeName); return type; }
@Override public AegisType createDefaultType(TypeClassInfo info) { BeanType type = new BeanType(); /* * As of this point, we refuse to do this for generics in general. * This might be revisited ... it might turn out to 'just work'. */ Class<?> typeClass = TypeUtil.getTypeClass(info.getType(), false); if (typeClass == null) { throw new DatabindingException("Unable to map generic type " + info.getType()); } type.setSchemaType(createQName(typeClass)); type.setTypeClass(typeClass); type.setTypeMapping(getTypeMapping()); BeanTypeInfo typeInfo = type.getTypeInfo(); typeInfo.setDefaultMinOccurs(getConfiguration().getDefaultMinOccurs()); typeInfo.setExtensibleAttributes(getConfiguration().isDefaultExtensibleAttributes()); typeInfo.setExtensibleElements(getConfiguration().isDefaultExtensibleElements()); return type; } protected AegisType getOrCreateMapKeyType(TypeClassInfo info) {