sudeep87 / uimafit

Automatically exported from code.google.com/p/uimafit
0 stars 0 forks source link

@ExternalResource - key should default to name of annotated field instead of the field type name #71

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
While analyzing some comments on uimaFIT recently on the UIMA users mailing 
list, it occurred to me that the default value for "key" should probably be the 
name of the annotated field, not the name of the type of the annotated field. 
That means

  public static final String FOO_KEY = "foo";
  @ExternalResource(key = FOO_KEY)
  private Foo foo;

could be written as simply

  @ExternalResource
  private Foo foo;

However, this would mean that 

  bindResource(desc, DummyResource.class);

wouldn't work anymore, because this kind of binding relies on the fact that the 
key defaults to the field type name. I think though, that this is a rather rare 
case.

Btw. the UIMA mailing list post is: 
http://mail-archives.apache.org/mod_mbox/uima-user/201103.mbox/%3cloom.20110321T
183824-248@post.gmane.org%3e

Original issue reported on code.google.com by richard.eckart on 25 Mar 2011 at 10:22

GoogleCodeExporter commented 8 years ago

Original comment by richard.eckart on 11 Apr 2011 at 5:01

GoogleCodeExporter commented 8 years ago

Original comment by richard.eckart on 17 Apr 2011 at 1:40

GoogleCodeExporter commented 8 years ago

Original comment by richard.eckart on 7 Jan 2013 at 4:51

GoogleCodeExporter commented 8 years ago
Issue at ASF: https://issues.apache.org/jira/browse/UIMA-2586

Original comment by richard.eckart on 18 Jan 2013 at 5:44

GoogleCodeExporter commented 8 years ago
UIMA-2586 is fixed.

Original comment by richard.eckart on 30 Mar 2013 at 3:57