本文整理汇总了Java中com.sun.syndication.feed.synd.SyndLink类的典型用法代码示例。如果您正苦于以下问题:Java SyndLink类的具体用法?Java SyndLink怎么用?Java SyndLink使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SyndLink类属于com.sun.syndication.feed.synd包,在下文中一共展示了SyndLink类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getLinks
import com.sun.syndication.feed.synd.SyndLink; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public List getLinks() {
List<SyndLink> links = super.getLinks();
List<SyndLink> result = new ArrayList<SyndLink>(links.size());
for (SyndLink l : links) {
SyndLinkImpl ll = new SyndLinkImpl();
if (l != null) {
ll.setHref(removeInvalidChars(l.getHref()));
ll.setHreflang(removeInvalidChars(l.getHreflang()));
ll.setLength(l.getLength());
ll.setRel(removeInvalidChars(l.getRel()));
ll.setTitle(removeInvalidChars(l.getTitle()));
ll.setType(removeInvalidChars(l.getType()));
}
result.add(ll);
}
return result;
}
开发者ID:otsecbsol,项目名称:linkbinder,代码行数:20,代码来源:ExtendedSyndEntryImpl.java
示例2: _testEntry
import com.sun.syndication.feed.synd.SyndLink; //导入依赖的package包/类
protected void _testEntry(int i) throws Exception {
List items = getCachedSyndFeed().getEntries();
SyndEntry entry = (SyndEntry) items.get(i);
assertProperty(entry.getTitle(),"feed.entry["+i+"].title");
assertProperty(entry.getTitleEx().getValue(),"feed.entry["+i+"].title");
assertEquals("text",entry.getTitleEx().getType());
assertEquals(entry.getLink(),"http://example.com/blog/entry" + (i + 1));
assertEquals(((SyndEnclosure)entry.getEnclosures().get(0)).getUrl(),"http://example.com/blog/enclosure"+(i+1)+".gif");
assertProperty(entry.getAuthor(),"feed.entry["+i+"].author.name");
Date d = DateParser.parseW3CDateTime("2000-0"+(i+1)+"-01T01:00:00Z");
assertEquals(entry.getPublishedDate(),d);
assertProperty(entry.getDescription().getValue(),"feed.entry["+i+"].summary");
assertProperty(((SyndContent)entry.getContents().get(0)).getValue(),"feed.entry["+i+"].content[0]");
assertEquals(1, ((List)entry.getForeignMarkup()).size());
SyndLink slink = (SyndLink)entry.getLinks().get(2);
assertTrue(slink.getHref().startsWith("tag:"));
}
开发者ID:Norkart,项目名称:NK-VirtualGlobe,代码行数:20,代码来源:TestSyndFeedAtom10.java
示例3: createSyndLinks
import com.sun.syndication.feed.synd.SyndLink; //导入依赖的package包/类
protected List createSyndLinks(List aLinks) {
ArrayList sLinks = new ArrayList();
for (Iterator iter = aLinks.iterator(); iter.hasNext();) {
Link link = (Link)iter.next();
SyndLink sLink = new SyndLinkImpl();
sLink.setHref( link.getHref());
sLink.setType( link.getType());
sLink.setLength( link.getLength());
sLink.setHreflang( link.getHref());
sLinks.add(sLink);
}
return sLinks;
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:14,代码来源:ConverterForAtom10.java
示例4: createSyndLink
import com.sun.syndication.feed.synd.SyndLink; //导入依赖的package包/类
public SyndLink createSyndLink(Feed feed, Entry entry, Link link) {
SyndLink syndLink = new SyndLinkImpl();
syndLink.setRel(link.getRel());
syndLink.setType(link.getType());
syndLink.setHref(link.getHref());
syndLink.setHreflang(link.getHreflang());
syndLink.setLength(link.getLength());
return syndLink;
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:10,代码来源:ConverterForAtom10.java
示例5: createSyndLinks
import com.sun.syndication.feed.synd.SyndLink; //导入依赖的package包/类
protected List createSyndLinks(List aLinks) {
ArrayList sLinks = new ArrayList();
for (Iterator iter = aLinks.iterator(); iter.hasNext();) {
Link link = (Link)iter.next();
SyndLink sLink = createSyndLink(link);
sLinks.add(sLink);
}
return sLinks;
}
开发者ID:4thline,项目名称:feeds,代码行数:10,代码来源:ConverterForAtom10.java
示例6: createSyndLink
import com.sun.syndication.feed.synd.SyndLink; //导入依赖的package包/类
public SyndLink createSyndLink(Link link) {
SyndLink syndLink = new SyndLinkImpl();
syndLink.setRel( link.getRel());
syndLink.setType( link.getType());
syndLink.setHref( link.getHrefResolved());
syndLink.setHreflang(link.getHreflang());
syndLink.setLength( link.getLength());
syndLink.setTitle( link.getTitle());
return syndLink;
}
开发者ID:4thline,项目名称:feeds,代码行数:11,代码来源:ConverterForAtom10.java
示例7: createAtomLink
import com.sun.syndication.feed.synd.SyndLink; //导入依赖的package包/类
public Link createAtomLink(SyndLink syndLink) {
Link link = new Link();
link.setRel( syndLink.getRel());
link.setType( syndLink.getType());
link.setHref( syndLink.getHref());
link.setHreflang(syndLink.getHreflang());
link.setLength( syndLink.getLength());
link.setTitle( syndLink.getTitle());
return link;
}
开发者ID:4thline,项目名称:feeds,代码行数:11,代码来源:ConverterForAtom10.java
示例8: createSyndLinks
import com.sun.syndication.feed.synd.SyndLink; //导入依赖的package包/类
protected List createSyndLinks(List aLinks) {
ArrayList sLinks = new ArrayList();
for (Iterator iter = aLinks.iterator(); iter.hasNext();) {
Link link = (Link)iter.next();
if (!link.getRel().equals("enclosure")) {
SyndLink sLink = createSyndLink(link);
sLinks.add(sLink);
}
}
return sLinks;
}
开发者ID:4thline,项目名称:feeds,代码行数:12,代码来源:ConverterForAtom03.java
示例9: createSyndLink
import com.sun.syndication.feed.synd.SyndLink; //导入依赖的package包/类
public SyndLink createSyndLink(Link link) {
SyndLink syndLink = new SyndLinkImpl();
syndLink.setRel( link.getRel());
syndLink.setType( link.getType());
syndLink.setHref( link.getHrefResolved());
syndLink.setTitle( link.getTitle());
return syndLink;
}
开发者ID:4thline,项目名称:feeds,代码行数:9,代码来源:ConverterForAtom03.java
示例10: createAtomLink
import com.sun.syndication.feed.synd.SyndLink; //导入依赖的package包/类
public Link createAtomLink(SyndLink syndLink) {
Link link = new Link();
link.setRel( syndLink.getRel());
link.setType( syndLink.getType());
link.setHref( syndLink.getHref());
link.setTitle( syndLink.getTitle());
return link;
}
开发者ID:4thline,项目名称:feeds,代码行数:9,代码来源:ConverterForAtom03.java
示例11: getImage
import com.sun.syndication.feed.synd.SyndLink; //导入依赖的package包/类
public Image getImage() {
List links = entry.getLinks();
if (links != null && links.size() > 5) {
try {
SyndLink imageLink = (SyndLink) links.get(5);
String href = imageLink.getHref();
href = replace(href, ".200.", ".65.");
URL url = Network.getUrlFromLink(href);
return ImageLoader.getImage(url);
} catch (IOException e) {
Screen.displayError(e);
}
}
return null;
}
开发者ID:kaloyan-raev,项目名称:chitanka4kindle,代码行数:16,代码来源:OpdsItem.java
示例12: parseNextPage
import com.sun.syndication.feed.synd.SyndLink; //导入依赖的package包/类
private boolean parseNextPage() throws IOException {
SyndLink nextLink = getNextLink(currentPage);
if (nextLink != null) {
currentPage = parse(Network.getUrlFromLinkAsString(nextLink.getHref()));
entries.addAll(currentPage.getEntries());
return true;
}
return false;
}
开发者ID:kaloyan-raev,项目名称:chitanka4kindle,代码行数:10,代码来源:OpdsPage.java
示例13: getNextLink
import com.sun.syndication.feed.synd.SyndLink; //导入依赖的package包/类
private SyndLink getNextLink(SyndFeed feed) {
List links = feed.getLinks();
if (links == null)
return null;
Iterator iter = links.iterator();
while (iter.hasNext()) {
SyndLink link = (SyndLink) iter.next();
if ("next".equals(link.getRel())) {
return link;
}
}
return null;
}
开发者ID:kaloyan-raev,项目名称:chitanka4kindle,代码行数:16,代码来源:OpdsPage.java
示例14: createSyndLinks
import com.sun.syndication.feed.synd.SyndLink; //导入依赖的package包/类
protected List createSyndLinks(List aLinks) {
ArrayList sLinks = new ArrayList();
for (Iterator iter = aLinks.iterator(); iter.hasNext();) {
Link link = (Link)iter.next();
SyndLink sLink = new SyndLinkImpl();
sLink.setRel( link.getRel());
sLink.setHref( link.getHref());
sLink.setType( link.getType());
sLink.setTitle( link.getTitle());
sLink.setLength( link.getLength());
sLink.setHreflang( link.getHref());
sLinks.add(sLink);
}
return sLinks;
}
开发者ID:Norkart,项目名称:NK-VirtualGlobe,代码行数:16,代码来源:ConverterForAtom10.java
示例15: getDownloadLink
import com.sun.syndication.feed.synd.SyndLink; //导入依赖的package包/类
public String getDownloadLink() {
List links = entry.getLinks();
SyndLink epubLink = (SyndLink) links.get(0);
return epubLink.getHref();
}
开发者ID:kaloyan-raev,项目名称:chitanka4kindle,代码行数:6,代码来源:OpdsItem.java
注:本文中的com.sun.syndication.feed.synd.SyndLink类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论