Esempio n. 1
0
 public static Response redirect(
     JsonObject fromPageResponse, Key rfModel, Key dataKey, boolean oobee) {
   JsonObject redir = new JsonObject();
   redir.addProperty(MODEL_KEY, rfModel.toString());
   redir.addProperty(DATA_KEY, dataKey.toString());
   redir.addProperty(OOBEE, oobee);
   return Response.redirect(fromPageResponse, RFView.class, redir);
 }
Esempio n. 2
0
 public static String link(Key k, String keyParam, String content) {
   RString rs = new RString("<a href='RFView.query?%key_param=%$key'>%content</a>");
   rs.replace("key_param", keyParam);
   rs.replace("key", k.toString());
   rs.replace("content", content);
   return rs.toString();
 }
Esempio n. 3
0
  public static Response redirect(
      JsonObject fromPageResponse,
      Key jobKey,
      Key modelKey,
      Key dataKey,
      int ntree,
      int classCol,
      String weights,
      boolean oobee,
      boolean iterativeCM) {
    JsonObject redirect = new JsonObject();
    if (jobKey != null) redirect.addProperty(JOB, jobKey.toString());
    redirect.addProperty(MODEL_KEY, modelKey.toString());
    redirect.addProperty(DEST_KEY, modelKey.toString());
    redirect.addProperty(DATA_KEY, dataKey.toString());
    redirect.addProperty(NUM_TREES, ntree);
    redirect.addProperty(CLASS, classCol);
    if (weights != null) redirect.addProperty(WEIGHTS, weights);
    redirect.addProperty(OOBEE, oobee);
    redirect.addProperty(ITERATIVE_CM, iterativeCM);

    return Response.redirect(fromPageResponse, RFView.class, redirect);
  }