use of org.eclipse.winery.model.tosca.yaml.YTArtifactDefinition in project winery by eclipse.
the class ToCanonical method convertNodeTypeImplementation.
/**
* Converts TOSCA YAML ArtifactDefinitions to TOSCA XML NodeTypeImplementations and ArtifactTemplates
*/
private void convertNodeTypeImplementation(Map<String, YTArtifactDefinition> implArtifacts, Map<String, YTArtifactDefinition> deploymentArtifacts, String type, String targetNamespace) {
for (Map.Entry<String, YTArtifactDefinition> implArtifact : implArtifacts.entrySet()) {
for (Map.Entry<String, YTArtifactDefinition> deploymentArtifact : deploymentArtifacts.entrySet()) {
if (implArtifact.getKey().equalsIgnoreCase(deploymentArtifact.getKey())) {
deploymentArtifacts.remove(deploymentArtifact.getKey());
}
}
}
TNodeTypeImplementation.Builder builder = (new TNodeTypeImplementation.Builder(type + "_impl", new QName(targetNamespace, type)).setTargetNamespace(targetNamespace));
List<TImplementationArtifact> implementationArtifacts = convertImplementationArtifact(implArtifacts, targetNamespace);
builder.setImplementationArtifacts(implementationArtifacts);
this.nodeTypeImplementations.add(builder.build());
}
Aggregations