Changeset 5799


Ignore:
Timestamp:
Dec 18, 2019, 1:12:33 PM (2 years ago)
Author:
Nicklas Nordborg
Message:

References #1209: Add support for storing TMA specimen

Added PADRequested annotation and added this to the TMASpecimenImporter as a job parameter.

Location:
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/dao/Annotationtype.java

    r5798 r5799  
    429429  public static final Annotationtype TMA_BLOCK_POS =
    430430    new Annotationtype("TMABlockPos", Type.STRING, false, Item.SAMPLE);
    431  
     431
     432  /**
     433    PAD that was requested when creating a TMA. The actually
     434    used PAD may be different in case the requested one is not
     435    available. Used on TMASpecimen items.
     436    @since 4.25
     437  */
     438  public static final Annotationtype PAD_REQUESTED =
     439    new Annotationtype("PADRequested", Type.STRING, true, Item.SAMPLE);
     440
    432441  /**
    433442    Annotation to be used on samples/extracts that are
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/plugins/TMASpecimenImporter.java

    r5798 r5799  
    9292      "padColumnMapping",
    9393      "PAD",
    94       "Mapping that picks the PAD id that was used to create the TMA. This " +
     94      "Mapping that picks the PAD that was actually used to create the TMA. This " +
    9595      "parameter is required. " +
    9696      "Example: \\PAD\\",
     97      requiredColumnMapping
     98      );
     99 
     100  private static final PluginParameter<String> padRequestedColumnMapping = new PluginParameter<String>(
     101      "padRequestedColumnMapping",
     102      "PAD Requested",
     103      "Mapping that picks the PAD that was requested when creating the TMA. This " +
     104      "parameter is required. " +
     105      "Example: \\PADRequested\\",
    97106      requiredColumnMapping
    98107      );
     
    255264        storeValue(wrapper, request, tmaBlockPosColumnMapping);
    256265        storeValue(wrapper, request, padColumnMapping);
     266        storeValue(wrapper, request, padRequestedColumnMapping);
    257267        storeValue(wrapper, request, commentColumnMapping);
    258268       
     
    282292  private Mapper tmaBlockPosMapper;
    283293  private Mapper padMapper;
     294  private Mapper padRequestedMapper;
    284295  private Mapper commentMapper;
    285296  private String lastTMA_XId;
     
    314325    tmaBlockPosMapper = NotNullMapper.wrap("TMABlockPos is null", getMapper(ffp, job.getValue("tmaBlockPosColumnMapping"), null, null));
    315326    padMapper = NotNullMapper.wrap("PAD is null", getMapper(ffp, job.getValue("padColumnMapping"), null, null));
     327    padRequestedMapper = NotNullMapper.wrap("PADRequested is null", getMapper(ffp, job.getValue("padRequestedColumnMapping"), null, null));
    316328    commentMapper = getMapper(ffp, job.getValue("commentColumnMapping"), null, null);
    317329    numCreated = 0;
     
    358370    Annotationtype.TMA_BLOCK_POS.setAnnotationValue(dc, tmaSpecimen, tmaBlockPosMapper.getString(data));
    359371    Annotationtype.PAD.setAnnotationValue(dc, tmaSpecimen, padMapper.getString(data));
     372    Annotationtype.PAD_REQUESTED.setAnnotationValue(dc, tmaSpecimen, padRequestedMapper.getString(data));
    360373    Annotationtype.SAMPLE_OWNER.setAnnotationValue(dc, tmaSpecimen, sampleOwner);
    361374   
     
    451464        parameters.add(tmaBlockPosColumnMapping);
    452465        parameters.add(padColumnMapping);
     466        parameters.add(padRequestedColumnMapping);
    453467        parameters.add(commentColumnMapping);
    454468       
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/InstallServlet.java

    r5798 r5799  
    442442        jsonChecks.add(checkAnnotationType(dc, Annotationtype.TMA_BLOCK, 1, null, createIfMissing, effectivePermissionsUse));
    443443        jsonChecks.add(checkAnnotationType(dc, Annotationtype.TMA_BLOCK_POS, 1, null, createIfMissing, effectivePermissionsUse));
     444        jsonChecks.add(checkAnnotationType(dc, Annotationtype.PAD_REQUESTED, 1,  null, createIfMissing, patientCuratorUse));
    444445        jsonChecks.add(checkAnnotationType(dc, Annotationtype.SAMPLE_OWNER, 1, null, createIfMissing, effectivePermissionsUse));
    445446
     
    785786        jsonChecks.add(checkAnnotationTypeCategory(dc, Subtype.TMA_SPECIMEN, createIfMissing,
    786787            Annotationtype.TMA_BLOCK, Annotationtype.TMA_BLOCK_POS,
    787             Annotationtype.PAD, Annotationtype.SAMPLE_OWNER
     788            Annotationtype.PAD, Annotationtype.PAD_REQUESTED, Annotationtype.SAMPLE_OWNER
    788789            ));
    789790       
     
    12471248      }
    12481249      at.setMultiplicity(multiplicity);
     1250      at.setDisableLogOfValues(annotationType.getDisableChangeHistoryLog());
    12491251      if (valueOptions != null)
    12501252      {
Note: See TracChangeset for help on using the changeset viewer.