Changeset 2103
- Timestamp:
- Oct 25, 2013, 8:36:36 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/CaseSummaryServlet.java
r2101 r2103 24 24 import net.sf.basedb.core.File; 25 25 import net.sf.basedb.core.ItemQuery; 26 import net.sf.basedb.core.MeasuredBioMaterial; 26 27 import net.sf.basedb.core.Permission; 27 28 import net.sf.basedb.core.Sample; … … 648 649 mrna.setAnnotation("comment", e.getDescription()); 649 650 650 // Get BioPlate CleanupDate annotation 651 BioPlate plate = mrna.getItem().getBioWell().getPlate(); 652 Date cleanupDate = (Date) Annotationtype.CLEANUP_DATE.getAnnotationValue(dc, plate); 653 mrna.setAnnotation("cleanupDate", Reggie.CONVERTER_DATE_TO_STRING.convert(cleanupDate)); 654 // Get BioPlate PlateProcessResult annotation 655 String result = (String) Annotationtype.PLATE_PROCESS_RESULT.getAnnotationValue(dc, plate); 656 mrna.setAnnotation("result", result); 651 // Get BioPlate annotations 652 BioPlate plate = getBioPlate(e); 653 if (plate != null) 654 { 655 Date cleanupDate = (Date) Annotationtype.CLEANUP_DATE.getAnnotationValue(dc, plate); 656 mrna.setAnnotation("cleanupDate", Reggie.CONVERTER_DATE_TO_STRING.convert(cleanupDate)); 657 // Get BioPlate PlateProcessResult annotation 658 String result = (String) Annotationtype.PLATE_PROCESS_RESULT.getAnnotationValue(dc, plate); 659 mrna.setAnnotation("result", result); 660 } 657 661 } 658 662 … … 665 669 cdna.setAnnotation("editable", e.hasPermission(Permission.WRITE)); 666 670 cdna.setAnnotation("comment", e.getDescription()); 667 // Get BioPlate SynthesisDate annotation 668 BioPlate plate = cdna.getItem().getBioWell().getPlate(); 669 Date synthesisDate = (Date) Annotationtype.SYNTHESIS_DATE.getAnnotationValue(dc, plate); 670 cdna.setAnnotation("synthesisDate", Reggie.CONVERTER_DATE_TO_STRING.convert(synthesisDate)); 671 // Get BioPlate PlateProcessResult annotation 672 String result = (String) Annotationtype.PLATE_PROCESS_RESULT.getAnnotationValue(dc, plate); 673 cdna.setAnnotation("result", result); 671 672 // Get BioPlate annotations 673 BioPlate plate = getBioPlate(e); 674 if (plate != null) 675 { 676 Date synthesisDate = (Date) Annotationtype.SYNTHESIS_DATE.getAnnotationValue(dc, plate); 677 cdna.setAnnotation("synthesisDate", Reggie.CONVERTER_DATE_TO_STRING.convert(synthesisDate)); 678 // Get BioPlate PlateProcessResult annotation 679 String result = (String) Annotationtype.PLATE_PROCESS_RESULT.getAnnotationValue(dc, plate); 680 cdna.setAnnotation("result", result); 681 } 674 682 } 675 683 … … 681 689 lib.setAnnotation("registrationDate", Reggie.CONVERTER_DATE_TO_STRING.convert(e.getEntryDate())); 682 690 lib.setAnnotation("editable", e.hasPermission(Permission.WRITE)); 683 // Get BioPlate CleanupDate annotation684 BioPlate plate = lib.getItem().getBioWell().getPlate();685 Date cleanupDate = (Date) Annotationtype.CLEANUP_DATE.getAnnotationValue(dc, plate);686 lib.setAnnotation("cleanupDate", Reggie.CONVERTER_DATE_TO_STRING.convert(cleanupDate));687 691 lib.setAnnotation("originalQuantity", e.getOriginalQuantity()); 688 692 lib.setAnnotation("remainingQuantity", e.getRemainingQuantity()); … … 691 695 lib.loadAnnotations(dc, "qubitconc", Annotationtype.QUBIT_CONC, null); 692 696 lib.setAnnotation("comment", e.getDescription()); 693 // Get BioPlate PlateProcessResult annotation 694 String result = (String) Annotationtype.PLATE_PROCESS_RESULT.getAnnotationValue(dc, plate); 695 lib.setAnnotation("result", result); 697 698 // Get BioPlate annotations 699 BioPlate plate = getBioPlate(e); 700 if (plate != null) 701 { 702 Date cleanupDate = (Date) Annotationtype.CLEANUP_DATE.getAnnotationValue(dc, plate); 703 lib.setAnnotation("cleanupDate", Reggie.CONVERTER_DATE_TO_STRING.convert(cleanupDate)); 704 // Get BioPlate PlateProcessResult annotation 705 String result = (String) Annotationtype.PLATE_PROCESS_RESULT.getAnnotationValue(dc, plate); 706 lib.setAnnotation("result", result); 707 } 696 708 } 697 709 … … 710 722 lib.setAnnotation("comment", e.getDescription()); 711 723 } 724 725 private BioPlate getBioPlate(MeasuredBioMaterial bioMaterial) 726 { 727 BioWell well = bioMaterial.getBioWell(); 728 return well == null ? null : well.getPlate(); 729 } 730 712 731 }
Note: See TracChangeset
for help on using the changeset viewer.