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

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

    protected SyndContent createEntryContent(MessageExchange exchange, NormalizedMessage message) throws TransformerException, MessagingException {
        SyndContent description = new SyndContentImpl();
        description.setType(contentType);
        Source content = message.getContent();

        String value = ExpressionHelper.asString(getEntryValue(), exchange, message, null);
        if (value == null && content != null) {
            value = getSourceTransformer().toString(content);
            value = encodeContent(value);
        }
        if (value != null) {
            description.setValue(value);
        }
        return description;
    }
View Full Code Here

          }
          else {
            entry.setLink(BaseUrlHolder.get() + event.getLink());
          }
        }
        final SyndContent content = new SyndContentImpl();
        content.setType(feedContentRenderer.getContentType(event));
        content.setValue(feedContentRenderer.getContent(event));
        entry.setDescription(content);
        entries.add(entry);
      }
      feed.setEntries(entries);
      return feed;
View Full Code Here

          continue; // (this is an RSS feed not a URL)
        }//TESTED
        SyndEntryImpl synd = new SyndEntryImpl();
        synd.setLink(extraUrl.url);
        if (null != extraUrl.description) {
          SyndContentImpl description = new SyndContentImpl();
          description.setValue(extraUrl.description);
          synd.setDescription(description);
        }
        synd.setTitle(extraUrl.title);
        if (null != extraUrl.publishedDate) {
          try {
View Full Code Here

      }
     
      String description = fdbo.getString(DocumentPojo.description_);
      if ( description != null ) {
        // Create the content for the entry
        SyndContent content = new SyndContentImpl(); // create the content of your entry
        content.setType( "text/plain" );
        content.setValue( description );
        entry.setDescription( content );
      }
      entries.add( entry );
    }//(end loop over entries)
   
View Full Code Here

            entry.setAuthor("Play framework modules");
            entry.setPublishedDate(historicalEvent.creationDate);
            // todo this will be the url of the module
            entry.setLink("http://modules.playframework.org");
            entry.setUri("mpo-he-" + historicalEvent.id);
            SyndContent description = new SyndContentImpl();
            description.setType("text/plain");
            description.setValue(historicalEvent.message);
            entry.setDescription(description);
            entries.add(entry);
        }

        feed.setEntries(entries);
View Full Code Here

            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());
                sContent.setMode(content.getMode());
                sContents.add(sContent);
            }
            syndEntry.setContents(sContents);
        }
View Full Code Here

   
    protected SyndEntry createSyndEntry(Item item, boolean preserveWireItem) {
        SyndEntry syndEntry = super.createSyndEntry(item, preserveWireItem);
        Description desc = item.getDescription();
        if (desc != null) {
            SyndContent descContent = new SyndContentImpl();
            descContent.setType(desc.getType());
            descContent.setValue(desc.getValue());
            syndEntry.setDescription(descContent);
        }
        Content cont = item.getContent();
        if (cont != null) {
            SyndContent content = new SyndContentImpl();
            content.setType(cont.getType());
            content.setValue(cont.getValue());
            List syndContents = new ArrayList();
            syndContents.add(content);
            syndEntry.setContents(syndContents);
        }
        return syndEntry;
View Full Code Here

    protected SyndEntry createSyndEntry(Item item, boolean preserveWireItem) {
        SyndEntry syndEntry = super.createSyndEntry(item, preserveWireItem);

        Description desc = item.getDescription();
        if (desc!=null) {
            SyndContent descContent = new SyndContentImpl();
            descContent.setType(desc.getType());
            descContent.setValue(desc.getValue());
            syndEntry.setDescription(descContent);
        }
        Content cont = item.getContent();
        if (cont!=null) {
            SyndContent contContent = new SyndContentImpl();
            contContent.setType(cont.getType());
            contContent.setValue(cont.getValue());
            List contents = new ArrayList();
            contents.add(contContent);
            syndEntry.setContents(contents);
        }
               
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.