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 getArtifactTypeHierarchy() throws Exception {
          setRevisionTo("af529e513388dc9358a8f700757d8dc59aba3a55");
          ServiceTemplateId id = new ServiceTemplateId("http://winery.opentosca.org/test/servicetemplates/ponyuniverse/daspecifier", "DASpecificationTest", false);
          TTopologyTemplate topologyTemplate = this.repository.getElement(id).getTopologyTemplate();
  
          TNodeTemplate nodeTemplate = topologyTemplate.getNodeTemplate("westernequipment");
  
          List<TArtifactType> artifactTypes = DASpecification.getArtifactTypeHierarchy(DASpecification.getArtifactTypeOfDA(nodeTemplate.getDeploymentArtifacts().getDeploymentArtifact().get(0)));
          List<String> artifactTypeNames = new ArrayList<>();
          artifactTypes.stream().forEach(at -> artifactTypeNames.add(at.getName()));
  
          assertEquals(2, artifactTypes.size());
          assertTrue(artifactTypeNames.contains("WesternEquipment_Pony"));
          assertTrue(artifactTypeNames.contains("PonyEquipment"));
      }
test_case.class_method_signature: DASpecificationTest.getArtifactTypeHierarchy()
test_case.full_signature: @Test public void getArtifactTypeHierarchy()
test_case.identifier: getArtifactTypeHierarchy
test_case.invocations: setRevisionTo getTopologyTemplate getElement getNodeTemplate getArtifactTypeHierarchy getArtifactTypeOfDA get getDeploymentArtifact getDeploymentArtifacts forEach stream add getName assertEquals size assertTrue contains assertTrue contains
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getArtifactTypeHierarchy()
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 List<TArtifactType> getArtifactTypeHierarchy(TArtifactType artifactType) {
  
          List<TArtifactType> artifactTypeHierarchy = new ArrayList<>();
  
          TArtifactType basisArtifactType = artifactType;
          artifactTypeHierarchy.add(basisArtifactType);
  
          while (basisArtifactType != null) {
              if (basisArtifactType.getDerivedFrom() != null) {
                  QName parentArtifactTypeQName = basisArtifactType.getDerivedFrom().getTypeRef();
                  ArtifactTypeId parentArtifactTypeId = new ArtifactTypeId(parentArtifactTypeQName);
                  basisArtifactType = RepositoryFactory.getRepository().getElement(parentArtifactTypeId);
                  artifactTypeHierarchy.add(basisArtifactType);
              } else {
                  basisArtifactType = null;
              }
          }
  
          return artifactTypeHierarchy;
      }
focal_method.class_method_signature: DASpecification.getArtifactTypeHierarchy(TArtifactType artifactType)
focal_method.full_signature: public static List<TArtifactType> getArtifactTypeHierarchy(TArtifactType artifactType)
focal_method.identifier: getArtifactTypeHierarchy
focal_method.invocations: add getDerivedFrom getTypeRef getDerivedFrom getElement getRepository add
focal_method.modifiers: public static
focal_method.parameters: (TArtifactType artifactType)
focal_method.return: List<TArtifactType>
focal_method.signature: List<TArtifactType> getArtifactTypeHierarchy(TArtifactType artifactType)