|
From: <pat...@us...> - 2010-05-28 18:18:30
|
Revision: 1067
http://cishell.svn.sourceforge.net/cishell/?rev=1067&view=rev
Author: pataphil
Date: 2010-05-28 18:18:24 +0000 (Fri, 28 May 2010)
Log Message:
-----------
* Added AlgorithmUtilities.executeAlgorithm().
* Basically reviewed by Joseph.
Modified Paths:
--------------
trunk/core/org.cishell.utilities/src/org/cishell/utilities/AlgorithmUtilities.java
Modified: trunk/core/org.cishell.utilities/src/org/cishell/utilities/AlgorithmUtilities.java
===================================================================
--- trunk/core/org.cishell.utilities/src/org/cishell/utilities/AlgorithmUtilities.java 2010-05-26 16:41:47 UTC (rev 1066)
+++ trunk/core/org.cishell.utilities/src/org/cishell/utilities/AlgorithmUtilities.java 2010-05-28 18:18:24 UTC (rev 1067)
@@ -3,6 +3,9 @@
import java.io.File;
import java.util.Dictionary;
+import org.cishell.framework.CIShellContext;
+import org.cishell.framework.algorithm.Algorithm;
+import org.cishell.framework.algorithm.AlgorithmExecutionException;
import org.cishell.framework.algorithm.AlgorithmFactory;
import org.cishell.framework.data.BasicData;
import org.cishell.framework.data.Data;
@@ -116,4 +119,18 @@
return guessSourceDataFilename(parent);
}
}
+
+ @SuppressWarnings("unchecked") // Dictionary<String, Object>
+ public static Data[] executeAlgorithm(
+ AlgorithmFactory algorithmFactory,
+ Dictionary parameters,
+ CIShellContext ciShellContext,
+ Data[] data)
+ throws AlgorithmExecutionException {
+ Algorithm algorithm =
+ algorithmFactory.createAlgorithm(data, parameters, ciShellContext);
+ Data[] result = algorithm.execute();
+
+ return result;
+ }
}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|