Reorganization of TypeSystemImpl, CASImpl, FSClassRegistry, adding new
CASMetadata class
----------------------------------------------------------------------------------------
Key: UIMA-409
URL: https://issues.apache.org/jira/browse/UIMA-409
Project: UIMA
Issue Type: Improvement
Components: Core Java Framework
Affects Versions: 2.1
Reporter: Marshall Schor
Assigned To: Marshall Schor
Priority: Minor
Fix For: 2.2
Prepatory to work on supporing multiple classloaders, this change reorganizes
several classes as follows:
1) following a suggestion by Thilo, added the CASMetadata class: holds "final"
refs to a TypeSystemImpl instance, and a FSClassRegistry instance; also holds
structures derived from these used by the CASImpl in doing its work. There is
now just one instance of FSClassRegistry per instance of CASMetadata, and one
instance of CASMetadata per instance of TypeSystemImpl.
2) TypeSystemImpl had a set of package-private variables holding instances of
some built-in Types and TypeCodes. So did CASImpl. These are now consolidated
into one spot - the TypeSystemImpl.
3) Creation of a new TypeSystemImpl object loads it with the UIMA Built-in
types.
4) The CASImpl class has a new inner class called SharedViewData; all CASImpl
fields which are shared by all views are stored here. The only things not in
this inner class are things related to the index repository, the mySofaRef, and
the JCasImpl ref corresponding to this Cas View. The shared view data replaces
a previous strategy of copying things for each view.
5) The JCas now shares all generated JCas cover objects among all views. The
cover object has a particular view instance, which is updated, as follows:
"new": the view used to create it; De-reference: the view associated with the
referring object; Iteration: the view containing the index being iterated over.
6) Following a suggestion by Adam, changed the generators to ignore what's in
the JCas _Type objects, and instead use a standard generator.
7) Several issues around Sofas and Views were cleared up - these were potential
bugs that could happen if users used old APIs in unusual ways.
8) JCas class loading is changed to load once per "class loader", and share
these across all "views". However, there are still individual _Type objects
per view, per the discussion in the uima-dev list.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.