public boolean isOwningNode(XPathFragment xPathFragment) {
return choiceElementNodeValue.isOwningNode(xPathFragment);
}
public void initializeNodeValue() {
XMLMapping xmlMapping = xmlChoiceMapping.getChoiceElementMappings().get(xmlField);
choiceElementNodeValue = getNodeValueForMapping(xmlMapping);
//check for mappings to other classes with the same field
for(Entry<Class, XMLMapping> entry:xmlChoiceMapping.getChoiceElementMappingsByClass().entrySet()) {
XMLField field = xmlChoiceMapping.getClassToFieldMappings().get(entry.getKey());
if(field != null && field.equals(this.xmlField)) {
XMLMapping mappingForClass = entry.getValue();
if(mappingForClass != xmlMapping) {
if(this.choiceElementNodeValues == null) {
choiceElementNodeValues = new HashMap<Class, NodeValue>();
}
choiceElementNodeValues.put(entry.getKey(), getNodeValueForMapping(mappingForClass));