sor++;
st = new StringTokenizer(buf.readLine());
id = Integer.parseInt(st.nextToken());
type = Integer.parseInt(st.nextToken());
if(!GeomResources.getInstance().getWorkTypeIndexes().isEleme(type)){
throw new GeomWrongIndexException(GeomWrongIndexException.NO_SPECIFIED_TYPE_INDEX_EXCEPTION, fileName, sor, type);
}
priority = Integer.parseInt(st.nextToken());
if(priority>maxPriority){
maxPriority = priority;
}
base = Integer.parseInt(st.nextToken());
begin = Integer.parseInt(st.nextToken());
end = Integer.parseInt(st.nextToken());
if(begin >= end){
throw new GeomWrongFileTypeException(GeomWrongFileTypeException.INVALID_INTERVAL_EXCEPTION, fileName, sor);
}
if(GeomResources.getInstance().getNagyT() < end){
throw new GeomWrongFileTypeException(GeomWrongFileTypeException.TIME_GREATER_THAN_NAGYT_EXCEPTION, fileName, sor);
}
length = Integer.parseInt(st.nextToken());
/// ha van bejelent�si id�
String nextToken = st.nextToken();
if(nextToken.trim().equals("-")){
rec = -1;
}else{
rec = Integer.parseInt(nextToken);
}
/// ha van id�egys�g alatti vesztes�g
if(st.hasMoreTokens()){
loseUnit = Integer.parseInt(st.nextToken());
if(loseUnit>maxEgysegnyiVeszteseg){
maxEgysegnyiVeszteseg = loseUnit;
}
}
if(priority<0){
throw new GeomWrongFileTypeException(GeomWrongFileTypeException.NEGATIVE_NUMBER_EXCEPTION, fileName, sor, "prioritas");
}
if(begin<0){
throw new GeomWrongFileTypeException(GeomWrongFileTypeException.NEGATIVE_NUMBER_EXCEPTION, fileName, sor, "idoablak kezdete");
}
if(end<0){
throw new GeomWrongFileTypeException(GeomWrongFileTypeException.NEGATIVE_NUMBER_EXCEPTION, fileName, sor, "idoablak vege");
}
if(length<0){
throw new GeomWrongFileTypeException(GeomWrongFileTypeException.NEGATIVE_NUMBER_EXCEPTION, fileName, sor, "vegrehajtasi ido");
}
if(rec<-1){
throw new GeomWrongFileTypeException(GeomWrongFileTypeException.NEGATIVE_NUMBER_EXCEPTION, fileName, sor, "bejelentesi ido");
}
if(loseUnit<0){
throw new GeomWrongFileTypeException(GeomWrongFileTypeException.NEGATIVE_NUMBER_EXCEPTION, fileName, sor, "egysegnyi veszteseg");
}
/// a munk�k id�ablak�nak sz�k�t�se
end = begin + length + GeomResources.getInstance().getRPercent()*(end-begin-length)/100;
GeomPlace place;
try{
place = GeomResources.getInstance().getPlaceById(base);
} catch (GeomWrongIndexException e){
throw new GeomWrongIndexException(GeomWrongIndexException.NO_SPECIFIED_PLACE_INDEX_EXCEPTION, fileName, sor, base);
}
if(map.put(new Integer(id), new GeomWork(id, type, priority, place, begin, end, length, rec, loseUnit))!=null){
throw new GeomWrongIndexException(GeomWrongIndexException.INDEX_DUPLICATE_EXCEPTION, fileName, sor, id);
}
workIndexes.addElement(id);
if(st.hasMoreTokens()){
throw new GeomWrongFileTypeException(GeomWrongFileTypeException.MUCH_TOKEN_EXCEPTION, fileName, sor);
}