DateTimeFormatter dtf = DateTimeFormat.forPattern("yyyy/MM/dd HH:mm:ss");
// Basic validation
String[] nextLine = csvReader.readNext();
if (nextLine == null)
throw new TranslatableException(new TranslatableMessage("dataImport.import.noData"));
if (nextLine.length < 2)
throw new TranslatableException(new TranslatableMessage("dataImport.import.noPoints"));
// Find the points by XID
DataPointVO[] vos = new DataPointVO[nextLine.length - 1];
for (int i = 1; i < nextLine.length; i++) {
if (StringUtils.isBlank(nextLine[i]))
throw new TranslatableException(new TranslatableMessage("dataImport.import.badXid", i));
DataPointVO vo = dataPointDao.getDataPoint(nextLine[i]);
if (vo == null)
throw new TranslatableException(new TranslatableMessage("dataImport.import.xidNotFound", nextLine[i]));
vos[i - 1] = vo;
}
// Find the RTs for the points if they are enabled