test_class.file: org.eclipse.winery.repository/src/test/java/org/eclipse/winery/repository/driverspecificationandinjection/DASpecificationTest.java
test_class.identifier: DASpecificationTest
test_class.superclass: extends TestWithGitBackedRepository
test_case.body: @Test
      public void getNodesWithSuitableConcreteDAAndTheDirectlyConnectedNode() throws Exception {
          setRevisionTo("5f63267261584a513dd8a9b7960687cc3dda910a");
          ServiceTemplateId id = new ServiceTemplateId("http://winery.opentosca.org/test/servicetemplates/ponyuniverse/daspecifier", "DASpecificationTest", false);
          TTopologyTemplate topologyTemplate = this.repository.getElement(id).getTopologyTemplate();
  
          TNodeTemplate nodeTemplateWithAbstractDA = topologyTemplate.getNodeTemplate("shetland_pony");
          TDeploymentArtifact deploymentArtifact = nodeTemplateWithAbstractDA.getDeploymentArtifacts().getDeploymentArtifact().get(0);
          TNodeTemplate nodeTemplateConcretDA1 = topologyTemplate.getNodeTemplate("dressageequipment");
          TRelationshipTemplate relationshipTemplate1 = topologyTemplate.getRelationshipTemplate("con_42");
          TNodeTemplate nodeTemplateConcretDA2 = topologyTemplate.getNodeTemplate("westernequipment");
          TRelationshipTemplate relationshipTemplate2 = topologyTemplate.getRelationshipTemplate("con_54");
  
          Map<TRelationshipTemplate, TNodeTemplate> concreteDAsAndConnectedNodes = new HashMap<>();
          concreteDAsAndConnectedNodes.put(relationshipTemplate1, nodeTemplateConcretDA1);
          concreteDAsAndConnectedNodes.put(relationshipTemplate2, nodeTemplateConcretDA2);
  
          Map<TRelationshipTemplate, TNodeTemplate> actualNodeWithConcreteDA =
              DASpecification.getNodesWithSuitableConcreteDAAndTheDirectlyConnectedNode(nodeTemplateWithAbstractDA, deploymentArtifact, topologyTemplate);
  
          assertEquals(concreteDAsAndConnectedNodes, actualNodeWithConcreteDA);
      }
