Package net.geco.model

Examples of net.geco.model.RunnerResult


    this.trace = new Trace[0];
  }
 
  public RunnerResult clone() {
    try {
      RunnerResult clone = (RunnerResult) super.clone();
      Trace[] trace = new Trace[getTrace().length];
      for (int i = 0; i < getTrace().length; i++) {
        trace[i] = getTrace()[i].clone();
      }
      clone.setTrace(trace);
      return clone;
    } catch (CloneNotSupportedException e) {
      e.printStackTrace();
    }
    return null;
View Full Code Here


//    clubL.setText(raceData.getRunner().getClub().getName());
//    categoryL.setText(raceData.getRunner().getCategory().getName());
    Course course = raceData.getCourse();
    courseL.setText(course.getName());
   
    RunnerResult result = raceData.getResult();
//    racetimeL.setText(result.formatRacetime());
    updateStatusLabel(result.getStatus());
//    penaltiesL.setText(result.formatTimePenalty());
    updateMps(result.getNbMPs(), course.nbControls());
   
    punchP.refreshPunches(raceData);
  }
View Full Code Here

        System.err.println("inconsistent course " + data[6]); //$NON-NLS-1$
        runnerControl.validateCourse(registry().findRunnerData(runner), data[6]);
      }
    }
   
    RunnerResult result = factory().createRunnerResult();
    result.setStatus(Status.valueOf(data[7]));
    result.setRacetime(Long.parseLong(data[8]));
    result.setNbMPs(Integer.parseInt(data[9]));
    result.setTimePenalty(Long.parseLong(data[10]));
    result.setTrace(createTraceFrom(Arrays.copyOfRange(data, 11, data.length)));
   
    RunnerRaceData runnerData = registry().findRunnerData(runner);
    runnerData.setResult(result);
    serverMulti.announceData(runnerData);
    return "ok"; //$NON-NLS-1$
View Full Code Here

    thread.interrupt();
  }
 
  public String formatDataForSending(RunnerRaceData data) {
    Runner runner = data.getRunner();
    RunnerResult result = data.getResult();
    return Util.join(new String[]{
      runner.getEcard(),
      runner.getStartId().toString(),
      runner.getLastname(),
      runner.getFirstname(),
      runner.getCategory().getName(),
      runner.getClub().getName(),
      runner.getCourse().getName(),
      result.getStatus().name(),
      Long.toString(result.getRacetime()),
      Integer.toString(result.getNbMPs()),
      Long.toString(result.getTimePenalty()),
      result.formatTrace()
    }, ",", new StringBuffer()); //$NON-NLS-1$
  }
View Full Code Here

    for (Result result : results) {
      double courseScore = computeCourseScore(result);
      html.nl().tag("h2", "class=\"pool\"", result.getIdentifier()).nl(); //$NON-NLS-1$ //$NON-NLS-2$
      html.open("table").nl(); //$NON-NLS-1$
      for (RankedRunner data : result.getRanking()) {
        RunnerResult r = data.getRunnerData().getResult();
        writeHtml(
            data.getRunnerData(),
            Integer.toString(data.getRank()),
            r.formatRacetime(),
            Integer.toString((int) (courseScore / r.getRacetime())),
            html);
      }
      html.close("table").nl(); //$NON-NLS-1$
    }
    return html.close();
View Full Code Here

          runnerControl().validateStatus(registry().findRunnerData(runner), Status.RUN);
        //   TODO: need a flag to tell sireaderhandler to detect course when reading this ecard
        }
      } else {
        RunnerRaceData runnerData = registry().findRunnerData(runner);
        RunnerResult result = runnerData.getResult();
        if( result.is(Status.NOS) ){
          runnerControl().validateStatus(runnerData, Status.RUN);
        } else
        if( result.is(Status.DNS) ){
          geco().log("Inconsistency: detected a running e-card flagged as DNS");
        }
      }
    }
    if( setDnsB.isSelected() ){
View Full Code Here

    };
  }

  @Override
  public RunnerRaceData importTData(String[] record) {
    RunnerResult result = factory.createRunnerResult();
    result.setStatus(Enum.valueOf(Status.class, record[1]));
    result.setRacetime(TimeManager.safeParse(record[2]).getTime());
    RunnerRaceData data;
    if( version12 ){
      data = registry.findRunnerData(Integer.valueOf(record[0]));
    } else {
      data = registry.findRunnerData(record[0]);
View Full Code Here

    repaint();
  }

  public void showOverwriteInfo() {
//    mergeInfoL.setText("Override runner result with card data.");
    RunnerResult result = registry().findRunnerData(getTargetRunner()).getResult();
    mergeInfoL.setText(
        Messages.uiGet("MergeRunnerDialog.OverwriteHelp1") //$NON-NLS-1$
        + printResult(result)
        + Messages.uiGet("MergeRunnerDialog.OverwriteHelp2") //$NON-NLS-1$
        + printResult(runnerData.getResult()));
View Full Code Here

    nameL.setText(raceData.getRunner().getName());
    clubL.setText(raceData.getRunner().getClub().getName());
    categoryL.setText(raceData.getRunner().getCategory().getName());
    courseL.setText(raceData.getCourse().getName());
   
    RunnerResult result = raceData.getResult();
    racetimeL.setText(result.formatRacetime());
    updateStatusLabel(result.getStatus());
    penaltiesL.setText(result.formatTimePenalty());
    updateMps(result.getNbMPs());
   
    punchP.refreshPunches(raceData);
  }
View Full Code Here

TOP

Related Classes of net.geco.model.RunnerResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.