Tabnine Logo
Dependency.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
com.synopsys.integration.bdio.model.dependency.Dependency
constructor

Best Java code snippets using com.synopsys.integration.bdio.model.dependency.Dependency.<init> (Showing top 4 results out of 315)

origin: com.blackducksoftware.integration/integration-bdio

public Dependency createDependency(final String name, final String version, final ExternalId externalId) {
  return new Dependency(name, version, externalId);
}
origin: com.blackducksoftware.integration/integration-bdio

public DependencyGraph transformToDependencyGraph(final BdioProject project, final List<BdioComponent> components) {
  final MutableMapDependencyGraph dependencyGraph = new MutableMapDependencyGraph();
  final Map<String, Dependency> bdioIdToDependencyMap = new HashMap<>();
  for (final BdioComponent component : components) {
    ExternalId externalId = component.bdioExternalIdentifier.externalIdMetaData;
    if (externalId == null) {
      // if the integration has not set the metadata, try our best to guess it
      final Forge forge = forgeMap.get(component.bdioExternalIdentifier.forge);
      externalId = recreateExternalId(forge, component.bdioExternalIdentifier.externalId, component.name, component.version);
    }
    final Dependency dependency = new Dependency(component.name, component.version, externalId);
    bdioIdToDependencyMap.put(component.id, dependency);
  }
  for (final BdioRelationship relation : project.relationships) {
    dependencyGraph.addChildrenToRoot(bdioIdToDependencyMap.get(relation.related));
  }
  for (final BdioComponent component : components) {
    final Dependency dependency = bdioIdToDependencyMap.get(component.id);
    for (final BdioRelationship relation : component.relationships) {
      dependencyGraph.addParentWithChild(dependency, bdioIdToDependencyMap.get(relation.related));
    }
  }
  return dependencyGraph;
}
origin: com.blackducksoftware.integration/integration-bdio

public DependencyGraph build() {
  final MutableDependencyGraph mutableDependencyGraph = new MutableMapDependencyGraph();
  for (final DependencyId dependencyId : dependencyInfo.keySet()) {
    final LazyDependencyInfo lazyDependencyInfo = infoForId(dependencyId);
    if (lazyDependencyInfo.externalId == null) {
      throw new IllegalStateException(String.format("A dependency (%s) in a relationship in the graph never had it's external id set.", dependencyId.toString()));
    }
  }
  for (final DependencyId dependencyId : dependencyInfo.keySet()) {
    final LazyDependencyInfo lazyDependencyInfo = infoForId(dependencyId);
    final Dependency dependency = new Dependency(lazyDependencyInfo.name, lazyDependencyInfo.version, lazyDependencyInfo.externalId);
    for (final DependencyId child : lazyDependencyInfo.children) {
      final LazyDependencyInfo childInfo = infoForId(child);
      mutableDependencyGraph.addParentWithChild(dependency, new Dependency(childInfo.name, childInfo.version, childInfo.externalId));
    }
    if (rootDependencyIds.contains(dependencyId) || rootDependencyIds.contains(lazyDependencyInfo.aliasId)) {
      mutableDependencyGraph.addChildToRoot(dependency);
    }
  }
  return mutableDependencyGraph;
}
origin: blackducksoftware/hub-detect

private Dependency buildDependency(final String name, final String version) {
  return new Dependency(name, version, externalIdFactory.createNameVersionExternalId(Forge.HEX, name, version));
}
com.synopsys.integration.bdio.model.dependencyDependency<init>

Popular methods of Dependency

    Popular in Java

    • Updating database using SQL prepared statement
    • setScale (BigDecimal)
    • getOriginalFilename (MultipartFile)
      Return the original filename in the client's filesystem.This may contain path information depending
    • getSystemService (Context)
    • FileNotFoundException (java.io)
      Thrown when a file specified by a program cannot be found.
    • System (java.lang)
      Provides access to system-related information and resources including standard input and output. Ena
    • Path (java.nio.file)
    • JCheckBox (javax.swing)
    • Project (org.apache.tools.ant)
      Central representation of an Ant project. This class defines an Ant project with all of its targets,
    • Loader (org.hibernate.loader)
      Abstract superclass of object loading (and querying) strategies. This class implements useful common
    • Top PhpStorm plugins
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Tabnine for your IDE now