Package uk.ac.bbsrc.tgac.miso.core.data

Examples of uk.ac.bbsrc.tgac.miso.core.data.Kit


  public JSONObject lookupKitByIdentificationBarcode(HttpSession session, JSONObject json) {
    try {
      if (json.has("barcode")) {
        String barcode = json.getString("barcode");
        Kit kit = requestManager.getKitByIdentificationBarcode(barcode);
        if (kit != null) {
          return JSONUtils.SimpleJSONResponse(kit.toString());
        }
        else {
          //new kit?
          Pattern ls454KitPattern = Pattern.compile("([\\d]{11})([\\d]{8})([\\d]{6})"); //05365473001 93765920 102010
          Pattern illuminaKitPattern = Pattern.compile("([A-Z0-9]{3}-[\\d]{7})"); // RGT-0520823 - outer kit barcode // 15003926 - partNumber // 5454482 - lotNumber
View Full Code Here


  public JSONObject lookupKitByLotNumber(HttpSession session, JSONObject json) {
    try {
      if (json.has("lotNumber")) {
        String lotNumber = json.getString("lotNumber");
        //String platform = json.getString("platform");
        Kit kit = requestManager.getKitByLotNumber(lotNumber);
        if (kit != null) {
          return JSONUtils.SimpleJSONResponse(kit.toString());
        }
        else {
          Pattern ls454KitPattern = Pattern.compile("([\\d]{11})([\\d]{8})([\\d]{6})"); //05365473001 93765920 102010
          Matcher ls454Matcher = ls454KitPattern.matcher(lotNumber);
          Pattern illuminaKitPattern = Pattern.compile("([0-9]{7})"); // 5454482 - lotNumber
View Full Code Here

        if ((element = lookupCache(cacheManager).get(DbUtils.hashCodeCacheKeyFor(id))) != null) {
          log.debug("Cache hit on map for Kit " + id);
          return (Kit)element.getObjectValue();
        }
      }
      Kit kit = null;

      try {
        KitDescriptor kd = getKitDescriptorById(rs.getInt("kitDescriptorId"));
        KitType kitType = kd.getKitType();

        if (kitType.equals(KitType.CLUSTERING)) {
          kit = new ClusterKit();
        }
        else if (kitType.equals(KitType.EMPCR)) {
          kit = new EmPcrKit();
        }
        else if (kitType.equals(KitType.LIBRARY)) {
          kit = new LibraryKit();
        }
        else if (kitType.equals(KitType.MULTIPLEXING)) {
          kit = new MultiplexingKit();
        }
        else if (kitType.equals(KitType.SEQUENCING)) {
          kit = new SequencingKit();
        }
        else {
          throw new SQLException("Unsupported KitType: "+kitType.getKey());
        }

        kit.setId(id);
        kit.setIdentificationBarcode(rs.getString("identificationBarcode"));
        kit.setLocationBarcode(rs.getString("locationBarcode"));
        kit.setLotNumber(rs.getString("lotNumber"));
        kit.setKitDate(rs.getDate("kitDate"));
        kit.setKitDescriptor(kd);
        kit.setNotes(noteDAO.listByKit(rs.getLong("kitId")));
      }
      catch (IOException e) {
        e.printStackTrace();
      }
      return kit;
View Full Code Here

TOP

Related Classes of uk.ac.bbsrc.tgac.miso.core.data.Kit

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.