/** * Create an image dataset from a flickr collection with the specified * parameters. * * @param reader * the reader with which to load the images * @param token * the flickr api authentication token * @param collectionsId * the collections ID * @param userId * the user ID * @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> createFromCollection( InputStreamObjectReader<IMAGE> reader, FlickrAPIToken token, String collectionsId, String userId) throws Exception { return createFromCollection(reader, token, collectionsId, userId, 0); }
/** * Create an image dataset from a flickr collection with the specified * parameters. * * @param reader * the reader with which to load the images * @param token * the flickr api authentication token * @param collectionsId * the collections ID * @param userId * the user ID * @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> createFromCollection( InputStreamObjectReader<IMAGE> reader, FlickrAPIToken token, String collectionsId, String userId) throws Exception { return createFromCollection(reader, token, collectionsId, userId, 0); }
private static <IMAGE extends Image<?, IMAGE>> FlickrImageDataset<IMAGE> fromCollection( InputStreamObjectReader<IMAGE> reader, FlickrAPIToken token, String urlString, int number) throws Exception { final Matcher matcher = COLLECTION_URL_PATTERN.matcher(urlString); matcher.find(); final String userId = matcher.group(1); final String collectionsId = matcher.group(2); return createFromCollection(reader, token, collectionsId, userId, number); }
private static <IMAGE extends Image<?, IMAGE>> FlickrImageDataset<IMAGE> fromCollection( InputStreamObjectReader<IMAGE> reader, FlickrAPIToken token, String urlString, int number) throws Exception { final Matcher matcher = COLLECTION_URL_PATTERN.matcher(urlString); matcher.find(); final String userId = matcher.group(1); final String collectionsId = matcher.group(2); return createFromCollection(reader, token, collectionsId, userId, number); }