use of com.synopsys.integration.detectable.detectables.nuget.model.NugetPackageSet in project synopsys-detect by blackducksoftware.
the class NugetDependencyNodeBuilder method createDependencyGraph.
public DependencyGraph createDependencyGraph(List<NugetPackageId> packageDependencies) {
DependencyGraph graph = new BasicDependencyGraph();
for (NugetPackageSet packageSet : packageSets) {
if (packageSet.dependencies != null) {
for (NugetPackageId id : packageSet.dependencies) {
if (packageSet.packageId != null) {
graph.addParentWithChild(convertPackageId(packageSet.packageId), convertPackageId(id));
}
}
}
}
packageDependencies.stream().map(this::convertPackageId).forEach(graph::addChildToRoot);
return graph;
}
Aggregations