Changeset 5977 for extensions/net.sf.basedb.relax/trunk/src
- Timestamp:
- Jun 24, 2020, 8:46:34 AM (3 years ago)
- Location:
- extensions/net.sf.basedb.relax/trunk/src/net/sf/basedb/relax
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.relax/trunk/src/net/sf/basedb/relax/servlet/InstallServlet.java
r5874 r5977 43 43 import net.sf.basedb.core.SessionControl; 44 44 import net.sf.basedb.core.SharedItem; 45 import net.sf.basedb.core.SimpleProgressReporter;46 45 import net.sf.basedb.core.SystemItems; 47 46 import net.sf.basedb.core.Type; … … 56 55 import net.sf.basedb.relax.dao.Rawdatatype; 57 56 import net.sf.basedb.relax.dao.Subtype; 58 import net.sf.basedb.relax.fixit.AddLysateFix;59 57 import net.sf.basedb.util.error.ThrowableUtil; 60 58 import net.sf.basedb.util.uri.ConnectionManager; … … 126 124 jsonChecks.add(checkSubtype(dc, Subtype.BLOOD, createIfMissing)); 127 125 jsonChecks.add(checkSubtype(dc, Subtype.BLOOD_DNA, createIfMissing)); 128 JSONObject jsonLysate = checkSubtype(dc, Subtype.LYSATE, createIfMissing); 129 jsonChecks.add(jsonLysate); 126 jsonChecks.add(checkSubtype(dc, Subtype.LYSATE, createIfMissing)); 130 127 jsonChecks.add(checkSubtype(dc, Subtype.RNA, createIfMissing)); 131 128 jsonChecks.add(checkSubtype(dc, Subtype.DNA, createIfMissing)); … … 186 183 json.put("checks", jsonChecks); 187 184 188 if (jsonLysate.get("id") != null)189 {190 json.put("rnaToSpecimenCount", AddLysateFix.countRNAWithLinkToSpecimen(dc));191 }192 193 185 if (createIfMissing) 194 186 { 195 187 dc.commit(); 196 188 } 197 }198 else if ("FixRNALinkToLysate".equals(cmd))199 {200 Relax.checkIsAdmin(sc, "'" + cmd + "' wizard");201 JSONArray jsonMessages = new JSONArray();202 203 SimpleProgressReporter progress = new SimpleProgressReporter(null);204 progressId = "relink-rna-progress";205 sc.setSessionSetting(progressId, progress);206 207 progress.display(5, "Loading items...");208 209 dc = sc.newDbControl();210 211 AddLysateFix fix = new AddLysateFix(jsonMessages);212 fix.checkAndFixLysateAnnotationTypeCategory(dc);213 fix.createLysateItems(dc, progress);214 215 json.put("messages", jsonMessages);216 progress.display(95, "Saving all changes to the database...");217 dc.commit();218 189 } 219 190 }
Note: See TracChangeset
for help on using the changeset viewer.