Examples of SyndEntryI


Examples of com.sun.syndication.feed.synd.SyndEntryI

    assertEqualsStr("channel.item[0].author", getEntryAuthor(getCachedSyndFeed().getEntries().get(0)));
    assertEqualsStr("channel.item[1].author", getEntryAuthor(getCachedSyndFeed().getEntries().get(1)));
  }

  public String getEntryAuthor(Object o) {
    SyndEntryI e = (SyndEntryI) o;
    return e.getAuthor();
  }
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndEntryI

            syndFeed.setCategories(this.createSyndCategories(cats));
        }
    }

    protected SyndEntryI createSyndEntry(Item item) {
        SyndEntryI syndEntry = super.createSyndEntry(item);
        syndEntry.setAuthor(item.getAuthor());
        return syndEntry;
    }
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndEntryI

        syndFeed.setModules(ModuleUtils.cloneModules(channel.getModules()));

    }

    protected SyndEntryI createSyndEntry(Item item) {
        SyndEntryI syndEntry = super.createSyndEntry(item);

        Description desc = item.getDescription();
        if (desc!=null) {
            SyndContentI content = new SyndContent();
            content.setType(desc.getType());
            content.setValue(desc.getValue());
            syndEntry.setDescription(content);

            // contents[0] and description then reference the same content
            //
            List contents = new ArrayList();
            contents.add(content);
            syndEntry.setContents(contents);

        }

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


        return syndEntry;
    }
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndEntryI

        }
        return syndEntries;
    }

    protected SyndEntryI createSyndEntry(Entry entry) {
        SyndEntryI syndEntry = new SyndEntry();

        syndEntry.setTitle(entry.getTitle());

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

        Content content = entry.getSummary();
        if (content==null) {
            List contents = entry.getContents();
            if (contents!=null && contents.size()>0) {
                content = (Content) contents.get(0);
            }
        }

        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);
                SyndContentI sContent = new SyndContent();
                sContent.setType(content.getType());
                sContent.setValue(content.getValue());
                sContents.add(sContent);
            }
            syndEntry.setContents(sContents);
        }

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

        // Core Atom author/modified elements have precedence
        // over DC equivalent info.

        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.feed.synd.SyndEntryI

        syndImage.setDescription(rssImage.getDescription());
        return syndImage;
    }

    protected SyndEntryI createSyndEntry(Item item) {
        SyndEntryI syndEntry = super.createSyndEntry(item);
        Description desc = item.getDescription();
        if (desc!=null) {
            SyndContentI content = new SyndContent();
            content.setType(desc.getType());
            content.setValue(desc.getValue());
            syndEntry.setDescription(content);

            // contents[0] and description then reference the same content
            //
            List contents = new ArrayList();
            contents.add(content);
            syndEntry.setContents(contents);

        }
        return syndEntry;
    }
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndEntryI

        }
        return syndEntries;
    }

    protected SyndEntryI createSyndEntry(Item item) {
        SyndEntryI syndEntry = new SyndEntry();
        syndEntry.setTitle(item.getTitle());
        syndEntry.setLink(item.getLink());
        return syndEntry;
    }
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndEntryI

        syndImage.setDescription(rssImage.getDescription());
        return syndImage;
    }

    protected SyndEntryI createSyndEntry(Item item) {
        SyndEntryI syndEntry = super.createSyndEntry(item);
        Description desc = item.getDescription();
        if (desc!=null) {
            SyndContentI content = new SyndContent();
            content.setType(desc.getType());
            content.setValue(desc.getValue());
            syndEntry.setDescription(content);

            // contents[0] and description then reference the same content
            //
            List contents = new ArrayList();
            contents.add(content);
            syndEntry.setContents(contents);

        }
        return syndEntry;
    }
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndEntryI

    public String getType() {
        return "rss_0.93";
    }

    protected SyndEntryI createSyndEntry(Item item) {
        SyndEntryI syndEntry = super.createSyndEntry(item);
        syndEntry.setPublishedDate(item.getPubDate());
        return syndEntry;
    }
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndEntryI

        }
        return syndEntries;
    }

    protected SyndEntryI createSyndEntry(Item item) {
        SyndEntryI syndEntry = new SyndEntry();
        syndEntry.setTitle(item.getTitle());
        syndEntry.setLink(item.getLink());
        return syndEntry;
    }
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndEntryI

            syndFeed.setCategories(this.createSyndCategories(cats));
        }
    }

    protected SyndEntryI createSyndEntry(Item item) {
        SyndEntryI syndEntry = super.createSyndEntry(item);
        syndEntry.setAuthor(item.getAuthor());
        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.