Package com.sun.syndication.feed.synd

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


        {
            entry = new SyndEntryImpl();
            entry.setTitle( dataEntry.getTitle() );
            entry.setPublishedDate( dataEntry.getPublishedDate() );

            description = new SyndContentImpl();
            description.setType( "text/plain" );
            description.setValue( dataEntry.getDescription() );
            entry.setDescription( description );

            entries.add( entry );
View Full Code Here


        entry.setPublishedDate(new Date());
        return entry;
    }

    protected SyndContent createEntryContent(QueueBrowser browser, Message message, HttpServletRequest request) throws JMSException {
        SyndContent description = new SyndContentImpl();
        description.setType(entryContentType);

        if (message instanceof TextMessage) {
            String text = ((TextMessage)message).getText();
            description.setValue(text);
        }
        return description;
    }
View Full Code Here

                } catch (IOException e) {
                    Debug.logError(e, module);
                }
                if (sub != null) {
                    String thisLink = entryLink + "?articleContentId=" + v.getString("contentId") + "&blogContentId=" + contentId;
                    SyndContent desc = new SyndContentImpl();
                    desc.setType("text/plain");
                    desc.setValue(sub);

                    SyndEntry entry = new SyndEntryImpl();
                    entry.setTitle(v.getString("contentName"));
                    entry.setPublishedDate(v.getTimestamp("createdDate"));
                    entry.setDescription(desc);
View Full Code Here

        try {
            //System.out.println(item.getTitle());
            item =(SyndEntry)item_instance.getData();
           
            // for atom feeds
            SyndContentImpl atom =(SyndContentImpl) item.getContents().get(0);
            if(atom!=null)
              doc=Jsoup.parse(atom.getValue());
            else 
              doc= Jsoup.parse(item.getDescription().getValue())// for RSS feeds  Getting HTML Content of feed
           
           
            Elements images = doc.getElementsByTag("img");
View Full Code Here

          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

                } catch (IOException e) {
                    Debug.logError(e, module);
                }
                if (sub != null) {
                    String thisLink = entryLink + "?articleContentId=" + v.getString("contentId") + "&blogContentId=" + contentId;
                    SyndContent desc = new SyndContentImpl();
                    desc.setType("text/plain");
                    desc.setValue(sub);

                    SyndEntry entry = new SyndEntryImpl();
                    entry.setTitle(v.getString("contentName"));
                    entry.setPublishedDate(v.getTimestamp("createdDate"));
                    entry.setDescription(desc);
View Full Code Here

   
    String entryDateWithLoggerName = logEntryLines.remove(0),
      entryLevelWithCustomPrefix = logEntryLines.remove(0);
   
    SyndEntry entry = new SyndEntryImpl();
    SyndContent  description = new SyndContentImpl();
   
    try {
      entry.setPublishedDate(parseLogEntryDate(entryDateWithLoggerName));
      entry.setTitle(parseLogEntryTitle(entryLevelWithCustomPrefix));   
     
      logEntryLines.add(0, parseLogMessage(entryLevelWithCustomPrefix));
     
          description.setType(ENTRY_FORMAT);
          description.setValue(StringUtils.join(logEntryLines, '\n'));
         
          entry.setDescription(description);
         
          entries.add(entry);         
    } catch (ParseException e) {
View Full Code Here

        entry.setPublishedDate(new Date());
        entry.setAuthor("Bob Newhart");
        entry.setLink("http://bobnewhart.com");
        entries.add(entry);

        SyndContentImpl description = new SyndContentImpl();
        description.setType("text/html");
        description.setValue("Remember Those Famous People On the Phone Skits?");
        entry.setDescription(description);

        ArrayList contents = new ArrayList();
        SyndContentImpl content = new SyndContentImpl();
        content.setType("text/xhtml");
        content.setValue("<div><str>Larry, Darrel, and Darrel</str><br/>Where are they now?</div>");
        contents.add(content);
        SyndContentImpl content2 = new SyndContentImpl();
        content2.setType("text/html");
        content2.setValue("<b>News</b><p> Bob wasn't funny on " + new Date());
        contents.add(content2);
        entry.setContents(contents);

        feed.setEntries(entries);
View Full Code Here

        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

    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

TOP

Related Classes of com.sun.syndication.feed.synd.SyndContentImpl

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.