Package com.google.gdata.data.photos

Examples of com.google.gdata.data.photos.AlbumFeed


  }
 
  @Override
  public List<PhotoEntry> selectPhotos(String albumId) throws
      MalformedURLException, IOException, ServiceException {
    AlbumFeed feed = getPicasawebService().getFeed(new URL(
        getPicasaURL(albumId)), AlbumFeed.class);
    return feed.getPhotoEntries();
  }
View Full Code Here


      throws MalformedURLException, IOException, ServiceException {
    Query myQuery = new Query(new URL(getPicasaURL()));
    myQuery.setStringCustomParameter("kind", "photo");
    myQuery.setMaxResults(count);
    myQuery.setFullTextQuery(title);
    AlbumFeed feed = getPicasawebService().query(myQuery, AlbumFeed.class);
    return feed.getPhotoEntries();
  }
View Full Code Here

      URL feedUrl = new URL("https://picasaweb.google.com/data/feed/api/user/"   +
            ApplicationConstants.PICASA_WEB_USERNAME_SHORT     +
            "/albumid/" + ApplicationConstants.PICASA_MAIN_ALBUM_ID );

      AlbumFeed mainAlbum = this.picasawebService.getFeed(feedUrl, AlbumFeed.class);

      this.photos = mainAlbum.getPhotoEntries();

      // Set last update entries
      this.lastUpdate = new Date();

      }
View Full Code Here

        // retrieve list of photos


        try {
            AlbumFeed feed = picasaService.getFeed(new URL(feedURI), AlbumFeed.class);
            for(PhotoEntry photo : feed.getPhotoEntries()) {
                Image image = fromEntry(photo);
                images.add(new Entry(image.getId(), image));
            }
        } catch (MalformedURLException e) {
            // TODO Auto-generated catch block
View Full Code Here

      urlWithParam = newAlbumUrl + "&max-results=1";
    } else {
      urlWithParam = newAlbumUrl + "?max-results=1";
    }
   
    AlbumFeed albumFeed = getAlbumFeedFromUrl(urlWithParam);
    if (albumFeed == null) {
      throw new IllegalArgumentException(String.format("Could not retrieve album from URL '%s'.",
          urlWithParam));
    }
    String newAlbumId = albumFeed.getGphotoId();

    com.google.gdata.data.photos.PhotoEntry photoEntry = getPhotoEntryFromUrl(photoUrl);
    if (photoEntry == null) {
      throw new IllegalArgumentException(String.format("Could not get photo from URL '%s'.",
          photoUrl));
View Full Code Here

   * Retrieves the photos for the given album.
   */
  public List<PhotoEntry> getPhotos(AlbumEntry album) throws IOException, ServiceException {

    String feedHref = getLinkByRel(album.getLinks(), Link.Rel.FEED);
    AlbumFeed albumFeed = getFeed(feedHref, AlbumFeed.class);

    List<GphotoEntry> entries = albumFeed.getEntries();
    List<PhotoEntry> photos = new ArrayList<PhotoEntry>();
    for (GphotoEntry entry : entries) {
      GphotoEntry adapted = entry.getAdaptedEntry();
      if (adapted instanceof PhotoEntry) {
        photos.add((PhotoEntry) adapted);
View Full Code Here

   * Retrieves the comments for the given photo.
   */
  public List<CommentEntry> getComments(PhotoEntry photo) throws IOException, ServiceException {

    String feedHref = getLinkByRel(photo.getLinks(), Link.Rel.FEED);
    AlbumFeed albumFeed = getFeed(feedHref, AlbumFeed.class);

    List<GphotoEntry> entries = albumFeed.getEntries();
    List<CommentEntry> comments = new ArrayList<CommentEntry>();
    for (GphotoEntry entry : entries) {
      GphotoEntry adapted = entry.getAdaptedEntry();
      if (adapted instanceof CommentEntry) {
        comments.add((CommentEntry) adapted);
View Full Code Here

   */
  public List<TagEntry> getTags(GphotoEntry<?> parent) throws IOException, ServiceException {

    String feedHref = getLinkByRel(parent.getLinks(), Link.Rel.FEED);
    feedHref = addKindParameter(feedHref, "tag");
    AlbumFeed albumFeed = getFeed(feedHref, AlbumFeed.class);

    List<GphotoEntry> entries = albumFeed.getEntries();
    List<TagEntry> tags = new ArrayList<TagEntry>();
    for (GphotoEntry entry : entries) {
      GphotoEntry adapted = entry.getAdaptedEntry();
      if (adapted instanceof TagEntry) {
        tags.add((TagEntry) adapted);
View Full Code Here

    String fields = "entry(title,gphoto:id,gphoto:location)";

    Query albumQuery = new Query(new URL(albumsUrl));
    albumQuery.setFields(fields);

    AlbumFeed feed = service.query(albumQuery, AlbumFeed.class);
    for (GphotoEntry entry : feed.getEntries()) {
      if (entry instanceof AlbumEntry) {
        AlbumEntry albumEntry = (AlbumEntry) entry;
        OUT.println(albumEntry.getGphotoId() + ":"
            + albumEntry.getTitle().getPlainText()
            + " (" + albumEntry.getLocation()  + ")");
View Full Code Here

   */
  public List<PhotoEntry> getPhotos(AlbumEntry album) throws IOException,
      ServiceException {

    String feedHref = getLinkByRel(album.getLinks(), Link.Rel.FEED);
    AlbumFeed albumFeed = getFeed(feedHref, AlbumFeed.class);

    List<GphotoEntry> entries = albumFeed.getEntries();
    List<PhotoEntry> photos = new ArrayList<PhotoEntry>();
    for (GphotoEntry entry : entries) {
      GphotoEntry adapted = entry.getAdaptedEntry();
      if (adapted instanceof PhotoEntry) {
        photos.add((PhotoEntry) adapted);
View Full Code Here

TOP

Related Classes of com.google.gdata.data.photos.AlbumFeed

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.