當前位置: 首頁>>代碼示例>>Java>>正文


Java SyndFeed.setCopyright方法代碼示例

本文整理匯總了Java中com.sun.syndication.feed.synd.SyndFeed.setCopyright方法的典型用法代碼示例。如果您正苦於以下問題:Java SyndFeed.setCopyright方法的具體用法?Java SyndFeed.setCopyright怎麽用?Java SyndFeed.setCopyright使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.sun.syndication.feed.synd.SyndFeed的用法示例。


在下文中一共展示了SyndFeed.setCopyright方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: copyInto

import com.sun.syndication.feed.synd.SyndFeed; //導入方法依賴的package包/類
public void copyInto(WireFeed feed,SyndFeed syndFeed) {
    Channel channel = (Channel) feed;
    super.copyInto(channel,syndFeed);
    syndFeed.setLanguage(channel.getLanguage());        //c
    syndFeed.setCopyright(channel.getCopyright());      //c
    Date pubDate = channel.getPubDate();
    if (pubDate!=null) {
        syndFeed.setPublishedDate(pubDate);     //c
    }

    String author = channel.getManagingEditor();
    if (author!=null) {    
        List creators = ((DCModule) syndFeed.getModule(DCModule.URI)).getCreators();
        if (!creators.contains(author)) {
            Set s = new HashSet(); // using a set to remove duplicates
            s.addAll(creators);    // DC creators
            s.add(author);         // feed native author
            creators.clear();
            creators.addAll(s);
        }
    }

}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:24,代碼來源:ConverterForRSS091Userland.java

示例2: copyInto

import com.sun.syndication.feed.synd.SyndFeed; //導入方法依賴的package包/類
public void copyInto(WireFeed feed,SyndFeed syndFeed) {
    Channel channel = (Channel) feed;
    super.copyInto(channel,syndFeed);
    syndFeed.setLanguage(channel.getLanguage());        //c
    syndFeed.setCopyright(channel.getCopyright());      //c
    Date pubDate = channel.getPubDate();
    if (pubDate!=null) {
        syndFeed.setPublishedDate(pubDate);  //c
    } else if (channel.getLastBuildDate() != null) {
        syndFeed.setPublishedDate(channel.getLastBuildDate());  //c
    }
    

    String author = channel.getManagingEditor();
    if (author!=null) {    
        List creators = ((DCModule) syndFeed.getModule(DCModule.URI)).getCreators();
        if (!creators.contains(author)) {
            Set s = new HashSet(); // using a set to remove duplicates
            s.addAll(creators);    // DC creators
            s.add(author);         // feed native author
            creators.clear();
            creators.addAll(s);
        }
    }

}
 
開發者ID:Norkart,項目名稱:NK-VirtualGlobe,代碼行數:27,代碼來源:ConverterForRSS091Userland.java

示例3: copyInto

import com.sun.syndication.feed.synd.SyndFeed; //導入方法依賴的package包/類
@Override
public void copyInto(WireFeed feed, SyndFeed syndFeed) {
    Channel channel = (Channel) feed;
    super.copyInto(channel, syndFeed);
    syndFeed.setLanguage(channel.getLanguage()); //c
    syndFeed.setCopyright(channel.getCopyright()); //c

    Date pubDate = channel.getPubDate();

    if (pubDate != null) {
        syndFeed.setPublishedDate(pubDate); //c
    } else if (channel.getLastBuildDate() != null) {
        syndFeed.setPublishedDate(channel.getLastBuildDate()); //c
    }

    String author = channel.getManagingEditor();

    if (author != null) {
        List creators = ((DCModule) syndFeed.getModule(DCModule.URI)).getCreators();

        if (!creators.contains(author)) {
            Set s = new HashSet(); // using a set to remove duplicates
            s.addAll(creators); // DC creators
            s.add(author); // feed native author
            creators.clear();
            creators.addAll(s);
        }
    }
}
 
開發者ID:4thline,項目名稱:feeds,代碼行數:30,代碼來源:ConverterForRSS091Userland.java

示例4: copyInto

