org.apache.abdera.factory.Factory.newAuthor()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(102)

本文整理了Java中org.apache.abdera.factory.Factory.newAuthor()方法的一些代码示例,展示了Factory.newAuthor()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Factory.newAuthor()方法的具体详情如下:
包路径:org.apache.abdera.factory.Factory
类名称:Factory
方法名:newAuthor

Factory.newAuthor介绍

[英]Create a new author element.
[中]创建一个新的author元素。

代码示例

代码示例来源:origin: org.apache.ws.commons.axiom/fom-testsuite

@Override
  protected Element addChild(Feed feed) {
    Person person = feed.getFactory().newAuthor();
    person.setName("Me");
    feed.addAuthor(person);
    return person;
  }
}

代码示例来源:origin: org.xcmis/xcmis-restatom

/**
* {@inheritDoc}
*/
@Override
public List<Person> getAuthors(CmisObject object, RequestContext request) throws ResponseContextException
{
 Person p = request.getAbdera().getFactory().newAuthor();
 p.setName(getAuthor(request));
 return Collections.singletonList(p);
}

代码示例来源:origin: org.xcmis/xcmis-restatom

/**
* {@inheritDoc}
*/
@Override
public List<Person> getAuthors(CmisObject object, RequestContext request) throws ResponseContextException
{
 String author = object.getObjectInfo().getCreatedBy();
 Person p = request.getAbdera().getFactory().newAuthor();
 if (author != null)
 {
   p.setName(author);
 }
 else
 {
   p.setName(SYSTEM);
 }
 return Collections.singletonList(p);
}

代码示例来源:origin: org.xcmis/xcmis-restatom

entry.setPublished(AtomUtils.getAtomDate(Calendar.getInstance()));
entry.setSummary("");
Person p = request.getAbdera().getFactory().newAuthor();
p.setName(getAuthor(request));
entry.addAuthor(p);

相关文章