本文整理了Java中org.apache.abdera.factory.Factory.newLink()
方法的一些代码示例,展示了Factory.newLink()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Factory.newLink()
方法的具体详情如下:
包路径:org.apache.abdera.factory.Factory
类名称:Factory
方法名:newLink
[英]Create a new Link element.
[中]创建一个新的链接元素。
代码示例来源:origin: org.mycore/mycore-sword
/**
* Creates a edit link for every derivate of a mcrobject.
*
* @param mcrObjId the mcrobject id as String
* @return returns a Stream which contains links to every derivate.
*/
public static Stream<Link> getEditMediaIRIStream(final String collection, final String mcrObjId)
throws SwordError {
return MCRSword.getCollection(collection).getDerivateIDsofObject(mcrObjId).map(derivateId -> {
final Factory abderaFactory = Abdera.getNewFactory();
final Stream<IRI> editMediaFileIRIStream = getEditMediaFileIRIStream(collection, derivateId);
return Stream
.concat(Stream.of(getEditMediaHrefOfDerivate(collection, derivateId)), editMediaFileIRIStream)
.map(link -> {
final Link newLinkElement = abderaFactory.newLink();
newLinkElement.setHref(link.toString());
newLinkElement.setRel("edit-media");
return newLinkElement;
});
}).flatMap(s -> s);
}
代码示例来源:origin: org.xcmis/xcmis-restatom
Link typeTypeDescendantsLink = factory.newLink(ws);
typeTypeDescendantsLink.setTitle("Type descendants");
typeTypeDescendantsLink.setRel(AtomCMIS.LINK_CMIS_TYPEDESCENDANTS);
if (capabilities.isCapabilityGetDescendants())
Link descendantsLink = factory.newLink(ws);
descendantsLink.setTitle("Root folder descendants");
descendantsLink.setRel(AtomCMIS.LINK_CMIS_ROOTDESCENDANTS);
Link treeLink = factory.newLink(ws);
treeLink.setTitle("Root folder tree");
treeLink.setRel(AtomCMIS.LINK_CMIS_FOLDERTREE);
Link treeLink = factory.newLink(ws);
treeLink.setTitle("Changes log");
treeLink.setRel(AtomCMIS.LINK_CMIS_CHANGES);
代码示例来源:origin: DSpace/DSpace
Link link = abdera.getFactory().newLink();
link.setHref(urlManager.getActionableBitstreamUrl(bitstream));
link.setMimeType(contentType);
代码示例来源:origin: org.dataconservancy.deposit/dc-deposit-sword-server
Link statusDoc = request.getAbdera().getFactory().newLink();
statusDoc.setHref(url);
statusDoc.setMimeType(depositInfo.getDepositStatus()
内容来源于网络,如有侵权,请联系作者删除!