Examples of TagBarcodeStrategy


Examples of uk.ac.bbsrc.tgac.miso.core.service.tagbarcode.TagBarcodeStrategy

    }
  }

  public JSONObject getBarcodesPositions(HttpSession session, JSONObject json) {
    if (json.has("strategy")) {
      TagBarcodeStrategy tbs = tagBarcodeStrategyResolverService.getTagBarcodeStrategy(json.getString("strategy"));
      if (tbs != null) {
        JSONObject j = new JSONObject();
        j.put("numApplicableBarcodes", tbs.getNumApplicableBarcodes());
        return j;
      }
      return JSONUtils.SimpleJSONError("No strategy found with the name: \"" + json.getString("strategy") + "\"");
    }
    else {
View Full Code Here

Examples of uk.ac.bbsrc.tgac.miso.core.service.tagbarcode.TagBarcodeStrategy

    return JSONUtils.SimpleJSONError("Cannot resolve LibraryType from selected Platform");
  }

  public JSONObject getTagBarcodesForStrategy(HttpSession session, JSONObject json) {
    if (json.has("strategy")) {
      TagBarcodeStrategy tbs = tagBarcodeStrategyResolverService.getTagBarcodeStrategy(json.getString("strategy"));
      if (tbs != null) {
        Map<String, Object> map = new HashMap<String, Object>();
        Map<Integer, Set<TagBarcode>> barcodes = tbs.getApplicableBarcodes();
        StringBuilder tagsb = new StringBuilder();
        for (Integer i : barcodes.keySet()) {
          //select
          tagsb.append("Barcode "+i+": " + "<select id='tagBarcodes[\""+i+"\"]' name='tagBarcodes[\""+i+"\"]'>");
          tagsb.append("<option value=''>No Barcode</option>");
View Full Code Here

Examples of uk.ac.bbsrc.tgac.miso.core.service.tagbarcode.TagBarcodeStrategy

  @RequestMapping(value = "barcodesForPosition", method = RequestMethod.GET)
  public
  @ResponseBody
  String jsonRestTagBarcodes(@RequestParam("barcodeStrategy") String barcodeStrategy, @RequestParam("position") String position) throws IOException {
    if (barcodeStrategy != null && !"".equals(barcodeStrategy)) {
      TagBarcodeStrategy tbs = tagBarcodeStrategyResolverService.getTagBarcodeStrategy(barcodeStrategy);
      if (tbs != null) {
        List<TagBarcode> tagBarcodes = new ArrayList<TagBarcode>(tbs.getApplicableBarcodesForPosition(Integer.parseInt(position)));
        List<String> names = new ArrayList<String>();
        for (TagBarcode tb : tagBarcodes) {
          names.add("\"" + tb.getId() + "\"" + ":" + "\"" + tb.getName() + " ("+tb.getSequence()+")\"");
        }
        return "{"+LimsUtils.join(names, ",")+"}";
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.