if(isBinaryType(className)) { XMLBinaryDataMapping xmlMapping = new XMLBinaryDataMapping(); xmlMapping.setField(xmlField);
if(isBinaryType(className)) { XMLBinaryDataMapping xmlMapping = new XMLBinaryDataMapping(); xmlMapping.setField(xmlField);
private void addChoiceElementMapping(XMLField xmlField, Class theClass){ if (xmlField.getLastXPathFragment().nameIsText() || xmlField.getLastXPathFragment().isAttribute()) { XMLDirectMapping xmlMapping = new XMLDirectMapping(); xmlMapping.setAttributeClassification(theClass); xmlMapping.setAttributeAccessor(temporaryAccessor); xmlMapping.setField(xmlField); this.choiceElementMappings.put(xmlField, xmlMapping); this.choiceElementMappingsByClass.put(theClass, xmlMapping); } else { if(isBinaryType(theClass)) { XMLBinaryDataMapping xmlMapping = new XMLBinaryDataMapping(); xmlMapping.setField(xmlField); xmlMapping.setAttributeClassification(theClass); xmlMapping.setAttributeAccessor(temporaryAccessor); this.choiceElementMappings.put(xmlField, xmlMapping); this.choiceElementMappingsByClass.put(theClass, xmlMapping); } else { XMLCompositeObjectMapping xmlMapping = new XMLCompositeObjectMapping(); xmlMapping.setAttributeAccessor(temporaryAccessor); if(!theClass.equals(ClassConstants.OBJECT)){ xmlMapping.setReferenceClass(theClass); } xmlMapping.setField(xmlField); this.choiceElementMappings.put(xmlField, xmlMapping); this.choiceElementMappingsByClass.put(theClass, xmlMapping); } } }
private void addChoiceElementMapping(XMLField xmlField, Class theClass){ if (xmlField.getLastXPathFragment().nameIsText() || xmlField.getLastXPathFragment().isAttribute()) { XMLDirectMapping xmlMapping = new XMLDirectMapping(); xmlMapping.setAttributeClassification(theClass); xmlMapping.setAttributeAccessor(temporaryAccessor); xmlMapping.setField(xmlField); this.choiceElementMappings.put(xmlField, xmlMapping); this.choiceElementMappingsByClass.put(theClass, xmlMapping); } else { if(isBinaryType(theClass)) { XMLBinaryDataMapping xmlMapping = new XMLBinaryDataMapping(); xmlMapping.setField(xmlField); xmlMapping.setAttributeClassification(theClass); xmlMapping.setAttributeAccessor(temporaryAccessor); this.choiceElementMappings.put(xmlField, xmlMapping); this.choiceElementMappingsByClass.put(theClass, xmlMapping); } else { XMLCompositeObjectMapping xmlMapping = new XMLCompositeObjectMapping(); xmlMapping.setAttributeAccessor(temporaryAccessor); if(!theClass.equals(ClassConstants.OBJECT)){ xmlMapping.setReferenceClass(theClass); } xmlMapping.setField(xmlField); this.choiceElementMappings.put(xmlField, xmlMapping); this.choiceElementMappingsByClass.put(theClass, xmlMapping); } } }