if (prevFlowTypeGUI.equals(flowTypeGUI))
return;
CapabilityLanguageFlow clf = null;
FixedFlow ff = null;
String[] nodes = new FlowNodes(modelFlow).getFlow();
if (flowTypeGUI.equals(CAPABILITY_LANGUAGE_FLOW)) {
setFlowControllerDeclaration(null);
getAnalysisEngineMetaData().setFlowConstraints(clf = new CapabilityLanguageFlow_impl());
clf.setCapabilityLanguageFlow(nodes);
} else if (flowTypeGUI.equals(FIXED_FLOW)) {
setFlowControllerDeclaration(null);
getAnalysisEngineMetaData().setFlowConstraints(ff = new FixedFlow_impl());
ff.setFixedFlow(nodes);
} else if (flowTypeGUI.equals(USER_DEFINED_FLOW)) {
// use case: user set user-defined-flow from some other state.
// user will have to fill in the import (CDE only supports that format)
// flow nodes kept, put under "Fixed Flow" arbitrarily
FlowControllerDeclaration newFcd = new FlowControllerDeclaration_impl();
setFlowControllerDeclaration(newFcd);
refreshFcd(newFcd);
getAnalysisEngineMetaData().setFlowConstraints(ff = new FixedFlow_impl());
ff.setFixedFlow(nodes);
}
enable();
setFileDirty();
}