}
return Integer.parseInt(line.substring(header.length() + 2, line.length() - 1));
}
private void readInstitutionalWeighting(Examination examination) throws IOException {
InstitutionParametrization institutionParametrization = new InstitutionParametrization();
institutionParametrization.setId(0L);
String[] lineTokens;
lineTokens = readInstitutionalWeightingProperty("TWOINAROW", 2);
institutionParametrization.setTwoInARowPenalty(Integer.parseInt(lineTokens[1]));
lineTokens = readInstitutionalWeightingProperty("TWOINADAY", 2);
institutionParametrization.setTwoInADayPenalty(Integer.parseInt(lineTokens[1]));
lineTokens = readInstitutionalWeightingProperty("PERIODSPREAD", 2);
institutionParametrization.setPeriodSpreadLength(Integer.parseInt(lineTokens[1]));
institutionParametrization.setPeriodSpreadPenalty(1); // constant
lineTokens = readInstitutionalWeightingProperty("NONMIXEDDURATIONS", 2);
institutionParametrization.setMixedDurationPenalty(Integer.parseInt(lineTokens[1]));
lineTokens = readInstitutionalWeightingProperty("FRONTLOAD", 4);
institutionParametrization.setFrontLoadLargeTopicSize(Integer.parseInt(lineTokens[1]));
institutionParametrization.setFrontLoadLastPeriodSize(Integer.parseInt(lineTokens[2]));
institutionParametrization.setFrontLoadPenalty(Integer.parseInt(lineTokens[3]));
examination.setInstitutionParametrization(institutionParametrization);
}