use of org.eclipse.winery.model.tosca.xml.XTPlan 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;
}
use of org.eclipse.winery.model.tosca.xml.XTPlan in project winery by eclipse.
the class Visitor method visit.
public void visit(XTServiceTemplate serviceTemplate) {
Objects.requireNonNull(serviceTemplate);
visit((XTExtensibleElements) serviceTemplate);
final XTTopologyTemplate topologyTemplate = serviceTemplate.getTopologyTemplate();
if (topologyTemplate != null) {
topologyTemplate.accept(this);
}
final List<XTTag> tags = serviceTemplate.getTags();
if (tags != null) {
for (XTTag tag : tags) {
tag.accept(this);
}
}
final List<XTPlan> plans = serviceTemplate.getPlans();
if (plans != null) {
for (XTPlan plan : plans) {
plan.accept(this);
}
}
final XTBoundaryDefinitions boundaryDefinitions = serviceTemplate.getBoundaryDefinitions();
if (boundaryDefinitions != null) {
boundaryDefinitions.accept(this);
}
}
Aggregations