Search in sources :

Example 11 with CapabilityTypeId

use of org.eclipse.winery.model.ids.definitions.CapabilityTypeId in project winery by eclipse.

the class Splitting method getBasisCapabilityType.

private TCapabilityType getBasisCapabilityType(QName capabilityTypeQName) {
    CapabilityTypeId parentCapTypeId = new CapabilityTypeId(capabilityTypeQName);
    TCapabilityType parentCapabilityType = RepositoryFactory.getRepository().getElement(parentCapTypeId);
    TCapabilityType basisCapabilityType = parentCapabilityType;
    while (parentCapabilityType != null) {
        basisCapabilityType = parentCapabilityType;
        if (parentCapabilityType.getDerivedFrom() != null) {
            capabilityTypeQName = parentCapabilityType.getDerivedFrom().getTypeRef();
            parentCapTypeId = new CapabilityTypeId(capabilityTypeQName);
            parentCapabilityType = RepositoryFactory.getRepository().getElement(parentCapTypeId);
        } else {
            parentCapabilityType = null;
        }
    }
    return basisCapabilityType;
}
Also used : CapabilityTypeId(org.eclipse.winery.model.ids.definitions.CapabilityTypeId) TCapabilityType(org.eclipse.winery.model.tosca.TCapabilityType)

Aggregations

CapabilityTypeId (org.eclipse.winery.model.ids.definitions.CapabilityTypeId)11 QName (javax.xml.namespace.QName)6 NodeTypeId (org.eclipse.winery.model.ids.definitions.NodeTypeId)6 RelationshipTypeId (org.eclipse.winery.model.ids.definitions.RelationshipTypeId)6 RequirementTypeId (org.eclipse.winery.model.ids.definitions.RequirementTypeId)6 NodeTypeImplementationId (org.eclipse.winery.model.ids.definitions.NodeTypeImplementationId)5 RelationshipTypeImplementationId (org.eclipse.winery.model.ids.definitions.RelationshipTypeImplementationId)5 ArrayList (java.util.ArrayList)4 ArtifactTemplateId (org.eclipse.winery.model.ids.definitions.ArtifactTemplateId)4 ArtifactTypeId (org.eclipse.winery.model.ids.definitions.ArtifactTypeId)4 PolicyTypeId (org.eclipse.winery.model.ids.definitions.PolicyTypeId)4 DefinitionsChildId (org.eclipse.winery.model.ids.definitions.DefinitionsChildId)3 InterfaceTypeId (org.eclipse.winery.model.ids.definitions.InterfaceTypeId)3 TArtifactTemplate (org.eclipse.winery.model.tosca.TArtifactTemplate)3 TCapabilityType (org.eclipse.winery.model.tosca.TCapabilityType)3 TRelationshipType (org.eclipse.winery.model.tosca.TRelationshipType)3 TRequirementType (org.eclipse.winery.model.tosca.TRequirementType)3 DataTypeId (org.eclipse.winery.model.ids.definitions.DataTypeId)2 PolicyTemplateId (org.eclipse.winery.model.ids.definitions.PolicyTemplateId)2 ServiceTemplateId (org.eclipse.winery.model.ids.definitions.ServiceTemplateId)2