import com.sun.syndication.feed.synd.SyndFeed; //導入方法依賴的package包/類
public void copyInto(WireFeed feed, SyndFeed syndFeed) {
    Feed aFeed = (Feed) feed;

    syndFeed.setModules(ModuleUtils.cloneModules(aFeed.getModules()));

    syndFeed.setEncoding(aFeed.getEncoding());

    syndFeed.setUri(aFeed.getId());

    syndFeed.setTitle(aFeed.getTitle());

    Content aSubtitle = aFeed.getSubtitle();
    if (aSubtitle!=null) {
        syndFeed.setDescription(aSubtitle.getValue());
    }

    // if there is exactly one alternate link, use that as THE link
    if (aFeed.getAlternateLinks() != null 
            && aFeed.getAlternateLinks().size() == 1) {
        Link theLink = (Link)aFeed.getAlternateLinks().get(0);
        syndFeed.setLink(theLink.getHref());
    }
    // lump alternate and other links together
    List syndLinks = new ArrayList();
    if (aFeed.getAlternateLinks() != null 
            && aFeed.getAlternateLinks().size() > 0) {
        syndLinks.addAll(createSyndLinks(aFeed.getAlternateLinks()));
    }
    if (aFeed.getOtherLinks() != null 
            && aFeed.getOtherLinks().size() > 0) {
        syndLinks.addAll(createSyndLinks(aFeed.getOtherLinks()));
    }
        
    List aEntries = aFeed.getEntries();
    if (aEntries!=null) {
        syndFeed.setEntries(createSyndEntries(aFeed, aEntries));
    }

    // Core Atom language/author/copyright/modified elements have precedence
    // over DC equivalent info.

    List authors = aFeed.getAuthors();
    if (authors!=null && authors.size() > 0) {
        syndFeed.setAuthors(ConverterForAtom03.createSyndPersons(authors));
    }

    String rights = aFeed.getRights();
    if (rights!=null) {
        syndFeed.setCopyright(rights);
    }

    Date date = aFeed.getUpdated();
    if (date!=null) {
        syndFeed.setPublishedDate(date);
    }
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:57,代碼來源:ConverterForAtom10.java

示例5: copyInto

import com.sun.syndication.feed.synd.SyndFeed; //導入方法依賴的package包/類
public void copyInto(WireFeed feed,SyndFeed syndFeed) {
    Feed aFeed = (Feed) feed;

    syndFeed.setModules(ModuleUtils.cloneModules(aFeed.getModules()));

    syndFeed.setEncoding(aFeed.getEncoding());

    syndFeed.setUri(aFeed.getId());

    syndFeed.setTitle(aFeed.getTitle());

    String linkHref = null;
    if (aFeed.getAlternateLinks().size() > 0) {
        linkHref = ((Link) aFeed.getAlternateLinks().get(0)).getHref();
    }
    syndFeed.setLink(linkHref);

    Content tagline = aFeed.getTagline();
    if (tagline!=null) {
        syndFeed.setDescription(tagline.getValue());
    }


    List aEntries = aFeed.getEntries();
    if (aEntries!=null) {
        syndFeed.setEntries(createSyndEntries(aEntries));
    }

    // Core Atom language/author/copyright/modified elements have precedence
    // over DC equivalent info.

    String language = aFeed.getLanguage();
    if (language!=null) {
        syndFeed.setLanguage(language);
    }

    List authors = aFeed.getAuthors();
    if (authors!=null && authors.size() > 0) {
        syndFeed.setAuthors(createSyndPersons(authors));
    }

    String copyright = aFeed.getCopyright();
    if (copyright!=null) {
        syndFeed.setCopyright(copyright);
    }

    Date date = aFeed.getModified();
    if (date!=null) {
        syndFeed.setPublishedDate(date);
    }

}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:53,代碼來源:ConverterForAtom03.java

示例6: copyInto

import com.sun.syndication.feed.synd.SyndFeed; //導入方法依賴的package包/類
public void copyInto(WireFeed feed,SyndFeed syndFeed) {
    Feed aFeed = (Feed) feed;

    syndFeed.setModules(ModuleUtils.cloneModules(aFeed.getModules()));

    if (((List)feed.getForeignMarkup()).size() > 0) {
        syndFeed.setForeignMarkup(feed.getForeignMarkup());
    }
    
    syndFeed.setEncoding(aFeed.getEncoding());

    syndFeed.setUri(aFeed.getId());

    syndFeed.setTitle(aFeed.getTitle());

    // use first alternate links as THE link
    if (aFeed.getAlternateLinks() != null
            && aFeed.getAlternateLinks().size() > 0) {
        Link theLink = (Link)aFeed.getAlternateLinks().get(0);
        syndFeed.setLink(theLink.getHrefResolved());
    }
    // lump alternate and other links together
    List syndLinks = new ArrayList();
    if (aFeed.getAlternateLinks() != null
            && aFeed.getAlternateLinks().size() > 0) {
        syndLinks.addAll(createSyndLinks(aFeed.getAlternateLinks()));
    }
    if (aFeed.getOtherLinks() != null
            && aFeed.getOtherLinks().size() > 0) {
        syndLinks.addAll(createSyndLinks(aFeed.getOtherLinks()));
    }
    syndFeed.setLinks(syndLinks);

    Content tagline = aFeed.getTagline();
    if (tagline!=null) {
        syndFeed.setDescription(tagline.getValue());
    }


    List aEntries = aFeed.getEntries();
    if (aEntries!=null) {
        syndFeed.setEntries(createSyndEntries(aEntries, syndFeed.isPreservingWireFeed()));
    }

    // Core Atom language/author/copyright/modified elements have precedence
    // over DC equivalent info.

    String language = aFeed.getLanguage();
    if (language!=null) {
        syndFeed.setLanguage(language);
    }

    List authors = aFeed.getAuthors();
    if (authors!=null && authors.size() > 0) {
        syndFeed.setAuthors(createSyndPersons(authors));
    }

    String copyright = aFeed.getCopyright();
    if (copyright!=null) {
        syndFeed.setCopyright(copyright);
    }

    Date date = aFeed.getModified();
    if (date!=null) {
        syndFeed.setPublishedDate(date);
    }

}
 
開發者ID:4thline,項目名稱:feeds,代碼行數:69,代碼來源:ConverterForAtom03.java

示例7: copyInto

import com.sun.syndication.feed.synd.SyndFeed; //導入方法依賴的package包/類
public void copyInto(WireFeed feed,SyndFeed syndFeed) {
    Feed aFeed = (Feed) feed;

    syndFeed.setModules(ModuleUtils.cloneModules(aFeed.getModules()));

    if (((List)feed.getForeignMarkup()).size() > 0) {
        syndFeed.setForeignMarkup(feed.getForeignMarkup());
    }
    
    syndFeed.setEncoding(aFeed.getEncoding());

    syndFeed.setUri(aFeed.getId());

    syndFeed.setTitle(aFeed.getTitle());

    String linkHref = null;
    if (aFeed.getAlternateLinks().size() > 0) {
        linkHref = ((Link) aFeed.getAlternateLinks().get(0)).getHref();
    }
    syndFeed.setLink(linkHref);

    Content tagline = aFeed.getTagline();
    if (tagline!=null) {
        syndFeed.setDescription(tagline.getValue());
    }


    List aEntries = aFeed.getEntries();
    if (aEntries!=null) {
        syndFeed.setEntries(createSyndEntries(aEntries));
    }

    // Core Atom language/author/copyright/modified elements have precedence
    // over DC equivalent info.

    String language = aFeed.getLanguage();
    if (language!=null) {
        syndFeed.setLanguage(language);
    }

    List authors = aFeed.getAuthors();
    if (authors!=null && authors.size() > 0) {
        syndFeed.setAuthors(createSyndPersons(authors));
    }

    String copyright = aFeed.getCopyright();
    if (copyright!=null) {
        syndFeed.setCopyright(copyright);
    }

    Date date = aFeed.getModified();
    if (date!=null) {
        syndFeed.setPublishedDate(date);
    }

}
 
開發者ID:Norkart,項目名稱:NK-VirtualGlobe,代碼行數:57,代碼來源:ConverterForAtom03.java


注:本文中的com.sun.syndication.feed.synd.SyndFeed.setCopyright方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。