Package net.geco.model

Examples of net.geco.model.Course


    for (RunnerRaceData runnerData : registry().getRunnersData()) {
      Runner runner = runnerData.getRunner();
      if( runnerData.hasResult() ) {
        Club club = runner.getClub();
        Category category = runner.getCategory();
        Course course = runner.getCourse();
       
        Collection<String> record = saveRecord(
            runner.getStartId().toString(),
            runner.getEcard(),
            ( runner.getArchiveId()!=null )? runner.getArchiveId().toString() : "", //$NON-NLS-1$
            runner.getLastname(),
            runner.getFirstname(),
            "", //$NON-NLS-1$ // ark.getBirthYear(),
            "", //$NON-NLS-1$ // ark.getSex(),
            "", //$NON-NLS-1$
            ( runner.isNC() ) ? "X" : "0", //$NON-NLS-1$ //$NON-NLS-2$
            oeTime(runnerData.getOfficialStarttime()),
            oeTime(runnerData.getFinishtime()),
            oeTime(new Date(runnerData.getResult().getRacetime())),
            oeEvaluationCode(runnerData.getStatus()),
            Integer.toString(clubnames.indexOf(club.getName())),
            club.getShortname(),
            club.getName(),
            "", //$NON-NLS-1$
            Integer.toString(categorynames.indexOf(category.getName())),
            category.getShortname(),
            category.getLongname(),
            "", "", "", "", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
            "", "", "", "", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
            "", "", "", "", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
            "", "", "",    //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
            "0", //$NON-NLS-1$
            "0", //$NON-NLS-1$
            "0", //$NON-NLS-1$
            Integer.toString(coursenames.indexOf(course.getName())),
            course.getName(),
            Integer.toString(course.getLength()),
            Integer.toString(course.getClimb())
            );
        if( withSplits ) {
          addSplits(runnerData, record);
        } else {
          record.add("1"); //$NON-NLS-1$
View Full Code Here


    }
    writer.close();
  }
  private void appendCsvHeat(Heat heat, CsvWriter writer) throws IOException {
    RunnerIO runnerIO = new RunnerIO(null, null, writer, null, stage().getZeroHour());
    Course heatCourse = factory().createCourse();
    heatCourse.setName(heat.getName());
    for (Runner runner : heat.getQualifiedRunners()) {
      writer.writeRecord(runnerIO.exportTData(cloneRunnerForHeat(runner, heatCourse)));
    }
  }
View Full Code Here

    }
  }
 
  public Runner insertRunner(ArchiveRunner arkRunner) {
    Category rCat = ensureCategoryInRegistry(arkRunner.getCategory());
    Course course = registry().getDefaultCourseOrAnyFor(rCat);
    Runner runner = createRunner(arkRunner, course);
    runnerControl().registerNewRunner(runner);
    return runner;
  }
View Full Code Here

    }
    return !clubHasRunners;
  }

  public Course createCourse() {
    Course course = factory().createCourse();
    course.setName("Course" + (registry().getCourses().size() + 1)); //$NON-NLS-1$
    course.setCodes(new int[0]);
    registry().addCourse(course);
    announcer().announceCoursesChanged();
    return course;
  }
View Full Code Here

    announcer().announceCoursesChanged();
    return course;
  }
 
  public Course addCourse(Course course) {
    Course previousCourse = registry().findCourse(course.getName());
    registry().addCourse(course);
    if( previousCourse!=null ) {
      changeCourse(previousCourse, course);
    }
    announcer().announceCoursesChanged();
View Full Code Here

  private void setCategory(RunnerRaceData runnerData, String newCategory) {
    Runner runner = runnerData.getRunner();
    control().validateCategory(runner, newCategory);
    // check course even if no change in category
    if( useDefaultCourseForCategory ){
      Course catCourse = runner.getCategory().getCourse();
      if( catCourse!=null ){
        control().validateCourse(runnerData, catCourse.getName());
      }
    }
  }
View Full Code Here

 
  @Test
  public void testImportBelfieldCourses() {
    assertEquals(2, registryB.getCourses().size());
   
    Course longCourse = registryB.findCourse("Long Course");
    testCourse(longCourse,
        "Long Course",
        3930,
        0,
        new int[] { 162,164,165,166,167,168,169,170,171,172,173,174,175
        ,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190 });

    Course shortCourse = registryB.findCourse("Short Course");
    testCourse(shortCourse,
        "Short Course",
        1620,
        0,
        new int[] { 187,186,177,174,175,176,182,163,184,185,161,162,190 }
View Full Code Here

   
  }
 
  @Test
  public void testMullaghmeenBrownCourse() {
    Course course = registryM.findCourse("Brown");
    testCourse(course,
        "Brown",
        9350,
        300,
        new int[] { 164,171,166,167,169,162,173,174,178,168,186,188,181
View Full Code Here

   
  }
 
  @Test
  public void testMullaghmeenLightgreenCourse() {
    Course course = registryM.findCourse("Light Green");
    testCourse(course,
        "Light Green",
        3210,
        90,
        new int[] { 179,190,156,180,175,154,172,189,191,171,166,192,169,193 });
View Full Code Here

        new int[] { 179,190,156,180,175,154,172,189,191,171,166,192,169,193 });
  }
 
  @Test
  public void testMullaghmeenRedCourse() {
    Course course = registryM.findCourse("Red");
    testCourse(course,
        "Red",
        4300,
        120,
        new int[] { 151,174,163,165,194,159,154,155,156,190,158 });
View Full Code Here

TOP

Related Classes of net.geco.model.Course

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.