Changeset 2104


Ignore:
Timestamp:
Oct 25, 2013, 9:18:33 AM (9 years ago)
Author:
Nicklas Nordborg
Message:

References #503: Change pooling strategy

Destroy *.dil items after pool has been completed. Existing *.dil items need to be fixed manually, by creating an event for the *.dil item removing all remaining biomaterial.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/PoolServlet.java

    r2091 r2104  
    1414import org.json.simple.JSONObject;
    1515import org.json.simple.parser.JSONParser;
     16
    1617
    1718
     
    2425import net.sf.basedb.core.BioMaterialList;
    2526import net.sf.basedb.core.BioPlate;
     27import net.sf.basedb.core.BioWell;
    2628import net.sf.basedb.core.DbControl;
    2729import net.sf.basedb.core.Extract;
     
    422424              dil.setDescription("Represents the remaining " + Values.formatNumber(extraVolume, 1) +
    423425                "µl aliquot after mixing " + Values.formatNumber(extraVolume*mixFactor, 1) +
    424                 "µl solution before pooling. Stored at a temporary location.");
     426                "µl solution before pooling. Stored at a temporary location until the pool has been completed.");
    425427              BioMaterialEventSource libSrc = dil.getCreationEvent().addSource(lib);
    426428              Annotationtype.POOL_MOLARITY.setAnnotationValue(dc, dil, mixMolarity);
     
    556558              dilEvent.setEventDate(poolDate);
    557559              dilEvent.setProtocol(poolProtocol);
    558               //jsonMessages.add(dil.getName() + " registered");
     560             
     561              // Create event for destroying the biomaterial
     562              BioMaterialEvent discardDil = dil.newEvent();
     563              discardDil.setEventDate(poolDate);
     564              discardDil.setProtocol(poolProtocol);
     565              discardDil.setUsedQuantity(dil.getOriginalQuantity());
     566              discardDil.setComment("Destroyed this aliquot after pooling was completed.");
     567              dc.saveItem(discardDil);
     568
     569              BioWell libWell = lib.getExtract().getBioWell();
     570              String location = libWell == null ? "" : " (" + libWell.getCoordinate() + ")";
     571             
     572              jsonMessages.add(dil.getName() + location + " aliquot registered as destroyed");
    559573            }
    560574          }         
    561           jsonMessages.add("Pool '" + pool.getName() + "' registered as completed.");
     575          jsonMessages.add(pool.getName() + " registered as completed.");
    562576        }
    563577       
Note: See TracChangeset for help on using the changeset viewer.