protected SyndEntry createSyndEntry(Item item, boolean preserveWireItem) { SyndEntry syndEntry = super.createSyndEntry(item, preserveWireItem); 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; }
@Override protected SyndEntry createSyndEntry(Item item, boolean preserveWireItem) { SyndEntry syndEntry = super.createSyndEntry(item, preserveWireItem); 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; }
@Override protected SyndEntry createSyndEntry(Item item, boolean preserveWireItem) { SyndEntry syndEntry = super.createSyndEntry(item, preserveWireItem); 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 contContent = new SyndContentImpl(); contContent.setType(cont.getType()); contContent.setValue(cont.getValue()); List contents = new ArrayList(); contents.add(contContent); syndEntry.setContents(contents); } return syndEntry; }
protected SyndEntry createSyndEntry(Item item, boolean preserveWireItem) { SyndEntry syndEntry = super.createSyndEntry(item, preserveWireItem); 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 contContent = new SyndContentImpl(); contContent.setType(cont.getType()); contContent.setValue(cont.getValue()); List contents = new ArrayList(); contents.add(contContent); syndEntry.setContents(contents); } return syndEntry; }
protected SyndEntry createSyndEntry(Item item, boolean preserveWireItem) { SyndEntry syndEntry = super.createSyndEntry(item, preserveWireItem); 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; }
protected SyndEntry createSyndEntry(Item item, boolean preserveWireItem) { SyndEntry syndEntry = super.createSyndEntry(item, preserveWireItem); 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 contContent = new SyndContentImpl(); contContent.setType(cont.getType()); contContent.setValue(cont.getValue()); List contents = new ArrayList(); contents.add(contContent); syndEntry.setContents(contents); } return syndEntry; }
@Override protected SyndEntry createSyndEntry(Item item, boolean preserveWireItem) { SyndEntry syndEntry = super.createSyndEntry(item, preserveWireItem); 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; }
@Override protected SyndEntry createSyndEntry(Item item, boolean preserveWireItem) { SyndEntry syndEntry = super.createSyndEntry(item, preserveWireItem); 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 contContent = new SyndContentImpl(); contContent.setType(cont.getType()); contContent.setValue(cont.getValue()); List contents = new ArrayList(); contents.add(contContent); syndEntry.setContents(contents); } return syndEntry; }
private SyndEntry toSyndEntry(TgwEntry tgwEntry) { SyndEntry entry = new SyndEntryImpl(); // basic info //entry.setUri("http://aaa.com/" + entry.hashCode()); //entry.setLink("http://aaa.com/" + entry.hashCode()); entry.setTitle(tgwEntry.getTitle()); entry.setPublishedDate(tgwEntry.getPublished()); entry.setUpdatedDate(tgwEntry.getUpdated()); entry.setAuthor(tgwEntry.getAuthor()); // entry.setLink("abcd"); SyndLink link = new SyndLinkImpl(); link.setRel("self"); link.setType("application/atom+xml"); link.setHref("xxxx"); // SyndLink link = new SyndLinkImpl(); // link.set // content SyndContent content = new SyndContentImpl(); content.setType("text/plain"); content.setValue(tgwEntry.getContent()); entry.setDescription(content); List<SyndContent> list = new ArrayList<SyndContent>(); list.add(content); entry.setContents(list); return entry; }
entry.setContents(contents);