Re: Global FS variables, another suggestion

2007-01-11 Thread Jörn Kottmann
Having not heard a user request for global variables, I'm a little fuzzy on the use case. Imagine an Annotator which is a spam filter, it has to put a tag to the CAS which say spam or no_spam. The document language is also an example for a global variable.

Re: Global FS variables, another suggestion

2007-01-11 Thread Adam Lally
On 1/11/07, Eddie Epstein <[EMAIL PROTECTED]> wrote: Having not heard a user request for global variables, I'm a little fuzzy on the use case. I think one use case is the "singleton" use case. You could define a "global variable" called myapp.documentMetadata and set its value to an instance o

Re: Global FS variables, another suggestion

2007-01-11 Thread Thilo Goetz
Eddie Epstein wrote: Having not heard a user request for global variables, I'm a little fuzzy on the use case. It usually goes by the name of "singletons", I'm sure you've heard that one. > However, if I understand correctly what is suggested is a combination of: 1. a new built in type with

Re: Global FS variables, another suggestion

2007-01-11 Thread Thilo Goetz
Adam Lally wrote: On 1/11/07, Michael Baessler <[EMAIL PROTECTED]> wrote: Thilo Goetz wrote: > CAS.declareFsVariable(String name, Type type) > CAS.isFsVariable(String name):boolean > CAS.getFsVariableType(String name):Type I would like to have an additional method like CAS.getFsVariableForType(

Re: Global FS variables, another suggestion

2007-01-11 Thread Eddie Epstein
Having not heard a user request for global variables, I'm a little fuzzy on the use case. However, if I understand correctly what is suggested is a combination of: 1. a new built in type with two features. 2. a slight variation on the set index, where instead of silently ignoring a "duplicate" FS

Re: Global FS variables, another suggestion

2007-01-11 Thread Adam Lally
On 1/11/07, Michael Baessler <[EMAIL PROTECTED]> wrote: Thilo Goetz wrote: > CAS.declareFsVariable(String name, Type type) > CAS.isFsVariable(String name):boolean > CAS.getFsVariableType(String name):Type I would like to have an additional method like CAS.getFsVariableForType(Type type):FS so t

Re: Global FS variables, another suggestion

2007-01-11 Thread Jörn Kottmann
Jörn, I'm not sure I understand what you mean. The types need to be declared in the the type system. Adam thinks that declaring variables in the descriptor is not worth the effort, and I don't know that I disagree with him. Declaring the variables in the descriptor would have the one ben

Re: Global FS variables, another suggestion

2007-01-11 Thread Thilo Goetz
Michael Baessler wrote: Thilo Goetz wrote: CAS.declareFsVariable(String name, Type type) CAS.isFsVariable(String name):boolean CAS.getFsVariableType(String name):Type I would like to have an additional method like CAS.getFsVariableForType(Type type):FS so that an analysis component do not hav

Re: Global FS variables, another suggestion

2007-01-11 Thread Thilo Goetz
Jörn Kottmann wrote: Please let me know if you think this is a good idea, and if so, if you're in favor of the dynamically typed or the pseudo-statically typed version. Can you explain what is the reason to not declare the type inside the type system ? Thanks, Jörn Jörn, I'm not sure I un

Re: Global FS variables, another suggestion

2007-01-11 Thread Jörn Kottmann
Please let me know if you think this is a good idea, and if so, if you're in favor of the dynamically typed or the pseudo-statically typed version. Can you explain what is the reason to not declare the type inside the type system ? Thanks, Jörn

Re: Global FS variables, another suggestion

2007-01-11 Thread Michael Baessler
Thilo Goetz wrote: CAS.declareFsVariable(String name, Type type) CAS.isFsVariable(String name):boolean CAS.getFsVariableType(String name):Type I would like to have an additional method like CAS.getFsVariableForType(Type type):FS so that an analysis component do not have to know the variable na

Global FS variables, another suggestion

2007-01-11 Thread Thilo Goetz
I have another suggestion that I believe - is user friendly, - is fully backward compatible, - does not involve changes to our descriptors, - is not too kludgy, - and only conservatively extends the API. I hope I have your attention ;-) I suggest we introduce a new built-in type and new built-i