Package com.sun.syndication.feed.atom

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


    public com.sun.syndication.feed.atom.Feed getFeed() {
       
        // Create a new Feed
        com.sun.syndication.feed.atom.Feed feed = new com.sun.syndication.feed.atom.Feed();
        feed.setTitle(feedTitle);
        Content subtitle = new Content();
        subtitle.setValue(feedDescription);
        feed.setSubtitle(subtitle);
        Person author = new Person();
        author.setName(feedAuthor);
        feed.setAuthors(Collections.singletonList(author));
        Link link = new Link();
View Full Code Here


       
        // Create a new Feed
        Feed feed = new Feed();
        feed.setId("accounts");
        feed.setTitle("Account Report Feed");
        Content subtitle = new Content();
        subtitle.setValue("This is a sample feed");
        feed.setSubtitle(subtitle);
        Link link = new Link();
        link.setHref("http://incubator.apache.org/tuscany");
        feed.getAlternateLinks().add(link);
View Full Code Here

        String value = Double.toString(balance);
       
        Entry entry = new Entry();
        entry.setId("account-" + id);
        entry.setTitle("Account Report Entry");
        Content summary = new Content();
        summary.setType(Content.HTML);
        summary.setValue("This is your account report: <b>" + value + "</b>");
        entry.setSummary(summary);
        Content content = new Content();
        content.setValue(value);
        entry.setContents(Collections.singletonList(content));
        return entry;
    }
View Full Code Here

     * Content is escaped.
     * Link is stored as rel=alternate link.
     */
    private Entry createAtomEntry(WeblogEntryData entry) {
        Entry atomEntry = new Entry();
        Content content = new Content();
        content.setType(Content.HTML);
        content.setValue(entry.getText());
        List contents = new ArrayList();
        contents.add(content);
       
        String absUrl = RollerRuntimeConfig.getAbsoluteContextURL();
        atomEntry.setId(        absUrl + entry.getPermaLink());
View Full Code Here

        Link editMedialink = new Link();
            editMedialink.setRel("edit-media");
            editMedialink.setHref(editMediaURI);       
            otherlinks.add(editMedialink);
       
        Content content = new Content();
        content.setSrc(viewURI);
        content.setType(contentType);
        List contents = new ArrayList();
        contents.add(content);
        entry.setContents(contents);
       
        return entry;
View Full Code Here

            updateTime = new Timestamp( entry.getUpdated().getTime() );
        }
        WeblogEntryData rollerEntry = new WeblogEntryData();
        rollerEntry.setTitle(entry.getTitle());
        if (entry.getContents() != null && entry.getContents().size() > 0) {
            Content content = (Content)entry.getContents().get(0);
            rollerEntry.setText(content.getValue());
        }
        rollerEntry.setPubTime(pubTime);
        rollerEntry.setUpdateTime(updateTime);
        rollerEntry.setWebsite(website);
       
View Full Code Here

            // see http://diveintomark.org/archives/2004/05/28/howto-atom-id#other
            entry.setId(String.format("tag:springsource.org,%s", vet.getId()));
            entry.setTitle(String.format("Vet: %s %s", vet.getFirstName(), vet.getLastName()));
            //entry.setUpdated(visit.getDate().toDate());

            Content summary = new Content();
            summary.setValue(vet.getSpecialties().toString());
            entry.setSummary(summary);

            entries.add(entry);
        }
        response.setContentType("blabla");
View Full Code Here

    StringBuffer buf = new StringBuffer("<div xmlns=\"http://www.w3.org/1999/xhtml\">");
    buf.append("<img src=\"");
    buf.append(imageUrl);
    buf.append("\" />");
    buf.append("</div>");
    Content image = new Content();
    image.setType("application/xhtml+xml");
    image.setValue(buf.toString());
    return image;
  }
View Full Code Here

     * Content is escaped.
     * Link is stored as rel=alternate link.
     */
    private Entry createAtomEntry(WeblogEntryData entry) {
        Entry atomEntry = new Entry();
        Content content = new Content();
        content.setType(Content.HTML);
        content.setValue(entry.getText());
        List contents = new ArrayList();
        contents.add(content);
       
        String absUrl = RollerRuntimeConfig.getAbsoluteContextURL();
        atomEntry.setId(        absUrl + entry.getPermaLink());
View Full Code Here

        Link editMedialink = new Link();
            editMedialink.setRel("edit-media");
            editMedialink.setHref(editMediaURI);       
            otherlinks.add(editMedialink);
       
        Content content = new Content();
        content.setSrc(viewURI);
        content.setType(contentType);
        List contents = new ArrayList();
        contents.add(content);
        entry.setContents(contents);
       
        return entry;
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.