Beispiel #1
0
 public String getActionString(GuideUserAction action) throws MaltChainedException {
   StringBuilder sb = new StringBuilder();
   action.getAction(actionContainers);
   TransitionTable ttable = (TransitionTable) getTransitionTableHandler().getSymbolTable("TRANS");
   sb.append(ttable.getSymbolCodeToString(transActionContainer.getActionCode()));
   for (int i = 0; i < arcLabelActionContainers.length; i++) {
     if (arcLabelActionContainers[i].getActionCode() != -1) {
       sb.append(' ');
       sb.append(
           arcLabelActionContainers[i]
               .getTable()
               .getSymbolCodeToString(arcLabelActionContainers[i].getActionCode()));
     }
   }
   return sb.toString();
 }
Beispiel #2
0
  protected GuideUserAction updateActionContainers(
      GuideUserHistory history, int transition, LabelSet arcLabels) throws MaltChainedException {
    transActionContainer.setAction(transition);

    if (arcLabels == null) {
      for (int i = 0; i < arcLabelActionContainers.length; i++) {
        arcLabelActionContainers[i].setAction(-1);
      }
    } else {
      for (int i = 0; i < arcLabelActionContainers.length; i++) {
        arcLabelActionContainers[i].setAction(
            arcLabels.get(arcLabelActionContainers[i].getTable()).shortValue());
      }
    }
    GuideUserAction oracleAction = history.getEmptyGuideUserAction();
    oracleAction.addAction(actionContainers);
    return oracleAction;
  }