if ("#TYPE".equals(pair[0])) {
fileType = pair[1];
if (!"EXTENDED".equals(fileType)
&& !"VISUAL".equals(fileType)) {
throw new ObservationReadError("Invalid file type: "
+ fileType);
}
} else if ("#OBSCODE".equals(pair[0])) {
obscode = pair[1].toUpperCase();
} else if ("#SOFTWARE".equals(pair[0])) {
software = pair[1];
} else if ("#DELIM".equals(pair[0])) {
delimiter = translateDelimiter(pair[1]);
if (isEmpty(delimiter)) {
throw new ObservationReadError(
"No delimiter specified.");
}
} else if ("#DATE".equals(pair[0])) {
dateType = pair[1];
setHeliocentric("HJD".equals(dateType));
} else if ("#OBSTYPE".equals(pair[0])) {
obsType = pair[1];
if ("EXTENDED".equals(fileType)) {
if (!"CCD".equals(obsType) && !"PEP".equals(obsType)) {
throw new ObservationReadError(
"Unknown observation type: " + obsType);
}
} else if ("VISUAL".equals(fileType)) {
if (!"VISUAL".equals(obsType) && !"PTG".equals(obsType)) {
throw new ObservationReadError(
"Unknown observation type: " + obsType);
}
}
}
}