Search in sources :

Example 1 with HasId

use of org.eclipse.winery.model.tosca.HasId in project winery by eclipse.

the class ServiceTemplateResource method cullElementReferences.

private void cullElementReferences() {
    final TTopologyTemplate topology = this.getServiceTemplate().getTopologyTemplate();
    TBoundaryDefinitions boundaryDefs = this.getServiceTemplate().getBoundaryDefinitions();
    if (topology == null || boundaryDefs == null) {
        return;
    }
    if (boundaryDefs.getProperties() != null && boundaryDefs.getProperties().getPropertyMappings() != null) {
        for (Iterator<TPropertyMapping> it = boundaryDefs.getProperties().getPropertyMappings().iterator(); it.hasNext(); ) {
            TPropertyMapping propMapping = it.next();
            HasId targetObject = propMapping.getTargetObjectRef();
            if (!containsTarget(topology, targetObject)) {
                // cull the property mapping pointing towards a no-longer existing element
                it.remove();
            }
        }
    }
    if (boundaryDefs.getCapabilities() != null) {
        for (Iterator<TCapabilityRef> it = boundaryDefs.getCapabilities().iterator(); it.hasNext(); ) {
            TCapabilityRef ref = it.next();
            TCapability target = ref.getRef();
            if (!containsCapability(topology, target)) {
                // cull the capability referencing a no longer existing capability in the topology
                it.remove();
            }
        }
    }
    if (boundaryDefs.getRequirements() != null) {
        for (Iterator<TRequirementRef> it = boundaryDefs.getRequirements().iterator(); it.hasNext(); ) {
            TRequirementRef ref = it.next();
            TRequirement target = ref.getRef();
            if (!containsRequirement(topology, target)) {
                // cull the requirement referencing a no longer existing requirement in the topology
                it.remove();
            }
        }
    }
}
Also used : HasId(org.eclipse.winery.model.tosca.HasId) TRequirement(org.eclipse.winery.model.tosca.TRequirement) TTopologyTemplate(org.eclipse.winery.model.tosca.TTopologyTemplate) TCapability(org.eclipse.winery.model.tosca.TCapability) TPropertyMapping(org.eclipse.winery.model.tosca.TPropertyMapping) TRequirementRef(org.eclipse.winery.model.tosca.TRequirementRef) TBoundaryDefinitions(org.eclipse.winery.model.tosca.TBoundaryDefinitions) TCapabilityRef(org.eclipse.winery.model.tosca.TCapabilityRef)

Example 2 with HasId

use of org.eclipse.winery.model.tosca.HasId in project winery by eclipse.

the class ServiceTemplateResource method setTopology.

