descriptor.addMapping(mapping);
}
public void generateCollectionMapping(Property property, XMLDescriptor descriptor, NamespaceInfo namespaceInfo) {
// check to see if this should be a composite or direct mapping
JavaClass javaClass = null;
if (property.getGenericType() != null) {
javaClass = (JavaClass) property.getGenericType();
}
if (helper.isAnnotationPresent(property.getElement(), XmlElement.class)) {
XmlElement xmlElement = (XmlElement) helper.getAnnotation(property.getElement(), XmlElement.class);
if (xmlElement.type() != XmlElement.DEFAULT.class) {
javaClass = helper.getJavaClass(xmlElement.type());
}
}
if (javaClass != null && typeInfo.get(javaClass.getQualifiedName()) != null) {
TypeInfo referenceInfo = typeInfo.get(javaClass.getQualifiedName());
if (referenceInfo.isEnumerationType()) {
generateEnumCollectionMapping(property, (EnumTypeInfo) referenceInfo, descriptor, namespaceInfo);
} else {
if (helper.isAnnotationPresent(property.getElement(), XmlIDREF.class)) {
generateXMLCollectionReferenceMapping(property, descriptor, namespaceInfo, javaClass);