Search in sources :

Example 11 with Dependency

use of com.blackducksoftware.integration.hub.bdio.model.dependency.Dependency in project hub-detect by blackducksoftware.

the class DependencyGraphAssertions method assertDoesNotHave.

private static void assertDoesNotHave(final DependencyGraph dependencyGraph, final String target, final ExternalId current) {
    if (current == null) {
        for (final Dependency dep : dependencyGraph.getRootDependencies()) {
            assertDoesNotHave(dep, target);
            assertDoesNotHave(dependencyGraph, target, dep.externalId);
        }
    } else {
        for (final Dependency dep : dependencyGraph.getChildrenForParent(current)) {
            assertDoesNotHave(dep, target);
            assertDoesNotHave(dependencyGraph, target, dep.externalId);
        }
    }
}
Also used : Dependency(com.blackducksoftware.integration.hub.bdio.model.dependency.Dependency)

Aggregations

Dependency (com.blackducksoftware.integration.hub.bdio.model.dependency.Dependency)11 ExternalId (com.blackducksoftware.integration.hub.bdio.model.externalid.ExternalId)6 MutableDependencyGraph (com.blackducksoftware.integration.hub.bdio.graph.MutableDependencyGraph)3 MutableMapDependencyGraph (com.blackducksoftware.integration.hub.bdio.graph.MutableMapDependencyGraph)3 NameVersionNode (com.blackducksoftware.integration.hub.detect.nameversion.NameVersionNode)2 Forge (com.blackducksoftware.integration.hub.bdio.model.Forge)1 ExternalIdFactory (com.blackducksoftware.integration.hub.bdio.model.externalid.ExternalIdFactory)1 DetectCodeLocation (com.blackducksoftware.integration.hub.detect.model.DetectCodeLocation)1 NodeMetadata (com.blackducksoftware.integration.hub.detect.nameversion.NodeMetadata)1 SubcomponentNodeBuilder (com.blackducksoftware.integration.hub.detect.nameversion.builder.SubcomponentNodeBuilder)1 YAMLMapper (com.fasterxml.jackson.dataformat.yaml.YAMLMapper)1 BufferedReader (java.io.BufferedReader)1 InputStreamReader (java.io.InputStreamReader)1 ArrayList (java.util.ArrayList)1