use of com.thinkbiganalytics.metadata.rest.model.feed.FeedDependencyGraph in project kylo by Teradata.
the class FeedsController method collectFeedDependencies.
private FeedDependencyGraph collectFeedDependencies(com.thinkbiganalytics.metadata.api.feed.Feed currentFeed, boolean assessPrecond) {
List<com.thinkbiganalytics.metadata.api.feed.Feed> domainDeps = currentFeed.getDependentFeeds();
FeedDependencyGraph feedDep = new FeedDependencyGraph(this.metadataTransform.domainToFeed().apply(currentFeed), null);
if (!domainDeps.isEmpty()) {
for (com.thinkbiganalytics.metadata.api.feed.Feed depFeed : domainDeps) {
FeedDependencyGraph childDep = collectFeedDependencies(depFeed, assessPrecond);
feedDep.addDependecy(childDep);
}
}
if (assessPrecond && currentFeed.getPrecondition() != null) {
feedDep.setPreconditonResult(generateModelAssessment(currentFeed.getPrecondition()));
}
return feedDep;
}
Aggregations