test_case.class_method_signature: DASpecificationTest.getNodesWithSuitableConcreteDAAndTheDirectlyConnectedNode()
test_case.full_signature: @Test public void getNodesWithSuitableConcreteDAAndTheDirectlyConnectedNode()
test_case.identifier: getNodesWithSuitableConcreteDAAndTheDirectlyConnectedNode
test_case.invocations: setRevisionTo getTopologyTemplate getElement getNodeTemplate get getDeploymentArtifact getDeploymentArtifacts getNodeTemplate getRelationshipTemplate getNodeTemplate getRelationshipTemplate put put getNodesWithSuitableConcreteDAAndTheDirectlyConnectedNode assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getNodesWithSuitableConcreteDAAndTheDirectlyConnectedNode()
focal_class.file: org.eclipse.winery.repository/src/main/java/org/eclipse/winery/repository/driverspecificationandinjection/DASpecification.java
focal_class.identifier: DASpecification
focal_class.class_method_signature: DASpecification.getNodeTemplatesWithAbstractDAs(TTopologyTemplate topologyTemplate)
focal_class.full_signature: public static List<TNodeTemplate> getNodeTemplatesWithAbstractDAs(TTopologyTemplate topologyTemplate)
focal_class.identifier: getNodeTemplatesWithAbstractDAs
focal_class.modifiers: public static
focal_class.parameters: (TTopologyTemplate topologyTemplate)
focal_class.return: List<TNodeTemplate>
focal_class.signature: List<TNodeTemplate> getNodeTemplatesWithAbstractDAs(TTopologyTemplate topologyTemplate)
focal_class.class_method_signature: DASpecification.getArtifactTypeOfDA(TDeploymentArtifact deploymentArtifact)
focal_class.full_signature: public static TArtifactType getArtifactTypeOfDA(TDeploymentArtifact deploymentArtifact)
focal_class.identifier: getArtifactTypeOfDA
focal_class.modifiers: public static
focal_class.parameters: (TDeploymentArtifact deploymentArtifact)
focal_class.return: TArtifactType
focal_class.signature: TArtifactType getArtifactTypeOfDA(TDeploymentArtifact deploymentArtifact)
focal_class.class_method_signature: DASpecification.getArtifactTypeHierarchy(TArtifactType artifactType)
focal_class.full_signature: public static List<TArtifactType> getArtifactTypeHierarchy(TArtifactType artifactType)
focal_class.identifier: getArtifactTypeHierarchy
focal_class.modifiers: public static
focal_class.parameters: (TArtifactType artifactType)
focal_class.return: List<TArtifactType>
focal_class.signature: List<TArtifactType> getArtifactTypeHierarchy(TArtifactType artifactType)
focal_class.class_method_signature: DASpecification.getNodesWithSuitableConcreteDAAndTheDirectlyConnectedNode(TNodeTemplate nodeTemplate, TDeploymentArtifact deploymentArtifact, TTopologyTemplate topologyTemplate)
focal_class.full_signature: public static Map<TRelationshipTemplate, TNodeTemplate> getNodesWithSuitableConcreteDAAndTheDirectlyConnectedNode(TNodeTemplate nodeTemplate, TDeploymentArtifact deploymentArtifact, TTopologyTemplate topologyTemplate)
focal_class.identifier: getNodesWithSuitableConcreteDAAndTheDirectlyConnectedNode
focal_class.modifiers: public static
focal_class.parameters: (TNodeTemplate nodeTemplate, TDeploymentArtifact deploymentArtifact, TTopologyTemplate topologyTemplate)
focal_class.return: Map<TRelationshipTemplate, TNodeTemplate>
focal_class.signature: Map<TRelationshipTemplate, TNodeTemplate> getNodesWithSuitableConcreteDAAndTheDirectlyConnectedNode(TNodeTemplate nodeTemplate, TDeploymentArtifact deploymentArtifact, TTopologyTemplate topologyTemplate)
focal_class.class_method_signature: DASpecification.getNodesWithSuitableConcreteDAs(TNodeTemplate nodeTemplate, TDeploymentArtifact deploymentArtifact, TTopologyTemplate topologyTemplate)
focal_class.full_signature: public static TNodeTemplate getNodesWithSuitableConcreteDAs(TNodeTemplate nodeTemplate, TDeploymentArtifact deploymentArtifact, TTopologyTemplate topologyTemplate)
focal_class.identifier: getNodesWithSuitableConcreteDAs
focal_class.modifiers: public static
focal_class.parameters: (TNodeTemplate nodeTemplate, TDeploymentArtifact deploymentArtifact, TTopologyTemplate topologyTemplate)
focal_class.return: TNodeTemplate
focal_class.signature: TNodeTemplate getNodesWithSuitableConcreteDAs(TNodeTemplate nodeTemplate, TDeploymentArtifact deploymentArtifact, TTopologyTemplate topologyTemplate)
focal_class.class_method_signature: DASpecification.getSuitableConcreteDA(TDeploymentArtifact abstractDeploymentArtifact, TNodeTemplate nodeTemplate)
focal_class.full_signature: public static TDeploymentArtifact getSuitableConcreteDA(TDeploymentArtifact abstractDeploymentArtifact, TNodeTemplate nodeTemplate)
focal_class.identifier: getSuitableConcreteDA
focal_class.modifiers: public static
focal_class.parameters: (TDeploymentArtifact abstractDeploymentArtifact, TNodeTemplate nodeTemplate)
focal_class.return: TDeploymentArtifact
focal_class.signature: TDeploymentArtifact getSuitableConcreteDA(TDeploymentArtifact abstractDeploymentArtifact, TNodeTemplate nodeTemplate)
focal_class.class_method_signature: DASpecification.getmatchingNodeTypeImplementations(QName nodeTypeQName)
focal_class.full_signature: private static List<TNodeTypeImplementation> getmatchingNodeTypeImplementations(QName nodeTypeQName)
focal_class.identifier: getmatchingNodeTypeImplementations
focal_class.modifiers: private static
focal_class.parameters: (QName nodeTypeQName)
focal_class.return: List<TNodeTypeImplementation>
focal_class.signature: List<TNodeTypeImplementation> getmatchingNodeTypeImplementations(QName nodeTypeQName)
focal_class.class_method_signature: DASpecification.getConcreteDA(TDeploymentArtifact abstractDeploymentArtifact, List<TDeploymentArtifact> candidates)
focal_class.full_signature: private static TDeploymentArtifact getConcreteDA(TDeploymentArtifact abstractDeploymentArtifact, List<TDeploymentArtifact> candidates)
focal_class.identifier: getConcreteDA
focal_class.modifiers: private static
focal_class.parameters: (TDeploymentArtifact abstractDeploymentArtifact, List<TDeploymentArtifact> candidates)
focal_class.return: TDeploymentArtifact
focal_class.signature: TDeploymentArtifact getConcreteDA(TDeploymentArtifact abstractDeploymentArtifact, List<TDeploymentArtifact> candidates)
focal_class.class_method_signature: DASpecification.getBasisRelationshipType(QName relationshipTypeQName)
focal_class.full_signature: private static TRelationshipType getBasisRelationshipType(QName relationshipTypeQName)
focal_class.identifier: getBasisRelationshipType
focal_class.modifiers: private static
focal_class.parameters: (QName relationshipTypeQName)
focal_class.return: TRelationshipType
focal_class.signature: TRelationshipType getBasisRelationshipType(QName relationshipTypeQName)
focal_method.body: public static Map<TRelationshipTemplate, TNodeTemplate> getNodesWithSuitableConcreteDAAndTheDirectlyConnectedNode
      (TNodeTemplate nodeTemplate, TDeploymentArtifact deploymentArtifact, TTopologyTemplate topologyTemplate) {
  
          // key is the node template the nodeTemplate is directly connected to this is the indicator from which connection the concrete DA is coming from
          // value is the node template which has a concrete DA attached to substiute the abstract DA of the nodeTemplate
          Map<TRelationshipTemplate, TNodeTemplate> nodeTemplateWithConcreteDAAndDirectlyConnectedNode = new HashMap<>();
          List<TRelationshipTemplate> outgoingRelationshipTemplates = ModelUtilities.getOutgoingRelationshipTemplates(topologyTemplate, nodeTemplate);
  
          //concrete DAs could be find in the hostedOn stack or the connected stacks, but just in directly connected stacks
          for (TRelationshipTemplate outgoingRelationship : outgoingRelationshipTemplates) {
              TNodeTemplate targetNodeTemplate = ModelUtilities.getTargetNodeTemplateOfRelationshipTemplate(topologyTemplate, outgoingRelationship);
              //In each directly connected stack a node with matching concrete DA is looked up
              TNodeTemplate nodesWithSuitableDA = getNodesWithSuitableConcreteDAs(targetNodeTemplate, deploymentArtifact, topologyTemplate);
              if (nodesWithSuitableDA != null) {
                  nodeTemplateWithConcreteDAAndDirectlyConnectedNode.put(outgoingRelationship, nodesWithSuitableDA);
              }
          }
          return nodeTemplateWithConcreteDAAndDirectlyConnectedNode;
      }
