Changes between Initial Version and Version 1 of Ticket #759, comment 48


Ignore:
Timestamp:
Apr 9, 2015, 2:56:35 PM (10 years ago)
Author:
olle

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #759, comment 48

    initial v1  
    22
    33 1. Data access object class/file `Annotationtype.java` in `src/net/sf/basedb/meludi/dao/` updated:[[BR]]a. New annotation type `SOURCE_ITEM_NAMES_LIST_STRING` of type  `Type.TEXT` added for bioplates.[[BR]]b. New public methods `List<?> getAnnotationValues(DbControl dc, Annotatable item, Boolean fromListString)` and `List<?> getAnnotationValues(DbControl dc, Annotatable item, Boolean fromListString, Boolean trim)` added. They return the same list as existing method `List<?> getAnnotationValues(DbControl dc, Annotatable item)` if Boolean flag `fromListString` is `null` or `false`, otherwise the data is expected to be stored as a comma-separated list string, which is converted to a list of string values, with optional trimming of leading and trailing white space.[[BR]]c. Public method `void setAnnotationValues(DbControl dc, Annotatable item, List<?> values)` updated if the annotation has multiplicity equal to 1, to stored the list as a comma-separated list string.
    4  2. Data access object class/file `MeludiItem.java` in `src/net/sf/basedb/meludi/dao/` updated:[[BR]]a. New public methods `void loadAnnotations(DbControl dc, String jsonKey, Annotationtype annotationType, ValueConverter converter, Boolean fromListString)` and `void loadAnnotations(DbControl dc, String jsonKey, Annotationtype annotationType, ValueConverter converter, Boolean fromListString, Boolean trim)` added. They load annotations for the given annotation type and store the values in the given JSON key. The functionality is identical to existing method `void loadAnnotations(DbControl dc, String jsonKey, Annotationtype annotationType, ValueConverter converter, Boolean fromListString)` if Boolean flag `fromListString` is `null` or `false`, otherwise the data is expected to be stored as a comma-separated list string, which is converted to a list of string values, with optional trimming of leading and trailing white space.
     4 2. Data access object class/file `MeludiItem.java` in `src/net/sf/basedb/meludi/dao/` updated:[[BR]]a. New public methods `void loadAnnotations(DbControl dc, String jsonKey, Annotationtype annotationType, ValueConverter converter, Boolean fromListString)` and `void loadAnnotations(DbControl dc, String jsonKey, Annotationtype annotationType, ValueConverter converter, Boolean fromListString, Boolean trim)` added. They load annotations for the given annotation type and store the values in the given JSON key. The functionality is identical to existing method `void loadAnnotations(DbControl dc, String jsonKey, Annotationtype annotationType, ValueConverter converter)` if Boolean flag `fromListString` is `null` or `false`, otherwise the data is expected to be stored as a comma-separated list string, which is converted to a list of string values, with optional trimming of leading and trailing white space.
    55 3. Java servlet class/file `InstallServlet.java` in `src/net/sf/basedb/meludi/servlet/` updated in protected method `void doGet(HttpServletRequest req, HttpServletResponse resp)` to include annotations of new text annotation type `Annotationtype.SOURCE_ITEM_NAMES_LIST_STRING` for bioplate items.
    66 4. Java servlet class/file `ExtractionServlet.java` in `src/net/sf/basedb/meludi/servlet/` updated:[[BR]]a. Protected method `void doGet(HttpServletRequest req, HttpServletResponse resp)` updated for commands "`GetStartPlates`" and "`GetUnprocessedStartPlates`" by calling method `loadAnnotations(DbControl dc, String jsonKey, Annotationtype annotationType, ValueConverter converter, Boolean fromListString, Boolean trim)` for a start plate to retrieve `Annotationtype.SOURCE_ITEM_NAMES_LIST_STRING` annotations as a string list, where Boolean flags `fromListString` and `trim` are set to `true`.[[BR]]b. Protected method `void doGet(HttpServletRequest req, HttpServletResponse resp)` updated for command "`GetSourceItemListFromStartPlate`" to call new  `Annotationtype` method `List<?> getAnnotationValues(DbControl dc, Annotatable item, Boolean fromListString, Boolean trim)` for a start plate to retrieve `Annotationtype.SOURCE_ITEM_NAMES_LIST_STRING` annotations as a string list, where Boolean flags `fromListString` and `trim` are set to `true`.[[BR]]c. Protected method `void doPost(HttpServletRequest req, HttpServletResponse resp)` updated for command "`RegisterStartPlate`" to call `Annotationtype` method `void setAnnotationValues(DbControl dc, Annotatable item, List<?> values)` for `Annotationtype.SOURCE_ITEM_NAMES_LIST_STRING` annotations to store an extract source item name list for a start plate.