Package com.commafeed.backend.rome

Source Code of com.commafeed.backend.rome.RSS090DescriptionConverter

package com.commafeed.backend.rome;

import com.rometools.rome.feed.rss.Description;
import com.rometools.rome.feed.rss.Item;
import com.rometools.rome.feed.synd.SyndContentImpl;
import com.rometools.rome.feed.synd.SyndEntry;
import com.rometools.rome.feed.synd.impl.ConverterForRSS090;

/**
* Support description tag for RSS09
*
*/
public class RSS090DescriptionConverter extends ConverterForRSS090 {

  @Override
  protected SyndEntry createSyndEntry(Item item, boolean preserveWireItem) {
    SyndEntry entry = super.createSyndEntry(item, preserveWireItem);
    Description desc = item.getDescription();
    if (desc != null) {
      SyndContentImpl syndDesc = new SyndContentImpl();
      syndDesc.setValue(desc.getValue());
      entry.setDescription(syndDesc);
    }
    return entry;
  }

}
TOP

Related Classes of com.commafeed.backend.rome.RSS090DescriptionConverter

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.