Package net.geco.model

Examples of net.geco.model.RunnerRaceData


    registry().removeRunnerData(data);
    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


  public void recheckRunnersFromCourse(Course course) {
    List<Runner> runners = registry().getRunnersFromCourse(course);
    geco().log(Messages.getString("RunnerControl.RecheckCourseMessage") + course.getName()); //$NON-NLS-1$
    for (Runner runner : runners) {
      RunnerRaceData runnerData = registry().findRunnerData(runner);
      if( runnerData.statusIsRecheckable() ) {
        recheckRunner(runnerData);
      }
    }
  }
View Full Code Here

    addMessage(formatDataForSending(geco.registry().findRunnerData(chip)));
  }

  @Override
  public void unknownCardRead(String chip) {
    RunnerRaceData data = geco.registry().findRunnerData(chip);
    if( data!=null ) {
      addMessage(formatDataForSending(data));
    }
  }
View Full Code Here

  }

  @Override
  public void cardReadAgain(String chip) {
    // H: card overwriting. Could use read time to take the last runner updated
    RunnerRaceData data = geco.registry().findRunnerData(chip);
    if( data!=null ) {
      addMessage(formatDataForSending(data));
    }
  }
View Full Code Here

 
  @Override
  public void newCardRead(IResultData<PunchObject,PunchRecordData> card) {
    Runner runner = registry().findRunnerByEcard(card.getSiIdent());
    if( runner!=null ) {
      RunnerRaceData runnerData = registry().findRunnerData(runner);
      if( runnerData.hasData() ) {
        geco().log("READING AGAIN " + card.getSiIdent()); //$NON-NLS-1$
        String returnedCard = requestHandler.requestMergeExistingRunner(handleNewData(card), runner);
        if( returnedCard!=null ) {
          geco().announcer().announceCardReadAgain(returnedCard);
        }
View Full Code Here

    }
   
  }
 
  private RunnerRaceData handleNewData(IResultData<PunchObject,PunchRecordData> card) {
    RunnerRaceData newData = factory().createRunnerRaceData();
    newData.setResult(factory().createRunnerResult());
    updateRaceDataWith(newData, card);
    // do not do any announcement here since the case is handled in the Merge dialog after that and depends on user decision
    return newData;
  }
View Full Code Here

    runnersTable.setRowSorter(sorter);
  }

 
  private void updateRunnerMap() {
    RunnerRaceData runnerData = registry().findRunnerData(selectedChip());
    if( runnerData!=null ) {
      liveComponent.displayRunnerMap(runnerData);
    }
  }
View Full Code Here

          runnerControl().registerNewRunner(runner);
          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() ){
      for (RunnerRaceData runnerData : registry().getRunnersData()) {
        if( runnerData.getResult().is(Status.NOS) ){
          runnerControl().validateStatus(runnerData, Status.DNS);
        }
      }
    }
  }
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]);
    }
    if( data==null ) {
      throw new Error("Error in race data " + sourceFilename() +"! " //$NON-NLS-1$ //$NON-NLS-2$
          + "Can't find runner with e-card " + record[0] //$NON-NLS-1$
          + ". Use a backup");   //$NON-NLS-1$
    }
    data.setResult(result);
    return data;
  }
View Full Code Here

    });
    mergeB.addActionListener(new ActionListener() {
      @Override
      public void actionPerformed(ActionEvent e) {
        // TODO: update e-card
        RunnerRaceData updatedData = runnerControl().updateRunnerDataFor(getTargetRunner(), runnerData);
        String selectedCoursename = getSelectedCoursename();
        selectedCoursename = selectedCoursename.equals(Messages.uiGet("MergeRunnerDialog.UnknownCourseItem")) ? //$NON-NLS-1$
          registry().anyCourse().getName() :
          selectedCoursename;
        runnerControl().validateCourse(updatedData, selectedCoursename);
View Full Code Here

TOP

Related Classes of net.geco.model.RunnerRaceData

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.