/** * Gets the category by index. * <p> * @param index the index position to retrieve the category. * @return the SyndCategoryImpl in position index, <b>null</b> if none. * */ public Object get(int index) { return new SyndCategoryImpl((DCSubject) _subjects.get(index)); }
/** * Removes a category element from a specific position. * <p> * @param index position to remove the category from. * @return the SyndCategoryImpl being removed from position index, <b>null</b> if none. * */ public Object remove(int index) { DCSubject subject = (DCSubject) _subjects.remove(index); return (subject!=null) ? new SyndCategoryImpl(subject) : null; }
/** * Gets the category by index. * <p> * @param index the index position to retrieve the category. * @return the SyndCategoryImpl in position index, <b>null</b> if none. * */ public SyndCategory get(int index) { return new SyndCategoryImpl((DCSubject) _subjects.get(index)); }
/** * Removes a category element from a specific position. * <p> * @param index position to remove the category from. * @return the SyndCategoryImpl being removed from position index, <b>null</b> if none. * */ public Object remove(int index) { DCSubject subject = (DCSubject) _subjects.remove(index); return (subject!=null) ? new SyndCategoryImpl(subject) : null; }
/** * Gets the category by index. * <p> * @param index the index position to retrieve the category. * @return the SyndCategoryImpl in position index, <b>null</b> if none. * */ public SyndCategory get(int index) { return new SyndCategoryImpl((DCSubject) _subjects.get(index)); }
/** * Removes a category element from a specific position. * <p> * @param index position to remove the category from. * @return the SyndCategoryImpl being removed from position index, <b>null</b> if none. * */ @Override public SyndCategory remove(int index) { DCSubject subject = (DCSubject) _subjects.remove(index); return (subject!=null) ? new SyndCategoryImpl(subject) : null; }
/** * Gets the category by index. * <p> * @param index the index position to retrieve the category. * @return the SyndCategoryImpl in position index, <b>null</b> if none. * */ public Object get(int index) { return new SyndCategoryImpl((DCSubject) _subjects.get(index)); }
/** * Removes a category element from a specific position. * <p> * @param index position to remove the category from. * @return the SyndCategoryImpl being removed from position index, <b>null</b> if none. * */ @Override public SyndCategory remove(int index) { DCSubject subject = (DCSubject) _subjects.remove(index); return (subject!=null) ? new SyndCategoryImpl(subject) : null; }
/** * Sets a category in an existing position in the list. * <p> * @param index position to set the category. * @param obj the SyndCategoryImpl object to set. * @return the SyndCategoryImpl object that is being replaced, <b>null</b> if none. * */ @Override public SyndCategory set(int index, SyndCategory obj) { SyndCategoryImpl sCat = (SyndCategoryImpl) obj; DCSubject subject = (sCat!=null) ? sCat.getSubject() : null; subject = (DCSubject) _subjects.set(index,subject); return (subject!=null) ? new SyndCategoryImpl(subject) : null; }
/** * Sets a category in an existing position in the list. * <p> * @param index position to set the category. * @param obj the SyndCategoryImpl object to set. * @return the SyndCategoryImpl object that is being replaced, <b>null</b> if none. * */ public Object set(int index,Object obj) { SyndCategoryImpl sCat = (SyndCategoryImpl) obj; DCSubject subject = (sCat!=null) ? sCat.getSubject() : null; subject = (DCSubject) _subjects.set(index,subject); return (subject!=null) ? new SyndCategoryImpl(subject) : null; }
/** * Sets a category in an existing position in the list. * <p> * @param index position to set the category. * @param obj the SyndCategoryImpl object to set. * @return the SyndCategoryImpl object that is being replaced, <b>null</b> if none. * */ public Object set(int index,Object obj) { SyndCategoryImpl sCat = (SyndCategoryImpl) obj; DCSubject subject = (sCat!=null) ? sCat.getSubject() : null; subject = (DCSubject) _subjects.set(index,subject); return (subject!=null) ? new SyndCategoryImpl(subject) : null; }
/** * Sets a category in an existing position in the list. * <p> * @param index position to set the category. * @param obj the SyndCategoryImpl object to set. * @return the SyndCategoryImpl object that is being replaced, <b>null</b> if none. * */ @Override public SyndCategory set(int index, SyndCategory obj) { SyndCategoryImpl sCat = (SyndCategoryImpl) obj; DCSubject subject = (sCat!=null) ? sCat.getSubject() : null; subject = (DCSubject) _subjects.set(index,subject); return (subject!=null) ? new SyndCategoryImpl(subject) : null; }
protected List createSyndCategories(List rssCats) { List syndCats = new ArrayList(); for (int i=0;i<rssCats.size();i++) { Category rssCat = (Category) rssCats.get(i); SyndCategory sCat = new SyndCategoryImpl(); sCat.setTaxonomyUri(rssCat.getDomain()); sCat.setName(rssCat.getValue()); syndCats.add(sCat); } return syndCats; }
protected List createSyndCategories(List rssCats) { List syndCats = new ArrayList(); for (int i=0;i<rssCats.size();i++) { Category rssCat = (Category) rssCats.get(i); SyndCategory sCat = new SyndCategoryImpl(); sCat.setTaxonomyUri(rssCat.getDomain()); sCat.setName(rssCat.getValue()); syndCats.add(sCat); } return syndCats; }
public static SyndCategory category(String name, String taxonomyUri) { final SyndCategory c = new SyndCategoryImpl(); c.setName(name); c.setTaxonomyUri(taxonomyUri); return c; }
protected List createSyndCategories(List rssCats) { List syndCats = new ArrayList(); for (int i=0;i<rssCats.size();i++) { Category rssCat = (Category) rssCats.get(i); SyndCategory sCat = new SyndCategoryImpl(); sCat.setTaxonomyUri(rssCat.getDomain()); sCat.setName(rssCat.getValue()); syndCats.add(sCat); } return syndCats; }
protected List createSyndCategories(List rssCats) { List syndCats = new ArrayList(); for (Object rssCat1 : rssCats) { Category rssCat = (Category) rssCat1; SyndCategory sCat = new SyndCategoryImpl(); sCat.setTaxonomyUri(rssCat.getDomain()); sCat.setName(rssCat.getValue()); syndCats.add(sCat); } return syndCats; }
public static SyndCategory category(Category category) { final SyndCategory c = new SyndCategoryImpl(); c.setName(category.getDefaultName().getDisplayName()); return c; }
protected List<SyndCategory> getCategories(Document doc, Map<String, Object> params, XWikiContext context) throws XWikiException { String mapping = (String) params.get(FIELD_CATEGORIES); if (mapping == null) { return getDefaultCategories(doc, params, context); } List<Object> categories; if (isVelocityCode(mapping)) { categories = parseList(mapping, doc, context); } else { categories = getListValue(mapping, doc, context); } List<SyndCategory> result = new ArrayList<SyndCategory>(); for (Object category : categories) { if (category instanceof SyndCategory) { result.add((SyndCategory) category); } else if (category != null) { SyndCategory scat = new SyndCategoryImpl(); scat.setName(category.toString()); result.add(scat); } } return result; }
for (Label label : bookmark.getLabels()) SyndCategory category = new SyndCategoryImpl(); category.setName(label.toString()); categories.add(category);