@Override
public void setTopology(TTopologyTemplate topologyTemplate, String type) {
    // if we are in yaml mode, replacing the topology can result in yaml artifacts having to be deleted.
    if (Environments.getInstance().getRepositoryConfig().getProvider() == RepositoryConfigurationObject.RepositoryProvider.YAML) {
        try {
            YamlArtifactsSynchronizer synchronizer = new YamlArtifactsSynchronizer.Builder(RepositoryFactory.getRepository()).setOriginalTemplate(this.getServiceTemplate().getTopologyTemplate()).setNewTemplate(topologyTemplate).setServiceTemplateId((ServiceTemplateId) this.getId()).build();
            synchronizer.synchronizeNodeTemplates();
            synchronizer.synchronizeRelationshipTemplates();
        } catch (IOException e) {
            LOGGER.error("Failed to delete yaml artifact files from disk. Reason {}", e.getMessage());
        }
        if (topologyTemplate.getNodeTemplates().stream().filter(nt -> nt.getRequirements() != null).anyMatch(nt -> nt.getRequirements().stream().anyMatch(req -> req.getRelationship() != null))) {
            // filter unused requirements
            // (1) get a list of requirement template ids
            // (2) filter requirement entry on node template if there is relations assigned
            Set<String> usedRelationshipTemplateIds = topologyTemplate.getRelationshipTemplates().stream().map(HasId::getId).collect(Collectors.toSet());
            topologyTemplate.getNodeTemplates().stream().filter(node -> node.getRequirements() != null).forEach(node -> node.getRequirements().removeIf(r -> !usedRelationshipTemplateIds.contains(r.getRelationship())));
        }
    }
    this.getServiceTemplate().setTopologyTemplate(topologyTemplate);
    this.cullElementReferences();
}
Also used : EdmmUtils(org.eclipse.winery.edmm.EdmmUtils) Produces(javax.ws.rs.Produces) TBoundaryDefinitions(org.eclipse.winery.model.tosca.TBoundaryDefinitions) PlansResource(org.eclipse.winery.repository.rest.resources.servicetemplates.plans.PlansResource) Date(java.util.Date) TopologyTemplateResource(org.eclipse.winery.repository.rest.resources.servicetemplates.topologytemplates.TopologyTemplateResource) Path(javax.ws.rs.Path) LoggerFactory(org.slf4j.LoggerFactory) SelfServicePortalResource(org.eclipse.winery.repository.rest.resources.servicetemplates.selfserviceportal.SelfServicePortalResource) TServiceTemplate(org.eclipse.winery.model.tosca.TServiceTemplate) WineryVersion(org.eclipse.winery.common.version.WineryVersion) ApiOperation(io.swagger.annotations.ApiOperation) MediaType(javax.ws.rs.core.MediaType) Consumes(javax.ws.rs.Consumes) Namespaces(org.eclipse.winery.model.tosca.constants.Namespaces) SplittingException(org.eclipse.winery.repository.splitting.SplittingException) VersionSupport(org.eclipse.winery.model.version.VersionSupport) Map(java.util.Map) TRequirement(org.eclipse.winery.model.tosca.TRequirement) URI(java.net.URI) DELETE(javax.ws.rs.DELETE) ThreatAssessment(org.eclipse.winery.model.threatmodeling.ThreatAssessment) ServiceTemplateComplianceRuleRuleChecker(org.eclipse.winery.compliance.checking.ServiceTemplateComplianceRuleRuleChecker) QNameApiData(org.eclipse.winery.repository.rest.resources.apiData.QNameApiData) Context(javax.ws.rs.core.Context) Collection(java.util.Collection) Set(java.util.Set) TNodeType(org.eclipse.winery.model.tosca.TNodeType) WinerysPropertiesDefinition(org.eclipse.winery.model.tosca.extensions.kvproperties.WinerysPropertiesDefinition) Collectors(java.util.stream.Collectors) JAXBException(javax.xml.bind.JAXBException) HasId(org.eclipse.winery.model.tosca.HasId) TInterface(org.eclipse.winery.model.tosca.TInterface) RepositoryFactory(org.eclipse.winery.repository.backend.RepositoryFactory) BoundaryDefinitionsResource(org.eclipse.winery.repository.rest.resources.servicetemplates.boundarydefinitions.BoundaryDefinitionsResource) List(java.util.List) PropertyDefinitionKV(org.eclipse.winery.model.tosca.extensions.kvproperties.PropertyDefinitionKV) TExtensibleElements(org.eclipse.winery.model.tosca.TExtensibleElements) Response(javax.ws.rs.core.Response) TPlan(org.eclipse.winery.model.tosca.TPlan) VersionUtils(org.eclipse.winery.common.version.VersionUtils) TCapability(org.eclipse.winery.model.tosca.TCapability) IRepository(org.eclipse.winery.repository.backend.IRepository) Optional(java.util.Optional) RestUtils(org.eclipse.winery.repository.rest.RestUtils) UriInfo(javax.ws.rs.core.UriInfo) QName(javax.xml.namespace.QName) ToscaBaseTypes(org.eclipse.winery.model.tosca.constants.ToscaBaseTypes) AbstractComponentInstanceResourceContainingATopology(org.eclipse.winery.repository.rest.resources._support.AbstractComponentInstanceResourceContainingATopology) GET(javax.ws.rs.GET) YamlArtifactsSynchronizer(org.eclipse.winery.repository.backend.YamlArtifactsSynchronizer) Splitting(org.eclipse.winery.repository.splitting.Splitting) ServiceTemplateCheckingResult(org.eclipse.winery.compliance.checking.ServiceTemplateCheckingResult) ServiceTemplateId(org.eclipse.winery.model.ids.definitions.ServiceTemplateId) SimpleDateFormat(java.text.SimpleDateFormat) ApiResponses(io.swagger.annotations.ApiResponses) TTopologyTemplate(org.eclipse.winery.model.tosca.TTopologyTemplate) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) TParameter(org.eclipse.winery.model.tosca.TParameter) InjectorReplaceOptions(org.eclipse.winery.repository.rest.resources._support.dataadapter.injectionadapter.InjectorReplaceOptions) ThreatModeling(org.eclipse.winery.model.threatmodeling.ThreatModeling) BackendUtils(org.eclipse.winery.repository.backend.BackendUtils) TCapabilityRef(org.eclipse.winery.model.tosca.TCapabilityRef) TNodeTemplate(org.eclipse.winery.model.tosca.TNodeTemplate) Status(javax.ws.rs.core.Response.Status) Substitution(org.eclipse.winery.model.adaptation.substitution.Substitution) ResourceResult(org.eclipse.winery.repository.rest.resources._support.ResourceResult) POST(javax.ws.rs.POST) TRequirementRef(org.eclipse.winery.model.tosca.TRequirementRef) Logger(org.slf4j.Logger) Iterator(java.util.Iterator) OTParticipant(org.eclipse.winery.model.tosca.extensions.OTParticipant) Environments(org.eclipse.winery.common.configuration.Environments) IOException(java.io.IOException) InjectRemoval(org.eclipse.winery.repository.splitting.InjectRemoval) TPropertyMapping(org.eclipse.winery.model.tosca.TPropertyMapping) TTag(org.eclipse.winery.model.tosca.TTag) InjectorReplaceData(org.eclipse.winery.repository.rest.resources._support.dataadapter.injectionadapter.InjectorReplaceData) EdmmResource(org.eclipse.winery.repository.rest.resources.edmm.EdmmResource) NamespaceManager(org.eclipse.winery.repository.backend.NamespaceManager) DASpecification(org.eclipse.winery.repository.driverspecificationandinjection.DASpecification) ApiResponse(io.swagger.annotations.ApiResponse) TRelationshipTemplate(org.eclipse.winery.model.tosca.TRelationshipTemplate) RepositoryConfigurationObject(org.eclipse.winery.common.configuration.RepositoryConfigurationObject) TOperation(org.eclipse.winery.model.tosca.TOperation) ModelUtilities(org.eclipse.winery.model.tosca.utils.ModelUtilities) DriverInjection(org.eclipse.winery.repository.driverspecificationandinjection.DriverInjection) NodeTypeId(org.eclipse.winery.model.ids.definitions.NodeTypeId) IHasName(org.eclipse.winery.repository.rest.resources._support.IHasName) YamlArtifactsSynchronizer(org.eclipse.winery.repository.backend.YamlArtifactsSynchronizer) IOException(java.io.IOException) ServiceTemplateId(org.eclipse.winery.model.ids.definitions.ServiceTemplateId)

