本文整理汇总了Java中com.rometools.rome.feed.atom.Link.setLength方法的典型用法代码示例。如果您正苦于以下问题:Java Link.setLength方法的具体用法?Java Link.setLength怎么用?Java Link.setLength使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.rometools.rome.feed.atom.Link
的用法示例。
在下文中一共展示了Link.setLength方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: clone
import com.rometools.rome.feed.atom.Link; //导入方法依赖的package包/类
@Override
public Object clone() {
final AtomLinkModuleImpl m = new AtomLinkModuleImpl();
List<Link> result = new LinkedList<Link>();
for(Link link : this.getLinks()) {
Link l = new Link();
l.setHref(link.getHref());
l.setType(link.getType());
l.setRel(link.getRel());
l.setHreflang(link.getHreflang());
l.setTitle(link.getTitle());
l.setLength(link.getLength());
result.add(l);
}
links.subList(0, links.size());
m.setLinks(result);
return m;
}
示例2: copyFrom
import com.rometools.rome.feed.atom.Link; //导入方法依赖的package包/类
@Override
public void copyFrom(CopyFrom obj) {
AtomLinkModule other = (AtomLinkModule) obj;
List<Link> links = other.getLinks();
for (Link link : links) {
Link l = new Link();
l.setHref(link.getHref());
l.setType(link.getType());
l.setRel(link.getRel());
l.setHreflang(link.getHreflang());
l.setTitle(link.getTitle());
l.setLength(link.getLength());
this.links.add(l);
}
}
示例3: parseLink
import com.rometools.rome.feed.atom.Link; //导入方法依赖的package包/类
private Link parseLink(final Element eLink) {
final Link link = new Link();
final String rel = getAttributeValue(eLink, AtomLinkAttribute.REL);
if (rel != null) {
link.setRel(rel);
}
final String type = getAttributeValue(eLink, AtomLinkAttribute.TYPE);
if (type != null) {
link.setType(type);
}
final String href = getAttributeValue(eLink, AtomLinkAttribute.HREF);
if (href != null) {
link.setHref(href);
}
final String title = getAttributeValue(eLink, AtomLinkAttribute.TITLE);
if (title != null) {
link.setTitle(title);
}
final String hrefLang = getAttributeValue(eLink, AtomLinkAttribute.HREF_LANG);
if (hrefLang != null) {
link.setHreflang(hrefLang);
}
final String length = getAttributeValue(eLink, AtomLinkAttribute.LENGTH);
if (length != null) {
final Long val = NumberParser.parseLong(length);
if (val != null) {
link.setLength(val.longValue());
}
}
return link;
}
示例4: createAtomEnclosure
import com.rometools.rome.feed.atom.Link; //导入方法依赖的package包/类
public Link createAtomEnclosure(final SyndEnclosure syndEnclosure) {
final Link link = new Link();
link.setRel("enclosure");
link.setType(syndEnclosure.getType());
link.setHref(syndEnclosure.getUrl());
link.setLength(syndEnclosure.getLength());
return link;
}
示例5: createAtomLink
import com.rometools.rome.feed.atom.Link; //导入方法依赖的package包/类
public Link createAtomLink(final SyndLink syndLink) {
final 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;
}
示例6: copyFrom
import com.rometools.rome.feed.atom.Link; //导入方法依赖的package包/类
@Override
public void copyFrom(CopyFrom obj) {
AtomLinkModule other = (AtomLinkModule) obj;
Link link = other.getLink();
if (link != null) {
Link l = new Link();
l.setHref(link.getHref());
l.setType(link.getType());
l.setRel(link.getRel());
l.setHreflang(link.getHreflang());
l.setTitle(link.getTitle());
l.setLength(link.getLength());
setLink(l);
}
}
示例7: clone
import com.rometools.rome.feed.atom.Link; //导入方法依赖的package包/类
@Override
public Object clone() {
final AtomLinkModuleImpl m = new AtomLinkModuleImpl();
if (link != null) {
Link l = new Link();
l.setHref(link.getHref());
l.setType(link.getType());
l.setRel(link.getRel());
l.setHreflang(link.getHreflang());
l.setTitle(link.getTitle());
l.setLength(link.getLength());
m.setLink(l);
}
return m;
}
示例8: parseLink
import com.rometools.rome.feed.atom.Link; //导入方法依赖的package包/类
private Link parseLink(final Feed feed, final Entry entry, final String baseURI, final Element eLink) {
final Link link = new Link();
final String rel = getAttributeValue(eLink, "rel");
if (rel != null) {
link.setRel(rel);
}
final String type = getAttributeValue(eLink, "type");
if (type != null) {
link.setType(type);
}
final String href = getAttributeValue(eLink, "href");
if (href != null) {
link.setHref(href);
if (isRelativeURI(href)) {
link.setHrefResolved(resolveURI(baseURI, eLink, href));
}
}
final String title = getAttributeValue(eLink, "title");
if (title != null) {
link.setTitle(title);
}
final String hrefLang = getAttributeValue(eLink, "hreflang");
if (hrefLang != null) {
link.setHreflang(hrefLang);
}
final String length = getAttributeValue(eLink, "length");
if (length != null) {
final Long val = NumberParser.parseLong(length);
if (val != null) {
link.setLength(val.longValue());
}
}
return link;
}