Search in sources :

Example 1 with FeedLineageBuilder

use of com.thinkbiganalytics.feedmgr.rest.FeedLineageBuilder in project kylo by Teradata.

the class FeedsController method getFeedLineage.

@GET
@Path("{feedId}/lineage")
@Produces(MediaType.APPLICATION_JSON)
@ApiOperation("Gets the lineage of the specified feed.")
@ApiResponses({ @ApiResponse(code = 200, message = "Returns the feed lineage.", response = FeedLineage.class), @ApiResponse(code = 400, message = "The id is not a valid UUID.", response = RestResponseStatus.class) })
public FeedLineage getFeedLineage(@PathParam("feedId") final String feedId) {
    return this.metadata.read(() -> {
        com.thinkbiganalytics.metadata.api.feed.Feed domainFeed = feedProvider.getFeed(feedProvider.resolveFeed(feedId));
        if (domainFeed != null) {
            FeedLineageBuilder builder = new FeedLineageBuilder(domainFeed, model, datasourceTransform);
            // Model.DOMAIN_TO_FEED_WITH_DEPENDENCIES.apply(domainFeed);
            Feed feed = builder.build();
            return new FeedLineage(feed, datasourceService.getFeedLineageStyleMap());
        }
        return null;
    });
}
Also used : FeedLineageBuilder(com.thinkbiganalytics.feedmgr.rest.FeedLineageBuilder) FeedLineage(com.thinkbiganalytics.metadata.rest.model.feed.FeedLineage) Feed(com.thinkbiganalytics.metadata.rest.model.feed.Feed) Path(javax.ws.rs.Path) Produces(javax.ws.rs.Produces) GET(javax.ws.rs.GET) ApiOperation(io.swagger.annotations.ApiOperation) ApiResponses(io.swagger.annotations.ApiResponses)

Aggregations

FeedLineageBuilder (com.thinkbiganalytics.feedmgr.rest.FeedLineageBuilder)1 Feed (com.thinkbiganalytics.metadata.rest.model.feed.Feed)1 FeedLineage (com.thinkbiganalytics.metadata.rest.model.feed.FeedLineage)1 ApiOperation (io.swagger.annotations.ApiOperation)1 ApiResponses (io.swagger.annotations.ApiResponses)1 GET (javax.ws.rs.GET)1 Path (javax.ws.rs.Path)1 Produces (javax.ws.rs.Produces)1