@@ -0,0 +1,897 @@
+public class NcdcRecordParser %7B%0A%0A%09private static final int MISSING_TEMPERATURE = 9999;%0A%09%0A%09private String year;%0A%09private int airTemperature;%0A%09private String quality;%0A%09%0A%09public void parse(String record) %7B%0A%09%09year = record.substring(15, 19);%0A%09%09String airTemperatureString;%0A%09%09// Remove leading plus sign as parseInt dosen't like them before Java 7%0A%09%09if (record.charAt(87) == '+') %7B%0A%09%09%09airTemperatureString = record.substring(88, 92);%0A%09%09%7D else %7B%0A%09%09%09airTemperatureString = record.substring(87, 92);%0A%09%09%7D%0A%09%09airTemperature = Integer.parseInt(airTemperatureString);%0A%09%09quality = record.substring(92,93);%0A%09%7D%0A%09%0A%09public void parse(Text record) %7B%0A%09%09parse(record.toString());%0A%09%7D%0A%09%0A%09public boolean isValidTemperature() %7B%0A%09%09return airTemperature != MISSING_TEMPERATURE && quality.matches(%22%5B01459%5D%22);%0A%09%7D%0A%09%0A%09public String getYear() %7B%0A%09%09return year;%0A%09%7D%0A%09%0A%09public int getAirTemperature() %7B%0A%09%09return airTemperature;%0A%09%7D%0A%7D%0A

Create NcdcRecordParser.java