|
From: <re...@us...> - 2011-10-24 19:51:00
|
Revision: 1247
http://cishell.svn.sourceforge.net/cishell/?rev=1247&view=rev
Author: rescdsk
Date: 2011-10-24 19:50:53 +0000 (Mon, 24 Oct 2011)
Log Message:
-----------
Document what happens when you throw an exception in MutateParameters
Modified Paths:
--------------
trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/ParameterMutator.java
Modified: trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/ParameterMutator.java
===================================================================
--- trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/ParameterMutator.java 2011-10-24 19:49:39 UTC (rev 1246)
+++ trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/ParameterMutator.java 2011-10-24 19:50:53 UTC (rev 1247)
@@ -20,27 +20,38 @@
/**
* An additional interface an {@link AlgorithmFactory} can implement that allows
* for adding, modifying, or removing input parameters before being shown to the
- * end-user for input. This interface is often implemented by algorithms that
+ * end-user for input. This interface is often implemented by algorithms that
* wish to customize the user interface based on the actual input data.
*
* @author Bruce Herr (bh...@bh...)
*/
public interface ParameterMutator {
- /**
- * Adds, modifies, or removes {@link Algorithm} parameters
- * ({@link AttributeDefinition}s) from a given {@link ObjectClassDefinition}
- * returning either the same (if no changes are made) input or a new,
- * mutated version of the input
- *
- * @param data An optional argument, the Data array that will be given to
- * this class to create an Algorithm with the createAlgorithm
- * method. Applications that don't know the Data array that is going
- * to be used ahead of time can give a <code>null</code> value.
- * @param parameters A set of AttributeDefinitions which define the
- * algorithm's input parameters
- * @return An OSGi {@link ObjectClassDefinition} that defines the parameters
- * needed by the Algorithm this class creates
- */
- public ObjectClassDefinition mutateParameters(Data[] data, ObjectClassDefinition parameters);
+ /**
+ * Adds, modifies, or removes {@link Algorithm} parameters (
+ * {@link AttributeDefinition}s) from a given {@link ObjectClassDefinition}
+ * returning either the same (if no changes are made) input or a new,
+ * mutated version of the input
+ *
+ * <p>
+ * If the mutateParameters method happens to find out that the algorithm
+ * will be unable to run, for instance if an input file does not have the
+ * correct format, it may throw a {@link AlgorithmCreationFailedException}.
+ * The user may be made aware of the exception, for example by printing the
+ * .getMessage to the console.
+ *
+ * @param data
+ * An optional argument, the Data array that will be given to
+ * this class to create an Algorithm with the createAlgorithm
+ * method. Applications that don't know the Data array that is
+ * going to be used ahead of time can give a <code>null</code>
+ * value.
+ * @param parameters
+ * A set of AttributeDefinitions which define the algorithm's
+ * input parameters
+ * @return An OSGi {@link ObjectClassDefinition} that defines the parameters
+ * needed by the Algorithm this class creates
+ */
+ public ObjectClassDefinition mutateParameters(Data[] data,
+ ObjectClassDefinition parameters);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|