当前位置: 首页>>代码示例>>Java>>正文


Java Channel.setCopyright方法代码示例

本文整理汇总了Java中com.sun.syndication.feed.rss.Channel.setCopyright方法的典型用法代码示例。如果您正苦于以下问题:Java Channel.setCopyright方法的具体用法?Java Channel.setCopyright怎么用?Java Channel.setCopyright使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sun.syndication.feed.rss.Channel的用法示例。


在下文中一共展示了Channel.setCopyright方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createRealFeed

import com.sun.syndication.feed.rss.Channel; //导入方法依赖的package包/类
@Override
protected WireFeed createRealFeed(String type, SyndFeed syndFeed) {
    Channel channel = (Channel) super.createRealFeed(type, syndFeed);
    channel.setLanguage(syndFeed.getLanguage()); //c
    channel.setCopyright(syndFeed.getCopyright()); //c
    channel.setPubDate(syndFeed.getPublishedDate()); //c        

    if ((syndFeed.getAuthors() != null) && (syndFeed.getAuthors()
                                                        .size() > 0)) {
        SyndPerson author = (SyndPerson) syndFeed.getAuthors()
                                                 .get(0);
        channel.setManagingEditor(author.getName());
    }

    return channel;
}
 
开发者ID:4thline,项目名称:feeds,代码行数:17,代码来源:ConverterForRSS091Userland.java

示例2: createRealFeed

