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 2016/01/04 15:07:23 UTC

svn commit: r1722874 - /uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeSystemImpl.java

Author: schor
Date: Mon Jan  4 14:07:23 2016
New Revision: 1722874

URL: http://svn.apache.org/viewvc?rev=1722874&view=rev
Log:
[UIMA-4673] add refresh type and feature to assist users who build type system programmatically who then need to refresh a type after commit in case the type system consolidation was able to reuse existing type and feature objects.

Modified:
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeSystemImpl.java

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeSystemImpl.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeSystemImpl.java?rev=1722874&r1=1722873&r2=1722874&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeSystemImpl.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeSystemImpl.java Mon Jan  4 14:07:23 2016
@@ -2422,5 +2422,15 @@ public class TypeSystemImpl implements T
 //    Type
 //  }
   
+  // Methods to assist users who build type systems programatically and have
+  // variables referring to Types and Features to update these after a commit
+  //   (in case the commit consolidated type systems).
+  public TypeImpl refreshType(Type t) {
+    return getType(t.getName());
+  }
+  
+  public FeatureImpl refreshFeature(Feature f) {
+    return getFeatureByFullName(f.getName());
+  }
   
 }