return processData(input.split(",")); //$NON-NLS-1$
}
private String processData(String[] data) {
// chip, start, last, first, cat, club, course, status, racetime, mps, penalties, trace...
Runner runner = registry().findRunnerByEcard(data[0]);
if( runner==null || ! Integer.valueOf(data[1]).equals(runner.getStartId()) ) {
System.err.println("creation " + data[0]); //$NON-NLS-1$
try {
runner = runnerControl.createAnonymousRunner(registry().findCourse(data[6]));
runnerControl.validateEcard(runner, data[0]);
runnerControl.validateStartId(runner, data[1]);
runnerControl.validateLastname(runner, data[2]);
runnerControl.validateFirstname(runner, data[3]);
runnerControl.validateCategory(runner, data[4]);
runnerControl.validateClub(runner, data[5]);
serverMulti.announceNewData();
} catch (RunnerCreationException e) {
e.printStackTrace();
}
} else { // check that course is consistent
if( !runner.getCourse().getName().equals(data[6]) ) {
System.err.println("inconsistent course " + data[6]); //$NON-NLS-1$
runnerControl.validateCourse(registry().findRunnerData(runner), data[6]);
}
}