entryCol.addAccept("application/atom+xml;type=entry");
// Add fixed categories using scheme that points to
// weblog because categories are weblog specific
weblog = perm.getWeblog();
Categories cats = new Categories();
cats.setFixed(true);
cats.setScheme(getWeblogCategoryScheme(weblog));
List rollerCats = roller.getWeblogEntryManager().getWeblogCategories(weblog, false);
for (Iterator it = rollerCats.iterator(); it.hasNext();) {
WeblogCategory rollerCat = (WeblogCategory) it.next();
Category cat = new Category();
cat.setTerm(rollerCat.getPath().substring(1));
cat.setLabel(rollerCat.getName());
cats.addCategory(cat);
}
entryCol.addCategories(cats);
// Add tags as free-form categories using scheme that points
// to site because tags can be considered site-wide
Categories tags = new Categories();
tags.setFixed(false);
entryCol.addCategories(tags);
workspace.addCollection(entryCol);
} catch (Exception e) {
throw new AtomException("Creating weblog entry collection for service doc", e);