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;
}
Aggregations