Examples of SyndEntryImpl


Examples of com.sun.syndication.synd.hibernate.SyndEntryImpl

        }
        return syndEntries;
    }

    protected SyndEntry createSyndEntry(Entry entry) {
        SyndEntry syndEntry = new SyndEntryImpl();
        syndEntry.setModules(ModuleUtils.cloneModules(entry.getModules()));

        syndEntry.setTitle(entry.getTitle());

        Link link = (Link) entry.getAlternateLinks().get(0);
        syndEntry.setLink(link.getHref());

        String id = entry.getId();
        if (id!=null) {
            syndEntry.setUri(entry.getId());
        }
        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);
        }

        Person author = entry.getAuthor();
        if (author!=null && author.getName()!=null) {
            syndEntry.setAuthor(author.getName());
        }

        Date date = entry.getModified();
        if (date!=null) {
            syndEntry.setPublishedDate(date);
        }

        return syndEntry;
    }
View Full Code Here

Examples of com.sun.syndication.synd.hibernate.SyndEntryImpl

        }
        return syndEntries;
    }

    protected SyndEntry createSyndEntry(Item item) {
        SyndEntry syndEntry = new SyndEntryImpl();

        syndEntry.setModules(ModuleUtils.cloneModules(item.getModules()));

        syndEntry.setUri(item.getLink());
        syndEntry.setTitle(item.getTitle());
        syndEntry.setLink(item.getLink());
        return syndEntry;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.