Changeset 5165


Ignore:
Timestamp:
Dec 3, 2018, 11:59:40 AM (5 months ago)
Author:
Nicklas Nordborg
Message:

References #1081: The release exporter should export more data

The specimen exporter is now exporting the remaining quantity in mg as a project-specific annotation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/plugins/release/SpecimenWriter.java

    r5140 r5165  
    9393      jsonAnnotations.add(item.createAnnotationJSON("OriginalQuantity",
    9494        toMilliG.convert(specimen.getOriginalQuantity())));
     95      jsonAnnotations.add(item.createAnnotationJSON("RemainingQuantity",
     96        toMilliG.convert(specimen.getRemainingQuantity())));
    9597     
    9698      if (samplingDateTime != null && rnaLaterDateTime != null)
     
    230232   
    231233    Unit days = UnitUtil.getUnit(dc, Quantity.TIME, "d");
     234    Unit mg = UnitUtil.getUnit(dc, Quantity.MASS, "mg");
    232235   
    233236    spFactory.createAnnotationType("Site", Type.STRING).setEnumeration(allSites);
    234     spFactory.createAnnotationType("OriginalQuantity", Type.FLOAT).setUnit(UnitUtil.getUnit(dc, Quantity.MASS, "mg"));
     237    spFactory.createAnnotationType("OriginalQuantity", Type.FLOAT).setUnit(mg);
     238    spFactory.createAnnotationType("RemainingQuantity", Type.FLOAT).setUnit(mg).setProjectSpecificValues(true);
    235239   
    236240    // Calculated from ArrivalDate - SamplingDate
Note: See TracChangeset for help on using the changeset viewer.