@SuppressWarnings("unchecked") @Test public void readComplexPropertyWithNamespace() throws Exception { String xml = "<d:Location m:type=\"RefScenario.c_Location\" " + " xmlns:m=\"" + Edm.NAMESPACE_M_2007_08 + "\"" + " xmlns:d=\"" + Edm.NAMESPACE_D_2007_08 + "\">" + " <d:Country>Germany</d:Country>" + " <d:City m:type=\"RefScenario.c_City\">" + " <d:PostalCode>69124</d:PostalCode>" + " <d:CityName>Heidelberg</d:CityName>" + " </d:City>" + "</d:Location>"; XMLStreamReader reader = createReaderForTest(xml, true); final EdmProperty property = (EdmProperty) MockFacade.getMockEdm().getEntityType("RefScenario", "Employee").getProperty("Location"); Object prop = new XmlPropertyConsumer().readProperty(reader, property, null); Map<String, Object> resultMap = (Map<String, Object>) prop; Map<String, Object> locationMap = (Map<String, Object>) resultMap.get("Location"); assertEquals("Germany", locationMap.get("Country")); Map<String, Object> cityMap = (Map<String, Object>) locationMap.get("City"); assertEquals("69124", cityMap.get("PostalCode")); assertEquals("Heidelberg", cityMap.get("CityName")); }
public Map<String, Object> readProperty(final XMLStreamReader reader, final EdmProperty property, final EntityProviderReadProperties readProperties) throws EntityProviderException { return readProperty(reader, EntityInfoAggregator.create(property), readProperties); }
XmlPropertyConsumer { public Map<String, Object> readProperty(final XMLStreamReader reader, final EdmProperty property, final EntityProviderReadProperties readProperties) throws EntityProviderException { return readProperty(reader, EntityInfoAggregator.create(property), readProperties); } }
XmlPropertyConsumer { public Map<String, Object> readProperty(final XMLStreamReader reader, final EdmProperty property, final EntityProviderReadProperties readProperties) throws EntityProviderException { return readProperty(reader, EntityInfoAggregator.create(property), readProperties); }  }
XmlPropertyConsumer { public Map<String, Object> readProperty(final XMLStreamReader reader, final EdmProperty property, final EntityProviderReadProperties readProperties) throws EntityProviderException { return readProperty(reader, EntityInfoAggregator.create(property), readProperties); }  Map<String, Object> readProperty(final XMLStreamReader reader, final EdmProperty property,
      final EntityProviderReadProperties readProperties); Map<String, Object> readProperty(final XMLStreamReader reader, final EntityPropertyInfo propertyInfo,
      final EntityProviderReadProperties readProperties); List<?> readCollection(XMLStreamReader reader, final EntityPropertyInfo info,
      final EntityProviderReadProperties properties); }
XmlPropertyConsumer { public Map<String, Object> readProperty(final XMLStreamReader reader, final EdmProperty property, final EntityProviderReadProperties readProperties) throws EntityProviderException { return readProperty(reader, EntityInfoAggregator.create(property), readProperties); }  Map<String, Object> readProperty(final XMLStreamReader reader, final EdmProperty property,
      final EntityProviderReadProperties readProperties); Map<String, Object> readProperty(final XMLStreamReader reader, final EntityPropertyInfo propertyInfo,
      final EntityProviderReadProperties readProperties); List<?> readCollection(XMLStreamReader reader, final EntityPropertyInfo info,
      final EntityProviderReadProperties properties);  }