Example 3 with HasId

use of org.eclipse.winery.model.tosca.HasId in project winery by eclipse.

the class PermutationGenerator method checkMutability.

public boolean checkMutability(OTTopologyFragmentRefinementModel refinementModel) {
    logger.info("Starting mutability check of {}", refinementModel.getIdFromIdOrNameField());
    this.mutabilityErrorReason = "";
    List<TNodeTemplate> detectorNodeTemplates = refinementModel.getDetector().getNodeTemplates();
    Set<TNodeTemplate> mutableNodes = detectorNodeTemplates.stream().filter(nodeTemplate -> !isStayPlaceholder(nodeTemplate, refinementModel)).collect(Collectors.toSet());
    List<OTStringList> permutationOptions = new ArrayList<>();
    refinementModel.setPermutationOptions(permutationOptions);
    Sets.powerSet(mutableNodes).stream().filter(set -> !(set.size() == 0 || set.size() == mutableNodes.size())).forEach(permutation -> permutationOptions.add(new OTStringList(permutation.stream().map(HasId::getId).collect(Collectors.toList()))));
    refinementModel.setComponentSets(new ArrayList<>());
    for (TNodeTemplate detectorNode : detectorNodeTemplates) {
        getAllMappingsForDetectorNode(detectorNode, refinementModel).stream().filter(mapping -> mapping.getRefinementElement() instanceof TNodeTemplate).map(mapping -> (TNodeTemplate) mapping.getRefinementElement()).forEach(refinementNode -> this.checkComponentMutability(refinementNode, detectorNode, refinementModel));
        ModelUtilities.getIncomingRelationshipTemplates(refinementModel.getDetector(), detectorNode).stream().filter(relation -> refinementModel.getComponentSets().stream().noneMatch(setList -> setList.getValues().contains(relation.getTargetElement().getRef().getId()) && setList.getValues().contains(relation.getSourceElement().getRef().getId()))).forEach(relation -> {
            TNodeTemplate dependantNode = (TNodeTemplate) relation.getSourceElement().getRef();
            if (refinementModel.getRelationMappings() != null) {
                refinementModel.getRelationMappings().stream().filter(relMap -> relMap.getDetectorElement().equals(dependantNode)).filter(relMap -> RefinementUtils.canRedirectRelation(relMap, relation, this.relationshipTypes, this.nodeTypes)).findFirst().ifPresent(relMap -> addMutabilityMapping(relMap.getDetectorElement(), relMap.getRefinementElement(), refinementModel));
            }
        });
    }
    if (refinementModel.getPermutationMappings() == null) {
        this.mutabilityErrorReason = "No permutation mappings could be identified";
        logger.info(this.errorMessage, this.mutabilityErrorReason);
        return false;
    }
    List<String> unmappedDetectorNodes = refinementModel.getDetector().getNodeTemplates().stream().filter(detectorNode -> !isStayPlaceholder(detectorNode, refinementModel)).filter(detectorNode -> !permutabilityMappingExistsForDetectorElement(detectorNode, refinementModel)).map(HasId::getId).collect(Collectors.toList());
    if (unmappedDetectorNodes.size() > 0) {
        this.mutabilityErrorReason = "There are detector nodes which could not be mapped to a refinement node: " + String.join(", ", unmappedDetectorNodes);
        logger.info(this.errorMessage, this.mutabilityErrorReason);
        return false;
    }
    List<String> unmappedRefinementNodes = refinementModel.getRefinementStructure().getNodeTemplates().stream().filter(refinementNode -> !isStayingRefinementElement(refinementNode, refinementModel)).filter(refinementNode -> !permutabilityMappingExistsForRefinementNode(refinementNode, refinementModel)).map(HasId::getId).collect(Collectors.toList());
    if (unmappedRefinementNodes.size() > 0) {
        this.mutabilityErrorReason = "There are refinement nodes which could not be mapped to a detector node: " + String.join(", ", unmappedRefinementNodes);
        logger.info(this.errorMessage, this.mutabilityErrorReason);
        return false;
    }
    List<String> unmappableRelationIds = chekMutabilityOfDetectorRelations(refinementModel);
    if (unmappableRelationIds.size() > 0) {
        this.mutabilityErrorReason = "There are relations that cannot be redirected during the generation: " + String.join(", ", unmappableRelationIds);
        logger.info(this.errorMessage, this.mutabilityErrorReason);
        return false;
    }
    return true;
}
Also used : Arrays(java.util.Arrays) RefinementUtils.getAllContentMappingsForRefinementNodeWithoutDetectorNode(org.eclipse.winery.model.adaptation.substitution.refinement.RefinementUtils.getAllContentMappingsForRefinementNodeWithoutDetectorNode) TopologyFragmentRefinementModelId(org.eclipse.winery.model.ids.extensions.TopologyFragmentRefinementModelId) LoggerFactory(org.slf4j.LoggerFactory) HashMap(java.util.HashMap) SerializationUtils(org.apache.commons.lang3.SerializationUtils) RefinementUtils.isStayPlaceholder(org.eclipse.winery.model.adaptation.substitution.refinement.RefinementUtils.isStayPlaceholder) OTTopologyFragmentRefinementModel(org.eclipse.winery.model.tosca.extensions.OTTopologyFragmentRefinementModel) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) OTPatternRefinementModel(org.eclipse.winery.model.tosca.extensions.OTPatternRefinementModel) RefinementUtils.addMutabilityMapping(org.eclipse.winery.model.adaptation.substitution.refinement.RefinementUtils.addMutabilityMapping) RefinementUtils.getAllMappingsForDetectorNode(org.eclipse.winery.model.adaptation.substitution.refinement.RefinementUtils.getAllMappingsForDetectorNode) PatternRefinementModelId(org.eclipse.winery.model.ids.extensions.PatternRefinementModelId) VersionSupport(org.eclipse.winery.model.version.VersionSupport) Map(java.util.Map) OTPermutationMapping(org.eclipse.winery.model.tosca.extensions.OTPermutationMapping) RefinementUtils.noMappingExistsForRefinementNodeExeptForGivenDetectorNode(org.eclipse.winery.model.adaptation.substitution.refinement.RefinementUtils.noMappingExistsForRefinementNodeExeptForGivenDetectorNode) DefinitionsChildId(org.eclipse.winery.model.ids.definitions.DefinitionsChildId) TNodeTemplate(org.eclipse.winery.model.tosca.TNodeTemplate) OTStayMapping(org.eclipse.winery.model.tosca.extensions.OTStayMapping) RefinementUtils.getStayAndPermutationMappings(org.eclipse.winery.model.adaptation.substitution.refinement.RefinementUtils.getStayAndPermutationMappings) RefinementUtils.isStayingRefinementElement(org.eclipse.winery.model.adaptation.substitution.refinement.RefinementUtils.isStayingRefinementElement) Logger(org.slf4j.Logger) Set(java.util.Set) IOException(java.io.IOException) RefinementUtils.permutabilityMappingExistsForDetectorElement(org.eclipse.winery.model.adaptation.substitution.refinement.RefinementUtils.permutabilityMappingExistsForDetectorElement) TNodeType(org.eclipse.winery.model.tosca.TNodeType) Collectors(java.util.stream.Collectors) HasId(org.eclipse.winery.model.tosca.HasId) RelationshipTypeId(org.eclipse.winery.model.ids.definitions.RelationshipTypeId) RepositoryFactory(org.eclipse.winery.repository.backend.RepositoryFactory) RefinementUtils.permutabilityMappingExistsForRefinementNode(org.eclipse.winery.model.adaptation.substitution.refinement.RefinementUtils.permutabilityMappingExistsForRefinementNode) List(java.util.List) IRepository(org.eclipse.winery.repository.backend.IRepository) TRelationshipType(org.eclipse.winery.model.tosca.TRelationshipType) Sets(org.eclipse.collections.impl.factory.Sets) Optional(java.util.Optional) TRelationshipTemplate(org.eclipse.winery.model.tosca.TRelationshipTemplate) OTPrmMapping(org.eclipse.winery.model.tosca.extensions.OTPrmMapping) ModelUtilities(org.eclipse.winery.model.tosca.utils.ModelUtilities) QName(javax.xml.namespace.QName) NodeTypeId(org.eclipse.winery.model.ids.definitions.NodeTypeId) OTStringList(org.eclipse.winery.model.tosca.extensions.OTStringList) HasId(org.eclipse.winery.model.tosca.HasId) OTStringList(org.eclipse.winery.model.tosca.extensions.OTStringList) ArrayList(java.util.ArrayList) TNodeTemplate(org.eclipse.winery.model.tosca.TNodeTemplate)

