Opened 16 years ago
Closed 16 years ago
#642 closed enhancement (fixed)
Add method that finds an enumerated annotation value that can ignore case and whitespace
Reported by: | Nicklas Nordborg | Owned by: | Nicklas Nordborg |
---|---|---|---|
Priority: | trivial | Milestone: | BASE 2.4 |
Component: | core | Version: | |
Keywords: | Cc: |
Description
Dominic Oyeniran wrote:
Having an annotation type cell type with allowed values: b cell, barrier epithelial cell etc.
On setting annotation -B cell, obtained from an import file, for cell type using this code:
annotatable.getAnnotationSet().getAnnotation(AnnotationType?).setValue(value);
I get an InvalidDataException?. I found out that this is because of the mismatch between B cell and b cell. once I changed either of them, it works fine.
Can an ignorecase equality be done in the base 2 code that does the setting of annotation values. May be a trim would also be reasonable.
It might be possible but I am a bit worried that it may break existing data. What I can do is to add a utility method in AnnotationType?. Something like this:
AnnotationType?.findValue(String value, boolean ignoreCase, boolean trim);
The method would return the string that is stored as one of the allowed values if it finds a match or null if it can't find a value.
Change History (4)
comment:1 Changed 16 years ago by
Component: | web → core |
---|---|
Milestone: | → BASE 2.4 |
comment:2 Changed 16 years ago by
Priority: | major → trivial |
---|
comment:3 Changed 16 years ago by
Owner: | changed from everyone to Nicklas Nordborg |
---|---|
Status: | new → assigned |
comment:4 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [3527]) Fixes #642: Add method that finds an enumerated annotation value that can ignore case and whitespace