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


            Entry entry = new Entry();
            entry.setTitle("customer " + "Jane Doe_" + String.valueOf(i));
            entry.setId(id);

            Content content = new Content();
            content.setValue("Jane Doe_" + String.valueOf(i));
            content.setType(Content.TEXT);
            entry.setContents(Collections.singletonList(content));

            List<Link> links = new ArrayList<Link>();
            Link link = new Link();
            link.setRel("edit");
View Full Code Here

    public Feed getFeed() {
        System.out.println(">>> ResourceCollectionImpl.get collection");

        Feed feed = new Feed();
        feed.setTitle("customers");
        Content subtitle = new Content();
        subtitle.setValue("This is a sample feed");
        feed.setSubtitle(subtitle);
        feed.getEntries().addAll(entries.values());
        return feed;
    }
View Full Code Here

    private Entry newEntry(String value) {

        Entry entry = new Entry();
        entry.setTitle("customer " + value);

        Content content = new Content();
        content.setValue(value);
        content.setType(Content.TEXT);
        List<Object> list = new ArrayList<Object>();
        list.add(content);
        entry.setContents(list);

        return entry;
View Full Code Here

    }

    private Entry updateEntry(Entry entry, String value) {

        entry.setTitle("customer " + value);
        Content content = new Content();
        content.setValue(value);
        content.setType(Content.TEXT);
        List<Object> list = new ArrayList<Object>();
        list.add(content);
        entry.setContents(list);

        return entry;
View Full Code Here

        }

        Element e = eFeed.getChild("title", getAtomNamespace());
        if (e != null)
        {
            Content c = new Content();
            c.setValue(parseTextConstructToString(e));
            c.setType(e.getAttributeValue("type")); //, Namespace.XML_NAMESPACE));
            feed.setTitleEx(c);
        }

        List<Element> eList = getChildren(eFeed, "link");
        feed.setAlternateLinks(parseAlternateLinks(feed, null, baseURI, eList));
        feed.setOtherLinks(parseOtherLinks(feed, null, baseURI, eList));

        List cList = eFeed.getChildren("category", getAtomNamespace());
        feed.setCategories(parseCategories(baseURI, cList));

        eList = getChildren(eFeed, "author");
        if (eList.size() > 0)
        {
            feed.setAuthors(parsePersons(baseURI, eList));
        }

        eList = getChildren(eFeed, "contributor");
        if (eList.size() > 0)
        {
            feed.setContributors(parsePersons(baseURI, eList));
        }

        e = eFeed.getChild("subtitle", getAtomNamespace());
        if (e != null)
        {
            Content subtitle = new Content();
            subtitle.setValue(parseTextConstructToString(e));
            subtitle.setType(e.getAttributeValue("type")); //, Namespace.XML_NAMESPACE));
            feed.setSubtitle(subtitle);
        }

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

    private Content parseContent(Element e)
    {
        String value = parseTextConstructToString(e);
        String src = e.getAttributeValue("src");//getAtomNamespace()); DONT KNOW WHY DOESN'T WORK
        String type = e.getAttributeValue("type");//getAtomNamespace()); DONT KNOW WHY DOESN'T WORK
        Content content = new Content();
        content.setSrc(src);
        content.setType(type);
        content.setValue(value);
        return content;
    }
View Full Code Here

        }

        Element e = eEntry.getChild("title", getAtomNamespace());
        if (e != null)
        {
            Content c = new Content();
            c.setValue(parseTextConstructToString(e));
            c.setType(e.getAttributeValue("type")); //, Namespace.XML_NAMESPACE));
            entry.setTitleEx(c);
        }

        List<Element> eList = getChildren(eEntry, "link");
        entry.setAlternateLinks(parseAlternateLinks(feed, entry, baseURI, eList));
View Full Code Here

        try {
            // get incoming slug from HTTP header
            String slug = areq.getHeader("Slug");

            Content content = (Content)entry.getContents().get(0);
            String contentType = content.getType();
            InputStream is = areq.getInputStream();
            String title = entry.getTitle() != null ? entry.getTitle() : slug;
           
            // authenticated client posted a weblog entry
            File tempFile = null;
View Full Code Here

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