public boolean isOwningNode(XPathFragment xPathFragment) {
return choiceElementNodeValue.isOwningNode(xPathFragment);
}
public void initializeNodeValue() {
XMLMapping xmlMapping = (XMLMapping) xmlChoiceMapping.getChoiceElementMappings().get(xmlField);
choiceElementNodeValue = getNodeValueForMapping(xmlMapping);
//check for mappings to other classes with the same field
for(Entry<Class, XMLMapping> entry: ((Map<Class, XMLMapping>)xmlChoiceMapping.getChoiceElementMappingsByClass()).entrySet()) {
XMLField field = (XMLField) 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));