I would like to revive the discussion that started with
http://www.mail-archive.com/uima-dev@incubator.apache.org/msg01299.html
Let me recap the current status of the proposal. The purpose is
for UIMA users/annotators to be able to access specific FSs by some
identifier. This can already be done "manually" with the tools available
in the CAS, but it is cumbersome and not standardized. There are users
who positively need this capability for 2.2, and I'm wondering how to
best provide it to them. The best solution for me of course would be if
I could build it into the core.
Technically, the proposal consists of a new built-in type and new built-in
index as follows.
- a type uima.cas.FsVariable that inherits from uima.cas.TOP with features
name:String, type:String and value:TOP.
- a built-in set index over FsVariable, sorted by the name feature.
The APIs to define and access these critters would look as follows.
// Declare a new global variable/singleton FS
declareFsVariable(String name, Type type)
// Check if a variable of that name exists
isFsVariable(String name):boolean
// Get the value of variable
getFsVariableType(String name):Type
// Get all variables of a given type
listFsVariables(Type type):List
There are several ways I can implement this.
1. Make the necessary type and index built-in to UIMA.
a) Define the APIs directly on the CAS.
b) Define the APIs external to the CAS, having to pass the CAS as
additional argument.
2. Provide type and index definition XML for users to include in their
descriptors and an external library that implements the APIs. This
could go in the sandbox.
Obviously, I think that 1a is the way to go. As I have to do something
in the 2.2 time frame, I would appreciate your input within the next few
days.
--Thilo