Package com.rometools.rome.feed.rss

Examples of com.rometools.rome.feed.rss.Source


        return item;
    }

    protected Source createSource(final SyndFeed feed) {
        Source source = null;
        if (feed != null) {
            source = new Source();
            source.setUrl(feed.getUri());
            source.setValue(feed.getTitle());
        }
        return source;
    }
View Full Code Here


    protected Item parseItem(final Element rssRoot, final Element eItem, final Locale locale) {
        final Item item = super.parseItem(rssRoot, eItem, locale);

        final Element eSource = eItem.getChild("source", getRSSNamespace());
        if (eSource != null) {
            final Source source = new Source();
            // getRSSNamespace()); DONT KNOW WHY DOESN'T WORK
            final String url = eSource.getAttributeValue("url");
            source.setUrl(url);
            source.setValue(eSource.getText());
            item.setSource(source);
        }

        // 0.92 allows one enclosure occurrence, 0.93 multiple just saving to write some code.
        // getRSSNamespace()); DONT KNOW WHY DOESN'T WORK
View Full Code Here

    @Override
    protected void populateItem(final Item item, final Element eItem, final int index) {

        super.populateItem(item, eItem, index);

        final Source source = item.getSource();
        if (source != null) {
            eItem.addContent(generateSourceElement(source));
        }

        final List<Enclosure> enclosures = item.getEnclosures();
View Full Code Here

TOP

Related Classes of com.rometools.rome.feed.rss.Source

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.