Example 4 with HasId

use of org.eclipse.winery.model.tosca.HasId in project winery by eclipse.

the class TopologyFragmentRefinement method applyRefinement.

@Override
public Map<String, String> applyRefinement(RefinementCandidate refinement, TTopologyTemplate topology) {
    if (!(refinement.getRefinementModel() instanceof OTTopologyFragmentRefinementModel)) {
        throw new UnsupportedOperationException("The refinement candidate is not a PRM!");
    }
    // determine the elements that are staying
    OTTopologyFragmentRefinementModel prm = (OTTopologyFragmentRefinementModel) refinement.getRefinementModel();
    List<String> stayingRefinementElementIds = RefinementUtils.getStayingRefinementElements(prm).stream().map(HasId::getId).collect(Collectors.toList());
    // import the refinement structure
    Map<String, String> idMapping = BackendUtils.mergeTopologyTemplateAinTopologyTemplateB(refinement.getRefinementModel().getRefinementTopology(), topology, stayingRefinementElementIds);
    // only for UI: position the imported nodes next to the nodes to be refined
    Map<String, Map<String, Integer>> coordinates = calculateNewPositions(refinement.getDetectorGraph(), refinement.getGraphMapping(), refinement.getRefinementModel().getRefinementTopology());
    refinement.getRefinementModel().getRefinementTopology().getNodeTemplates().stream().filter(element -> !stayingRefinementElementIds.contains(element.getId())).forEach(node -> {
        Map<String, Integer> newCoordinates = coordinates.get(node.getId());
        TNodeTemplate nodeTemplate = topology.getNodeTemplate(idMapping.get(node.getId()));
        if (nodeTemplate != null) {
            nodeTemplate.setX(newCoordinates.get("x").toString());
            nodeTemplate.setY(newCoordinates.get("y").toString());
        }
    });
    // iterate over the detector nodes
    refinement.getDetectorGraph().vertexSet().forEach(vertex -> {
        // get the matching node in the topology
        TNodeTemplate matchingNode = refinement.getGraphMapping().getVertexCorrespondence(vertex, false).getTemplate();
        this.redirectInternalRelations(prm, vertex.getTemplate(), matchingNode, topology);
        this.redirectExternalRelations(refinement, vertex.getTemplate(), matchingNode, topology, idMapping);
        this.applyPropertyMappings(refinement, vertex.getId(), matchingNode, topology, idMapping);
        this.applyDeploymentArtifactMapping(refinement, vertex.getTemplate(), matchingNode, topology, idMapping);
        if (!getStayMappingsOfCurrentElement(prm, vertex.getTemplate()).findFirst().isPresent()) {
            topology.getNodeTemplateOrRelationshipTemplate().remove(matchingNode);
        } else if (shouldRemoveBehaviorPatterns(vertex.getTemplate(), matchingNode)) {
            if (vertex.getTemplate().getPolicies() != null && matchingNode.getPolicies() != null)
                vertex.getTemplate().getPolicies().forEach(detectorPolicy -> matchingNode.getPolicies().removeIf(matchingPolicy -> matchingPolicy.getPolicyType().equals(detectorPolicy.getPolicyType())));
        }
    });
    refinement.getDetectorGraph().edgeSet().forEach(edge -> {
        TRelationshipTemplate relationshipTemplate = refinement.getGraphMapping().getEdgeCorrespondence(edge, false).getTemplate();
        this.applyPropertyMappings(refinement, edge.getId(), relationshipTemplate, topology, idMapping);
        if (!getStayMappingsOfCurrentElement(prm, edge.getTemplate()).findFirst().isPresent()) {
            topology.getNodeTemplateOrRelationshipTemplate().remove(relationshipTemplate);
        }
    });
    return idMapping;
}
Also used : OTDeploymentArtifactMapping(org.eclipse.winery.model.tosca.extensions.OTDeploymentArtifactMapping) OTAttributeMapping(org.eclipse.winery.model.tosca.extensions.OTAttributeMapping) TopologyFragmentRefinementModelId(org.eclipse.winery.model.ids.extensions.TopologyFragmentRefinementModelId) GraphMapping(org.jgrapht.GraphMapping) LoggerFactory(org.slf4j.LoggerFactory) RefinementChooser(org.eclipse.winery.model.adaptation.substitution.refinement.RefinementChooser) TEntityTemplate(org.eclipse.winery.model.tosca.TEntityTemplate) HashMap(java.util.HashMap) IToscaMatcher(org.eclipse.winery.topologygraph.matching.IToscaMatcher) ToscaEdge(org.eclipse.winery.topologygraph.model.ToscaEdge) TTopologyTemplate(org.eclipse.winery.model.tosca.TTopologyTemplate) OTTopologyFragmentRefinementModel(org.eclipse.winery.model.tosca.extensions.OTTopologyFragmentRefinementModel) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) BackendUtils(org.eclipse.winery.repository.backend.BackendUtils) Map(java.util.Map) ToscaPrmPropertyMatcher(org.eclipse.winery.topologygraph.matching.ToscaPrmPropertyMatcher) OTRefinementModel(org.eclipse.winery.model.tosca.extensions.OTRefinementModel) TNodeTemplate(org.eclipse.winery.model.tosca.TNodeTemplate) OTAttributeMappingType(org.eclipse.winery.model.tosca.extensions.OTAttributeMappingType) ArtifactTypeId(org.eclipse.winery.model.ids.definitions.ArtifactTypeId) TArtifactType(org.eclipse.winery.model.tosca.TArtifactType) OTStayMapping(org.eclipse.winery.model.tosca.extensions.OTStayMapping) Logger(org.slf4j.Logger) DefaultRefinementChooser(org.eclipse.winery.model.adaptation.substitution.refinement.DefaultRefinementChooser) RefinementUtils.redirectRelation(org.eclipse.winery.model.adaptation.substitution.refinement.RefinementUtils.redirectRelation) AbstractRefinement(org.eclipse.winery.model.adaptation.substitution.refinement.AbstractRefinement) UUID(java.util.UUID) RefinementId(org.eclipse.winery.model.ids.extensions.RefinementId) Collectors(java.util.stream.Collectors) RefinementUtils(org.eclipse.winery.model.adaptation.substitution.refinement.RefinementUtils) HasId(org.eclipse.winery.model.tosca.HasId) Objects(java.util.Objects) List(java.util.List) Stream(java.util.stream.Stream) ToscaNode(org.eclipse.winery.topologygraph.model.ToscaNode) TDeploymentArtifact(org.eclipse.winery.model.tosca.TDeploymentArtifact) TRelationshipTemplate(org.eclipse.winery.model.tosca.TRelationshipTemplate) ModelUtilities(org.eclipse.winery.model.tosca.utils.ModelUtilities) ToscaGraph(org.eclipse.winery.topologygraph.model.ToscaGraph) QName(javax.xml.namespace.QName) RefinementCandidate(org.eclipse.winery.model.adaptation.substitution.refinement.RefinementCandidate) OTTopologyFragmentRefinementModel(org.eclipse.winery.model.tosca.extensions.OTTopologyFragmentRefinementModel) TRelationshipTemplate(org.eclipse.winery.model.tosca.TRelationshipTemplate) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) Map(java.util.Map) TNodeTemplate(org.eclipse.winery.model.tosca.TNodeTemplate)

