Java Reference
In-Depth Information
This closes the section using the information entered by the user
in the graphical interface to create the necessary build settings.
56.
VerificationReport lVerifBS lBuildSettings.verify();
57.
if (lVerifBS ! null) {
58.
displayLongMessage(this, "Wrong Settings",
59.
lVerifBS.getReportText(), 0);
60.
return;
61.
}
The BuildSettings object is verified through the preceding code. If
the user-provided values are not compatible with the selected mining
function (for example, selecting a continuous attribute as the target
for a classification model), we expect the DME implementation to
provide a meaningful error report. We then save the build settings
and execute the task.
62.
ExecutionHandle lBuildHandle
63.
saveBuildSettingsAndExecuteTask(
64.
lFunctionNameShort,
65.
lDSName,
66.
lBuildSettings);
67.
if (lBuildHandle null) {
68.
return;
69.
}
70.
boolean lTaskSucceed monitorTaskExecution(lBuildHandle);
71.
// Check success/error
72.
if (lTaskSucceed) {
73.
JOptionPane.showMessageDialog(this, "Execution Successful");
74.
} else {
75.
JOptionPane.showMessageDialog(this,
76.
"Execution failed: "
77.
lBuildHandle.getLatestStatus().getState().name() " ["
78.
lBuildHandle.getLatestStatus().getDescription() "]");
79.
}
The code above reuses the same method to monitor the build task
execution that we used to monitor the execution of the Compute-
StatisticsTask .
Finally, the last section deals with the eventual exceptions that
may be raised in the process.
80.
} catch (InvalidURIException lInvalidURIException) {
81.
JOptionPane.showMessageDialog(this,
Search WWH ::




Custom Search