Esempio n. 1
0
  public SyndEntry build() {
    final SyndEntry entry = new SyndEntryImpl();

    if (uri != null) {
      entry.setUri(uri);
    }
    if (title != null) {
      entry.setTitleEx(title);
    }
    if (link != null) {
      entry.setLink(link);
    }
    if (links != null) {
      entry.setLinks(links);
    }
    if (description != null) {
      entry.setDescription(description);
    }
    if (contents != null) {
      entry.setContents(contents);
    }
    if (enclosures != null) {
      entry.setEnclosures(enclosures);
    }
    if (publishedDate != null) {
      entry.setPublishedDate(publishedDate);
    }
    if (updatedDate != null) {
      entry.setUpdatedDate(updatedDate);
    }
    if (author != null) {
      entry.setAuthor(author);
    }
    if (authors != null) {
      entry.setAuthors(authors);
    }
    if (contributors != null) {
      entry.setContributors(contributors);
    }
    if (categories != null) {
      entry.setCategories(categories);
    }

    return entry;
  }
 protected SyndEntry createSyndEntry(Item item) {
   SyndEntry syndEntry = super.createSyndEntry(item);
   Description desc = item.getDescription();
   if (desc != null) {
     SyndContent descContent = new SyndContentImpl();
     descContent.setType(desc.getType());
     descContent.setValue(desc.getValue());
     syndEntry.setDescription(descContent);
   }
   Content cont = item.getContent();
   if (cont != null) {
     SyndContent content = new SyndContentImpl();
     content.setType(cont.getType());
     content.setValue(cont.getValue());
     List syndContents = new ArrayList();
     syndContents.add(content);
     syndEntry.setContents(syndContents);
   }
   return syndEntry;
 }