Package com.sun.syndication.feed.atom

Examples of com.sun.syndication.feed.atom.Content


            aEntry.setAlternateLinks(list);
        }

        SyndContent sContent = sEntry.getDescription();
        if (sContent!=null) {
            Content content = new Content();
            content.setType(sContent.getType());
            content.setValue(sContent.getValue());
            content.setMode(Content.ESCAPED);
            aEntry.setSummary(content);
        }

        List contents = sEntry.getContents();
        if (contents.size()>0) {
            List aContents = new ArrayList();
            for (int i=0;i<contents.size();i++) {
                sContent = (SyndContentImpl) contents.get(i);
                Content content = new Content();
                content.setType(sContent.getType());
                content.setValue(sContent.getValue());
                content.setMode(Content.ESCAPED);
                aContents.add(content);

            }
            aEntry.setContents(aContents);
        }
View Full Code Here


        syndFeed.setTitle(aFeed.getTitle());

        Link link = (Link) aFeed.getAlternateLinks().get(0);
        syndFeed.setLink(link.getHref());

        Content info = aFeed.getInfo();
        if (info!=null) {
            syndFeed.setDescription(info.getValue());
        }


        List aEntries = aFeed.getEntries();
        if (aEntries!=null) {
View Full Code Here

        }
        else {
            syndEntry.setUri(syndEntry.getLink());
        }

        Content content = entry.getSummary();
        if (content==null) {
            List contents = entry.getContents();
            if (contents!=null && contents.size()>0) {
                content = (Content) contents.get(0);
            }
        }
        if (content!=null) {
            SyndContent sContent = new SyndContentImpl();
            sContent.setType(content.getType());
            sContent.setValue(content.getValue());
            syndEntry.setDescription(sContent);
        }

        List contents = entry.getContents();
        if (contents.size()>0) {
            List sContents = new ArrayList();
            for (int i=0;i<contents.size();i++) {
                content = (Content) contents.get(i);
                SyndContent sContent = new SyndContentImpl();
                sContent.setType(content.getType());
                sContent.setValue(content.getValue());
                sContents.add(sContent);
            }
            syndEntry.setContents(sContents);
        }
View Full Code Here

            aFeed.setAlternateLinks(list);
        }

        String sDesc = syndFeed.getDescription();
        if (sDesc!=null) {
            Content info = new Content();
            info.setValue(sDesc);
            aFeed.setInfo(info);
        }

        aFeed.setLanguage(syndFeed.getLanguage());
View Full Code Here

            aEntry.setAlternateLinks(list);
        }

        SyndContent sContent = sEntry.getDescription();
        if (sContent!=null) {
            Content content = new Content();
            content.setType(sContent.getType());
            content.setValue(sContent.getValue());
            content.setMode(Content.XML);
            aEntry.setSummary(content);
        }

        List contents = sEntry.getContents();
        if (contents.size()>0) {
            List aContents = new ArrayList();
            for (int i=0;i<contents.size();i++) {
                sContent = (SyndContentImpl) contents.get(i);
                Content content = new Content();
                content.setType(sContent.getType());
                content.setValue(sContent.getValue());
                content.setMode(Content.XML);
                aContents.add(content);

            }
            aEntry.setContents(aContents);
        }
View Full Code Here

            value = outputter.outputString(eContent);
        }
       
        // TODO: handle Atom Content's src attribute

        Content content = new Content();
        content.setType(type);
        content.setValue(value);
        return content;
    }
View Full Code Here

            feed.setContributors(parsePersons(baseURI, eList));
        }

        e = eFeed.getChild("subtitle",getAtomNamespace());
        if (e!=null) {
            Content subtitle = new Content();
            subtitle.setType(Content.TEXT); // TODO: need content type of SyndFeed level
            subtitle.setValue(e.getText());
            feed.setSubtitle(subtitle);
        }

        e = eFeed.getChild("id",getAtomNamespace());
        if (e!=null) {
View Full Code Here

            eEntry.addContent(publishedElement);
        }

        if (entry.getContents() != null && entry.getContents().size() > 0) {
            Element contentElement = new Element("content", getFeedNamespace());
            Content content = (Content)entry.getContents().get(0);
            fillContentElement(contentElement, content);
            eEntry.addContent(contentElement);
        }

        if (entry.getSummary() != null) {
View Full Code Here

        }
      }
      value = outputter.outputString(eContent);
    }

    Content content = new Content();
    content.setType(type);
    content.setMode(mode);
    content.setValue(value);
    return content;
  }
View Full Code Here

       
        // Set the id
        e.setId(entryId);
       
        // Set the content to link to the media
        Content c = new Content();
        c.setType(headers.getMediaType().toString());
        URI mediaUri = entryUriBuilder.
                path("media").
                build();
        c.setSrc(mediaUri.toString());
        e.getContents().add(c);
       
        // Store entry document
        AtomStore.createEntryDocument(bodyContext, entryId, e);
        // Store the media
View Full Code Here

TOP

Related Classes of com.sun.syndication.feed.atom.Content

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.