use of org.eclipse.winery.model.tosca.xml.XTExportedOperation in project winery by eclipse.
the class ToCanonical method convert.
private TExportedOperation convert(XTExportedOperation xml) {
TExportedOperation canonical = new TExportedOperation(xml.getName());
if (xml.getNodeOperation() != null) {
canonical.setNodeOperation(convert(xml.getNodeOperation()));
}
if (xml.getRelationshipOperation() != null) {
canonical.setRelationshipOperation(convert(xml.getRelationshipOperation()));
}
if (xml.getPlan() != null) {
TExportedOperation.Plan plan = new TExportedOperation.Plan();
if (xml.getPlan().getPlanRef() instanceof String) {
plan.setPlanRef(xml.getPlan().getPlanRef());
} else {
plan.setPlanRef(convert((XTPlan) xml.getPlan().getPlanRef()));
}
canonical.setPlan(plan);
}
return canonical;
}
Aggregations