Exemplo n.º 1
0
  private void loadKB(String kbURL, String guidelineId) {

    System.out.println("Starting to load KB");
    System.out.println("------------------------------------------------------------------");
    try {
      PCAImp = new PCAServer_i();
      PCAImp.kbManager = new KBHandler(kbURL); // Sever loads the KB
      // java.util.Date finishedKB = new java.util.Date();
      // logger.warn("finished loading KB "+(finishedKB.getTime() - startTime.getTime())+ "
      // milliseconds after start.");
      pca = PCAImp.open_pca_session();
      if ((guidelineId != null) && (guidelineId != "")) {
        pca.setGuideline(guidelineId); // Specifies the guideline to use
      } else logger.error("No GUIDELINEID specified");
    } catch (Exception se) {
      logger.error("Exception raised during initialization " + se.toString());
      System.exit(1);
    }
    pca.finishSession();
    System.out.println("------------------------------------------------------------------");
    System.out.println("Done loading KB");
  }