Package com.rometools.opml.feed.opml

Examples of com.rometools.opml.feed.opml.Outline


    return opml;

  }

  private Outline buildCategoryOutline(FeedCategory cat, List<FeedSubscription> subscriptions) {
    Outline outline = new Outline();
    outline.setText(cat.getName());
    outline.setTitle(cat.getName());

    for (FeedCategory child : cat.getChildren()) {
      outline.getChildren().add(buildCategoryOutline(child, subscriptions));
    }

    for (FeedSubscription sub : subscriptions) {
      if (sub.getCategory() != null && sub.getCategory().getId().equals(cat.getId())) {
        outline.getChildren().add(buildSubscriptionOutline(sub));
      }
    }
    return outline;
  }
View Full Code Here


    }
    return outline;
  }

  private Outline buildSubscriptionOutline(FeedSubscription sub) {
    Outline outline = new Outline();
    outline.setText(sub.getTitle());
    outline.setTitle(sub.getTitle());
    outline.setType("rss");
    outline.getAttributes().add(new Attribute("xmlUrl", sub.getFeed().getUrl()));
    if (sub.getFeed().getLink() != null) {
      outline.getAttributes().add(new Attribute("htmlUrl", sub.getFeed().getLink()));
    }
    return outline;
  }
View Full Code Here

TOP

Related Classes of com.rometools.opml.feed.opml.Outline

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.