예제 #1
0
  public void getMapping(int mailAddress) {

    LimesUser le = UserManager.getInstance().getUser(mailAddress);
    le.addPropertyChangeListener(UserManager.getInstance());

    HashMap<String, Object> source;

    source = le.getSourceMap();

    HashMap<String, Object> target = le.getTargetMap();
    HashMap<String, Object> metric = le.getMetricMap();

    KBInfo sourceInfo = createKBInfo(source);
    KBInfo targetInfo = createKBInfo(target);
    // get metric

    String metricExpr = (String) metric.get("metric");
    Double accThreshold = (Double) metric.get("accthreshold");
    Double verThreshold = (Double) metric.get("verthreshold");
    le.calculateMapping(sourceInfo, targetInfo, metricExpr, accThreshold, verThreshold);
    le.setNoUsageTime(0);
  }
예제 #2
0
 public String fetchMetricMap(int sessionId) {
   LimesUser lu = UserManager.getInstance().getUser(sessionId);
   String result = "";
   return JsonParser.parseJavaToJSON(lu.getMetricMap());
 }