Package com.sun.syndication.feed.rss

Examples of com.sun.syndication.feed.rss.Guid


        String comments = item.getComments();
        if (comments != null) {
            eItem.addContent(generateSimpleElement("comments", comments));
        }

        Guid guid = item.getGuid();
        if (guid != null) {
            Element eGuid = generateSimpleElement("guid",guid.getValue());
            if (!guid.isPermaLink()) {
                eGuid.setAttribute("isPermaLink", "false");
            }
            eItem.addContent(eGuid);
        }
    }
View Full Code Here


    protected SyndEntry createSyndEntry(Item item) {
        SyndEntry syndEntry = super.createSyndEntry(item);
        syndEntry.setAuthor(item.getAuthor());    //c

        Guid guid = item.getGuid();
        if (guid!=null) {
            syndEntry.setUri(guid.getValue());
            if (item.getLink()==null && guid.isPermaLink()) {
                syndEntry.setLink(guid.getValue());
            }
        }
        else {
            syndEntry.setUri(item.getLink());
        }
View Full Code Here

    protected Item createRSSItem(SyndEntry sEntry) {
        Item item = super.createRSSItem(sEntry);
        item.setAuthor(sEntry.getAuthor());    //c

        Guid guid = null;
        String uri = sEntry.getUri();
        if (uri!=null) {
            guid = new Guid();
            guid.setPermaLink(false);
            guid.setValue(uri);
        }
        else {
            String link = sEntry.getLink();
            if (link!=null) {
                guid = new Guid();
                guid.setPermaLink(true);
                guid.setValue(link);
            }
        }
        item.setGuid(guid);

        return item;
View Full Code Here

TOP

Related Classes of com.sun.syndication.feed.rss.Guid

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.