org.jickr
Class PhotoSearch

java.lang.Object
  extended by org.jickr.PhotoSearch

public class PhotoSearch
extends java.lang.Object

Class used for complex searches on Photo objects. This class should be populated with search terms, and then passed to Photo.search(PhotoSearch).

See Also:
Photo.search(PhotoSearch)

Nested Class Summary
static class PhotoSearch.Privacy
          Privacy value associated with an object on Flickr.
static class PhotoSearch.Sort
          The order to sort returned Photos for a PhotoSearch.
static class PhotoSearch.Tagmode
          The join mode for multitag searches.
 
Constructor Summary
PhotoSearch()
          Creates a new instance of PhotoSearch
 
Method Summary
 java.util.List<License> getLicenses()
          Get the list of licenses to use in the search.
 java.util.Date getMaxTaken()
          Get the maximum date taken for the search.
 java.util.Date getMaxUpload()
          Get the maximum upload date for the search.
 java.util.Date getMinTaken()
          Get the minimum date taken for the search.
 java.util.Date getMinUpload()
          Get the minimum upload date for the search.
 PhotoSearch.Privacy getPrivacy()
          Get the privacy level for the search.
 java.lang.String getSearchText()
          Get the text search string.
 PhotoSearch.Sort getSort()
          Get the sort order for Photos returned by the search.
 PhotoSearch.Tagmode getTagMode()
          Get the join mode for multi-tag searches.
 java.lang.String getTags()
          Get the comma separated list of tags to search for.
 User getUser()
          Get the user in the search term.
 void setLicenses(java.util.List<License> licenses)
          Set the list of licenses to use in the search.
 void setMaxTaken(java.util.Date maxTaken)
          Set the maximum date taken for the search.
 void setMaxUpload(java.util.Date maxUpload)
          Set the maximum upload date for the search.
 void setMinTaken(java.util.Date minTaken)
          Set the minimum date taken for the search.
 void setMinUpload(java.util.Date minUpload)
          Set the minimum upload date for the search.
 void setPrivacy(PhotoSearch.Privacy privacy)
          Set the privacy level for the search.
 void setSearchText(java.lang.String searchText)
          Full text search string.
 void setSort(PhotoSearch.Sort sort)
          Set the sort order for Photos returned by the search.
 void setTagMode(PhotoSearch.Tagmode tagmode)
          Set the join mode for multi-tag searches.
 void setTags(java.lang.String tags)
          Search for Photos with the following tags.
 void setUser(User user)
          Search for Photos owned by the specified user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PhotoSearch

public PhotoSearch()
Creates a new instance of PhotoSearch

Method Detail

setUser

public void setUser(User user)
Search for Photos owned by the specified user.

Parameters:
user - The user to search for. Null to search for all users.

getUser

public User getUser()
Get the user in the search term.

Returns:
The owner of the Photos you want to find. Null if unset.

setTags

public void setTags(java.lang.String tags)
Search for Photos with the following tags.

Parameters:
tags - Comma separated list of tags. Null to search for all.

getTags

public java.lang.String getTags()
Get the comma separated list of tags to search for.

Returns:
The list of tags. Null if unset.

setTagMode

public void setTagMode(PhotoSearch.Tagmode tagmode)
Set the join mode for multi-tag searches. ANY looks for any tag in the list (OR). ALL looks for every tag in the list (AND). Defaults to ANY if unset. May be set to null to indicate default behavior.

Parameters:
tagmode - Join mode for multi-tag searches.

getTagMode

public PhotoSearch.Tagmode getTagMode()
Get the join mode for multi-tag searches.

Returns:
The join mode for tag searches, null if unset.

setSearchText

public void setSearchText(java.lang.String searchText)
Full text search string. Flickr will look for this string in descriptions, title and tags. Set to null to clear.

Parameters:
searchText - The string to use to search Flickr.

getSearchText

public java.lang.String getSearchText()
Get the text search string.

Returns:
The search string for full text search, null if unset.

setPrivacy

public void setPrivacy(PhotoSearch.Privacy privacy)
Set the privacy level for the search.

Parameters:
privacy - Privacy level.

getPrivacy

public PhotoSearch.Privacy getPrivacy()
Get the privacy level for the search.

Returns:
The Privacy level for the search.

setSort

public void setSort(PhotoSearch.Sort sort)
Set the sort order for Photos returned by the search.

Parameters:
sort - Sort order

getSort

public PhotoSearch.Sort getSort()
Get the sort order for Photos returned by the search.

Returns:
The sort order requested.

setMinUpload

public void setMinUpload(java.util.Date minUpload)
Set the minimum upload date for the search.

Parameters:
minUpload - The date which is the minimum value for an upload date on Flickr.

getMinUpload

public java.util.Date getMinUpload()
Get the minimum upload date for the search.

Returns:
The minimum upload date for each Photo returned.

setMaxUpload

public void setMaxUpload(java.util.Date maxUpload)
Set the maximum upload date for the search.

Parameters:
maxUpload - The maximum upload date for each Photo returned.

getMaxUpload

public java.util.Date getMaxUpload()
Get the maximum upload date for the search.

Returns:
The maximum upload date for each Photo returned.

setMinTaken

public void setMinTaken(java.util.Date minTaken)
Set the minimum date taken for the search.

Parameters:
minTaken - The minimum date taken for each Photo returned.

getMinTaken

public java.util.Date getMinTaken()
Get the minimum date taken for the search.

Returns:
The minimum date taken for each Photo returned.

setMaxTaken

public void setMaxTaken(java.util.Date maxTaken)
Set the maximum date taken for the search.

Parameters:
maxTaken - The maximum date taken for each Photo returned.

getMaxTaken

public java.util.Date getMaxTaken()
Get the maximum date taken for the search.

Returns:
The maximum date taken for each Photo returned.

setLicenses

public void setLicenses(java.util.List<License> licenses)
Set the list of licenses to use in the search. Set to null or empty list to clear.

Parameters:
licenses - The list of licenses that the Photos should have.
See Also:
License.getLicenses()

getLicenses

public java.util.List<License> getLicenses()
Get the list of licenses to use in the search.

Returns:
A list of licenses to use.
See Also:
License.getLicenses()