Package net.geco.model

Examples of net.geco.model.Status


    }
  }

  private void mergeRunnerData(RunnerRaceData runnerData, Vector<Stage> poolStages) {
    long mergedTime = 0;
    Status mergedStatus = Status.OK;
    for (Stage stage : poolStages) {
      RunnerRaceData poolData = stage.registry().findRunnerData(runnerData.getRunner().getEcard());
      mergedTime = mergeTime(mergedTime, poolData.getResult().getRacetime());
      mergedStatus = mergeStatus(mergedStatus, poolData.getResult().getStatus());
    }
View Full Code Here


  /*
   * This method has side-effect.
   */
  @Override
  protected Status computeStatus(RunnerRaceData data) {
    Status status = super.computeStatus(data);
    data.getResult().setNbMPs(this.nbMP);
    data.getResult().setTrace(this.trace.toArray(new Trace[0]));
    return status;
  }
View Full Code Here

  }

  public void check(RunnerRaceData data) {
    data.setResult(factory().createRunnerResult());

    Status status = computeStatus(data);
    long racetime = computeOfficialRaceTime(data);
    if( racetime==TimeManager.NO_TIME_l ) {
      status = Status.MP;
    }
    data.getResult().setStatus(status);
View Full Code Here

    announcer().announceRunnerDeletion(data);
  }
 
  public RunnerRaceData updateRunnerDataFor(Runner runner, RunnerRaceData newData) {
    RunnerRaceData runnerData = registry().findRunnerData(runner);
    Status oldStatus = runnerData.getResult().getStatus();
    runnerData.copyFrom(newData);
    announcer().announceStatusChange(runnerData, oldStatus);
    return runnerData;
  }
View Full Code Here

            + runner.idString() + Messages.getString("RunnerControl.FromMessage") //$NON-NLS-1$
            + oldCourse.getName() + Messages.getString("RunnerControl.ToMessage") //$NON-NLS-1$
            + newCourse);
      // Proceed by checking the new status
      if( runnerData.statusIsRecheckable() ) {
        Status oldStatus = runnerData.getResult().getStatus();
        geco().checker().check(runnerData);
        announcer().announceStatusChange(runnerData, oldStatus);
      }
      return true;
    }
View Full Code Here

    }
    return true;
  }
 
  public boolean validateStatus(RunnerRaceData runnerData, Status newStatus) {
    Status oldStatus = runnerData.getResult().getStatus();
    if( !newStatus.equals(oldStatus) ) {
      runnerData.getResult().setStatus(newStatus);
      geco().log(Messages.getString("RunnerControl.StatusChangeMessage") //$NON-NLS-1$
            + runnerData.getRunner().idString() + Messages.getString("RunnerControl.FromMessage") //$NON-NLS-1$
            + oldStatus + Messages.getString("RunnerControl.ToMessage") //$NON-NLS-1$
View Full Code Here

    }
    return false;
  }
 
  public boolean recheckRunner(RunnerRaceData runnerData) {
    Status oldStatus = runnerData.getResult().getStatus();
    geco().checker().check(runnerData);
    Status newStatus = runnerData.getResult().getStatus();
    if( !oldStatus.equals(newStatus) ) {
      geco().log(Messages.getString("RunnerControl.RecheckMessage") //$NON-NLS-1$
            + runnerData.getRunner().idString() + Messages.getString("RunnerControl.FromMessage") //$NON-NLS-1$
            + oldStatus + Messages.getString("RunnerControl.ToMessage") //$NON-NLS-1$
            + newStatus);
View Full Code Here

   * @param runnerData
   * @param card
   */
  private void handleData(RunnerRaceData runnerData, IResultData<PunchObject,PunchRecordData> card) {
    updateRaceDataWith(runnerData, card);
    Status oldStatus = runnerData.getResult().getStatus();
    geco().checker().check(runnerData);
    geco().log("READING " + runnerData.infoString()); //$NON-NLS-1$
    if( runnerData.getResult().is(Status.MP) ) {
      geco().announcer().dataInfo(runnerData.getResult().formatMpTrace() + " (" + runnerData.getResult().getNbMPs() + " MP)"); //$NON-NLS-1$ //$NON-NLS-2$
    }
View Full Code Here

    this.ecard = ecard;
    this.existingRunner = data.getRunner();
    this.defaultCreationStatus = defaultStatus;
   
    // Only compute new status if initially one of the following
    Status status = data.getResult().getStatus();
    updateStatus = status.isRecheckable() || status.isUnresolved()// TODO: we should not recheck when manual mod
   
    this.mockRunner = runnerControl().buildMockRunner();
    this.runnerData.setRunner(this.mockRunner);
    if( this.existingRunner != null ) {
      // initialize mock object with minimal props for the checker
View Full Code Here

TOP

Related Classes of net.geco.model.Status

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.