final MappingNodeValue nodeValue = (MappingNodeValue) childNode.getNodeValue();
public boolean isWhitespaceAware() { return this.getNodeValue().isWhitespaceAware(); }
final MappingNodeValue nodeValue = (MappingNodeValue) childNode.getNodeValue();
final MappingNodeValue nodeValue = (MappingNodeValue) childNode.getNodeValue();
for (int x = 0; x < selfChildrenSize; x++) { XPathNode selfNode = (XPathNode)xPathNode.getSelfChildren().get(x); if (null != selfNode.getNodeValue()) { selfRecords.add(selfNode.getNodeValue().buildSelfRecord(this, attributes));
selfRecords = new ArrayList<UnmarshalRecord>(selfChildrenSize); for (int x = 0; x < selfChildrenSize; x++) { NodeValue nv = xPathNode.getSelfChildren().get(x).getNodeValue(); if (null != nv) { selfRecords.add(nv.buildSelfRecord(this, attributes));
for (int x = 0; x < selfChildrenSize; x++) { XPathNode selfNode = (XPathNode)xPathNode.getSelfChildren().get(x); if (null != selfNode.getNodeValue()) { selfNode.getNodeValue().endSelfNodeValue(this, attributes);
selfRecords = new ArrayList<UnmarshalRecord>(selfChildrenSize); for (int x = 0; x < selfChildrenSize; x++) { NodeValue nv = xPathNode.getSelfChildren().get(x).getNodeValue(); if (null != nv) { selfRecords.add(nv.buildSelfRecord(this, attributes));
if (xPathNode.getNodeValue().isMappingNodeValue()) { MappingNodeValue mappingNodeValue = (MappingNodeValue) xPathNode.getNodeValue(); return mappingNodeValue.getMapping();
if (xPathNode.getNodeValue().isMappingNodeValue()) { MappingNodeValue mappingNodeValue = (MappingNodeValue) xPathNode.getNodeValue(); return mappingNodeValue.getMapping();
for (int x = 0; x < selfChildrenSize; x++) { XPathNode selfNode = xPathNode.getSelfChildren().get(x); if (null != selfNode.getNodeValue()) { selfNode.getNodeValue().endSelfNodeValue(this, selfRecords.get(x), attributes);
for (int x = 0; x < selfChildrenSize; x++) { XPathNode selfNode = xPathNode.getSelfChildren().get(x); if (null != selfNode.getNodeValue()) { selfNode.getNodeValue().endSelfNodeValue(this, selfRecords.get(x), attributes);
XPathNode node = ur.getNonAttributeXPathNode(uri, parentLocalName, parentLocalName, null); if (node != null) { NodeValue nv = node.getNodeValue(); if (nv == null && node.getTextNode() != null) { nv = node.getTextNode().getUnmarshalNodeValue();
XPathNode node = ur.getNonAttributeXPathNode(uri, parentLocalName, parentLocalName, null); if (node != null) { NodeValue nv = node.getNodeValue(); if (nv == null && node.getTextNode() != null) { nv = node.getTextNode().getUnmarshalNodeValue();
public void attribute(UnmarshalRecord unmarshalRecord, String namespaceURI, String localName, String value) { Descriptor referenceDescriptor = (Descriptor) getMapping().getReferenceDescriptor(); ObjectBuilder treeObjectBuilder = (ObjectBuilder) referenceDescriptor.getObjectBuilder(); MappingNodeValue textMappingNodeValue = (MappingNodeValue) treeObjectBuilder.getRootXPathNode().getTextNode().getNodeValue(); Mapping textMapping = textMappingNodeValue.getMapping(); Object childObject = referenceDescriptor.getInstantiationPolicy().buildNewInstance(); if(textMapping.isAbstractDirectMapping()) { DirectMapping xmlDirectMapping = (DirectMapping) textMappingNodeValue.getMapping(); Field xmlField = (Field) xmlDirectMapping.getField(); Object realValue = unmarshalRecord.getXMLReader().convertValueBasedOnSchemaType(xmlField, value, (ConversionManager) unmarshalRecord.getSession().getDatasourcePlatform().getConversionManager(), unmarshalRecord); Object convertedValue = xmlDirectMapping.getAttributeValue(realValue, unmarshalRecord.getSession(), unmarshalRecord); xmlDirectMapping.setAttributeValueInObject(childObject, convertedValue); } else { Object oldChildObject = unmarshalRecord.getCurrentObject(); CompositeObjectMapping nestedXMLCompositeObjectMapping = (CompositeObjectMapping) textMappingNodeValue.getMapping(); unmarshalRecord.setCurrentObject(childObject); textMappingNodeValue.attribute(unmarshalRecord, namespaceURI, localName, value); unmarshalRecord.setCurrentObject(oldChildObject); } setXPathInObject(namespaceURI, localName, childObject); setOrAddAttributeValue(unmarshalRecord, childObject, null, null); }
public void attribute(UnmarshalRecord unmarshalRecord, String namespaceURI, String localName, String value) { Descriptor referenceDescriptor = (Descriptor) getMapping().getReferenceDescriptor(); ObjectBuilder treeObjectBuilder = (ObjectBuilder) referenceDescriptor.getObjectBuilder(); MappingNodeValue textMappingNodeValue = (MappingNodeValue) treeObjectBuilder.getRootXPathNode().getTextNode().getNodeValue(); Mapping textMapping = textMappingNodeValue.getMapping(); Object childObject = referenceDescriptor.getInstantiationPolicy().buildNewInstance(); if(textMapping.isAbstractDirectMapping()) { DirectMapping xmlDirectMapping = (DirectMapping) textMappingNodeValue.getMapping(); Field xmlField = (Field) xmlDirectMapping.getField(); Object realValue = unmarshalRecord.getXMLReader().convertValueBasedOnSchemaType(xmlField, value, (ConversionManager) unmarshalRecord.getSession().getDatasourcePlatform().getConversionManager(), unmarshalRecord); Object convertedValue = xmlDirectMapping.getAttributeValue(realValue, unmarshalRecord.getSession(), unmarshalRecord); xmlDirectMapping.setAttributeValueInObject(childObject, convertedValue); } else { Object oldChildObject = unmarshalRecord.getCurrentObject(); CompositeObjectMapping nestedXMLCompositeObjectMapping = (CompositeObjectMapping) textMappingNodeValue.getMapping(); unmarshalRecord.setCurrentObject(childObject); textMappingNodeValue.attribute(unmarshalRecord, namespaceURI, localName, value); unmarshalRecord.setCurrentObject(oldChildObject); } setXPathInObject(namespaceURI, localName, childObject); setOrAddAttributeValue(unmarshalRecord, childObject, null, null); }
@Override public void attribute(UnmarshalRecord unmarshalRecord, String namespaceURI, String localName, String value) { unmarshalRecord.removeNullCapableValue(this); Descriptor referenceDescriptor = (Descriptor) getMapping().getReferenceDescriptor(); ObjectBuilder treeObjectBuilder = (ObjectBuilder) referenceDescriptor.getObjectBuilder(); MappingNodeValue textMappingNodeValue = (MappingNodeValue) treeObjectBuilder.getRootXPathNode().getTextNode().getNodeValue(); Mapping textMapping = textMappingNodeValue.getMapping(); Object childObject = referenceDescriptor.getInstantiationPolicy().buildNewInstance(); if(textMapping.isAbstractDirectMapping()) { DirectMapping xmlDirectMapping = (DirectMapping) textMappingNodeValue.getMapping(); Field xmlField = (Field) xmlDirectMapping.getField(); Object realValue = unmarshalRecord.getXMLReader().convertValueBasedOnSchemaType(xmlField, value, (ConversionManager) unmarshalRecord.getSession().getDatasourcePlatform().getConversionManager(), unmarshalRecord); Object convertedValue = xmlDirectMapping.getAttributeValue(realValue, unmarshalRecord.getSession(), unmarshalRecord); xmlDirectMapping.setAttributeValueInObject(childObject, convertedValue); } else { Object oldChildObject = unmarshalRecord.getCurrentObject(); CompositeObjectMapping nestedXMLCompositeObjectMapping = (CompositeObjectMapping) textMappingNodeValue.getMapping(); unmarshalRecord.setCurrentObject(childObject); textMappingNodeValue.attribute(unmarshalRecord, namespaceURI, localName, value); unmarshalRecord.setCurrentObject(oldChildObject); } setAttributeValue(childObject, unmarshalRecord); }
@Override public void attribute(UnmarshalRecord unmarshalRecord, String namespaceURI, String localName, String value) { unmarshalRecord.removeNullCapableValue(this); Descriptor referenceDescriptor = (Descriptor) getMapping().getReferenceDescriptor(); ObjectBuilder treeObjectBuilder = (ObjectBuilder) referenceDescriptor.getObjectBuilder(); MappingNodeValue textMappingNodeValue = (MappingNodeValue) treeObjectBuilder.getRootXPathNode().getTextNode().getNodeValue(); Mapping textMapping = textMappingNodeValue.getMapping(); Object childObject = referenceDescriptor.getInstantiationPolicy().buildNewInstance(); if(textMapping.isAbstractDirectMapping()) { DirectMapping xmlDirectMapping = (DirectMapping) textMappingNodeValue.getMapping(); Field xmlField = (Field) xmlDirectMapping.getField(); Object realValue = unmarshalRecord.getXMLReader().convertValueBasedOnSchemaType(xmlField, value, (ConversionManager) unmarshalRecord.getSession().getDatasourcePlatform().getConversionManager(), unmarshalRecord); Object convertedValue = xmlDirectMapping.getAttributeValue(realValue, unmarshalRecord.getSession(), unmarshalRecord); xmlDirectMapping.setAttributeValueInObject(childObject, convertedValue); } else { Object oldChildObject = unmarshalRecord.getCurrentObject(); CompositeObjectMapping nestedXMLCompositeObjectMapping = (CompositeObjectMapping) textMappingNodeValue.getMapping(); unmarshalRecord.setCurrentObject(childObject); textMappingNodeValue.attribute(unmarshalRecord, namespaceURI, localName, value); unmarshalRecord.setCurrentObject(oldChildObject); } setAttributeValue(childObject, unmarshalRecord); }