Changes between Version 1 and Version 2 of Ticket #525, comment 38


Ignore:
Timestamp:
Apr 21, 2016, 4:13:03 PM (8 years ago)
Author:
olle

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #525, comment 38

    v1 v2  
    44 * The new `AnnotationBatcher` cannot be used in the same session as standard database requests for the same item. Since values of a number of case annotations like laterality etc. are needed in the test part preceding the import part, a new `DbControl` item has to be created for use in the import part.
    55
    6  1. Java servlet class/file `IncaServlet.java` in `src/net/sf/basedb/reggie/servlet/` updated in protected method `void doPost(HttpServletRequest req, HttpServletResponse resp)` for command "`ImportInca`":[[BR]]a. A list of database ID values for INCA annotation types is stored after the database query.[[BR]]b. Before the import step, `dc.commit()` is called for the `DbControl` item used in the input file test steps, after which a new `DbControl` item is created for use with the `AnnotationBatcher batcher` item. INCA annotation type lists and hash maps, that are to be used in the import step, are re-created using annotation type items created from the stored ID list using the new `DbControl` item. The INCA annotation types plus the INCA export and import date annotation types are added to the `batcher`.[[BR]]c. For each case mapped to the INCA import, `batcher` is set to use the current case item, then loaded with the INCA annotations to be updated (using the `setValue()` method), after which the INCA export and import date annotation are loaded. A single command `dc.commit()` is then called.
     6 1. Java servlet class/file `IncaServlet.java` in `src/net/sf/basedb/reggie/servlet/` updated in protected method `void doPost(HttpServletRequest req, HttpServletResponse resp)` for command "`ImportInca`":[[BR]]a. A list of database ID values for INCA annotation types is stored after the database query.[[BR]]b. Before the import step, `dc.commit()` is called for the `DbControl` item used in the input file test steps, after which a new `DbControl` item is created for use with the `AnnotationBatcher batcher` item. INCA annotation type lists and hash maps, that are to be used in the import step, are re-created using annotation type items created from the stored ID list using the new `DbControl` item. The INCA annotation types plus the INCA export and import date annotation types are added to the `batcher`.[[BR]]c. For each case mapped to the INCA import, `batcher` is set to use the current case item, then loaded with the INCA annotations to be updated (using the `setValue()` method), after which the INCA export and import date annotation are loaded.[[BR]]d. A single command `dc.commit()` is then called.
    77 2. Java servlet class/file `IncaServlet.java` in `src/net/sf/basedb/reggie/servlet/` updated by removing private methods `Object fetchAnnotationValue(AnnotationType at, AnnotationSet as)` and `Object fetchAnnotationValue(DbControl dc, AnnotationType at, AnnotationSet as, HashMap<Integer,AnnotationTypeFilter> atIdSnapshotFilterHM, SnapshotManager manager, Annotatable item)`, as they are no longer used.