Examples of writeFeed()


Examples of com.colorfulsoftware.atom.FeedWriter.writeFeed()

      // make sure it can also be written afterwards.
      FeedWriter feedWriter = new FeedWriter();
      XMLStreamWriter writer = XMLOutputFactory.newInstance()
          .createXMLStreamWriter(
              new FileOutputStream("target/dump1.xml"));
      feedWriter.writeFeed(writer, feed);

    } catch (Exception e) {
      e.printStackTrace();
      fail("could not read fead.");
    }
View Full Code Here

Examples of com.colorfulsoftware.atom.FeedWriter.writeFeed()

      // make sure it can also be written afterwards.
      FeedWriter feedWriter = new FeedWriter();
      XMLStreamWriter writer = XMLOutputFactory.newInstance()
          .createXMLStreamWriter(
              new FileOutputStream("target/dump1.xml"));
      feedWriter.writeFeed(writer, feed);

    } catch (Exception e) {
      e.printStackTrace();
      fail("could not read fead.");
    }
View Full Code Here

Examples of com.colorfulsoftware.atom.FeedWriter.writeFeed()

      // make sure it can also be written afterwards.
      FeedWriter feedWriter = new FeedWriter();
      XMLStreamWriter writer = XMLOutputFactory.newInstance()
          .createXMLStreamWriter(
              new FileOutputStream("target/dump1.xml"));
      feedWriter.writeFeed(writer, feed);

    } catch (Exception e) {
      e.printStackTrace();
      fail("could not read fead.");
    }
View Full Code Here

Examples of com.colorfulsoftware.atom.FeedWriter.writeFeed()

      // make sure it can also be written afterwards.
      FeedWriter feedWriter = new FeedWriter();
      XMLStreamWriter writer = XMLOutputFactory.newInstance()
          .createXMLStreamWriter(
              new FileOutputStream("target/dump1.xml"));
      feedWriter.writeFeed(writer, feed);

    } catch (Exception e) {
      e.printStackTrace();
      fail("could not read fead.");
    }
View Full Code Here

Examples of org.apache.olingo.odata2.core.ep.AtomEntityProvider.writeFeed()

  @Test
  public void testWithIncludeSimplePropertyTypes() throws Exception {
    AtomEntityProvider ser = createAtomEntityProvider();
    EntityProviderWriteProperties properties =
        EntityProviderWriteProperties.serviceRoot(BASE_URI).includeSimplePropertyType(true).build();
    ODataResponse response = ser.writeFeed(view.getTargetEntitySet(), roomsData, properties);
    String xmlString = verifyResponse(response);

    assertXpathExists("/a:feed", xmlString);
    assertXpathExists("/a:feed/a:entry/a:content/m:properties", xmlString);
    assertXpathExists("/a:feed/a:entry/a:content/m:properties/d:Id[@m:type=\"Edm.String\"]", xmlString);
View Full Code Here

Examples of org.apache.olingo.odata2.core.ep.AtomEntityProvider.writeFeed()

  @Test
  public void testFeedNamespaces() throws Exception {
    AtomEntityProvider ser = createAtomEntityProvider();
    EntityProviderWriteProperties properties =
        EntityProviderWriteProperties.serviceRoot(BASE_URI).build();
    ODataResponse response = ser.writeFeed(view.getTargetEntitySet(), roomsData, properties);
    String xmlString = verifyResponse(response);

    assertXpathExists("/a:feed", xmlString);
    assertXpathEvaluatesTo(BASE_URI.toASCIIString(), "/a:feed/@xml:base", xmlString);
  }
View Full Code Here

Examples of org.apache.olingo.odata2.core.ep.AtomEntityProvider.writeFeed()

  @Test
  public void testSelfLink() throws Exception {
    AtomEntityProvider ser = createAtomEntityProvider();
    EntityProviderWriteProperties properties =
        EntityProviderWriteProperties.serviceRoot(BASE_URI).build();
    ODataResponse response = ser.writeFeed(view.getTargetEntitySet(), roomsData, properties);
    String xmlString = verifyResponse(response);

    assertXpathExists("/a:feed/a:link[@rel='self']", xmlString);
    assertXpathEvaluatesTo("Rooms", "/a:feed/a:link[@rel='self']/@href", xmlString);
    assertXpathEvaluatesTo("Rooms", "/a:feed/a:link[@rel='self']/@title", xmlString);
View Full Code Here

Examples of org.apache.olingo.odata2.core.ep.AtomEntityProvider.writeFeed()

    String customLink = "Test";
    AtomEntityProvider ser = createAtomEntityProvider();
    EntityProviderWriteProperties properties =
        EntityProviderWriteProperties.serviceRoot(BASE_URI).selfLink(
            new URI(customLink)).build();
    ODataResponse response = ser.writeFeed(view.getTargetEntitySet(), roomsData, properties);
    String xmlString = verifyResponse(response);

    assertXpathExists("/a:feed/a:link[@rel='self']", xmlString);
    assertXpathEvaluatesTo(customLink, "/a:feed/a:link[@rel='self']/@href", xmlString);
    assertXpathEvaluatesTo("Rooms", "/a:feed/a:link[@rel='self']/@title", xmlString);
View Full Code Here

Examples of org.apache.olingo.odata2.core.ep.AtomEntityProvider.writeFeed()

  @Test
  public void testFeedMandatoryParts() throws Exception {
    AtomEntityProvider ser = createAtomEntityProvider();
    EntityProviderWriteProperties properties =
        EntityProviderWriteProperties.serviceRoot(BASE_URI).build();
    ODataResponse response = ser.writeFeed(view.getTargetEntitySet(), roomsData, properties);
    String xmlString = verifyResponse(response);

    assertXpathExists("/a:feed/a:id", xmlString);
    assertXpathEvaluatesTo(BASE_URI.toASCIIString() + "Rooms", "/a:feed/a:id/text()", xmlString);
View Full Code Here

Examples of org.apache.olingo.odata2.core.ep.AtomEntityProvider.writeFeed()

    AtomEntityProvider ser = createAtomEntityProvider();
    EntityProviderWriteProperties properties = EntityProviderWriteProperties.serviceRoot(BASE_URI)
        .inlineCount(Integer.valueOf(103))
        .inlineCountType(InlineCount.ALLPAGES)
        .build();
    ODataResponse response = ser.writeFeed(view.getTargetEntitySet(), roomsData, properties);
    String xmlString = verifyResponse(response);

    assertXpathExists("/a:feed/m:count", xmlString);
    assertXpathEvaluatesTo("103", "/a:feed/m:count/text()", xmlString);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.