@Test public void readDeltaLink() throws Exception { String content = readFile("feed_with_delta_link.xml"); assertNotNull(content); EdmEntitySet entitySet = MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Employees"); InputStream reqContent = createContentAsStream(content); XmlEntityConsumer xec = new XmlEntityConsumer(); EntityProviderReadProperties consumerProperties = EntityProviderReadProperties.init() .mergeSemantic(false).build(); ODataFeed feed = xec.readFeed(entitySet, reqContent, consumerProperties); assertNotNull(feed); FeedMetadata feedMetadata = feed.getFeedMetadata(); assertNotNull(feedMetadata); String deltaLink = feedMetadata.getDeltaLink(); assertNotNull(deltaLink); assertEquals("http: }
public ODataDeltaFeed readFeed(final EdmEntitySet entitySet, final InputStream content, final EntityProviderReadProperties properties) throws EntityProviderException { XMLStreamReader reader = null; EntityProviderException cachedException = null; try { reader = XmlHelper.createStreamReader(content); EntityInfoAggregator eia = EntityInfoAggregator.create(entitySet); XmlFeedConsumer xfc = new XmlFeedConsumer(); return xfc.readFeed(reader, eia, properties); } catch (EntityProviderException e) { cachedException = e; throw cachedException; } finally { if (reader != null) { try { reader.close(); } catch (XMLStreamException e) { if (cachedException != null) { throw cachedException; } else { throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass() .getSimpleName()), e); } } } } }
XmlEntityConsumer { public ODataDeltaFeed readFeed(final EdmEntitySet entitySet, final InputStream content, final EntityProviderReadProperties properties) throws EntityProviderException { XMLStreamReader reader = null; EntityProviderException cachedException = null; try { reader = XmlHelper.createStreamReader(content); EntityInfoAggregator eia = EntityInfoAggregator.create(entitySet); XmlFeedConsumer xfc = new XmlFeedConsumer(); return xfc.readFeed(reader, eia, properties); } catch (EntityProviderException e) { cachedException = e; throw cachedException; } finally { if (reader != null) { try { reader.close(); } catch (XMLStreamException e) { if (cachedException != null) { throw cachedException; } else { throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass() .getSimpleName()), e); } } } } } }
XmlEntityConsumer { public ODataDeltaFeed readFeed(final EdmEntitySet entitySet, final InputStream content, final EntityProviderReadProperties properties) throws EntityProviderException { XMLStreamReader reader = null; EntityProviderException cachedException = null; try { reader = XmlHelper.createStreamReader(content); EntityInfoAggregator eia = EntityInfoAggregator.create(entitySet); XmlFeedConsumer xfc = new XmlFeedConsumer(); return xfc.readFeed(reader, eia, properties); } catch (EntityProviderException e) { cachedException = e; throw cachedException; } finally { if (reader != null) { try { reader.close(); } catch (XMLStreamException e) { if (cachedException != null) { throw cachedException; } else { throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass() .getSimpleName()), e); } } } } } XmlEntityConsumer(); }
XmlEntityConsumer { public ODataDeltaFeed readFeed(final EdmEntitySet entitySet, final InputStream content, final EntityProviderReadProperties properties) throws EntityProviderException { XMLStreamReader reader = null; EntityProviderException cachedException = null; try { reader = XmlHelper.createStreamReader(content); EntityInfoAggregator eia = EntityInfoAggregator.create(entitySet); XmlFeedConsumer xfc = new XmlFeedConsumer(); return xfc.readFeed(reader, eia, properties); } catch (EntityProviderException e) { cachedException = e; throw cachedException; } finally { if (reader != null) { try { reader.close(); } catch (XMLStreamException e) { if (cachedException != null) { throw cachedException; } else { throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass() .getSimpleName()), e); } } } } } XmlEntityConsumer(); ODataDeltaFeed readFeed(final EdmEntitySet entitySet, final InputStream content,
      final EntityProviderReadProperties properties); ODataEntry readEntry(final EdmEntitySet entitySet, final InputStream content,
      final EntityProviderReadProperties properties); Map<String, Object> readProperty(final EdmProperty edmProperty, final InputStream content,
      final EntityProviderReadProperties properties); Map<String, Object> readProperty(final EntityPropertyInfo propertyInfo, final InputStream content,
      final EntityProviderReadProperties readProperties); Object readPropertyValue(final EdmProperty edmProperty, final InputStream content); Object readPropertyValue(final EdmProperty edmProperty, final InputStream content, final Class<?> typeMapping); Object readCollection(final EntityPropertyInfo info, InputStream content,
      final EntityProviderReadProperties properties); String readLink(final EdmEntitySet entitySet, final Object content); List<String> readLinks(final EdmEntitySet entitySet, final Object content); }
XmlEntityConsumer { public ODataDeltaFeed readFeed(final EdmEntitySet entitySet, final InputStream content, final EntityProviderReadProperties properties) throws EntityProviderException { XMLStreamReader reader = null; EntityProviderException cachedException = null; try { reader = XmlHelper.createStreamReader(content); EntityInfoAggregator eia = EntityInfoAggregator.create(entitySet); XmlFeedConsumer xfc = new XmlFeedConsumer(); return xfc.readFeed(reader, eia, properties); } catch (EntityProviderException e) { cachedException = e; throw cachedException; } finally { if (reader != null) { try { reader.close(); } catch (XMLStreamException e) { if (cachedException != null) { throw cachedException; } else { throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass() .getSimpleName()), e); } } } } } XmlEntityConsumer(); ODataDeltaFeed readFeed(final EdmEntitySet entitySet, final InputStream content,
      final EntityProviderReadProperties properties); ODataEntry readEntry(final EdmEntitySet entitySet, final InputStream content,
      final EntityProviderReadProperties properties); Map<String, Object> readProperty(final EdmProperty edmProperty, final InputStream content,
      final EntityProviderReadProperties properties); Map<String, Object> readProperty(final EntityPropertyInfo propertyInfo, final InputStream content,
      final EntityProviderReadProperties readProperties); Object readPropertyValue(final EdmProperty edmProperty, final InputStream content); Object readPropertyValue(final EdmProperty edmProperty, final InputStream content, final Class<?> typeMapping); Object readCollection(final EntityPropertyInfo info, InputStream content,
      final EntityProviderReadProperties properties); String readLink(final EdmEntitySet entitySet, final Object content); List<String> readLinks(final EdmEntitySet entitySet, final Object content);  }