public void openProfiles_old() {
    String saltData = "";
    try {
      if (System.getProperty("saltData") != null) {
        saltData = System.getProperty("saltData");
      }
      StringTokenizer fileTokens = new StringTokenizer(saltData, ",");
      while (fileTokens.hasMoreElements()) {
        String file = fileTokens.nextToken();

        if (file != null && !file.equals("null") && !file.equals("")) {
          System.out.println("Built tab from list" + file);
          buildProfileTab(file);
        }
      }
      saltData = "";
    } catch (Exception e) {
      System.out.println("Failed to open files ");
    }
    // just incase it was a signle node
    if (saltData != null && !saltData.equals("null") && !saltData.equals("")) {
      System.out.println("Built tab from single " + saltData);
      buildProfileTab(saltData);
    }
    System.setProperty("saltData", "");
  }
  public ArrayList parseData(String propName) {
    ArrayList<String> files = new ArrayList();
    String saltData = "";
    try {
      if (System.getProperty(propName) != null) {
        saltData = System.getProperty(propName);
      }
      StringTokenizer fileTokens = new StringTokenizer(saltData, ",");
      while (fileTokens.hasMoreElements()) {
        String file = fileTokens.nextToken();

        if (file != null && !file.equals("null") && !file.equals("")) {
          System.out.println("Built tab from list" + file);

          files.add(file);
        }
      }
      saltData = "";
    } catch (Exception e) {
      System.out.println("Failed to open files ");
    }
    // just incase it was a signle node
    if (saltData != null && !saltData.equals("null") && !saltData.equals("")) {
      System.out.println("Built tab from single " + saltData);
      files.add(saltData);
    }
    System.setProperty(propName, "");
    return files;
  }
示例#3
0
文件: FindTool.java 项目: URMC/i2b2
  public List getCategories() {
    List concepts = null;
    try {
      //		GetReturnType request = new GetReturnType();
      //		request.setType("limited");

      GetCategoriesType request = new GetCategoriesType();
      request.setType("core");
      request.setHiddens(false);
      request.setSynonyms(false);

      OntologyResponseMessage msg = new OntologyResponseMessage();
      StatusType procStatus = null;
      while (procStatus == null || !procStatus.getType().equals("DONE")) {
        String response = OntServiceDriver.getCategories(request, "FIND");
        procStatus = msg.processResult(response);
        //				if  other error codes
        //				TABLE_ACCESS_DENIED and USER_INVALID, DATABASE ERROR
        if (procStatus.getType().equals("ERROR")) {
          System.setProperty("errorMessage", procStatus.getValue());
          return concepts;
        }
        procStatus.setType("DONE");
      }
      ConceptsType allConcepts = msg.doReadConcepts();
      if (allConcepts != null) concepts = allConcepts.getConcept();

    } catch (AxisFault e) {
      log.error(e.getMessage());
      System.setProperty("errorMessage", "Ontology cell unavailable");
    } catch (I2B2Exception e) {
      log.error(e.getMessage());
      System.setProperty("errorMessage", e.getMessage());
    } catch (Exception e) {
      log.error(e.getMessage());
      System.setProperty("errorMessage", "Remote server unavailable");
    }

    return concepts;
  }
示例#4
0
 static {
   System.setProperty("apple.awt.usingSWT", "true");
 }