Author: schor
Date: Mon Aug 29 18:55:03 2016
New Revision: 1758289

URL: http://svn.apache.org/viewvc?rev=1758289&view=rev
Log:
[UIMA-5043] merge catchup pass 2

Modified:
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/   (props changed)
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/   (props 
changed)
    
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/UimaContext.java
    
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/impl/UimaContext_ImplBase.java
    
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/org/apache/uima/analysis_engine/impl/TestAnnotator2.java

Propchange: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Aug 29 18:55:03 2016
@@ -4,4 +4,4 @@
 /uima/uimaj/branches/depend-on-parent-pom-4/uimaj-core:961329-961745
 /uima/uimaj/branches/filteredCompress-uima-2498/uimaj-core:1436573-1462257
 /uima/uimaj/branches/mavenAlign/uimaj-core:933273-944396
-/uima/uimaj/trunk/uimaj-core:1690273-1693269,1757287-1757385
+/uima/uimaj/trunk/uimaj-core:1690273-1693269,1757287-1757385,1757523

Propchange: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Aug 29 18:55:03 2016
@@ -5,4 +5,4 @@
 
/uima/uimaj/branches/filteredCompress-uima-2498/uimaj-core/src/main/java:1436573-1462257
 /uima/uimaj/branches/mavenAlign/uimaj-core/src/main/java:933273-944396
 /uima/uimaj/branches/test-parent-pom-6/uimaj-core/src/main/java:1024030
-/uima/uimaj/trunk/uimaj-core/src/main/java:1690273-1693269,1757287-1757385
+/uima/uimaj/trunk/uimaj-core/src/main/java:1690273-1693269,1757287-1757385,1757523

Modified: 
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/UimaContext.java
URL: 
http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/UimaContext.java?rev=1758289&r1=1758288&r2=1758289&view=diff
==============================================================================
--- 
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/UimaContext.java
 (original)
+++ 
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/UimaContext.java
 Mon Aug 29 18:55:03 2016
@@ -118,31 +118,31 @@ public interface UimaContext {
   public String[] getConfigParameterNames();
 
   /**
-   * Get the value of an external override setting.
+   * Get the value of a shared configuration parameter from the external 
override settings.
    * 
    * @param name - the name of the parameter
-   * @return     - the value found in the settings file(s), or null if missing.
+   * @return     - the value found in the shared settings file(s), or null if 
missing.
    * @throws ResourceConfigurationException 
-   *                 if the value references an undefined property, or the 
value is an array
+   *                 if the value references an undefined parameter, or the 
value is an array
    */
-  public String getSetting(String name) throws ResourceConfigurationException;
+  public String getSharedSettingValue(String name) throws 
ResourceConfigurationException;
   
   /**
-  * Get the array of values for an external override setting.
+  * Get the array of values for a shared configuration parameter from the 
external override settings.
   * 
   * @param name  - the name of the parameter
-  * @return      - an array of values found in the settings file(s), or null 
if missing.
+  * @return      - an array of values found in the shared settings file(s), or 
null if missing.
   * @throws ResourceConfigurationException 
-  *                  if the value references an undefined property, or the 
value is not an array
+  *                  if the value references an undefined parameter, or the 
value is not an array
   */
-  public String[] getSettingArray(String name) throws 
ResourceConfigurationException;
+  public String[] getSharedSettingArray(String name) throws 
ResourceConfigurationException;
   
   /**
-   * Return a set containing the names of all the external override settings 
available
+   * Get the names of all the external override settings available.
    * 
-   * @return - set of strings
+   * @return - an array containing the names of all the external override 
settings.
    */
-  public Set<String> getSettingNames();
+  public String[] getSharedSettingNames();
   
   /**
    * Gets the <code>Settings</code> used for external parameter overrides

Modified: 
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/impl/UimaContext_ImplBase.java
URL: 
http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/impl/UimaContext_ImplBase.java?rev=1758289&r1=1758288&r2=1758289&view=diff
==============================================================================
--- 
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/impl/UimaContext_ImplBase.java
 (original)
+++ 
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/impl/UimaContext_ImplBase.java
 Mon Aug 29 18:55:03 2016
@@ -278,21 +278,25 @@ public abstract class UimaContext_ImplBa
   }
 
   @Override
-  public String getSetting(String name) throws ResourceConfigurationException {
+  public String getSharedSettingValue(String name) throws 
ResourceConfigurationException {
     Settings settings = getRootContext().getExternalOverrides();
     return (settings == null) ? null : settings.getSetting(name);
   }
   
   @Override
-  public String[] getSettingArray(String name) throws 
ResourceConfigurationException {
+  public String[] getSharedSettingArray(String name) throws 
ResourceConfigurationException {
     Settings settings = getRootContext().getExternalOverrides();
     return (settings == null) ? null : settings.getSettingArray(name);
   }
   
   @Override
-  public Set<String> getSettingNames() {
+  public String[] getSharedSettingNames() {
     Settings settings = getRootContext().getExternalOverrides();
-    return (settings == null) ? null : settings.getKeys();
+    if (settings == null) {
+      return null;
+    }
+    Set<String> names = settings.getKeys();
+    return names.toArray(new String[names.size()]);
   }
   
   /**

Modified: 
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/org/apache/uima/analysis_engine/impl/TestAnnotator2.java
URL: 
http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/org/apache/uima/analysis_engine/impl/TestAnnotator2.java?rev=1758289&r1=1758288&r2=1758289&view=diff
==============================================================================
--- 
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/org/apache/uima/analysis_engine/impl/TestAnnotator2.java
 (original)
+++ 
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/org/apache/uima/analysis_engine/impl/TestAnnotator2.java
 Mon Aug 29 18:55:03 2016
@@ -79,7 +79,7 @@ public class TestAnnotator2 extends CasA
       String expected = "Context Holder Test";
       String[] actuals = null;
       try {
-        actuals = 
UimaContextHolder.getContext().getSettingArray("test.externalFloatArray");
+        actuals = 
UimaContextHolder.getContext().getSharedSettingArray("test.externalFloatArray");
       } catch (ResourceConfigurationException e) {
         Assert.fail(e.getMessage());
       }
@@ -89,7 +89,7 @@ public class TestAnnotator2 extends CasA
       // suffix = should be ignored
       String actual = null;
       try {
-        actual = UimaContextHolder.getContext().getSetting("context-holder");
+        actual = 
UimaContextHolder.getContext().getSharedSettingValue("context-holder");
       } catch (ResourceConfigurationException e) {
         Assert.fail(e.getMessage());
       }
@@ -97,13 +97,13 @@ public class TestAnnotator2 extends CasA
       
       // Test assigning an array to a string and vice-versa
       try {
-        actual = 
UimaContextHolder.getContext().getSetting("test.externalFloatArray");
+        actual = 
UimaContextHolder.getContext().getSharedSettingValue("test.externalFloatArray");
         Assert.fail("\"bad\" should create an error");
       } catch (ResourceConfigurationException e) {
         System.err.println("Expected exception: " + e.toString());
       }
       try {
-        actuals = 
UimaContextHolder.getContext().getSettingArray("prefix-suffix");
+        actuals = 
UimaContextHolder.getContext().getSharedSettingArray("prefix-suffix");
         Assert.fail("\"bad\" should create an error");
       } catch (ResourceConfigurationException e) {
         System.err.println("Expected exception: " + e.toString());


Reply via email to