XMLDirectMapping keepAsElementMapping = new XMLDirectMapping();
keepAsElementMapping.setAttributeName("keepAsElementPolicy");
keepAsElementMapping.setGetMethodName("getKeepAsElementPolicy");
keepAsElementMapping.setSetMethodName("setKeepAsElementPolicy");
keepAsElementMapping.setXPath(getPrimaryNamespaceXPath() + "keep-as-element-policy");
EnumTypeConverter converter = new EnumTypeConverter(keepAsElementMapping, UnmarshalKeepAsElementPolicy.class, false);
keepAsElementMapping.setConverter(converter);
descriptor.addMapping(keepAsElementMapping);
XMLDirectMapping reuseContainerMapping = new XMLDirectMapping();
reuseContainerMapping.setAttributeName("reuseContainer");