focal_method.class_method_signature: DASpecification.getNodesWithSuitableConcreteDAAndTheDirectlyConnectedNode(TNodeTemplate nodeTemplate, TDeploymentArtifact deploymentArtifact, TTopologyTemplate topologyTemplate)
focal_method.full_signature: public static Map<TRelationshipTemplate, TNodeTemplate> getNodesWithSuitableConcreteDAAndTheDirectlyConnectedNode(TNodeTemplate nodeTemplate, TDeploymentArtifact deploymentArtifact, TTopologyTemplate topologyTemplate)
focal_method.identifier: getNodesWithSuitableConcreteDAAndTheDirectlyConnectedNode
focal_method.invocations: getOutgoingRelationshipTemplates getTargetNodeTemplateOfRelationshipTemplate getNodesWithSuitableConcreteDAs put
focal_method.modifiers: public static
focal_method.parameters: (TNodeTemplate nodeTemplate, TDeploymentArtifact deploymentArtifact, TTopologyTemplate topologyTemplate)
focal_method.return: Map<TRelationshipTemplate, TNodeTemplate>
focal_method.signature: Map<TRelationshipTemplate, TNodeTemplate> getNodesWithSuitableConcreteDAAndTheDirectlyConnectedNode(TNodeTemplate nodeTemplate, TDeploymentArtifact deploymentArtifact, TTopologyTemplate topologyTemplate)