private void serializeContents(ObjectNode root, JsonNodeFactory factory, List contents) { if (contents == null || contents.size() == 0) { return; } ArrayNode contentsArray = factory.arrayNode(); for (Object obj : contents) { ObjectNode content = factory.objectNode(); if (obj instanceof com.rometools.rome.feed.rss.Content) { com.rometools.rome.feed.rss.Content rssContent = (com.rometools.rome.feed.rss.Content) obj; content.put("type", rssContent.getType()); content.put("value", rssContent.getValue()); } if (obj instanceof com.rometools.rome.feed.atom.Content) { com.rometools.rome.feed.atom.Content atomContent = (com.rometools.rome.feed.atom.Content) obj; content.put("type", atomContent.getType()); content.put("value", atomContent.getValue()); content.put("mode", atomContent.getMode()); content.put("src", atomContent.getSrc()); } contentsArray.add(content); } root.put("contents", contentsArray); }
protected SyndContent createSyndContent(final Content content) { final SyndContent sContent = new SyndContentImpl(); sContent.setType(content.getType()); sContent.setValue(content.getValue()); return sContent; }
protected SyndContent createSyndContent(final Content content) { final SyndContent sContent = new SyndContentImpl(); sContent.setType(content.getType()); sContent.setValue(content.getValue()); return sContent; }
protected void fillContentElement(final Element contentElement, final Content content) throws FeedException { final String type = content.getType();
entry.setTitle(slug); final String fileName = createFileName(slug != null ? slug : entry.getTitle(), content.getType()); final File tempFile = File.createTempFile(fileName, "tmp"); final FileOutputStream fos = new FileOutputStream(tempFile); saveMediaFile(fileName, content.getType(), tempFile.length(), fis); fis.close(); final File resourceFile = new File(getEntryMediaPath(fileName));
protected void fillContentElement(final Element contentElement, final Content content) throws FeedException { final String type = content.getType();
protected void fillContentElement(final Element contentElement, final Content content) throws FeedException { final String type = content.getType(); if (type != null) { final Attribute typeAttribute = new Attribute("type", type);
protected Element generateTagLineElement(final Content tagline) { final Element taglineElement = new Element("subtitle", getFeedNamespace()); final String type = tagline.getType(); if (type != null) { final Attribute typeAttribute = new Attribute("type", type); taglineElement.setAttribute(typeAttribute); } final String value = tagline.getValue(); if (value != null) { taglineElement.addContent(value); } return taglineElement; }
protected Element generateTagLineElement(final Content tagline) { final Element taglineElement = new Element("subtitle", getFeedNamespace()); final String type = tagline.getType(); if (type != null) { final Attribute typeAttribute = new Attribute("type", type); taglineElement.setAttribute(typeAttribute); } final String value = tagline.getValue(); if (value != null) { taglineElement.addContent(value); } return taglineElement; }
protected Element generateTagLineElement(final Content tagline) { final Element taglineElement = new Element("tagline", getFeedNamespace()); final String type = tagline.getType(); if (type != null) { final Attribute typeAttribute = new Attribute("type", type); taglineElement.setAttribute(typeAttribute); } final String value = tagline.getValue(); if (value != null) { taglineElement.addContent(value); } return taglineElement; }
protected Element generateTagLineElement(final Content tagline) { final Element taglineElement = new Element("tagline", getFeedNamespace()); final String type = tagline.getType(); if (type != null) { final Attribute typeAttribute = new Attribute("type", type); taglineElement.setAttribute(typeAttribute); } final String value = tagline.getValue(); if (value != null) { taglineElement.addContent(value); } return taglineElement; }
protected void fillContentElement(final Element contentElement, final Content content) throws FeedException { final String type = content.getType(); if (type != null) { final Attribute typeAttribute = new Attribute("type", type);
method.setRequestEntity(new InputStreamRequestEntity(new ByteArrayInputStream(getBytes()))); method.setRequestHeader("Content-type", c.getType()); method.setRequestHeader("Title", getTitle()); method.setRequestHeader("Slug", getSlug());
String contentType = content.getType(); InputStream is = areq.getInputStream(); String title = entry.getTitle() != null ? entry.getTitle() : slug;
content.setType(romeContent.getType()); content.setSrc(romeContent.getSrc());
method.setRequestHeader("Content-type", updateContent.getType()); } else if (getEditURI() != null) {
sContent.setType(summary.getType()); sContent.setValue(summary.getValue()); syndEntry.setDescription(sContent); for (final Content content : contents) { final SyndContent sContent = new SyndContentImpl(); sContent.setType(content.getType()); sContent.setValue(content.getValue()); sContent.setMode(content.getMode());
sContent.setType(summary.getType()); sContent.setValue(summary.getValue()); syndEntry.setDescription(sContent); for (final Content content : contents) { final SyndContent sContent = new SyndContentImpl(); sContent.setType(content.getType()); sContent.setValue(content.getValue()); sContent.setMode(content.getMode());
if (aTitle != null) { final SyndContent c = new SyndContentImpl(); c.setType(aTitle.getType()); c.setValue(aTitle.getValue()); syndFeed.setTitleEx(c); if (aSubtitle != null) { final SyndContent c = new SyndContentImpl(); c.setType(aSubtitle.getType()); c.setValue(aSubtitle.getValue()); syndFeed.setDescriptionEx(c);
if (aTitle != null) { final SyndContent c = new SyndContentImpl(); c.setType(aTitle.getType()); c.setValue(aTitle.getValue()); syndFeed.setTitleEx(c); if (aSubtitle != null) { final SyndContent c = new SyndContentImpl(); c.setType(aSubtitle.getType()); c.setValue(aSubtitle.getValue()); syndFeed.setDescriptionEx(c);