Search in sources :

Example 1 with XTExportedOperation

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;
}
Also used : XTPlan(org.eclipse.winery.model.tosca.xml.XTPlan) XTPlan(org.eclipse.winery.model.tosca.xml.XTPlan) TPlan(org.eclipse.winery.model.tosca.TPlan) XTExportedOperation(org.eclipse.winery.model.tosca.xml.XTExportedOperation) TExportedOperation(org.eclipse.winery.model.tosca.TExportedOperation)

Aggregations

TExportedOperation (org.eclipse.winery.model.tosca.TExportedOperation)1 TPlan (org.eclipse.winery.model.tosca.TPlan)1 XTExportedOperation (org.eclipse.winery.model.tosca.xml.XTExportedOperation)1 XTPlan (org.eclipse.winery.model.tosca.xml.XTPlan)1