You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2013/09/26 19:43:34 UTC
svn commit: r1526623 - in
/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima:
UIMAFramework.java analysis_engine/AnalysisEngine.java
analysis_engine/impl/AggregateAnalysisEngine_impl.java resource/Resource.java
Author: schor
Date: Thu Sep 26 17:43:34 2013
New Revision: 1526623
URL: http://svn.apache.org/r1526623
Log:
[UIMA-3209] didn't move any of the PARAM_ defs, but deprecated some duplicates, and set them to the "master" value. Also fix some spellings in comments.
Modified:
uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/UIMAFramework.java
uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/analysis_engine/AnalysisEngine.java
uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/analysis_engine/impl/AggregateAnalysisEngine_impl.java
uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/Resource.java
Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/UIMAFramework.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/UIMAFramework.java?rev=1526623&r1=1526622&r2=1526623&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/UIMAFramework.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/UIMAFramework.java Thu Sep 26 17:43:34 2013
@@ -230,8 +230,13 @@ public abstract class UIMAFramework {
* @param aAdditionalParams
* a Map containing additional parameters to pass to the
* {@link Resource#initialize(ResourceSpecifier,Map)} method. May be <code>null</code>
- * if there are no parameters. For example this can be used to set performance-tuning
- * settings as described in {@link #getDefaultPerformanceTuningProperties()}.
+ * if there are no parameters. Parameter names are defined as constants on the
+ * {@link AnalysisEngine}, and {@link Resource}.
+ * Furthermore, the entry under the key {@link Resource.PARAM_PERFORMANCE_TUNING_SETTINGS}
+ * is a map which may contain settings with keys defined as constants here {@link UIMAFramework} interfaces.
+ * For example this can be used to set
+ * performance-tuning settings as described in
+ * {@link #getDefaultPerformanceTuningProperties()}.
*
* @return a <code>Resource</code> instance.
*
@@ -255,8 +260,13 @@ public abstract class UIMAFramework {
* @param aAdditionalParams
* a Map containing additional parameters to pass to the
* {@link Resource#initialize(ResourceSpecifier,Map)} method. May be <code>null</code>
- * if there are no parameters. For example this can be used to set performance-tuning
- * settings as described in {@link #getDefaultPerformanceTuningProperties()}.
+ * if there are no parameters. Parameter names are defined as constants on the
+ * {@link AnalysisEngine}, and {@link Resource}.
+ * Furthermore, the entry under the key {@link Resource.PARAM_PERFORMANCE_TUNING_SETTINGS}
+ * is a map which may contain settings with keys defined as constants here {@link UIMAFramework} interfaces.
+ * For example this can be used to set
+ * performance-tuning settings as described in
+ * {@link #getDefaultPerformanceTuningProperties()}.
*
* @return a <code>Resource</code> instance. This will be a subclass of
* <code>aResourceClass</code>.
@@ -291,8 +301,13 @@ public abstract class UIMAFramework {
* @param aAdditionalParams
* a Map containing additional parameters to pass to the
* {@link Resource#initialize(ResourceSpecifier,Map)} method. May be <code>null</code>
- * if there are no parameters. For example this can be used to set performance-tuning
- * settings as described in {@link #getDefaultPerformanceTuningProperties()}.
+ * if there are no parameters. Parameter names are defined as constants on the
+ * {@link AnalysisEngine}, and {@link Resource}.
+ * Furthermore, the entry under the key {@link Resource.PARAM_PERFORMANCE_TUNING_SETTINGS}
+ * is a map which may contain settings with keys defined as constants here {@link UIMAFramework} interfaces.
+ * For example this can be used to set
+ * performance-tuning settings as described in
+ * {@link #getDefaultPerformanceTuningProperties()}.
*
* @return a <code>Resource</code> instance. This will be a subclass of
* <code>aResourceClass</code>.
@@ -369,8 +384,11 @@ public abstract class UIMAFramework {
* @param aAdditionalParams
* a Map containing additional parameters to pass to the
* {@link Resource#initialize(ResourceSpecifier,Map)} method. May be <code>null</code>
- * if there are no parameters. Valid parameter names are defined as constants on the
- * {@link AnalysisEngine} interface. For example this can be used to set
+ * if there are no parameters. Parameter names are defined as constants on the
+ * {@link AnalysisEngine}, and {@link Resource}.
+ * Furthermore, the entry under the key {@link Resource.PARAM_PERFORMANCE_TUNING_SETTINGS}
+ * is a map which may contain settings with keys defined as constants here {@link UIMAFramework} interfaces.
+ * For example this can be used to set
* performance-tuning settings as described in
* {@link #getDefaultPerformanceTuningProperties()}.
*
@@ -406,8 +424,11 @@ public abstract class UIMAFramework {
* @param aAdditionalParams
* a Map containing additional parameters to pass to the
* {@link Resource#initialize(ResourceSpecifier,Map)} method. May be <code>null</code>
- * if there are no parameters. Valid parameter names are defined as constants on the
- * {@link AnalysisEngine} interface. For example this can be used to set
+ * if there are no parameters. Parameter names are defined as constants on the
+ * {@link AnalysisEngine}, and {@link Resource}.
+ * Furthermore, the entry under the key {@link Resource.PARAM_PERFORMANCE_TUNING_SETTINGS}
+ * is a map which may contain settings with keys defined as constants here {@link UIMAFramework} interfaces.
+ * For example this can be used to set
* performance-tuning settings as described in
* {@link #getDefaultPerformanceTuningProperties()}.
*
@@ -516,8 +537,11 @@ public abstract class UIMAFramework {
* @param aAdditionalParams
* a Map containing additional parameters to pass to the
* {@link Resource#initialize(ResourceSpecifier,Map)} method. May be <code>null</code>
- * if there are no parameters. Valid parameter names are defined as constants on the
- * {@link AnalysisEngine} interface. For example this can be used to set
+ * if there are no parameters. Parameter names are defined as constants on the
+ * {@link AnalysisEngine}, and {@link Resource}.
+ * Furthermore, the entry under the key {@link Resource.PARAM_PERFORMANCE_TUNING_SETTINGS}
+ * is a map which may contain settings with keys defined as constants here {@link UIMAFramework} interfaces.
+ * For example this can be used to set
* performance-tuning settings as described in
* {@link #getDefaultPerformanceTuningProperties()}.
*
@@ -551,8 +575,11 @@ public abstract class UIMAFramework {
* @param aAdditionalParams
* a Map containing additional parameters to pass to the
* {@link Resource#initialize(ResourceSpecifier,Map)} method. May be <code>null</code>
- * if there are no parameters. Valid parameter names are defined as constants on the
- * {@link AnalysisEngine} interface. For example this can be used to set
+ * if there are no parameters. Parameter names are defined as constants on the
+ * {@link AnalysisEngine}, and {@link Resource}.
+ * Furthermore, the entry under the key {@link Resource.PARAM_PERFORMANCE_TUNING_SETTINGS}
+ * is a map which may contain settings with keys defined as constants here {@link UIMAFramework} interfaces.
+ * For example this can be used to set
* performance-tuning settings as described in
* {@link #getDefaultPerformanceTuningProperties()}.
*
@@ -649,8 +676,13 @@ public abstract class UIMAFramework {
* @param aAdditionalParams
* a Map containing additional parameters to pass to the
* {@link Resource#initialize(ResourceSpecifier,Map)} method. May be <code>null</code>
- * if there are no parameters. For example this can be used to set performance-tuning
- * settings as described in {@link #getDefaultPerformanceTuningProperties()}.
+ * if there are no parameters. Parameter names are defined as constants on the
+ * {@link AnalysisEngine}, and {@link Resource}.
+ * Furthermore, the entry under the key {@link Resource.PARAM_PERFORMANCE_TUNING_SETTINGS}
+ * is a map which may contain settings with keys defined as constants here {@link UIMAFramework} interfaces.
+ * For example this can be used to set
+ * performance-tuning settings as described in
+ * {@link #getDefaultPerformanceTuningProperties()}.
*
* @return a <code>CasConsumer</code> instance.
*
@@ -676,9 +708,13 @@ public abstract class UIMAFramework {
* @param aAdditionalParams
* a Map containing additional parameters to pass to the
* {@link Resource#initialize(ResourceSpecifier,Map)} method. May be <code>null</code>
- * if there are no parameters. Valid parameter names are defined as constants on the
- * {@link CasConsumer} interface. For example this can be used to set performance-tuning
- * settings as described in {@link #getDefaultPerformanceTuningProperties()}.
+ * if there are no parameters. Parameter names are defined as constants on the
+ * {@link AnalysisEngine}, and {@link Resource}.
+ * Furthermore, the entry under the key {@link Resource.PARAM_PERFORMANCE_TUNING_SETTINGS}
+ * is a map which may contain settings with keys defined as constants here {@link UIMAFramework} interfaces.
+ * For example this can be used to set
+ * performance-tuning settings as described in
+ * {@link #getDefaultPerformanceTuningProperties()}.
*
* @return an <code>CasConsumer</code> instance.
*
@@ -722,8 +758,13 @@ public abstract class UIMAFramework {
* @param aAdditionalParams
* a Map containing additional parameters to pass to the
* {@link Resource#initialize(ResourceSpecifier,Map)} method. May be <code>null</code>
- * if there are no parameters. For example this can be used to set performance-tuning
- * settings as described in {@link #getDefaultPerformanceTuningProperties()}.
+ * if there are no parameters. Parameter names are defined as constants on the
+ * {@link AnalysisEngine}, and {@link Resource}.
+ * Furthermore, the entry under the key {@link Resource.PARAM_PERFORMANCE_TUNING_SETTINGS}
+ * is a map which may contain settings with keys defined as constants here {@link UIMAFramework} interfaces.
+ * For example this can be used to set
+ * performance-tuning settings as described in
+ * {@link #getDefaultPerformanceTuningProperties()}.
*
* @return a <code>CollectionReader</code> instance.
*
@@ -750,8 +791,11 @@ public abstract class UIMAFramework {
* @param aAdditionalParams
* a Map containing additional parameters to pass to the
* {@link Resource#initialize(ResourceSpecifier,Map)} method. May be <code>null</code>
- * if there are no parameters. Valid parameter names are defined as constants on the
- * {@link CollectionReader} interface. For example this can be used to set
+ * if there are no parameters. Parameter names are defined as constants on the
+ * {@link AnalysisEngine}, and {@link Resource}.
+ * Furthermore, the entry under the key {@link Resource.PARAM_PERFORMANCE_TUNING_SETTINGS}
+ * is a map which may contain settings with keys defined as constants here {@link UIMAFramework} interfaces.
+ * For example this can be used to set
* performance-tuning settings as described in
* {@link #getDefaultPerformanceTuningProperties()}.
*
@@ -802,8 +846,13 @@ public abstract class UIMAFramework {
* @param aAdditionalParams
* a Map containing additional parameters to pass to the
* {@link Resource#initialize(ResourceSpecifier,Map)} method. May be <code>null</code>
- * if there are no parameters. For example this can be used to set performance-tuning
- * settings as described in {@link #getDefaultPerformanceTuningProperties()}.
+ * if there are no parameters. Parameter names are defined as constants on the
+ * {@link AnalysisEngine}, and {@link Resource}.
+ * Furthermore, the entry under the key {@link Resource.PARAM_PERFORMANCE_TUNING_SETTINGS}
+ * is a map which may contain settings with keys defined as constants here {@link UIMAFramework} interfaces.
+ * For example this can be used to set
+ * performance-tuning settings as described in
+ * {@link #getDefaultPerformanceTuningProperties()}.
*
* @return a <code>CasInitializer</code> instance.
*
@@ -830,8 +879,11 @@ public abstract class UIMAFramework {
* @param aAdditionalParams
* a Map containing additional parameters to pass to the
* {@link Resource#initialize(ResourceSpecifier,Map)} method. May be <code>null</code>
- * if there are no parameters. Valid parameter names are defined as constants on the
- * {@link CasInitializer} interface. For example this can be used to set
+ * if there are no parameters. Parameter names are defined as constants on the
+ * {@link AnalysisEngine}, and {@link Resource}.
+ * Furthermore, the entry under the key {@link Resource.PARAM_PERFORMANCE_TUNING_SETTINGS}
+ * is a map which may contain settings with keys defined as constants here {@link UIMAFramework} interfaces.
+ * For example this can be used to set
* performance-tuning settings as described in
* {@link #getDefaultPerformanceTuningProperties()}.
*
@@ -873,7 +925,11 @@ public abstract class UIMAFramework {
* @param aAdditionalParams
* a Map containing additional parameters to pass to the
* {@link CollectionProcessingEngine#initialize(CpeDescription,Map)} method. May be
- * <code>null</code> if there are no parameters. For example this can be used to set
+ * <code>null</code> if there are no parameters. Parameter names are defined as constants on the
+ * {@link AnalysisEngine}, and {@link Resource}.
+ * Furthermore, the entry under the key {@link Resource.PARAM_PERFORMANCE_TUNING_SETTINGS}
+ * is a map which may contain settings with keys defined as constants here {@link UIMAFramework} interfaces.
+ * For example this can be used to set
* performance-tuning settings as described in
* {@link #getDefaultPerformanceTuningProperties()}.
*
@@ -901,7 +957,11 @@ public abstract class UIMAFramework {
* @param aAdditionalParams
* a Map containing additional parameters to pass to the
* {@link CollectionProcessingEngine#initialize(CpeDescription,Map)} method. May be
- * <code>null</code> if there are no parameters. For example this can be used to set
+ * <code>null</code> if there are no parameters. Parameter names are defined as constants on the
+ * {@link AnalysisEngine}, and {@link Resource}.
+ * Furthermore, the entry under the key {@link Resource.PARAM_PERFORMANCE_TUNING_SETTINGS}
+ * is a map which may contain settings with keys defined as constants here {@link UIMAFramework} interfaces.
+ * For example this can be used to set
* performance-tuning settings as described in
* {@link #getDefaultPerformanceTuningProperties()}.
*
@@ -1043,8 +1103,8 @@ public abstract class UIMAFramework {
* initial heap size allocated in the CAS to 100,000:
*
* <pre>
- * Properties perfProps = UIMAFramework.getDefaultPerformanceTuningProperties();
- * perfProps.setProperty(UIMAFramework.CAS_INITIAL_HEAP_SIZE, "100000");
+ * Properties uimaPerfProps = UIMAFramework.getDefaultPerformanceTuningProperties();
+ * uimaPerfProps.setProperty(UIMAFramework.CAS_INITIAL_HEAP_SIZE, "100000");
* HashMap params = new HashMap();
* params.put(Resource.PARAM_PERFORMANCE_TUNING_SETTINGS, uimaPerfProps);
* AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier, params);
@@ -1215,7 +1275,11 @@ public abstract class UIMAFramework {
* @param aAdditionalParams
* a Map containing additional parameters to pass to the
* {@link CollectionProcessingEngine#initialize(CpeDescription,Map)} method. May be
- * <code>null</code> if there are no parameters. For example this can be used to set
+ * <code>null</code> if there are no parameters. Parameter names are defined as constants on the
+ * {@link AnalysisEngine}, and {@link Resource}.
+ * Furthermore, the entry under the key {@link Resource.PARAM_PERFORMANCE_TUNING_SETTINGS}
+ * is a map which may contain settings with keys defined as constants here {@link UIMAFramework} interfaces.
+ * For example this can be used to set
* performance-tuning settings as described in
* {@link #getDefaultPerformanceTuningProperties()}.
*
Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/analysis_engine/AnalysisEngine.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/analysis_engine/AnalysisEngine.java?rev=1526623&r1=1526622&r2=1526623&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/analysis_engine/AnalysisEngine.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/analysis_engine/AnalysisEngine.java Thu Sep 26 17:43:34 2013
@@ -28,6 +28,7 @@ import org.apache.uima.cas.TypeSystem;
import org.apache.uima.collection.base_cpm.CasObjectProcessor;
import org.apache.uima.jcas.JCas;
import org.apache.uima.resource.ConfigurableResource;
+import org.apache.uima.resource.Resource;
import org.apache.uima.resource.ResourceConfigurationException;
import org.apache.uima.resource.ResourceInitializationException;
import org.apache.uima.resource.ResourceManager;
@@ -87,8 +88,9 @@ public interface AnalysisEngine extends
* that this AnalysisEngine should use. This value is used as a key in the
* <code>aAdditionalParams</code> Map that is passed to the
* {@link #initialize(ResourceSpecifier,Map)} method.
+ * @deprecated use {@link Resource.PARAM_RESOURCE_MANAGER}
*/
- public static final String PARAM_RESOURCE_MANAGER = "RESOURCE_MANAGER";
+ public static final String PARAM_RESOURCE_MANAGER = Resource.PARAM_RESOURCE_MANAGER;
/**
* Key for the initialization parameter whose value is a {@link ConfigurationParameterSettings}
@@ -96,8 +98,9 @@ public interface AnalysisEngine extends
* overriding any conflicting settings specified in this AnalysisEngine's Descriptor. This value
* is used as a key in the <code>aAdditionalParams</code> Map that is passed to the
* {@link #initialize(ResourceSpecifier,Map)} method.
+ * @deprecated use {@link Resource.PARAM_CONFIG_PARAM_SETTINGS}
*/
- public static final String PARAM_CONFIG_PARAM_SETTINGS = "CONFIG_PARAM_SETTINGS";
+ public static final String PARAM_CONFIG_PARAM_SETTINGS = Resource.PARAM_CONFIG_PARAM_SETTINGS;
/**
* Key for the initialization parameter whose value is the number of simultaneous calls to
@@ -136,7 +139,7 @@ public interface AnalysisEngine extends
public static final String PARAM_MBEAN_SERVER = "MBEAN_SERVER";
/**
- * Key for the initialization parameter whose value is a String repesenting the prefix
+ * Key for the initialization parameter whose value is a String representing the prefix
* that will be added to all of the JMX MBean names that are generated by this AE (and
* its components, if it is an aggregate). This allows an application that has its own
* MBeans to control how the UIMA MBeans are organized relative to the application's own
@@ -293,7 +296,7 @@ public interface AnalysisEngine extends
* {@link org.apache.uima.resource.metadata.Capability} specification.)
* <p>
* This version of the <code>process</code> method takes a {@link ResultSpecification} as an
- * argument. The <code>ResultSpecification</code> is alist of output types and features that the
+ * argument. The <code>ResultSpecification</code> is a list of output types and features that the
* application wants this AnalysisEngine to produce. If you are going to use the same
* {@link ResultSpecification} for multiple calls to <code>process</code>, it is not
* recommended to use this method. Instead call
@@ -373,7 +376,7 @@ public interface AnalysisEngine extends
* {@link JCas} interface instead of the general {@link CAS} interface.
* <p>
* This version of the <code>process</code> method takes a {@link ResultSpecification} as an
- * argument. The <code>ResultSpecification</code> is alist of output types and features that the
+ * argument. The <code>ResultSpecification</code> is a list of output types and features that the
* application wants this AnalysisEngine to produce. If you are going to use the same
* {@link ResultSpecification} for multiple calls to <code>process</code>, it is not
* recommended to use this method. Instead call
@@ -403,7 +406,7 @@ public interface AnalysisEngine extends
* Java-object-based {@link JCas} interface instead of the general {@link CAS} interface.
* <p>
* This version of the <code>process</code> method takes a {@link ResultSpecification} as an
- * argument. The <code>ResultSpecification</code> is alist of output types and features that the
+ * argument. The <code>ResultSpecification</code> is a list of output types and features that the
* application wants this AnalysisEngine to produce. If you are going to use the same
* {@link ResultSpecification} for multiple calls to <code>process</code>, it is not
* recommended to use this method. Instead call
Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/analysis_engine/impl/AggregateAnalysisEngine_impl.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/analysis_engine/impl/AggregateAnalysisEngine_impl.java?rev=1526623&r1=1526622&r2=1526623&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/analysis_engine/impl/AggregateAnalysisEngine_impl.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/analysis_engine/impl/AggregateAnalysisEngine_impl.java Thu Sep 26 17:43:34 2013
@@ -398,7 +398,7 @@ public class AggregateAnalysisEngine_imp
throws ResourceInitializationException {
// add this analysis engine's name to the parameters sent to the ASB
Map<String, Object> asbParams = new HashMap<String, Object>(aAdditionalParams);
- asbParams.put(ASB.PARAM_AGGREGATE_ANALYSIS_ENGINE_NAME, this.getMetaData().getName());
+ asbParams.put(ASB.PARAM_AGGREGATE_ANALYSIS_ENGINE_NAME, this.getMetaData().getName()); // not used 9/2013 scan
asbParams.put(Resource.PARAM_RESOURCE_MANAGER, getResourceManager());
// Pass sofa mappings defined in this aggregate as additional ASB parameters
Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/Resource.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/Resource.java?rev=1526623&r1=1526622&r2=1526623&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/Resource.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/Resource.java Thu Sep 26 17:43:34 2013
@@ -179,8 +179,8 @@ public interface Resource {
// * This value is used as a key in the <code>additionalParams</code> Map that
// * is passed to the {@link #initialize(ResourceSpecifier,Map)} method.
// */
- /** Reserved for future use. */
- public static final String PARAM_AGGREGATE_SOFA_MAPPINGS = "AGGREGATE_SOFA_MAPPINGS";
+ /** Used to pass the sofa mappings to the ASB */
+ public static final String PARAM_AGGREGATE_SOFA_MAPPINGS = "AGGREGATE_SOFA_MAPPINGS"; // internal use only
/**
* Key to specify a pre-existing