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;
}