public String getIcon() { return webContentLink.getHref(); }
public String getIcon() { return webContentLink.getHref(); }
public String getIcon() { return webContentLink.getHref(); }
/** * Gets the rel=related type=application/atom+xml link pointing to the video. * * @return video url or null */ public String getVideoUrl() { Link link = getLink(Link.Rel.RELATED, Link.Type.ATOM); return link == null ? null : link.getHref(); }
/** * Returns the id given by the given entry's parent link, or null if it has * no parent link. */ public static String getParentId(BaseContentEntry<?> entry) { Link link = entry.getLink(SitesLink.Rel.PARENT, ILink.Type.ATOM); if (link == null) { return null; } return link.getHref(); }
/** Gets the url pointing to the user profile entry of this contact. */ public String getUserProfileLink() { Link link = getLink(Link.Rel.RELATED, Link.Type.ATOM); return link == null ? null : link.getHref(); }
/** Gets the url pointing to the user profile entry of this contact. */ public String getUserProfileLink() { Link link = getLink(Link.Rel.RELATED, Link.Type.ATOM); return link == null ? null : link.getHref(); }
/** * Gets the rel=related type=application/atom+xml link pointing to the video. * * @return video url or null */ public String getVideoUrl() { Link link = getLink(Link.Rel.RELATED, Link.Type.ATOM); return link == null ? null : link.getHref(); }
/** * Get the next page from the atom:next link * * @param atomLink The feed link for next page * @return A GenericFeed of entries of next page from the atom:next link * @throws AppsForYourDomainException If a Provisioning API error occurs * @throws MalformedURLException If a URL related error occurs * @throws IOException If a network I/O related error occurs * @throws ServiceException If the API service fails */ public GenericFeed getNextPage(Link atomLink) throws AppsForYourDomainException, MalformedURLException, IOException, ServiceException { return getFeed(new URL(atomLink.getHref()), GenericFeed.class); }
/** * Get the next page from the atom:next link * * @param atomLink The feed link for next page * @return A GenericFeed of entries of next page from the atom:next link * @throws AppsForYourDomainException If a Provisioning API error occurs * @throws MalformedURLException If a URL related error occurs * @throws IOException If a network I/O related error occurs * @throws ServiceException If the API service fails */ public GenericFeed getNextPage(Link atomLink) throws AppsForYourDomainException, MalformedURLException, IOException, ServiceException { return getFeed(new URL(atomLink.getHref()), GenericFeed.class); }
/** * Gets the URL for this spreadsheet's worksheets feed. * You can then create a query using this URL to query this worksheet's * sheets. * * @return a URL to get a feed of worksheets */ public URL getWorksheetFeedUrl() { Link feedLink = this.getLink( com.google.gdata.data.spreadsheet.Namespaces.WORKSHEETS_LINK_REL, Link.Type.ATOM); try { return new URL(feedLink.getHref()); } catch (MalformedURLException e) { throw new RuntimeException("Error in GData server", e); } }
/** * Gets the URL for this spreadsheet's worksheets feed. * You can then create a query using this URL to query this worksheet's * sheets. * * @return a URL to get a feed of worksheets */ public URL getWorksheetFeedUrl() { Link feedLink = this.getLink( com.google.gdata.data.spreadsheet.Namespaces.WORKSHEETS_LINK_REL, Link.Type.ATOM); try { return new URL(feedLink.getHref()); } catch (MalformedURLException e) { throw new RuntimeException("Error in GData server", e); } }
/** * Gets the URL for this spreadsheet's worksheets feed. * You can then create a query using this URL to query this worksheet's * sheets. * * @return a URL to get a feed of worksheets */ public URL getWorksheetFeedUrl() { Link feedLink = this.getLink( com.google.gdata.data.spreadsheet.Namespaces.WORKSHEETS_LINK_REL, Link.Type.ATOM); try { return new URL(feedLink.getHref()); } catch (MalformedURLException e) { throw new RuntimeException("Error in GData server", e); } }
/** * Gets the first worksheet in the spreadsheet. * * This is very useful if your spreadsheet only has one worksheet. * * @return the first worksheet */ public WorksheetEntry getDefaultWorksheet() throws IOException, ServiceException { Link feedLink = this.getLink( com.google.gdata.data.spreadsheet.Namespaces.WORKSHEETS_LINK_REL, Link.Type.ATOM); String url = feedLink.getHref() + "/default"; return state.service.getEntry(new URL(url), WorksheetEntry.class); } }
/** * Gets the first worksheet in the spreadsheet. * * This is very useful if your spreadsheet only has one worksheet. * * @return the first worksheet */ public WorksheetEntry getDefaultWorksheet() throws IOException, ServiceException { Link feedLink = this.getLink( com.google.gdata.data.spreadsheet.Namespaces.WORKSHEETS_LINK_REL, Link.Type.ATOM); String url = feedLink.getHref() + "/default"; return state.service.getEntry(new URL(url), WorksheetEntry.class); } }
/** * Gets the first worksheet in the spreadsheet. * * This is very useful if your spreadsheet only has one worksheet. * * @return the first worksheet */ public WorksheetEntry getDefaultWorksheet() throws IOException, ServiceException { Link feedLink = this.getLink( com.google.gdata.data.spreadsheet.Namespaces.WORKSHEETS_LINK_REL, Link.Type.ATOM); String url = feedLink.getHref() + "/default"; return state.service.getEntry(new URL(url), WorksheetEntry.class); } }
private String getFeedUrlString(String linkRelKind) { Version spreadsheetVersion = state.service.getProtocolVersion(); if (spreadsheetVersion.isCompatible(SpreadsheetService.Versions.V1)) { Link feedLink = this.getLink(linkRelKind, Link.Type.ATOM); return feedLink.getHref(); } else { // must be SpreadsheetService.Versions.V2; only 2 versions for now // List or Cells feed Url? if (linkRelKind.equals(Namespaces.LIST_LINK_REL)) { // the list feed is stored as a <content> tag return ((OutOfLineContent)(this.getContent())).getUri(); } else { // it must be Namespaces.CELLS_LINK_REL // the cells feed is stored in the <link> tag Link feedLink = this.getLink(linkRelKind, Link.Type.ATOM); return feedLink.getHref(); } } }
private String getFeedUrlString(String linkRelKind) { Version spreadsheetVersion = state.service.getProtocolVersion(); if (spreadsheetVersion.isCompatible(SpreadsheetService.Versions.V1)) { Link feedLink = this.getLink(linkRelKind, Link.Type.ATOM); return feedLink.getHref(); } else { // must be SpreadsheetService.Versions.V2; only 2 versions for now // List or Cells feed Url? if (linkRelKind.equals(Namespaces.LIST_LINK_REL)) { // the list feed is stored as a <content> tag return ((OutOfLineContent)(this.getContent())).getUri(); } else { // it must be Namespaces.CELLS_LINK_REL // the cells feed is stored in the <link> tag Link feedLink = this.getLink(linkRelKind, Link.Type.ATOM); return feedLink.getHref(); } } }
/** * Gets the URL for this spreadseet's worksheets feed as a string. * * <p>This checks for version compatibility also. * * and call that from here, just like in WorksheetEntry. * * @return a string representing the URL for the worksheets feed */ private String getWorksheetFeedUrlString() { Version spreadsheetVersion = state.service.getProtocolVersion(); if (spreadsheetVersion.isCompatible(SpreadsheetService.Versions.V1)) { Link feedLink = this.getLink(Namespaces.WORKSHEETS_LINK_REL, Link.Type.ATOM); return feedLink.getHref(); } else { // must be SpreadsheetService.Versions.V2; only 2 versions for now return ((OutOfLineContent)(this.getContent())).getUri(); } }
/** * Gets the URL for this spreadseet's worksheets feed as a string. * * <p>This checks for version compatibility also. * * and call that from here, just like in WorksheetEntry. * * @return a string representing the URL for the worksheets feed */ private String getWorksheetFeedUrlString() { Version spreadsheetVersion = state.service.getProtocolVersion(); if (spreadsheetVersion.isCompatible(SpreadsheetService.Versions.V1)) { Link feedLink = this.getLink(Namespaces.WORKSHEETS_LINK_REL, Link.Type.ATOM); return feedLink.getHref(); } else { // must be SpreadsheetService.Versions.V2; only 2 versions for now return ((OutOfLineContent)(this.getContent())).getUri(); } }