package com.github.dannil.scbapi.test;

import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.Map;

import com.github.dannil.scbapi.api.SCBAPI;
import com.github.dannil.scbapi.api.environment.landandwaterarea.LandAndWaterAreaAPI;
import com.github.dannil.scbapi.api.population.statistic.StatisticAPI;
import com.github.dannil.scbapi.model.environment.landandwaterarea.Area;
import com.github.dannil.scbapi.model.environment.landandwaterarea.Area.Type;
import com.github.dannil.scbapi.model.population.demography.AverageAgeFirstChild;
import com.github.dannil.scbapi.model.population.statistic.Statistic;
import com.github.dannil.scbapi.utility.ParseUtility;

public class Test {

	public static void main(String[] args) {

		Locale locale = new Locale("en");
		SCBAPI api = new SCBAPI(locale);

		List<String> regions = new ArrayList<String>();
		// regions.add("00");
		regions.add("1267");

		List<Type> types = new ArrayList<Type>();
		types.add(Type.INLANDWATEREXCLUDINGTHEFOURLARGELAKES);

		List<Integer> years = new ArrayList<Integer>();
		years.add(2012);
		years.add(2013);

		List<String> ages = new ArrayList<String>();
		ages.add("18");
		ages.add("20");

		Map<String, String> map = api.getRegionMappings();
		for (String key : map.keySet()) {
			// System.out.println(key + " : " + map.get(key));
		}

		System.out.println(ParseUtility.parseLong("221", null));

		StatisticAPI statisticApi = api.population().statistic();

		List<Statistic> collection8 = statisticApi.getPopulation(regions, null, ages, null, years);
		for (Statistic p : collection8) {
			System.out.println(p);
		}

		List<Statistic> collection4 = statisticApi.getPopulation();
		for (Statistic p : collection4) {
			System.out.println(p);
		}

		List<Integer> availableYears = statisticApi.getYears();
		for (Integer year : availableYears) {
			System.out.println(year);
		}

		LandAndWaterAreaAPI lawApi = api.environment().landAndWaterArea();

		List<Area> collection6 = lawApi.getArea(regions, types, years);
		for (Area a : collection6) {
			System.out.println(a);
		}

		List<AverageAgeFirstChild> collection7 = api.population().demography().getAverageAgeFirstChild(regions, null, null);
		for (AverageAgeFirstChild a : collection7) {
			System.out.println(a);
		}

	}
}

@@ -625,25 +625,96 @@
 atistic.
-Statistic
+LiveBirth;%0Aimport com.github.dannil.scbapi.model.population.statistic.Population
 ;%0Aimport
@@ -1543,33 +1543,163 @@
 ();%0A%0A%09%09List%3C
-Statistic
+LiveBirth%3E collection9 = statisticApi.getLiveBirths();%0A%09%09for (LiveBirth l : collection9) %7B%0A%09%09%09System.out.println(l);%0A%09%09%7D%0A%0A%09%09List%3CPopulation
 %3E collection
@@ -1767,33 +1767,34 @@
 rs);%0A%09%09for (
-Statistic
+Population
  p : collect
@@ -1839,25 +1839,26 @@
 %0A%09%09List%3C
-Statistic
+Population
 %3E collec
@@ -1902,25 +1902,26 @@
 %0A%09%09for (
-Statistic
+Population
  p : col
@@ -1961,24 +1961,27 @@
 (p);%0A%09%09%7D%0A%0A%09%09
+// 
 List%3CInteger
@@ -2022,24 +2022,27 @@
 tYears();%0A%09%09
+// 
 for (Integer
@@ -2065,25 +2065,27 @@
 eYears) %7B%0A%09%09
-%09
+// 
 System.out.p
@@ -2096,24 +2096,27 @@
 ln(year);%0A%09%09
+// 
 %7D%0A%0A%09%09LandAnd

Test file now conforms to new interface