public static void printAllPosts( GoogleService myService, String blogId) throws ServiceException, IOException { // Request the feed URL feedUrl = new URL("http://www.blogger.com/feeds/" + blogID + "/posts/default"); Feed resultFeed = myService.getFeed(feedUrl, Feed.class); // Print the results System.out.println(resultFeed.getTitle().getPlainText()); for (int i = 0; i < resultFeed.getEntries().size(); i++) { Entry entry = resultFeed.getEntries().get(i); System.out.println("\t" + entry.getTitle().getPlainText()); } System.out.println(); }
Feed feed = getFeed( request ); if ( feed != null ) { String title = feed.getTitle(); if ( title != null ) { collection.setTitle(title);
@Test public void testGetBooksWithCustomProvider() throws Exception { String endpointAddress = "http://localhost:" + PORT + "/bookstore/bookstore4/books/feed"; Feed feed = getFeed(endpointAddress, null); assertEquals("http://localhost:" + PORT + "/bookstore/bookstore4/books/feed", feed.getBaseUri().toString()); assertEquals("Collection of Books", feed.getTitle()); }
@Test public void testGetBooks2() throws Exception { String endpointAddress = "http://localhost:" + PORT + "/bookstore/sub/"; Feed feed = getFeed(endpointAddress, null); assertEquals("http://localhost:" + PORT + "/bookstore/sub/", feed.getBaseUri().toString()); assertEquals("Collection of Books", feed.getTitle()); getAndCompareJson("http://localhost:" + PORT + "/bookstore/sub/books/entries/123.json", "resources/expected_atom_book_json2.txt", "*/*"); }
private void addAtomManagedDatastream(Feed feed, String contentLocation) throws Exception { String dsId = "DS"; Entry dsEntry = feed.addEntry(); dsEntry.setId(feed.getId().toString() + "/" + dsId); Entry dsvEntry = feed.addEntry(); dsvEntry.setId(dsEntry.getId().toString() + "/" + feed.getUpdatedString()); dsEntry.setTitle(feed.getTitle()); dsEntry.setUpdated(feed.getUpdated()); dsEntry.addLink(dsvEntry.getId().toString(), Link.REL_ALTERNATE); dsEntry.addCategory(MODEL.STATE.uri, "A", null); dsEntry.addCategory(MODEL.CONTROL_GROUP.uri, "M", null); dsEntry.addCategory(MODEL.VERSIONABLE.uri, "true", null); dsvEntry.setTitle(feed.getTitle()); dsvEntry.setUpdated(feed.getUpdated()); ThreadHelper.addInReplyTo(dsvEntry, dsEntry.getId()); dsvEntry.setSummary("summary"); dsvEntry.setContent(new IRI(contentLocation), "text/plain"); }
String label = feed.getTitle(); String state = m_xpath.valueOf("/a:feed/a:category[@scheme='"
String label = feed.getTitle(); String state = m_xpath.valueOf("/a:feed/a:category[@scheme='"
assertEquals("http://localhost:" + PORT + "/bookstore/bookstore/books/feed", feed.getBaseUri().toString()); assertEquals("Collection of Books", feed.getTitle());