Examples of SyndContentImpl


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

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

            // contents[0] and description then reference the same content
            //
            List contents = new ArrayList();
View Full Code Here

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

            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);
        }
View Full Code Here

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

        entry.setAuthor("Marcus Aqueductum");
        entry.setLink("http://wiki.java.net/bin/view/Javawsxml/RomeAqueduct");
        entries.add(entry);

        ArrayList contents = new ArrayList();
        SyndContentImpl content = new SyndContentImpl();
        content.setType("text/xhtml");
        content.setValue("<div><b>Aqueduct + Prevayler</b><br/>Fast and furious.</div>");
        contents.add(content);
        SyndContentImpl content2 = new SyndContentImpl();
        content2.setType("text/html");
        content2.setValue("<b>Really fast to implement.");
        contents.add(content2);
        entry.setContents(contents);

        feed.setEntries(entries);
View Full Code Here

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

              entry.setPublishedDate(dateParser.parse("2004-11-25"));
          }
          catch (ParseException ex) {
              //
          }
          description = new SyndContentImpl();
          description.setType("text/plain");
          description.setValue("Test for RFC3229 Delta Encoding");         
          entry.setDescription(description);         
          entries.add(entry);
         
View Full Code Here

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

          tags.add(cat);
        }
        entry.setCategories(tags);
      }

      SyndContent content = new SyndContentImpl();
      if (StringUtils.isEmpty(entryModel.contentType)
          || entryModel.contentType.equalsIgnoreCase("text/plain")) {
        content.setType("text/html");
        content.setValue(StringUtils.breakLinesForHtml(entryModel.content));
      } else {
        content.setType(entryModel.contentType);
        content.setValue(entryModel.content);
      }
      entry.setDescription(content);

      entries.add(entry);
    }
View Full Code Here

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

        syndFeed.setUri(aFeed.getId());

        Content aTitle = aFeed.getTitleEx();
        if (aTitle != null) {
            SyndContent c = new SyndContentImpl();
            c.setType(aTitle.getType());
            c.setValue(aTitle.getValue());
            syndFeed.setTitleEx(c);
        }

        Content aSubtitle = aFeed.getSubtitle();
        if (aSubtitle!=null) {
            SyndContent c = new SyndContentImpl();
            c.setType(aSubtitle.getType());
            c.setValue(aSubtitle.getValue());
            syndFeed.setDescriptionEx(c);
        }

        // use first alternate links as THE link
        if (aFeed.getAlternateLinks() != null
View Full Code Here

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

        }
        return aFeed;
    }

    protected SyndContent createSyndContent(Content content) {
        SyndContent sContent = new SyndContentImpl();
        sContent.setType(content.getType());
        sContent.setValue(content.getValue());
        return sContent;
    }
View Full Code Here

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

        DateTimeFormatter df = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss");
        List<SyndEntry> entries = new LinkedList<SyndEntry>();
        for (int i = 0; i < 9; i++) {
            SyndEntry entry = new SyndEntryImpl();
            entry.setTitle("テスト" + i);
            SyndContent description = new SyndContentImpl();
            description.setValue("テスト説明" + i);
            entry.setDescription(description);
            entry.setLink("http://ryu22e.org/" + i);

            NicoliveModule module = new NicoliveModule();
            module.setOpenTime(datetime.minusDays(i).toString(df));
            module.setStartTime(datetime
                .minusDays(i)
                .plusMinutes(10)
                .toString(df));
            module.setType("official");
            entry.getModules().add(module);

            entries.add(entry);
        }
        // NicoliveModuleなしのデータも含める。
        SyndEntry invalidEntry = new SyndEntryImpl();
        invalidEntry.setTitle("NicoliveModuleなしデータ");
        SyndContent description = new SyndContentImpl();
        description.setValue("テスト説明");
        invalidEntry.setDescription(description);
        invalidEntry.setLink("http://ryu22e.org/");
        entries.add(invalidEntry);

        feed.setEntries(entries);
View Full Code Here

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

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

            // contents[0] and description then reference the same content
            //
            List contents = new ArrayList();
View Full Code Here

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

            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);
        }
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.