List of usage examples for com.google.gwt.gdata.client.sidewiki SidewikiAuthor getResourceId
public final native ResourceId getResourceId() ;
From source file:com.google.gwt.gdata.sample.hellogdata.client.SidewikiQueryEntriesByAuthorDemo.java
License:Apache License
/** * Retrieves a Sidewiki entry feed using a Query object. * In GData, feed URIs can contain query string parameters. The * GData query objects aid in building parameterized feed URIs. * Upon successfully receiving the entries feed, we obtain the * first author of the first entry and query for Sidewiki entries * by that author./*from w w w . j av a 2 s. c o m*/ * * @param entriesFeedUri The items feed uri. */ private void queryEntries(String entriesFeedUri) { showStatus("Loading entries feed...", false); SidewikiEntryQuery query = SidewikiEntryQuery.newInstance(entriesFeedUri); query.setMaxResults(25); service.getSidewikiEntryFeed(query, new SidewikiEntryFeedCallback() { public void onFailure(CallErrorException caught) { showStatus("An error occurred while retrieving the entries feed: " + caught.getMessage(), true); } public void onSuccess(SidewikiEntryFeed result) { SidewikiEntry[] entries = result.getEntries(); if (entries.length == 0) { showStatus("No entries matched the search criteria.", false); } else { SidewikiAuthor author = (SidewikiAuthor) entries[0].getAuthors()[0]; queryEntriesByAuthor(author.getResourceId().getValue()); } } }); }