Exemplo n.º 1
0
 private void generateItem(Element conflictElement, Item item) {
   if (item != null) {
     Element itemElement = new Element("item");
     parentGenerator.populateItem(item, itemElement, 0);
     parentGenerator.generateItemModules(item.getModules(), itemElement);
     conflictElement.addContent(itemElement);
   }
 }
  protected SyndEntry createSyndEntry(Item item) {
    SyndEntry syndEntry = new SyndEntryImpl();

    syndEntry.setModules(ModuleUtils.cloneModules(item.getModules()));

    if (((List) item.getForeignMarkup()).size() > 0) {
      syndEntry.setForeignMarkup(item.getForeignMarkup());
    }

    syndEntry.setUri(item.getUri());
    syndEntry.setLink(item.getLink());
    syndEntry.setTitle(item.getTitle());
    if (item.getDescription() != null) {
      SyndContent description = new SyndContentImpl();
      description.setValue(item.getDescription().getValue());
      syndEntry.setDescription(description);
    }
    if (item.getAuthor() != null) syndEntry.setAuthor(item.getAuthor());
    if (item.getPubDate() != null) syndEntry.setPublishedDate(item.getPubDate());
    syndEntry.setCategories(item.getCategories());
    return syndEntry;
  }