use of com.blackducksoftware.integration.hub.detect.detector.nuget.model.NugetPackageId in project hub-detect by blackducksoftware.
the class NugetDependencyNodeBuilder method createDependencyGraph.
public DependencyGraph createDependencyGraph(final List<NugetPackageId> packageDependencies) {
final MutableDependencyGraph graph = new MutableMapDependencyGraph();
if (packageSets != null) {
for (final NugetPackageSet packageSet : packageSets) {
if (packageSet.dependencies != null) {
for (final NugetPackageId id : packageSet.dependencies) {
if (packageSet.packageId != null) {
graph.addParentWithChild(convertPackageId(packageSet.packageId), convertPackageId(id));
}
}
}
}
}
packageDependencies.forEach(it -> {
graph.addChildToRoot(convertPackageId(it));
});
return graph;
}
Aggregations