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


Java Entry.setOtherLinks方法代码示例

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


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

示例1: parseEntry

import com.sun.syndication.feed.atom.Entry; //导入方法依赖的package包/类
private Entry parseEntry(Feed feed, Element eEntry, URL baseURI) {
    Entry entry = new Entry();

    String xmlBase = eEntry.getAttributeValue("base", Namespace.XML_NAMESPACE);
    if (xmlBase != null) {
        entry.setXmlBase(xmlBase);
    }
    
    Element e = eEntry.getChild("title",getAtomNamespace());
    if (e!=null) {
        entry.setTitle(e.getText());
    }

    List eList = eEntry.getChildren("link",getAtomNamespace());
    entry.setAlternateLinks(parseAlternateLinks(feed, entry, baseURI, eList));
    entry.setOtherLinks(parseOtherLinks(feed, entry, baseURI, eList));

    eList = eEntry.getChildren("author", getAtomNamespace());
    if (eList.size()>0) {
        entry.setAuthors(parsePersons(baseURI, eList));
    }

    eList = eEntry.getChildren("contributor",getAtomNamespace());
    if (eList.size()>0) {
        entry.setContributors(parsePersons(baseURI, eList));
    }

    e = eEntry.getChild("id",getAtomNamespace());
    if (e!=null) {
        entry.setId(e.getText());
    }

    e = eEntry.getChild("updated",getAtomNamespace());
    if (e!=null) {
        entry.setUpdated(DateParser.parseDate(e.getText()));
    }

    e = eEntry.getChild("published",getAtomNamespace());
    if (e!=null) {
        entry.setPublished(DateParser.parseDate(e.getText()));
    }

    e = eEntry.getChild("summary",getAtomNamespace());
    if (e!=null) {
        entry.setSummary(parseContent(e));
    }

    e = eEntry.getChild("content",getAtomNamespace());
    if (e!=null) {
        List contents = new ArrayList();
        contents.add(parseContent(e));
        entry.setContents(contents);
    }

    e = eEntry.getChild("rights",getAtomNamespace());
    if (e!=null) {
        entry.setRights(e.getText());
    }

    List cList = eEntry.getChildren("category",getAtomNamespace());
    entry.setCategories(parseCategories(baseURI, cList));

    // TODO: SHOULD handle Atom entry source element
    
    entry.setModules(parseItemModules(eEntry));

    return entry;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:69,代码来源:Atom10Parser.java

示例2: parseEntry

import com.sun.syndication.feed.atom.Entry; //导入方法依赖的package包/类
protected Entry parseEntry(Feed feed, Element eEntry, String baseURI) {
    Entry entry = new Entry();
    
    String xmlBase = eEntry.getAttributeValue("base", Namespace.XML_NAMESPACE);
    if (xmlBase != null) {
        entry.setXmlBase(xmlBase);
    }
    
    Element e = eEntry.getChild("title",getAtomNamespace());
    if (e!=null) {
        Content c = new Content();
        c.setValue(parseTextConstructToString(e));
        c.setType(getAttributeValue(e, "type"));
        entry.setTitleEx(c);
    }
    
    List eList = eEntry.getChildren("link",getAtomNamespace());
    entry.setAlternateLinks(parseAlternateLinks(feed, entry, baseURI, eList));
    entry.setOtherLinks(parseOtherLinks(feed, entry, baseURI, eList));
    
    eList = eEntry.getChildren("author", getAtomNamespace());
    if (eList.size()>0) {
        entry.setAuthors(parsePersons(baseURI, eList));
    }
    
    eList = eEntry.getChildren("contributor",getAtomNamespace());
    if (eList.size()>0) {
        entry.setContributors(parsePersons(baseURI, eList));
    }
    
    e = eEntry.getChild("id",getAtomNamespace());
    if (e!=null) {
        entry.setId(e.getText());
    }
    
    e = eEntry.getChild("updated",getAtomNamespace());
    if (e!=null) {
        entry.setUpdated(DateParser.parseDate(e.getText()));
    }
    
    e = eEntry.getChild("published",getAtomNamespace());
    if (e!=null) {
        entry.setPublished(DateParser.parseDate(e.getText()));
    }
    
    e = eEntry.getChild("summary",getAtomNamespace());
    if (e!=null) {
        entry.setSummary(parseContent(e));
    }
    
    e = eEntry.getChild("content",getAtomNamespace());
    if (e!=null) {
        List contents = new ArrayList();
        contents.add(parseContent(e));
        entry.setContents(contents);
    }
    
    e = eEntry.getChild("rights",getAtomNamespace());
    if (e!=null) {
        entry.setRights(e.getText());
    }
    
    List cList = eEntry.getChildren("category",getAtomNamespace());
    entry.setCategories(parseCategories(baseURI, cList));
    
    // TODO: SHOULD handle Atom entry source element
    e = eEntry.getChild("source", getAtomNamespace());
    if (e!=null) {
        entry.setSource(parseFeedMetadata(baseURI, e));
    }
    
    entry.setModules(parseItemModules(eEntry));
    
    List foreignMarkup =
            extractForeignMarkup(eEntry, entry, getAtomNamespace());
    if (foreignMarkup.size() > 0) {
        entry.setForeignMarkup(foreignMarkup);
    }
    return entry;
}
 
开发者ID:4thline,项目名称:feeds,代码行数:81,代码来源:Atom10Parser.java

示例3: parseEntry

import com.sun.syndication.feed.atom.Entry; //导入方法依赖的package包/类
protected Entry parseEntry(Feed feed, Element eEntry, String baseURI) {
    Entry entry = new Entry();
    
    String xmlBase = eEntry.getAttributeValue("base", Namespace.XML_NAMESPACE);
    if (xmlBase != null) {
        entry.setXmlBase(xmlBase);
    }
    
    Element e = eEntry.getChild("title",getAtomNamespace());
    if (e!=null) {
        Content c = new Content();
        c.setValue(parseTextConstructToString(e));
        c.setType(e.getAttributeValue("type")); //, Namespace.XML_NAMESPACE));
        entry.setTitleEx(c);
    }
    
    List eList = eEntry.getChildren("link",getAtomNamespace());
    entry.setAlternateLinks(parseAlternateLinks(feed, entry, baseURI, eList));
    entry.setOtherLinks(parseOtherLinks(feed, entry, baseURI, eList));
    
    eList = eEntry.getChildren("author", getAtomNamespace());
    if (eList.size()>0) {
        entry.setAuthors(parsePersons(baseURI, eList));
    }
    
    eList = eEntry.getChildren("contributor",getAtomNamespace());
    if (eList.size()>0) {
        entry.setContributors(parsePersons(baseURI, eList));
    }
    
    e = eEntry.getChild("id",getAtomNamespace());
    if (e!=null) {
        entry.setId(e.getText());
    }
    
    e = eEntry.getChild("updated",getAtomNamespace());
    if (e!=null) {
        entry.setUpdated(DateParser.parseW3CDateTime(e.getText()));
    }
    
    e = eEntry.getChild("published",getAtomNamespace());
    if (e!=null) {
        entry.setPublished(DateParser.parseW3CDateTime(e.getText()));
    }
    
    e = eEntry.getChild("summary",getAtomNamespace());
    if (e!=null) {
        entry.setSummary(parseContent(e));
    }
    
    e = eEntry.getChild("content",getAtomNamespace());
    if (e!=null) {
        List contents = new ArrayList();
        contents.add(parseContent(e));
        entry.setContents(contents);
    }
    
    e = eEntry.getChild("rights",getAtomNamespace());
    if (e!=null) {
        entry.setRights(e.getText());
    }
    
    List cList = eEntry.getChildren("category",getAtomNamespace());
    entry.setCategories(parseCategories(baseURI, cList));
    
    // TODO: SHOULD handle Atom entry source element
    
    entry.setModules(parseItemModules(eEntry));
    
    List foreignMarkup =
            extractForeignMarkup(eEntry, entry, getAtomNamespace());
    if (foreignMarkup.size() > 0) {
        entry.setForeignMarkup(foreignMarkup);
    }
    return entry;
}
 
开发者ID:Norkart,项目名称:NK-VirtualGlobe,代码行数:77,代码来源:Atom10Parser.java


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