@Test public void roomsFeedWithRoomsToEmployeesInlineTeams() throws Exception { InputStream stream = getFileAsStream("RoomsToEmployeesWithInlineTeams.xml"); assertNotNull(stream); EntityStream es = new EntityStream(); es.setContent(stream); es.setReadProperties(DEFAULT_PROPERTIES); ODataClientImpl client = new ODataClientImpl(); ContentTypeBasedDeserializer deserializer = client.createDeserializer("application/atom+xml"); ODataFeed feed = deserializer.readFeed( MockFacade.getMockEdm().getDefaultEntityContainer() .getEntitySet( "Employees"), es); assertNotNull(feed); assertEquals(2, feed.getEntries().size()); for (ODataEntry entry : feed.getEntries()) { assertEquals(10, entry.getProperties().size()); assertEquals(3, ((ODataEntry)entry.getProperties().get("ne_Team")).getProperties().size()); } }
public ODataDeltaFeed readFeed(final XMLStreamReader reader, final EntityInfoAggregator eia, final DeserializerProperties readProperties) throws EntityProviderException { try { reader.require(XMLStreamConstants.START_DOCUMENT, null, null); reader.nextTag(); reader.require(XMLStreamConstants.START_ELEMENT, Edm.NAMESPACE_ATOM_2005, FormatXml.ATOM_FEED); Map<String, String> foundPrefix2NamespaceUri = extractNamespacesFromTag(reader); foundPrefix2NamespaceUri.putAll(readProperties.getValidatedPrefixNamespaceUris()); checkAllMandatoryNamespacesAvailable(foundPrefix2NamespaceUri); DeserializerProperties entryReadProperties = DeserializerProperties.initFrom(readProperties) .addValidatedPrefixes(foundPrefix2NamespaceUri).build(); return readFeedData(reader, eia, entryReadProperties); } catch (XMLStreamException e) { throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass() .getSimpleName()), e); } }
XmlFeedDeserializer { public ODataDeltaFeed readFeed(final XMLStreamReader reader, final EntityInfoAggregator eia, final DeserializerProperties readProperties) throws EntityProviderException { try { reader.require(XMLStreamConstants.START_DOCUMENT, null, null); reader.nextTag(); reader.require(XMLStreamConstants.START_ELEMENT, Edm.NAMESPACE_ATOM_2005, FormatXml.ATOM_FEED); Map<String, String> foundPrefix2NamespaceUri = extractNamespacesFromTag(reader); foundPrefix2NamespaceUri.putAll(readProperties.getValidatedPrefixNamespaceUris()); checkAllMandatoryNamespacesAvailable(foundPrefix2NamespaceUri); DeserializerProperties entryReadProperties = DeserializerProperties.initFrom(readProperties) .addValidatedPrefixes(foundPrefix2NamespaceUri).build(); return readFeedData(reader, eia, entryReadProperties); } catch (XMLStreamException e) { throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass() .getSimpleName()), e); } } }
XmlFeedDeserializer { public ODataDeltaFeed readFeed(final XMLStreamReader reader, final EntityInfoAggregator eia, final DeserializerProperties readProperties) throws EntityProviderException { try { reader.require(XMLStreamConstants.START_DOCUMENT, null, null); reader.nextTag(); reader.require(XMLStreamConstants.START_ELEMENT, Edm.NAMESPACE_ATOM_2005, FormatXml.ATOM_FEED); Map<String, String> foundPrefix2NamespaceUri = extractNamespacesFromTag(reader); foundPrefix2NamespaceUri.putAll(readProperties.getValidatedPrefixNamespaceUris()); checkAllMandatoryNamespacesAvailable(foundPrefix2NamespaceUri); DeserializerProperties entryReadProperties = DeserializerProperties.initFrom(readProperties) .addValidatedPrefixes(foundPrefix2NamespaceUri).build(); return readFeedData(reader, eia, entryReadProperties); } catch (XMLStreamException e) { throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass() .getSimpleName()), e); } }  }
XmlFeedDeserializer { public ODataDeltaFeed readFeed(final XMLStreamReader reader, final EntityInfoAggregator eia, final DeserializerProperties readProperties) throws EntityProviderException { try { reader.require(XMLStreamConstants.START_DOCUMENT, null, null); reader.nextTag(); reader.require(XMLStreamConstants.START_ELEMENT, Edm.NAMESPACE_ATOM_2005, FormatXml.ATOM_FEED); Map<String, String> foundPrefix2NamespaceUri = extractNamespacesFromTag(reader); foundPrefix2NamespaceUri.putAll(readProperties.getValidatedPrefixNamespaceUris()); checkAllMandatoryNamespacesAvailable(foundPrefix2NamespaceUri); DeserializerProperties entryReadProperties = DeserializerProperties.initFrom(readProperties) .addValidatedPrefixes(foundPrefix2NamespaceUri).build(); return readFeedData(reader, eia, entryReadProperties); } catch (XMLStreamException e) { throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass() .getSimpleName()), e); } }  ODataDeltaFeed readFeed(final XMLStreamReader reader, final EntityInfoAggregator eia,
      final DeserializerProperties readProperties); }
XmlFeedDeserializer { public ODataDeltaFeed readFeed(final XMLStreamReader reader, final EntityInfoAggregator eia, final DeserializerProperties readProperties) throws EntityProviderException { try { reader.require(XMLStreamConstants.START_DOCUMENT, null, null); reader.nextTag(); reader.require(XMLStreamConstants.START_ELEMENT, Edm.NAMESPACE_ATOM_2005, FormatXml.ATOM_FEED); Map<String, String> foundPrefix2NamespaceUri = extractNamespacesFromTag(reader); foundPrefix2NamespaceUri.putAll(readProperties.getValidatedPrefixNamespaceUris()); checkAllMandatoryNamespacesAvailable(foundPrefix2NamespaceUri); DeserializerProperties entryReadProperties = DeserializerProperties.initFrom(readProperties) .addValidatedPrefixes(foundPrefix2NamespaceUri).build(); return readFeedData(reader, eia, entryReadProperties); } catch (XMLStreamException e) { throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass() .getSimpleName()), e); } }  ODataDeltaFeed readFeed(final XMLStreamReader reader, final EntityInfoAggregator eia,
      final DeserializerProperties readProperties);  }