Package com.google.gdata.data

Examples of com.google.gdata.data.Link


      for(VideoEntry entry : videoFeed.getEntries() ) {
        uniques.add(entry.getId());
      }
     
      //check if we have more results
      Link nextLink = videoFeed.getLink("next", "application/atom+xml");
      if(nextLink != null) {
        queryUrl = nextLink.getHref();
      }
      else {
        queryUrl = null;
      }
     
View Full Code Here


      LOGGER.severe(murle.toString());
    }
       
    UserFeed feed = null;
    try {
      Link nextLink;
      do {
        UserFeed currentPage = (UserFeed) service.getFeed(
            feedUrl, UserFeed.class, lastFetchDateTime);
        if (feed == null) {
          feed = new UserFeed();
View Full Code Here

      while (feedUrl != null) {
        UserFeed albumFeed = service.getFeed(feedUrl, UserFeed.class);
        albums.addAll(albumFeed.getAlbumEntries());
       
        Link nextLink = albumFeed.getNextLink();
        if (nextLink == null) {
          feedUrl = null;
        } else {
          feedUrl = new URL(nextLink.getHref());
        }
      }
     
      return albums;
    } catch (MalformedURLException e) {
View Full Code Here

      CaptionTrackFeed captionTrackFeed = service.getFeed(new URL(feedUrl), CaptionTrackFeed.class);

      HashMap<String, String> languageToUrl = new HashMap<String, String>();
      for (CaptionTrackEntry captionTrackEntry : captionTrackFeed.getEntries()) {
        String languageCode = captionTrackEntry.getLanguageCode();
        Link link = captionTrackEntry.getLink("edit-media", "application/vnd.youtube.timedtext");
        if (link != null) {
          languageToUrl.put(languageCode, link.getHref());
        }
      }

      return languageToUrl;
    } catch (MalformedURLException e) {
View Full Code Here

    try {
      while (playlistUrl != null) {
        PlaylistFeed playlistFeed = service.getFeed(new URL(playlistUrl), PlaylistFeed.class);
       
        Link nextLink = playlistFeed.getNextLink();
        if (nextLink == null) {
          playlistUrl = null;
        } else {
          playlistUrl = nextLink.getHref();
        }
       
        for (PlaylistEntry playlistEntry : playlistFeed.getEntries()) {
          if (playlistEntry.getMediaGroup().getVideoId().equals(videoId)) {
            return playlistEntry;
View Full Code Here

    try {
      PlaylistFeed playlistFeed = null;
     
      while (playlistUrl != null) {
        playlistFeed = service.getFeed(new URL(playlistUrl), PlaylistFeed.class);
        Link nextLink = playlistFeed.getNextLink();
       
        if (nextLink == null) {
          playlistUrl = null;
        } else {
          playlistUrl = nextLink.getHref();
        }
      }
     
      if (playlistFeed != null) {
        List<PlaylistEntry> entries = playlistFeed.getEntries();
View Full Code Here

      while (feedUrl != null) {
        PlaylistLinkFeed playlistFeed = service.getFeed(feedUrl, PlaylistLinkFeed.class);
        playlistEntries.addAll(playlistFeed.getEntries());
       
        Link nextLink = playlistFeed.getNextLink();
        if (nextLink == null) {
          feedUrl = null;
        } else {
          feedUrl = new URL(nextLink.getHref());
        }
      }
     
      return playlistEntries;
    } catch (MalformedURLException e) {
View Full Code Here

      VideoEntry videoEntry = apiManager.getVideoEntry(id);
      if (videoEntry == null) {
        throw new IllegalArgumentException(String.format("Couldn't retrieve video entry with id " + "'%s' for user '%s'.", id, user));
      }

      Link insightLink = videoEntry.getLink("http://gdata.youtube.com/schemas/2007#insight.views", null);
      if (insightLink != null) {
        String url = insightLink.getHref();
        if (util.isNullOrEmpty(url)) {
          throw new IllegalArgumentException(String.format("No insight download URL found for " + "video id '%s'.", id));
        }

        resp.sendRedirect(url);
View Full Code Here

      BatchUtils.setBatchOperationType(entry, batchOperationType);
      batchRequest.getEntries().add(entry);
    }

    // Get the batch link URL and send the batch request there.
    Link batchLink = batchFeed.getLink(Link.Rel.FEED_BATCH, Link.Type.ATOM);
    CalendarEventFeed batchResponse = service.batch(new URL(batchLink.getHref()), batchRequest);

    // Ensure that all the operations were successful.
    boolean isSuccess = true;
    for (CalendarEventEntry entry : batchResponse.getEntries()) {
      String batchId = BatchUtils.getBatchId(entry);
View Full Code Here

        BatchUtils.setBatchOperationType(batchEntry, BatchOperationType.UPDATE);
        batchRequest.getEntries().add(batchEntry);
      }

      // Submit the update
      Link batchLink = cellFeed.getLink(Link.Rel.FEED_BATCH, Link.Type.ATOM);
      URL batchURL = new URL(batchLink.getHref());
      CellFeed batchResponse = spreadsheetService.batch(batchURL, batchRequest);

      // Ensure that all the operations were successful.
      boolean isSuccess = true;
      for (CellEntry entry : batchResponse.getEntries()) {
View Full Code Here

TOP

Related Classes of com.google.gdata.data.Link

Copyright © 2018 www.massapicom. 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.