Changeset 1992


Ignore:
Timestamp:
May 23, 2013, 1:59:39 PM (9 years ago)
Author:
Nicklas Nordborg
Message:

References #436 and #473. Added subtypes for 5 different files produced or used by Bioanalyzer, Caliper and Qubit. The wizards use those subtypes as a filter when selecting files so that it should be easier to find the correct files.

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

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/resources/libprep/lib_registration.jsp

    r1991 r1992  
    3232var LIB_FILES_PATH = '/home/SCANB/LibPlateQC';
    3333var firstBrowse = true;
     34var subtypeInfo = [];
    3435
    3536var debug = false;
     
    248249
    249250var lastPrefix;
    250 function browseOnClick(prefix, extension)
     251function browseOnClick(prefix, extension, subtype)
    251252{
    252253  var frm = document.forms['reggie'];
     
    255256  if (firstBrowse)
    256257  {
     258    firstBrowse = false;
    257259    setCurrentDirectory('<%=ID%>', LIB_FILES_PATH, debug, '../');
    258     firstBrowse = false;
    259   }
    260 
     260  }
     261  if (subtypeInfo[subtype] == undefined)
     262  {
     263    subtypeInfo[subtype] = getSubtypeInfo('<%=ID%>', subtype, debug, '../');
     264  }
     265 
    261266  var url = getRoot() + 'filemanager/index.jsp?ID=<%=ID%>&cmd=SelectOne&callback=setFileCallback';
    262267  url += '&resetTemporary=1&tmpfilter:STRING:name='+escape('%.' + extension);
     268  if (subtypeInfo[subtype])
     269  {
     270    url += '&tmpfilter:INT:itemSubtype='+subtypeInfo[subtype].id;
     271  }
    263272  lastPrefix = prefix;
    264273  Main.openPopup(url, 'SelectFile', 1000, 700);
     
    680689          <td style="padding-left: 4px;"><base:button
    681690              title="Browse&hellip;"
    682               onclick="browseOnClick('qubitcsv', 'csv')"
     691              onclick="browseOnClick('qubitcsv', 'csv', 'QUBIT_CSV')"
    683692              id="btnQubitCsv"
    684693              />
     
    712721          <td style="padding-left: 4px;"><base:button
    713722              title="Browse&hellip;"
    714               onclick="browseOnClick('welltable', 'csv')"
     723              onclick="browseOnClick('welltable', 'csv', 'CALIPER_WELL_TABLE')"
    715724              id="btnWellTable"
    716725              />
     
    737746          <td style="padding-left: 4px;"><base:button
    738747              title="Browse&hellip;"
    739               onclick="browseOnClick('calipergxd', 'gxd')"
     748              onclick="browseOnClick('calipergxd', 'gxd', 'CALIPER_RAW_DATA')"
    740749              id="btnCaliperGxd"
    741750              />
     
    761770          <td style="padding-left: 4px;"><base:button
    762771              title="Browse&hellip;"
    763               onclick="browseOnClick('caliperpdf', 'pdf')"
     772              onclick="browseOnClick('caliperpdf', 'pdf', 'CALIPER_PDF')"
    764773              id="btnCaliperPdf"
    765774              />
  • extensions/net.sf.basedb.reggie/trunk/resources/libprep/libqc_registration.jsp

    r1991 r1992  
    3232var LIB_QC_FILES_PATH = '/home/SCANB/LibPlateQC';
    3333var firstBrowse = true;
     34var subtypeBioAnalyzerPdf;
    3435
    3536var debug = false;
     
    148149  if (firstBrowse)
    149150  {
     151    firstBrowse = false;
    150152    setCurrentDirectory('<%=ID%>', LIB_QC_FILES_PATH, debug, '../');
    151     firstBrowse = false;
     153    subtypeBioAnalyzerPdf = getSubtypeInfo('<%=ID%>', 'BIOANALYZER_PDF', debug, '../');
    152154  }
    153155
    154156  var url = getRoot() + 'filemanager/index.jsp?ID=<%=ID%>&cmd=SelectOne&callback=setFileCallback';
    155157  url += '&resetTemporary=1&tmpfilter:STRING:name='+escape('%.' + extension);
     158  if (subtypeBioAnalyzerPdf)
     159  {
     160    url += '&tmpfilter:INT:itemSubtype='+subtypeBioAnalyzerPdf.id;
     161  }
    156162  lastPrefix = prefix;
    157163  Main.openPopup(url, 'SelectFile', 1000, 700);
  • extensions/net.sf.basedb.reggie/trunk/resources/libprep/mrna_registration.jsp

    r1990 r1992  
    3232var MRNA_QC_FILES_PATH = '/home/SCANB/MRnaPlateQC';
    3333var firstBrowse = true;
     34var subtypeBioAnalyzerPdf;
    3435
    3536var debug = false;
     
    195196  if (firstBrowse)
    196197  {
     198    firstBrowse = false;
    197199    setCurrentDirectory('<%=ID%>', MRNA_QC_FILES_PATH, debug, '../');
    198     firstBrowse = false;
     200    subtypeBioAnalyzerPdf = getSubtypeInfo('<%=ID%>', 'BIOANALYZER_PDF', debug, '../');
    199201  }
    200202  var url = getRoot() + 'filemanager/index.jsp?ID=<%=ID%>&cmd=SelectOne&callback=setFileCallback';
    201203  url += '&resetTemporary=1&tmpfilter:STRING:name='+escape('%.' + extension.substr(0, 3));
     204  if (subtypeBioAnalyzerPdf)
     205  {
     206    url += '&tmpfilter:INT:itemSubtype='+subtypeBioAnalyzerPdf.id;
     207  }
    202208  lastExtension = extension;
    203209  Main.openPopup(url, 'SelectFile', 1000, 700);
  • extensions/net.sf.basedb.reggie/trunk/resources/reggie.js

    r1990 r1992  
    483483  request.send(null);
    484484  if (debug) Main.debug(request.responseText);
    485   return request;
     485  var response = JSON.parse(request.responseText);
     486  return response.status == 'ok' ? response.path : null;
     487}
     488
     489function getSubtypeInfo(ID, subtypeName, debug, reggieRoot)
     490{
     491  var root = reggieRoot ? reggieRoot : '';
     492  var url = root + 'Subtype.servlet?ID='+ID+'&cmd=GetSubtypeInfo';
     493  url += '&name='+subtypeName;
     494 
     495  var request = Ajax.getXmlHttpRequest();
     496  request.open("GET", url, false);
     497  request.send(null);
     498
     499  if (debug) Main.debug(request.responseText);
     500  var response = JSON.parse(request.responseText);
     501  return response.status == 'ok' ? response.subtype : null;
    486502}
    487503
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/dao/Mimetype.java

    r1546 r1992  
    2828  */
    2929  public static final Mimetype GDX =
    30     new Mimetype("application/octet-stream", "gdx", "LabView GX raw data", null);
     30    new Mimetype("application/octet-stream", "gdx", "LabView GX raw data", Subtype.CALIPER_RAW_DATA);
    3131
    3232 
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/dao/Subtype.java

    r1910 r1992  
    217217  public static final Subtype POOLING_PROTOCOL = new Subtype("Pooling", Item.PROTOCOL, false);
    218218
     219  /**
     220    File subtype for BioAnalyzer PDF reports.
     221    @since 2.12
     222  */
     223  public static final Subtype BIOANALYZER_PDF = new Subtype("BioAnalyzer PDF", Item.FILE, false);
     224
     225  /**
     226    File subtype for Caliper PDF reports.
     227    @since 2.12
     228  */
     229  public static final Subtype CALIPER_PDF = new Subtype("Caliper PDF", Item.FILE, false);
     230
     231  /**
     232    File subtype for Caliper Well Table data files (CSV format).
     233    @since 2.12
     234  */
     235  public static final Subtype CALIPER_WELL_TABLE = new Subtype("Caliper Well Table", Item.FILE, false);
     236
     237  /**
     238    File subtype for Caliper raw data files (GXD format).
     239    @since 2.12
     240  */
     241  public static final Subtype CALIPER_RAW_DATA = new Subtype("Caliper Raw Data", Item.FILE, false);
     242
     243  /**
     244    File subtype for Qubit data files (CSV format).
     245    @since 2.12
     246  */
     247  public static final Subtype QUBIT_CSV = new Subtype("Qubit CSV", Item.FILE, false);
    219248 
    220249  /**
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/InstallServlet.java

    r1987 r1992  
    159159        jsonChecks.add(checkSubtype(dc, Subtype.POOLED_LIBRARY, createIfMissing, Subtype.LIBRARY, Subtype.POOLING_PROTOCOL));
    160160        jsonChecks.add(checkSubtype(dc, Subtype.FLOW_CELL, createIfMissing, Subtype.POOLED_LIBRARY));
     161        jsonChecks.add(checkSubtype(dc, Subtype.BIOANALYZER_PDF, createIfMissing));
     162        jsonChecks.add(checkSubtype(dc, Subtype.CALIPER_PDF, createIfMissing));
     163        jsonChecks.add(checkSubtype(dc, Subtype.CALIPER_RAW_DATA, createIfMissing));
     164        jsonChecks.add(checkSubtype(dc, Subtype.CALIPER_WELL_TABLE, createIfMissing));
     165        jsonChecks.add(checkSubtype(dc, Subtype.QUBIT_CSV, createIfMissing));
    161166
    162167        // Plate geometries
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/LibPrepServlet.java

    r1989 r1992  
    176176        BioplateType.LIBRARY.addFilter(dc, query, true);
    177177        // Must NOT have a creation date
    178         query.restrict(Restrictions.eq(Hql.property("eventDate"), null));
     178      //  query.restrict(Restrictions.eq(Hql.property("eventDate"), null));
    179179        // Must have a BARCODE_VARIANT annotation
    180180        query.join(Annotations.leftJoin(null, Annotationtype.BARCODE_VARIANT.load(dc), "bv"));
Note: See TracChangeset for help on using the changeset viewer.