/** * Adds the atom:content element to an entry */ protected void addContent(Entry e, T doc, RequestContext request) throws ResponseContextException { Object content = getContent(doc, request); if (content instanceof Content) { e.setContentElement((Content)content); } else if (content instanceof String) { e.setContent((String)content); } }
protected void setEntryContent(Factory factory, Entry e, String content) { Content ct = factory.newContent(Content.Type.XML); ct.setValue(content); e.setContentElement(ct); }
protected void setEntryContent(Factory factory, Entry e, String content) { Content ct = factory.newContent(Content.Type.XML); ct.setValue(content); e.setContentElement(ct); }
protected void setEntryContent(Factory factory, Entry e, String content) { Content ct = factory.newContent(Content.Type.XML); ct.setValue(content); e.setContentElement(ct); }
private Entry createBookEntry(int id, String name) throws Exception { Book b = new Book(); b.setId(id); b.setName(name); Factory factory = Abdera.getNewFactory(); JAXBContext jc = JAXBContext.newInstance(Book.class); Entry e = factory.getAbdera().newEntry(); e.setTitle(b.getName()); e.setId(Long.toString(b.getId())); StringWriter writer = new StringWriter(); jc.createMarshaller().marshal(b, writer); Content ct = factory.newContent(Content.Type.XML); ct.setValue(writer.toString()); e.setContentElement(ct); return e; }
content.setValue(value); feedEntry.setContentElement(content);
content.setContentType(null); content.setSrc(contentLink); entry.setContentElement(content);