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 2015/11/01 15:36:51 UTC

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

Author: schor
Date: Sun Nov  1 14:36:50 2015
New Revision: 1711778

URL: http://svn.apache.org/viewvc?rev=1711778&view=rev
Log:
[UIMA-4662] v3 update

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

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/package.html
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/package.html?rev=1711778&r1=1711777&r2=1711778&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/package.html (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/package.html Sun Nov  1 14:36:50 2015
@@ -28,19 +28,41 @@
   </head>
 
   <body>
-<p>Implementation and Low-Level API for the CAS Interfaces.</p>
-<p>Internal APIs. Use these APIs at your own risk. APIs in this package are subject to change without notice, even in minor releases. Use of this package is not supported. If you think you have found a bug in this package, please try to reproduce it with the officially supported APIs before reporting it.</p>
+<h1>Implementation and Low-Level API for the CAS Interfaces.</h1>
+<p>These are Internal APIs. Use these APIs at your own risk. APIs in this package are subject to change without notice, even in minor releases. Use of this package is not supported. If you think you have found a bug in this package, please try to reproduce it with the officially supported APIs before reporting it.</p>
 <hr />
 <h1>Internals documentation</h1>
 <p>NOTE: This documentation is plain HTML, generated from a WYSIWIG editor "tinymce".&nbsp;&nbsp; The way to work on this:&nbsp; after setting up a small web page with the tinymce (running from a local file), use the Tools - source code to cut/paste between this file's source and that editor.</p>
-<h2>Java Cover Objects</h2>
-<p>It is possible to run UIMA without creating Java cover objects for FSs.&nbsp; However, for convenience, many of the APIs return Java objects that provide, in turn, various APIs for accessing features, updating in indexes, etc.</p>
-<p>There are two kinds of Java cover objects:</p>
-<ul>
-<li>Basic - this provides a generic API that works for all FSs.</li>
-<li>JCas - this provides a custom Java Class for a type that gives get/set style accessors for the Features.</li>
+<h2>Java Cover Objects for version 3</h2>
+<p>The Java Cover Objects are no longer cover objects; instead, instances&nbsp;are&nbsp;the Feature Structures for a particular UIMA type of the same name (generally - some built-ins have some name mapping done for the package name).</p>
+<p>There is one definition of these objects per UIMA Type System. &nbsp;Support for PEARs having a different "customization" of JCas class is not supported in v3.</p>
+<ul>
+<li>This loss of capability is mitigated by the addition of more kinds of Java types as built-in values.</li>
+<li>The reason for this not being supported is that there's no solution figured out for sharing types between the outer and PEAR pipelines, without encountering class-cast exceptions.</li>
+<li>The PEAR can still define customizations for types only it defines (that is, not used by the outer pipeline).</li>
+</ul>
+<p>Much of the infrastructure is kept as-is in version 3 to support backwards compatibility.</p>
+<h3>Format of a JCas class version 3</h3>
+<p>The _Type is not used. &nbsp;May revisit this if users are using the low-level access made possible by _Type.</p>
+<p>There is one definition of the class per type system. &nbsp;Type systems are often shared among multiple CASes. &nbsp;Each definition is loaded under a specific loader for that type system. &nbsp;The loader is set up to delegate to the parent for all classes except the JCas types, and for those, it generates them using ASM byte code generation from the fully merged TypeSystem information and existing "customizations".</p>
+<p>Each feature is represented by the corresponding native Java type. &nbsp;Arrays are represented by Java Arrays. &nbsp;Getters and Setters are provided as before. &nbsp;Constructors are provided as before.</p>
+<p>Extra fields in the Feature Structure include both instance and class fields:</p>
+<ul>
+<li>(class) a reference to the TypeImpl for this class - initialized by a reference to a TypeSystemImpl thread local value, at load time.</li>
+<li>(class) a reference to all of the FeatureImpls, as an array, indexed by the feature offset value</li>
+<li>(instance) a reference to the CAS View used when this feature structure was created</li>
+</ul>
+<p>Extra methods in the FeatureStructure</p>
+<ul>
+<li>a set of generic getters and setters, one per incompatible value type.
+<ul>
+<li>All references to non-primitive FeatureStructures values are collapsed into a single TOP ref.</li>
+<li>These are used for generic access, including serialization/deserialization</li>
+<li>more: see <a href="../../../../../../../../../uimaj-tools/src/main/java/org/apache/uima/tools/jcasgen/package.html">
+package.html for uimaj-tools jcasgen</a> (link only works if all sources checked out)</li>
+</ul>
+</li>
 </ul>
-<p>Both of these inherit from the <code>FeatureStructure</code> Interface.&nbsp; Use of the JCas is optional; if the JCas cover classes are available (in the class path), they are used.&nbsp; </p>
 <h2>UIMA Indexes</h2>
 <p>Indexes are defined for a pipeline, and are kept as part of the general CAS definition.</p>
 <p>Each CAS View has its own instantiation of the defined indexes (there's one definition for all views), and as a result, a particular FS may be added-to-indexes and indexed in some views, and not in others.</p>
@@ -135,8 +157,5 @@
 <ul>
 <li><strong>FSIterator</strong> - extends the standard Java interface: hasNext, next, remove, with isValid, get, moveToNext/Previous/First/Last, moveTo(fs), copy.</li>
 </ul>
-<p>&nbsp;</p>
-<p>&nbsp;</p>
-<p>&nbsp;</p>
   </body>
 </html>