import com.sun.syndication.feed.rss.Channel; //导入方法依赖的package包/类
protected WireFeed createRealFeed(String type,SyndFeed syndFeed) {
    Channel channel = (Channel) super.createRealFeed(type,syndFeed);
    channel.setLanguage(syndFeed.getLanguage());        //c
    channel.setCopyright(syndFeed.getCopyright());      //c
    channel.setPubDate(syndFeed.getPublishedDate());    //c        
    if (syndFeed.getAuthors()!=null && syndFeed.getAuthors().size() > 0) {
        SyndPerson author = (SyndPerson)syndFeed.getAuthors().get(0);
        channel.setManagingEditor(author.getName());  
    }        
    return channel;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:12,代码来源:ConverterForRSS091Userland.java

示例3: parseChannel

import com.sun.syndication.feed.rss.Channel; //导入方法依赖的package包/类
/**
 * Parses the root element of an RSS document into a Channel bean.
 * <p/>
 * It first invokes super.parseChannel and then parses and injects the following
 * properties if present: language, pubDate, rating and copyright.
 * <p/>
 *
 * @param rssRoot the root element of the RSS document to parse.
 * @return the parsed Channel bean.
 */
protected WireFeed parseChannel(Element rssRoot)  {
    Channel channel = (Channel) super.parseChannel(rssRoot);

    Element eChannel = rssRoot.getChild("channel",getRSSNamespace());

    Element e = eChannel.getChild("language",getRSSNamespace());
    if (e!=null) {
        channel.setLanguage(e.getText());
    }
    e = eChannel.getChild("rating",getRSSNamespace());
    if (e!=null) {
        channel.setRating(e.getText());
    }
    e = eChannel.getChild("copyright",getRSSNamespace());
    if (e!=null) {
        channel.setCopyright(e.getText());
    }
    e = eChannel.getChild("pubDate",getRSSNamespace());
    if (e!=null) {
        channel.setPubDate(DateParser.parseRFC822(e.getText()));
    }
    e = eChannel.getChild("lastBuildDate",getRSSNamespace());
    if (e!=null) {
        channel.setLastBuildDate(DateParser.parseRFC822(e.getText()));
    }
    e = eChannel.getChild("docs",getRSSNamespace());
    if (e!=null) {
        channel.setDocs(e.getText());
    }
    e = eChannel.getChild("docs",getRSSNamespace());
    if (e!=null) {
        channel.setDocs(e.getText());
    }
    e = eChannel.getChild("managingEditor",getRSSNamespace());
    if (e!=null) {
        channel.setManagingEditor(e.getText());
    }
    e = eChannel.getChild("webMaster",getRSSNamespace());
    if (e!=null) {
        channel.setWebMaster(e.getText());
    }
    e = eChannel.getChild("skipHours");
    if (e!=null) {
        List skipHours = new ArrayList();
        List eHours = e.getChildren("hour",getRSSNamespace());
        for (int i=0;i<eHours.size();i++) {
            Element eHour = (Element) eHours.get(i);
            skipHours.add(new Integer(eHour.getText().trim()));
        }
        channel.setSkipHours(skipHours);
    }

    e = eChannel.getChild("skipDays");
    if (e!=null) {
        List skipDays = new ArrayList();
        List eDays = e.getChildren("day",getRSSNamespace());
        for (int i=0;i<eDays.size();i++) {
            Element eDay = (Element) eDays.get(i);
            skipDays.add(eDay.getText().trim());
        }
        channel.setSkipDays(skipDays);
    }
    return channel;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:75,代码来源:RSS091UserlandParser.java

示例4: doSyndication

import com.sun.syndication.feed.rss.Channel; //导入方法依赖的package包/类
/**
 * This puts the pieces together to generate the actual feed.
 * 
 * @param title
 *            The global title for the podcast
 * @param link
 *            The URL for the feed
 * @param description_loc
 *            Global description of the feed
 * @param copyright
 *            Copyright information
 * @param entries
 *            The list of individual podcasts
 * @param feedTyle
 * 			 The output feed type (for potential future development). Set to rss_2.0
 * @param pubDate
 * 			 The date to set the publish date for this feed
 * 
 * @eturn SyndFeed
 * 			The entire podcast stuffed into a SyndFeed object
 */
private Channel doSyndication(Map feedInfo, List entries,
		String feedType, Date pubDate, Date lastBuildDate) {

	final Channel channel = new Channel();

	// FUTURE: How to determine what podcatcher supports and feed that to them
	channel.setFeedType(feedType);
	channel.setTitle((String) feedInfo.get("title"));
	channel.setLanguage(LANGUAGE);

	channel.setPubDate(pubDate);
	channel.setLastBuildDate(lastBuildDate);

	channel.setLink((String) feedInfo.get("url"));
	channel.setDescription((String) feedInfo.get("desc"));		
	channel.setCopyright((String) feedInfo.get("copyright"));
	channel.setGenerator((String) feedInfo.get("gen"));

	channel.setItems(entries);

	// Used to remove the dc: tags from the channel level info
	List modules = new ArrayList();
	
	channel.setModules(modules);

	return channel;
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:49,代码来源:BasicPodfeedService.java

示例5: parseChannel

import com.sun.syndication.feed.rss.Channel; //导入方法依赖的package包/类
/**
 * Parses the root element of an RSS document into a Channel bean.
 * <p/>
 * It first invokes super.parseChannel and then parses and injects the following
 * properties if present: language, pubDate, rating and copyright.
 * <p/>
 *
 * @param rssRoot the root element of the RSS document to parse.
 * @return the parsed Channel bean.
 */
protected WireFeed parseChannel(Element rssRoot)  {
    Channel channel = (Channel) super.parseChannel(rssRoot);

    Element eChannel = rssRoot.getChild("channel",getRSSNamespace());

    Element e = eChannel.getChild("language",getRSSNamespace());
    if (e!=null) {
        channel.setLanguage(e.getText());
    }
    e = eChannel.getChild("rating",getRSSNamespace());
    if (e!=null) {
        channel.setRating(e.getText());
    }
    e = eChannel.getChild("copyright",getRSSNamespace());
    if (e!=null) {
        channel.setCopyright(e.getText());
    }
    e = eChannel.getChild("pubDate",getRSSNamespace());
    if (e!=null) {
        channel.setPubDate(DateParser.parseDate(e.getText()));
    }
    e = eChannel.getChild("lastBuildDate",getRSSNamespace());
    if (e!=null) {
        channel.setLastBuildDate(DateParser.parseDate(e.getText()));
    }
    e = eChannel.getChild("docs",getRSSNamespace());
    if (e!=null) {
        channel.setDocs(e.getText());
    }
    e = eChannel.getChild("docs",getRSSNamespace());
    if (e!=null) {
        channel.setDocs(e.getText());
    }
    e = eChannel.getChild("managingEditor",getRSSNamespace());
    if (e!=null) {
        channel.setManagingEditor(e.getText());
    }
    e = eChannel.getChild("webMaster",getRSSNamespace());
    if (e!=null) {
        channel.setWebMaster(e.getText());
    }
    e = eChannel.getChild("skipHours");
    if (e!=null) {
        List skipHours = new ArrayList();
        List eHours = e.getChildren("hour",getRSSNamespace());
        for (int i=0;i<eHours.size();i++) {
            Element eHour = (Element) eHours.get(i);
            skipHours.add(new Integer(eHour.getText().trim()));
        }
        channel.setSkipHours(skipHours);
    }

    e = eChannel.getChild("skipDays");
    if (e!=null) {
        List skipDays = new ArrayList();
        List eDays = e.getChildren("day",getRSSNamespace());
        for (int i=0;i<eDays.size();i++) {
            Element eDay = (Element) eDays.get(i);
            skipDays.add(eDay.getText().trim());
        }
        channel.setSkipDays(skipDays);
    }
    return channel;
}
 
开发者ID:4thline,项目名称:feeds,代码行数:75,代码来源:RSS091UserlandParser.java


注:本文中的com.sun.syndication.feed.rss.Channel.setCopyright方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。