Java Reference
In-Depth Information
1. protected PhysicalDataSet createPhysicalData(IDataMining iServices) throws
2.
RemoteException, MalformedURIException {
3.
PhysicalDataSet lBuildPhysicalDataSet new PhysicalDataSet();
4.
lBuildPhysicalDataSet.setName("MyODBCCensus ");
5.
String lBuildUri "odbc:///ODBC_Source/CensusTable";
6.
org.apache.axis.types.URI lBuildUriAxis
7.
new org.apache.axis.types.URI(lBuildUri);
8.
lBuildPhysicalDataSet.setUri(lBuildUriAxis);
9.
askToSaveObject(lBuildPhysicalDataSet, "MyODBCCensus", iServices);
10.
return lBuildPhysicalDataSet;
11. }
14.2.5
Creating a BuildTask
The task to build a classification model will use the PhysicalDataSet
and BuildSettings previously built. This is done within the method
called createBuildTask . The following code shows how to create the
BuildTask from a BuildSettings object. Even if it has been previously
saved to the MOR, the BuildSettings bean is provided as is, and thus
will be expanded in its own XML in the SOAP message. We could
have used the BuildSettings name instead of the object because JDM
Web services allows both cases.
1. protected final Task createBuildTask(IDataMining iServices,
2.
BuildSettings iBuildSettings,
3.
String iModelName,
4.
PhysicalDataSet iBuildPhysicalDataSet)
5.
throws RemoteException {
6.
BuildTask lBuildTask new BuildTask();
7.
lBuildTask.setBuildSettings(iBuildSettings);
8.
lBuildTask.setDescription("My First BuildTask");
9.
lBuildTask.setModelName(iModelName);
10
askToSaveObject(lBuildTask, "MyBuildTask_" iModelName, iServices);
11.
return lBuildTask;
12. }
14.2.6
Executing a BuildTask
Finally, we need to create a method to execute the task we have just
created, defined, and saved to the MOR. We use a code structure
already presented in other environments: getting the execution status
through the execution handle—a common usage scenario. There is
 
Search WWH ::




Custom Search