Changeset 3734
- Timestamp:
- Sep 14, 2007, 3:51:04 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.4-stable/src/plugins/core/net/sf/basedb/plugins/Base1PluginExecuter.java
r3731 r3734 55 55 import net.sf.basedb.core.PositionBatcher; 56 56 import net.sf.basedb.core.ProgressReporter; 57 import net.sf.basedb.core.Reporter; 57 58 import net.sf.basedb.core.RequestInformation; 58 59 import net.sf.basedb.core.SpotBatcher; … … 62 63 import net.sf.basedb.core.Type; 63 64 import net.sf.basedb.core.User; 65 import net.sf.basedb.core.data.ReporterData; 64 66 import net.sf.basedb.core.plugin.About; 65 67 import net.sf.basedb.core.plugin.AboutImpl; … … 565 567 permissions.add(new Permissions(Item.PLUGINCONFIGURATION, EnumSet.of(Permission.WRITE), null)); 566 568 permissions.add(new Permissions(Item.RAWBIOASSAY, null, EnumSet.of(Permission.READ))); 569 permissions.add(new Permissions(Item.REPORTER, null, EnumSet.of(Permission.READ))); 567 570 permissions.add(new Permissions(Item.EXTRAVALUETYPE, null, EnumSet.of(Permission.CREATE, Permission.USE))); 568 571 permissions.add(new Permissions(Item.USER, null, EnumSet.of(Permission.READ))); … … 1309 1312 1310 1313 HashMap<String, BioAssay> idMap = new HashMap<String, BioAssay>(); 1311 HashMap<Integer, Integer> posMap = new HashMap<Integer, Integer>();1314 HashMap<Integer, ReporterData> posRepMap = new HashMap<Integer, ReporterData>(); 1312 1315 HashMap<String, ExtraValueType> evtMap = new HashMap<String, ExtraValueType>(); 1313 1316 … … 1378 1381 } 1379 1382 spotBatcher = bas.getSpotBatcher(); 1380 // posBatcher = bas.getPositionBatcher();1381 1383 1382 1384 for (String assayId : assays) … … 1506 1508 spotBatcher.insert(ba.getDataCubeColumnNo(), position, intensities); 1507 1509 1508 // if (posMap.containsKey(position)) 1509 // { 1510 // if (!posMap.get(position).equals(reporter)) 1511 // throw new BaseException("Invalid data. Position, "+position+", occurs twice with different reporter data."); 1512 // 1513 // } 1514 // else 1515 // { 1516 // posMap.put(position, reporter); 1517 // posBatcher.insert(position, Reporter.getById(dc, reporter)); 1518 // } 1510 if (posRepMap.containsKey(position)) 1511 { 1512 if (!reporter.equals(posRepMap.get(position).getId())) 1513 throw new BaseException("Invalid data. Position, "+position+", occurs twice with different reporter data."); 1514 } 1515 else 1516 { 1517 posRepMap.put(position, Reporter.getById(dc, reporter)); 1518 } 1519 1519 1520 for (int i = 0; i < evBatcher.size(); i++) 1520 1521 { … … 1535 1536 } 1536 1537 } 1538 1539 //Batch reporters 1540 int it = 0; 1541 if (bas != null) 1542 { 1543 posBatcher = bas.getPositionBatcher(); 1544 for (Integer position : posRepMap.keySet()) 1545 { 1546 System.out.println(it++ + "\t" +position); 1547 try 1548 { 1549 posBatcher.insert(position, posRepMap.get(position)); 1550 } 1551 catch (BaseException e) 1552 { 1553 System.out.println(position+"\t"+posRepMap.get(position)); 1554 throw e; 1555 } 1556 } 1557 } 1558 1537 1559 // save bas 1538 1560 if (bas != null)
Note: See TracChangeset
for help on using the changeset viewer.