/** * Create an image dataset from a flickr search with the specified * parameters. * * @param reader * the reader with which to load the images * @param token * the flickr api authentication token * @param params * the parameters describing the gallery and any additional * constraints. * @return a {@link FlickrImageDataset} created from the gallery described * by the given parameters * @throws Exception * if an error occurs */ public static <IMAGE extends Image<?, IMAGE>> FlickrImageDataset<IMAGE> createFromSearch( InputStreamObjectReader<IMAGE> reader, FlickrAPIToken token, com.flickr4java.flickr.photos.SearchParameters params) throws Exception { return createFromSearch(reader, token, params, 0); }
/** * Create an image dataset from a flickr search with the specified * parameters. * * @param reader * the reader with which to load the images * @param token * the flickr api authentication token * @param params * the parameters describing the gallery and any additional * constraints. * @return a {@link FlickrImageDataset} created from the gallery described * by the given parameters * @throws Exception * if an error occurs */ public static <IMAGE extends Image<?, IMAGE>> FlickrImageDataset<IMAGE> createFromSearch( InputStreamObjectReader<IMAGE> reader, FlickrAPIToken token, com.flickr4java.flickr.photos.SearchParameters params) throws Exception { return createFromSearch(reader, token, params, 0); }
/** * Create an image dataset by searching flickr with the given search terms. * The number of images can be limited to a subset. * * @param reader * the reader with which to load the images * @param token * the flickr api authentication token * @param searchTerms * the search terms; space separated. Prepending a term with a * "-" means that the term should not appear. * @param number * the maximum number of images to add to the dataset. Setting to * 0 or less will attempt to use all the images. * @return a {@link FlickrImageDataset} created from the given url * @throws Exception * if an error occurs */ public static <IMAGE extends Image<?, IMAGE>> FlickrImageDataset<IMAGE> create(InputStreamObjectReader<IMAGE> reader, FlickrAPIToken token, String searchTerms, int number) throws Exception { final com.flickr4java.flickr.photos.SearchParameters params = new com.flickr4java.flickr.photos.SearchParameters(); params.setText(searchTerms); return createFromSearch(reader, token, params, number); }
/** * Create an image dataset by searching flickr with the given search terms. * The number of images can be limited to a subset. * * @param reader * the reader with which to load the images * @param token * the flickr api authentication token * @param searchTerms * the search terms; space separated. Prepending a term with a * "-" means that the term should not appear. * @param number * the maximum number of images to add to the dataset. Setting to * 0 or less will attempt to use all the images. * @return a {@link FlickrImageDataset} created from the given url * @throws Exception * if an error occurs */ public static <IMAGE extends Image<?, IMAGE>> FlickrImageDataset<IMAGE> create(InputStreamObjectReader<IMAGE> reader, FlickrAPIToken token, String searchTerms, int number) throws Exception { final com.flickr4java.flickr.photos.SearchParameters params = new com.flickr4java.flickr.photos.SearchParameters(); params.setText(searchTerms); return createFromSearch(reader, token, params, number); }