• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Photoset类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.flickr4java.flickr.photosets.Photoset的典型用法代码示例。如果您正苦于以下问题:Java Photoset类的具体用法?Java Photoset怎么用?Java Photoset使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Photoset类属于com.flickr4java.flickr.photosets包,在下文中一共展示了Photoset类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: findAllPictureId

import com.flickr4java.flickr.photosets.Photoset; //导入依赖的package包/类
private Set<String> findAllPictureId(int year) throws FlickrException {
    PhotosetsInterface photosetsInterface = flickrFactory.getFlickr().getPhotosetsInterface();
    Collection<Photoset> photosets = photosetsInterface.getList(flickrFactory.getUserId()).getPhotosets();

    Set<String> ids = new HashSet<>();

    int counter = 0;
    for (Photoset photoset : photosets) {
        counter++;
        if (!photoset.getTitle().contains(year + "")) {
            continue;
        }

        LOGGER.info("PHOTOSET[{}]: {}/{}", photoset.getTitle(), counter, photosets.size());
        ids.addAll(idsFromPhotoset(photoset));
    }

    return ids;
}
 
开发者ID:sapka12,项目名称:mosaicmaker,代码行数:20,代码来源:FlickrCrawler.java


示例2: getSets

import com.flickr4java.flickr.photosets.Photoset; //导入依赖的package包/类
public List<AbstractSet> getSets() throws FlickrException, IOException, SAXException {
	if (this.sets != null)
		return this.sets;

	Logger.getLogger(Sets.class).info("Downloading photo set information");

	List<AbstractSet> setMap = new LinkedList<AbstractSet>();
       Iterator<Photoset> fsets = this.flickr.getPhotosetsInterface().getList(this.configuration.photosUser.getId()).getPhotosets().iterator();
       while (fsets.hasNext()) {
           Photoset fset = fsets.next();
       	AbstractSet s = new Set(this.configuration, fset);
       	setMap.add(s);
       }
       
       PhotosNotInASet photosNotInSet = new PhotosNotInASet(this.configuration, this.flickr);
       if (photosNotInSet.getMediaCount() > 0)
       	setMap.add(photosNotInSet);

       return setMap;
}
 
开发者ID:masneyb,项目名称:flickrdownload,代码行数:21,代码来源:Sets.java


示例3: findPhotoset

import com.flickr4java.flickr.photosets.Photoset; //导入依赖的package包/类
private Photoset findPhotoset(String name) {
    if (name == null)
        return null;
    
    Photosets photosets = null;
    
    try {
        photosets = flickr.getPhotosetsInterface().getList(nsid);

        Iterator<Photoset> sets = photosets.getPhotosets().iterator();

        while (sets.hasNext()) {
            Photoset set = sets.next();
            if (set.getTitle().equals(name)) {
                return set;
            }
        }
    } catch (FlickrException e1) {
        e1.printStackTrace();
    }

    return null;
}
 
开发者ID:entercritical,项目名称:SwanFlickrUploader,代码行数:24,代码来源:Upload.java


示例4: idsFromPhotoset

import com.flickr4java.flickr.photosets.Photoset; //导入依赖的package包/类
private Collection<String> idsFromPhotoset(Photoset photoset) throws FlickrException {
    PhotoList<Photo> photos = flickrFactory.getFlickr().getPhotosetsInterface().getPhotos(photoset.getId(), photoset.getPhotoCount(), 1);

    Set<String> ids = new HashSet<>();
    photos.stream().forEach((photo) -> {
        ids.add(photo.getId());
    });

    return ids;
}
 
开发者ID:sapka12,项目名称:mosaicmaker,代码行数:11,代码来源:FlickrCrawler.java


示例5: flickrProcess

import com.flickr4java.flickr.photosets.Photoset; //导入依赖的package包/类
@Override
protected PhotoList<Photo> flickrProcess(String path) {
	try {
		final PhotosetsInterface setsInterface = flickr.getPhotosetsInterface();
		final Matcher matcher = r.matcher(path);
		matcher.find();
		final String setId = matcher.group(1);
		final Photoset set = setsInterface.getInfo(setId);
		return setsInterface.getPhotos(setId, set.getPhotoCount(), 0);
	} catch (final Exception e) {
		e.printStackTrace();
	}
	return null;
}
 
开发者ID:openimaj,项目名称:openimaj,代码行数:15,代码来源:FlickrWebpageImageCollection.java


示例6: createTopLevelXml

import com.flickr4java.flickr.photosets.Photoset; //导入依赖的package包/类
public Element createTopLevelXml() throws FlickrException, SAXException, IOException {
	CollectionsInterface collectionsInterface = this.flickr.getCollectionsInterface();

	File iconsDir = new File(this.configuration.photosBaseDirectory, COLLECTIONS_ICON_DIRECTORY);
	iconsDir.mkdir();

	Element allCollections = new Element("collections");
   	for (Collection collection : collectionsInterface.getTree(null, null)) {
   		Element setsEle = new Element("sets");
   		for (Photoset set : collection.getPhotosets()) {
   			setsEle.addContent(new Element("set")
   				.setAttribute("id", set.getId())
   				.setAttribute("title", set.getTitle()));
   		}

           String iconLarge = collection.getIconLarge();
           String iconSmall = collection.getIconSmall();

           if(!iconLarge.matches("^https://.*")) iconLarge = "https://www.flickr.com" + iconLarge;
           if(!iconSmall.matches("^https://.*")) iconSmall = "https://www.flickr.com" + iconSmall;

   		File largeFile = new File(iconsDir, collection.getId() + "-large." + (iconLarge.matches(".*jpg$") ? "jpg" : "gif"));
   		File smallFile = new File(iconsDir, collection.getId() + "-small." + (iconSmall.matches(".*jpg$") ? "jpg" : "gif"));

   		allCollections.addContent(new Element("collection")
   			.addContent(new Element("id").setText(collection.getId()))
   			.addContent(new Element("title").setText(collection.getTitle()))
   			.addContent(new Element("description").setText(collection.getDescription()))
   			.addContent(XmlUtils.downloadMediaAndCreateElement("iconLarge", largeFile, iconsDir.getName() + File.separator + largeFile.getName(), iconLarge, this.configuration.downloadCollectionIcons, configuration))
   			.addContent(XmlUtils.downloadMediaAndCreateElement("iconSmall", smallFile, iconsDir.getName() + File.separator + smallFile.getName(), iconSmall, this.configuration.downloadCollectionIcons, configuration))
   			.addContent(setsEle));
   	}

   	return allCollections;
}
 
开发者ID:masneyb,项目名称:flickrdownload,代码行数:36,代码来源:Collections.java


示例7: Set

import com.flickr4java.flickr.photosets.Photoset; //导入依赖的package包/类
public Set(Configuration configuration, Photoset set) {
	super(configuration);
	this.set = set;
}
 
开发者ID:masneyb,项目名称:flickrdownload,代码行数:5,代码来源:Set.java



注:本文中的com.flickr4java.flickr.photosets.Photoset类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java VariableBinding类代码示例发布时间:2022-05-22
下一篇:
Java DefaultEventSelectionModel类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap