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

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

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

Factory.newCategories介绍

[英]Create a new Categories element. The app:categories element is introduced by the Atom Publishing Protocol as a means of providing a listing of atom:category's that can be used by entries in a collection.
[中]

代码示例

代码示例来源:origin: org.apache.abdera/abdera-core

/**
 * Create a new Categories instance. This is a convenience shortcut for
 * <code>abdera.getFactory().newCategories()</code>
 * 
 * @return A newly created categories element
 */
public Categories newCategories() {
  return getFactory().newCategories();
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.abdera

/**
 * Create a new Categories instance.  This is a convenience shortcut
 * for <code>abdera.getFactory().newCategories()</code>
 * @return A newly created categories element
 */
public Categories newCategories() {
 return getFactory().newCategories();
}

代码示例来源:origin: org.apache.abdera/abdera-server

public Categories asCategoriesElement(RequestContext request) {
    Categories cats = request.getAbdera().getFactory().newCategories();
    if (href != null)
      cats.setHref(href);
    else {
      cats.setFixed(fixed);
      cats.setScheme(scheme);
      for (CategoryInfo cat : this)
        cats.addCategory(cat.asCategoryElement(request));
    }
    return cats;
  }
}

相关文章