Android Open Source - AndroidFlickrPlay Flickr Query Criteria






From Project

Back to project page AndroidFlickrPlay.

License

The source code is released under:

Apache License

If you think the Android project AndroidFlickrPlay listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.ufo.androidphotoviewer.flickr;
// w w w .j a va 2s .  co  m
import java.io.Serializable;


/**
 * Flickr search criteria object.
 * 
 * Will return a query URL which will be used by the FlickrQueryEngine
 * to query and produce a Query ResutSet. This URL is generated based on 
 * constructed criteria. 
 * 
 * @author vlad
 *
 */
public class FlickrQueryCriteria implements Serializable
{
  private static final long serialVersionUID = -2239058277895497111L;
  
  // For demonstration of class functionality
  public enum Stream {
      PUBLIC1, PUBLIC2 
  }
  
  // Generated based on other criteria provided such as feed type ext.
  private String requestUrl;
  
  
  public FlickrQueryCriteria(Stream stream)
  {
    if (stream == Stream.PUBLIC1) {
      // This is for demonstration, expendable class in the future to provide more search criteria
      this.requestUrl = "https://api.flickr.com/services/feeds/photos_public.gne?format=json&nojsoncallback=2";
    } else {
      this.requestUrl = "https://api.flickr.com/services/feeds/photos_public.gne?format=json&nojsoncallback=2";
    }
  }
  
  
  public String getRequestUrl() {
    return requestUrl;
  }
  
}




Java Source Code List

com.ufo.androidphotoviewer.MainActivity.java
com.ufo.androidphotoviewer.flickr.FlickrImage.java
com.ufo.androidphotoviewer.flickr.FlickrQueryCriteria.java
com.ufo.androidphotoviewer.flickr.FlickrQueryEngine.java
com.ufo.androidphotoviewer.flickr.FlickrResultSet.java
com.ufo.androidphotoviewer.flickr.FlickrServiceATask.java