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 2017/10/01 20:23:10 UTC
svn commit: r1810277 - in
/uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas:
admin/TypeSystemMgr.java impl/TypeSystemImpl.java
Author: schor
Date: Sun Oct 1 20:23:09 2017
New Revision: 1810277
URL: http://svn.apache.org/viewvc?rev=1810277&view=rev
Log:
no Jira, add commit(classloader) to TypeSystemMgr, with documentation
Modified:
uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/admin/TypeSystemMgr.java
uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeSystemImpl.java
Modified: uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/admin/TypeSystemMgr.java
URL: http://svn.apache.org/viewvc/uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/admin/TypeSystemMgr.java?rev=1810277&r1=1810276&r2=1810277&view=diff
==============================================================================
--- uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/admin/TypeSystemMgr.java (original)
+++ uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/admin/TypeSystemMgr.java Sun Oct 1 20:23:09 2017
@@ -117,15 +117,40 @@ public interface TypeSystemMgr extends T
boolean multipleReferencesAllowed) throws CASAdminException;
/**
- * Commit the type system. The type system will be locked and no longer writable. WARNING: Users
+ * Commit the type system, and load JCas Classes from the UIMA Framework's classloader.
+ * The type system will be locked and no longer writable.
+ *
+ * WARNING: Users
* should not call this, but instead call ((CASImpl) theAssociatedCAS).commitTypeSystem() in order
* to set up the parts of the CAS that should be set up when the type system is committed.
*
+ * WARNING: This API will use the UIMA Framework's class loader to find a load JCas classes.
+ * If you have JCas classes under some other class loader you wish to use (perhaps you are
+ * setting a ResourceManager's extension classpath, which creates a class loader), use the
+ * commit which takes a class loader as an argument, and pass in the class loader where the
+ * JCas classes are.
+ *
* @return the committed type system. Note that this may be the same object as "this" or a
* different (but equal) object. Type systems are cached and recreating the exact same type system
* repeatedly will return the original one.
*/
TypeSystem commit();
+
+ /**
+ * Commit the type system, and load JCas classes from the passed in classloader.
+ * The type system will be locked and no longer writable.
+ *
+ * WARNING: Users
+ * should not call this, but instead call ((CASImpl) theAssociatedCAS).commitTypeSystem() in order
+ * to set up the parts of the CAS that should be set up when the type system is committed.
+ *
+ * @param cl the JCas class loader
+ *
+ * @return the committed type system. Note that this may be the same object as "this" or a
+ * different (but equal) object. Type systems are cached and recreating the exact same type system
+ * repeatedly will return the original one.
+ */
+ TypeSystem commit(ClassLoader cl);
/**
* Check if this instance has been committed.
Modified: uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeSystemImpl.java
URL: http://svn.apache.org/viewvc/uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeSystemImpl.java?rev=1810277&r1=1810276&r2=1810277&view=diff
==============================================================================
--- uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeSystemImpl.java (original)
+++ uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeSystemImpl.java Sun Oct 1 20:23:09 2017
@@ -1313,6 +1313,10 @@ public class TypeSystemImpl implements T
return commit(this.getClass().getClassLoader()); // default if not called with a CAS context
}
+ /**
+ * @see org.apache.uima.cas.admin.TypeSystemMgr#commit(ClassLoader)
+ */
+ @Override
public TypeSystemImpl commit(ClassLoader cl) {
synchronized(this) {
if (this.locked) {