public static void main(String[] args) {
    String[] stateList = CSVStrings.MALE_CSV.split("-");
    
    String[] yearList = stateList[0].split(",");
    for (int i = 1; i < yearList.length; i++)
    {
      _populationByYearList.add(new PopulationYear(Integer.parseInt(yearList[i])));
    }
    
    parse(stateList, PopulationYear.MALE);
    
    stateList = CSVStrings.FEMALE_CSV.split("-");
    parse(stateList, PopulationYear.FEMALE);
    
    stateList = CSVStrings.PERSON_CSV.split("-");
    parse(stateList, PopulationYear.PERSON);
    
    try {
      // Output File - clear it down first.
       File outputFile = new File(OUTPUT_FILE);
       outputFile.delete();
       FileWriter fw = new FileWriter(OUTPUT_FILE, true);
       BufferedWriter bw = new BufferedWriter(fw);
       
       bw.write("db." + COLLECTION_NAME + ".remove();\n\n");
       
       for (PopulationYear py : _populationByYearList) 
       {
         write(py.toString(), bw);
       }
       
       bw.write("\ndb." + COLLECTION_NAME + ".ensureIndex({year: 1});");
       
       bw.close();
     } catch (IOException e) {
       e.printStackTrace();
     }
    
    
  }