List list = new List();
list.setItemType(XMLConstants.SCHEMA_PREFIX + ":" + baseType.getLocalPart());
type.setList(list);
} else {
if (helper.isAnnotationPresent(valueField.getElement(), XmlSchemaType.class)) {
XmlSchemaType schemaType = (XmlSchemaType) helper.getAnnotation(valueField.getElement(), XmlSchemaType.class);
baseType = new QName(XMLConstants.SCHEMA_INSTANCE_URL, schemaType.name());
}
restriction.setBaseType(XMLConstants.SCHEMA_PREFIX + ":" + baseType.getLocalPart());
type.setRestriction(restriction);
}
}
info.setSimpleType(type);
} else if ((valueField = this.getXmlValueFieldForSimpleContent(info.getPropertyList())) != null) {
ComplexType type = new ComplexType();
SimpleContent content = new SimpleContent();
if (typeName.equals("")) {
if(rootElement != null) {
rootElement.setComplexType(type);
}
info.setComplexType(type);
} else {
type.setName(typeName);
schema.addTopLevelComplexTypes(type);
if(rootElement != null) {
rootElement.setType(pfx+type.getName());
}
}
QName extensionType = getSchemaTypeFor(valueField.getType());
if (helper.isAnnotationPresent(valueField.getElement(), XmlSchemaType.class)) {
XmlSchemaType schemaType = (XmlSchemaType) helper.getAnnotation(valueField.getElement(), XmlSchemaType.class);
extensionType = new QName(XMLConstants.SCHEMA_INSTANCE_URL, schemaType.name());
}
Extension extension = new Extension();
extension.setBaseType(XMLConstants.SCHEMA_PREFIX + ":" + extensionType.getLocalPart());
content.setExtension(extension);
type.setSimpleContent(content);