Aggregations

HasId (org.eclipse.winery.model.tosca.HasId)4 ArrayList (java.util.ArrayList)3 List (java.util.List)3 Map (java.util.Map)3 Collectors (java.util.stream.Collectors)3 QName (javax.xml.namespace.QName)3 TNodeTemplate (org.eclipse.winery.model.tosca.TNodeTemplate)3 TRelationshipTemplate (org.eclipse.winery.model.tosca.TRelationshipTemplate)3 TTopologyTemplate (org.eclipse.winery.model.tosca.TTopologyTemplate)3 ModelUtilities (org.eclipse.winery.model.tosca.utils.ModelUtilities)3 Logger (org.slf4j.Logger)3 LoggerFactory (org.slf4j.LoggerFactory)3 IOException (java.io.IOException)2 HashMap (java.util.HashMap)2 LinkedHashMap (java.util.LinkedHashMap)2 Optional (java.util.Optional)2 Set (java.util.Set)2 NodeTypeId (org.eclipse.winery.model.ids.definitions.NodeTypeId)2 TopologyFragmentRefinementModelId (org.eclipse.winery.model.ids.extensions.TopologyFragmentRefinementModelId)2 TBoundaryDefinitions (org.eclipse.winery.model.tosca.TBoundaryDefinitions)2