Package com.sun.syndication.feed.rss

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


    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

        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

            item.setAuthor(e.getText());
        }

        e = eItem.getChild("guid",getRSSNamespace());
        if (e!=null) {
            Guid guid = new Guid();
            String att = e.getAttributeValue("isPermaLink");//getRSSNamespace()); DONT KNOW WHY DOESN'T WORK
            if (att!=null) {
                guid.setPermaLink(att.equalsIgnoreCase("true"));
            }
            guid.setValue(e.getText());
            item.setGuid(guid);
        }

        e = eItem.getChild("comments",getRSSNamespace());
        if (e!=null) {
View Full Code Here

                creators.clear();
                creators.addAll(s);
            }
        }

        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

        if (sEntry.getAuthors()!=null && sEntry.getAuthors().size() > 0) {
            SyndPerson author = (SyndPerson)sEntry.getAuthors().get(0);
            item.setAuthor(author.getEmail())
       

        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

        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

            item.setAuthor(e.getText());
        }

        e = eItem.getChild("guid",getRSSNamespace());
        if (e!=null) {
            Guid guid = new Guid();
            String att = e.getAttributeValue("isPermaLink");//getRSSNamespace()); DONT KNOW WHY DOESN'T WORK
            if (att!=null) {
                guid.setPermaLink(att.equalsIgnoreCase("true"));
            }
            guid.setValue(e.getText());
            item.setGuid(guid);
        }

        e = eItem.getChild("comments",getRSSNamespace());
        if (e!=null) {
View Full Code Here

                creators.clear();
                creators.addAll(s);
            }
        }

        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

        if (sEntry.getAuthors()!=null && sEntry.getAuthors().size() > 0) {
            SyndPerson author = (SyndPerson)sEntry.getAuthors().get(0);
            item.setAuthor(author.getEmail())
       

        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);
        SyndLink comments = sEntry.findRelatedLink("comments");
        if(comments != null && (comments.getType() == null || comments.getType().endsWith("html"))){
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.