mapping.setMimeType(nextElement.getXmlMimeType());
//}
desc.addMapping((CoreMapping)mapping);
}else{
DirectMapping mapping = new XMLDirectMapping();
mapping.setNullValueMarshalled(true);
mapping.setAttributeName("value");
mapping.setXPath("text()");
mapping.setSetMethodName("setValue");
mapping.setGetMethodName("getValue");
if(nextElement.getDefaultValue() != null) {
mapping.setNullValue(nextElement.getDefaultValue());
mapping.getNullPolicy().setNullRepresentedByXsiNil(true);
}
if(helper.isBuiltInJavaType(nextElement.getJavaType())){
Class attributeClassification = null;
if(nextElement.getJavaType().isPrimitive()) {
attributeClassification = XMLConversionManager.getDefaultManager().convertClassNameToClass(attributeTypeName);
} else {
attributeClassification = org.eclipse.persistence.internal.helper.Helper.getClassFromClasseName(attributeTypeName, getClass().getClassLoader());
}
mapping.setAttributeClassification(attributeClassification);
}
IsSetNullPolicy nullPolicy = new IsSetNullPolicy("isSetValue", false, true, XMLNullRepresentationType.ABSENT_NODE);
//nullPolicy.setNullRepresentedByEmptyNode(true);
mapping.setNullPolicy(nullPolicy);
if(type != null && type.isEnumerationType()){
mapping.setConverter(buildJAXBEnumTypeConverter(mapping, (EnumTypeInfo)type));
}
if(nextClassName.equals("[B") || nextClassName.equals("[Ljava.lang.Byte;")) {
((Field)mapping.getField()).setSchemaType(Constants.BASE_64_BINARY_QNAME);
}
else if(nextClassName.equals("javax.xml.namespace.QName")){
((Field)mapping.getField()).setSchemaType(Constants.QNAME_QNAME);
}
if (nextElement.getJavaTypeAdapterClass() != null) {
mapping.setConverter(new XMLJavaTypeConverter(nextElement.getJavaTypeAdapterClass()));
}
desc.addMapping((CoreMapping)mapping);
}
}