Package com.rometools.rome.feed.synd

Examples of com.rometools.rome.feed.synd.SyndContentImpl


        if (raw) {
            if (message.getContents() != null) {
                out.startObject(Rss.RAW);
                for (Object o : message.getContents()) {
                    if (o instanceof SyndContentImpl) {
                        SyndContentImpl content = (SyndContentImpl) o;
                        out.field(content.getType(), content.getValue());
                    }
                }
                out.endObject();
            }
        }
View Full Code Here


    SyndEntry entry = new SyndEntryImpl();

    entry.setUri(getGuid());
    entry.setTitle(getTitle());

    SyndContentImpl content = new SyndContentImpl();
    content.setValue(getContent());
    entry.setContents(Arrays.<SyndContent> asList(content));
    entry.setLink(getUrl());
    entry.setPublishedDate(getDate());
    return entry;
  }
View Full Code Here

  @Override
  protected SyndEntry createSyndEntry(Item item, boolean preserveWireItem) {
    SyndEntry entry = super.createSyndEntry(item, preserveWireItem);
    Description desc = item.getDescription();
    if (desc != null) {
      SyndContentImpl syndDesc = new SyndContentImpl();
      syndDesc.setValue(desc.getValue());
      entry.setDescription(syndDesc);
    }
    return entry;
  }
View Full Code Here

        final SyndEntry syndEntry = super.createSyndEntry(item, preserveWireItem);

        final Description desc = item.getDescription();
        if (desc != null) {
            final SyndContent descContent = new SyndContentImpl();
            descContent.setType(desc.getType());
            descContent.setValue(desc.getValue());
            syndEntry.setDescription(descContent);
        }

        final Content cont = item.getContent();
        if (cont != null) {

            final SyndContent contContent = new SyndContentImpl();
            contContent.setType(cont.getType());
            contContent.setValue(cont.getValue());

            final List<SyndContent> contents = new ArrayList<SyndContent>();
            contents.add(contContent);
            syndEntry.setContents(contents);
View Full Code Here

            final List<Content> contents = entry.getContents();
            if (Lists.isNotEmpty(contents)) {
                summary = contents.get(0);
            }
        } else {
            final SyndContent sContent = new SyndContentImpl();
            sContent.setType(summary.getType());
            sContent.setValue(summary.getValue());
            syndEntry.setDescription(sContent);
        }

        final List<Content> contents = entry.getContents();
        if (Lists.isNotEmpty(contents)) {
            final List<SyndContent> sContents = new ArrayList<SyndContent>();
            for (final Content content : contents) {
                final SyndContent sContent = new SyndContentImpl();
                sContent.setType(content.getType());
                sContent.setValue(content.getValue());
                sContent.setMode(content.getMode());
                sContents.add(sContent);

            }
            syndEntry.setContents(sContents);
        }
View Full Code Here

        syndFeed.setUri(aFeed.getId());

        final Content aTitle = aFeed.getTitleEx();
        if (aTitle != null) {
            final SyndContent c = new SyndContentImpl();
            c.setType(aTitle.getType());
            c.setValue(aTitle.getValue());
            syndFeed.setTitleEx(c);
        }

        final Content aSubtitle = aFeed.getSubtitle();
        if (aSubtitle != null) {
            final SyndContent c = new SyndContentImpl();
            c.setType(aSubtitle.getType());
            c.setValue(aSubtitle.getValue());
            syndFeed.setDescriptionEx(c);
        }

        // use first alternate links as THE link
        final List<Link> alternateLinks = aFeed.getAlternateLinks();
View Full Code Here

        return aFeed;

    }

    protected SyndContent createSyndContent(final Content content) {
        final SyndContent sContent = new SyndContentImpl();
        sContent.setType(content.getType());
        sContent.setValue(content.getValue());
        return sContent;
    }
View Full Code Here

        final Description desc = item.getDescription();

        syndEntry.setComments(item.getComments());

        if (desc != null) {
            final SyndContent descContent = new SyndContentImpl();
            descContent.setType(desc.getType());
            descContent.setValue(desc.getValue());
            syndEntry.setDescription(descContent);
        }

        final Content cont = item.getContent();

        if (cont != null) {
            final SyndContent content = new SyndContentImpl();
            content.setType(cont.getType());
            content.setValue(cont.getValue());

            final List<SyndContent> syndContents = new ArrayList<SyndContent>();
            syndContents.add(content);
            syndEntry.setContents(syndContents);
        }
View Full Code Here

TOP

Related Classes of com.rometools.rome.feed.synd.SyndContentImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.