public ExpressionStageOptions generateExpressionStageOptions() {
		List<String> allExpressionStagesRaw = retrieveExpressionStages.getDmelanogasterExpressionStages();
		ExpressionStageOptions expressionStageOptions = new ExpressionStageOptions();
		List<ExpressionStageGroup> expressionStageGroupList = new LinkedList<ExpressionStageGroup>();
		List<ExpressionStage> allExpressionStages = new ArrayList<ExpressionStage>(allExpressionStagesRaw.size());
		int idCounter = 0;
		for (String expressionStageString : allExpressionStagesRaw) {
			ExpressionStage expressionStage = new ExpressionStage();
			expressionStage.setExpressionStageTitle(expressionStageString);
			expressionStage.setExpressionStageId("stage" + idCounter);
			expressionStage.setExpressionStageNumericalId(idCounter);
			allExpressionStages.add(expressionStage);
			idCounter++;
		}
		// Add expressionStageList to returned object
		expressionStageOptions.setExpressionStageList(allExpressionStages);
		/*
		 * Add embryogenesis expressionStageGroup
		 */
		ExpressionStageGroup embryologyExpressionStageGroup = new ExpressionStageGroup();
		embryologyExpressionStageGroup.setGroupTitle("embryogenesis");
		embryologyExpressionStageGroup.setGroupId("group" + 0);
		embryologyExpressionStageGroup.setGroupNumericalId(0);
		List<ExpressionStage> embryologyExpressionStageList = new LinkedList<ExpressionStage>();
		// Add embryo stages
		for (int i = 56; i <= 67; i++) {
			embryologyExpressionStageList.add(allExpressionStages.get(i));
		}
		embryologyExpressionStageGroup.setExpressionStageList(embryologyExpressionStageList);
		expressionStageGroupList.add(embryologyExpressionStageGroup);
		/*
		 * Add development expressionStageGroup
		 */
		ExpressionStageGroup developmentExpressionStageGroup = new ExpressionStageGroup();
		developmentExpressionStageGroup.setGroupTitle("development");
		developmentExpressionStageGroup.setGroupId("group" + 1);
		developmentExpressionStageGroup.setGroupNumericalId(1);
		List<ExpressionStage> developmentExpressionStageList = new LinkedList<ExpressionStage>();
		// Add embryo stages
		for (int i = 56; i <= 67; i++) {
			developmentExpressionStageList.add(allExpressionStages.get(i));
		}
		// larva stages
		for (int i = 75; i <= 81; i++) {
			developmentExpressionStageList.add(allExpressionStages.get(i));
		}
		developmentExpressionStageList.add(allExpressionStages.get(97));
		for (int i = 49; i <= 54; i++) {
			developmentExpressionStageList.add(allExpressionStages.get(i));
		}
		for (int i = 38; i <= 41; i++) {
			developmentExpressionStageList.add(allExpressionStages.get(i));
		}
		// TODO: Add the others
		developmentExpressionStageList.add(allExpressionStages.get(19));
		developmentExpressionStageList.add(allExpressionStages.get(44));
		developmentExpressionStageGroup.setExpressionStageList(developmentExpressionStageList);
		expressionStageGroupList.add(developmentExpressionStageGroup);
		/*
		 * Add tissue expressionStageGroup
		 */
		ExpressionStageGroup tissueExpressionStageGroup = new ExpressionStageGroup();
		tissueExpressionStageGroup.setGroupTitle("tissue");
		tissueExpressionStageGroup.setGroupId("group" + 2);
		tissueExpressionStageGroup.setGroupNumericalId(2);
		List<ExpressionStage> tissueExpressionStageList = new LinkedList<ExpressionStage>();
		// A Mate stages
		for (int i = 11; i <= 29; i++) {
			tissueExpressionStageList.add(allExpressionStages.get(i));
		}
		for (int i = 32; i <= 37; i++) {
			tissueExpressionStageList.add(allExpressionStages.get(i));
		}
		for (int i = 42; i <= 43; i++) {
			tissueExpressionStageList.add(allExpressionStages.get(i));
		}
		for (int i = 47; i <= 48; i++) {
			tissueExpressionStageList.add(allExpressionStages.get(i));
		}
		tissueExpressionStageGroup.setExpressionStageList(tissueExpressionStageList);
		expressionStageGroupList.add(tissueExpressionStageGroup);
		/*
		 * Add treatment expressionStageGroup
		 */
		ExpressionStageGroup treatmentExpressionStageGroup = new ExpressionStageGroup();
		treatmentExpressionStageGroup.setGroupTitle("treatment");
		treatmentExpressionStageGroup.setGroupId("group" + 3);
		treatmentExpressionStageGroup.setGroupNumericalId(3);
		List<ExpressionStage> treatmentExpressionStageList = new LinkedList<ExpressionStage>();
		// larva stages
		for (int i = 82; i <= 90; i++) {
			treatmentExpressionStageList.add(allExpressionStages.get(i));
		}
		for (int i = 0; i <= 10; i++) {
			treatmentExpressionStageList.add(allExpressionStages.get(i));
		}
		treatmentExpressionStageGroup.setExpressionStageList(treatmentExpressionStageList);
		expressionStageGroupList.add(treatmentExpressionStageGroup);
		/*
		 * Add cell-line expressionStageGroup
		 */
		ExpressionStageGroup cellLineExpressionStageGroup = new ExpressionStageGroup();
		cellLineExpressionStageGroup.setGroupTitle("cell-line");
		cellLineExpressionStageGroup.setGroupId("group" + 4);
		cellLineExpressionStageGroup.setGroupNumericalId(4);
		List<ExpressionStage> cellLineExpressionStageList = new LinkedList<ExpressionStage>();
		// Add embryo stages
		for (int i = 98; i <= 103; i++) {
			cellLineExpressionStageList.add(allExpressionStages.get(i));
		}
		// larva stages
		for (int i = 68; i <= 74; i++) {
			cellLineExpressionStageList.add(allExpressionStages.get(i));
		}
		for (int i = 91; i <= 96; i++) {
			cellLineExpressionStageList.add(allExpressionStages.get(i));
		}
		for (int i = 45; i <= 46; i++) {
			cellLineExpressionStageList.add(allExpressionStages.get(i));
		}
		for (int i = 30; i <= 31; i++) {
			cellLineExpressionStageList.add(allExpressionStages.get(i));
		}
		cellLineExpressionStageList.add(allExpressionStages.get(55));
		// TODO: Add the others
		cellLineExpressionStageGroup.setExpressionStageList(cellLineExpressionStageList);
		expressionStageGroupList.add(cellLineExpressionStageGroup);
		expressionStageOptions.setExpressionStageGroupList(expressionStageGroupList);
		return expressionStageOptions;
	}
public ExpressionStageOptions generateExpressionStageOptions() {
		List<String> allExpressionStagesRaw = retrieveExpressionStages.getDmelanogasterExpressionStages();
		ExpressionStageOptions expressionStageOptions = new ExpressionStageOptions();
		List<ExpressionStageGroup> expressionStageGroupList = new LinkedList<ExpressionStageGroup>();
		List<ExpressionStage> allExpressionStages = new ArrayList<ExpressionStage>(allExpressionStagesRaw.size());
		int idCounter = 0;
		for (String expressionStageString : allExpressionStagesRaw) {
			ExpressionStage expressionStage = new ExpressionStage();
			expressionStage.setExpressionStageTitle(expressionStageString);
			expressionStage.setExpressionStageId("stage" + idCounter);
			expressionStage.setExpressionStageNumericalId(idCounter);
			allExpressionStages.add(expressionStage);
			idCounter++;
		}
	
		expressionStageOptions.setExpressionStageList(allExpressionStages);
	
		ExpressionStageGroup embryologyExpressionStageGroup = new ExpressionStageGroup();
		embryologyExpressionStageGroup.setGroupTitle("embryogenesis");
		embryologyExpressionStageGroup.setGroupId("group" + 0);
		embryologyExpressionStageGroup.setGroupNumericalId(0);
		List<ExpressionStage> embryologyExpressionStageList = new LinkedList<ExpressionStage>();
	
		for (int i = 56; i <= 67; i++) {
			embryologyExpressionStageList.add(allExpressionStages.get(i));
		}
		embryologyExpressionStageGroup.setExpressionStageList(embryologyExpressionStageList);
		expressionStageGroupList.add(embryologyExpressionStageGroup);
	
		ExpressionStageGroup developmentExpressionStageGroup = new ExpressionStageGroup();
		developmentExpressionStageGroup.setGroupTitle("development");
		developmentExpressionStageGroup.setGroupId("group" + 1);
		developmentExpressionStageGroup.setGroupNumericalId(1);
		List<ExpressionStage> developmentExpressionStageList = new LinkedList<ExpressionStage>();
	
		for (int i = 56; i <= 67; i++) {
			developmentExpressionStageList.add(allExpressionStages.get(i));
		}
	
		for (int i = 75; i <= 81; i++) {
			developmentExpressionStageList.add(allExpressionStages.get(i));
		}
		developmentExpressionStageList.add(allExpressionStages.get(97));
		for (int i = 49; i <= 54; i++) {
			developmentExpressionStageList.add(allExpressionStages.get(i));
		}
		for (int i = 38; i <= 41; i++) {
			developmentExpressionStageList.add(allExpressionStages.get(i));
		}
	
		developmentExpressionStageList.add(allExpressionStages.get(19));
		developmentExpressionStageList.add(allExpressionStages.get(44));
		developmentExpressionStageGroup.setExpressionStageList(developmentExpressionStageList);
		expressionStageGroupList.add(developmentExpressionStageGroup);
	
		ExpressionStageGroup tissueExpressionStageGroup = new ExpressionStageGroup();
		tissueExpressionStageGroup.setGroupTitle("tissue");
		tissueExpressionStageGroup.setGroupId("group" + 2);
		tissueExpressionStageGroup.setGroupNumericalId(2);
		List<ExpressionStage> tissueExpressionStageList = new LinkedList<ExpressionStage>();
	
		for (int i = 11; i <= 29; i++) {
			tissueExpressionStageList.add(allExpressionStages.get(i));
		}
		for (int i = 32; i <= 37; i++) {
			tissueExpressionStageList.add(allExpressionStages.get(i));
		}
		for (int i = 42; i <= 43; i++) {
			tissueExpressionStageList.add(allExpressionStages.get(i));
		}
		for (int i = 47; i <= 48; i++) {
			tissueExpressionStageList.add(allExpressionStages.get(i));
		}
		tissueExpressionStageGroup.setExpressionStageList(tissueExpressionStageList);
		expressionStageGroupList.add(tissueExpressionStageGroup);
	
		ExpressionStageGroup treatmentExpressionStageGroup = new ExpressionStageGroup();
		treatmentExpressionStageGroup.setGroupTitle("treatment");
		treatmentExpressionStageGroup.setGroupId("group" + 3);
		treatmentExpressionStageGroup.setGroupNumericalId(3);
		List<ExpressionStage> treatmentExpressionStageList = new LinkedList<ExpressionStage>();
	
		for (int i = 82; i <= 90; i++) {
			treatmentExpressionStageList.add(allExpressionStages.get(i));
		}
		for (int i = 0; i <= 10; i++) {
			treatmentExpressionStageList.add(allExpressionStages.get(i));
		}
		treatmentExpressionStageGroup.setExpressionStageList(treatmentExpressionStageList);
		expressionStageGroupList.add(treatmentExpressionStageGroup);
	
		ExpressionStageGroup cellLineExpressionStageGroup = new ExpressionStageGroup();
		cellLineExpressionStageGroup.setGroupTitle("cell-line");
		cellLineExpressionStageGroup.setGroupId("group" + 4);
		cellLineExpressionStageGroup.setGroupNumericalId(4);
		List<ExpressionStage> cellLineExpressionStageList = new LinkedList<ExpressionStage>();
	
		for (int i = 98; i <= 103; i++) {
			cellLineExpressionStageList.add(allExpressionStages.get(i));
		}
	
		for (int i = 68; i <= 74; i++) {
			cellLineExpressionStageList.add(allExpressionStages.get(i));
		}
		for (int i = 91; i <= 96; i++) {
			cellLineExpressionStageList.add(allExpressionStages.get(i));
		}
		for (int i = 45; i <= 46; i++) {
			cellLineExpressionStageList.add(allExpressionStages.get(i));
		}
		for (int i = 30; i <= 31; i++) {
			cellLineExpressionStageList.add(allExpressionStages.get(i));
		}
		cellLineExpressionStageList.add(allExpressionStages.get(55));
	
		cellLineExpressionStageGroup.setExpressionStageList(cellLineExpressionStageList);
		expressionStageGroupList.add(cellLineExpressionStageGroup);
		expressionStageOptions.setExpressionStageGroupList(expressionStageGroupList);
		return expressionStageOptions;
	}
public expressionstageoptions generateexpressionstageoptions() { list<string> allexpressionstagesraw = retrieveexpressionstages.getdmelanogasterexpressionstages(); expressionstageoptions expressionstageoptions = new expressionstageoptions(); list<expressionstagegroup> expressionstagegrouplist = new linkedlist<expressionstagegroup>(); list<expressionstage> allexpressionstages = new arraylist<expressionstage>(allexpressionstagesraw.size()); int idcounter = 0; for (string expressionstagestring : allexpressionstagesraw) { expressionstage expressionstage = new expressionstage(); expressionstage.setexpressionstagetitle(expressionstagestring); expressionstage.setexpressionstageid("stage" + idcounter); expressionstage.setexpressionstagenumericalid(idcounter); allexpressionstages.add(expressionstage); idcounter++; } expressionstageoptions.setexpressionstagelist(allexpressionstages); expressionstagegroup embryologyexpressionstagegroup = new expressionstagegroup(); embryologyexpressionstagegroup.setgrouptitle("embryogenesis"); embryologyexpressionstagegroup.setgroupid("group" + 0); embryologyexpressionstagegroup.setgroupnumericalid(0); list<expressionstage> embryologyexpressionstagelist = new linkedlist<expressionstage>(); for (int i = 56; i <= 67; i++) { embryologyexpressionstagelist.add(allexpressionstages.get(i)); } embryologyexpressionstagegroup.setexpressionstagelist(embryologyexpressionstagelist); expressionstagegrouplist.add(embryologyexpressionstagegroup); expressionstagegroup developmentexpressionstagegroup = new expressionstagegroup(); developmentexpressionstagegroup.setgrouptitle("development"); developmentexpressionstagegroup.setgroupid("group" + 1); developmentexpressionstagegroup.setgroupnumericalid(1); list<expressionstage> developmentexpressionstagelist = new linkedlist<expressionstage>(); for (int i = 56; i <= 67; i++) { developmentexpressionstagelist.add(allexpressionstages.get(i)); } for (int i = 75; i <= 81; i++) { developmentexpressionstagelist.add(allexpressionstages.get(i)); } developmentexpressionstagelist.add(allexpressionstages.get(97)); for (int i = 49; i <= 54; i++) { developmentexpressionstagelist.add(allexpressionstages.get(i)); } for (int i = 38; i <= 41; i++) { developmentexpressionstagelist.add(allexpressionstages.get(i)); } developmentexpressionstagelist.add(allexpressionstages.get(19)); developmentexpressionstagelist.add(allexpressionstages.get(44)); developmentexpressionstagegroup.setexpressionstagelist(developmentexpressionstagelist); expressionstagegrouplist.add(developmentexpressionstagegroup); expressionstagegroup tissueexpressionstagegroup = new expressionstagegroup(); tissueexpressionstagegroup.setgrouptitle("tissue"); tissueexpressionstagegroup.setgroupid("group" + 2); tissueexpressionstagegroup.setgroupnumericalid(2); list<expressionstage> tissueexpressionstagelist = new linkedlist<expressionstage>(); for (int i = 11; i <= 29; i++) { tissueexpressionstagelist.add(allexpressionstages.get(i)); } for (int i = 32; i <= 37; i++) { tissueexpressionstagelist.add(allexpressionstages.get(i)); } for (int i = 42; i <= 43; i++) { tissueexpressionstagelist.add(allexpressionstages.get(i)); } for (int i = 47; i <= 48; i++) { tissueexpressionstagelist.add(allexpressionstages.get(i)); } tissueexpressionstagegroup.setexpressionstagelist(tissueexpressionstagelist); expressionstagegrouplist.add(tissueexpressionstagegroup); expressionstagegroup treatmentexpressionstagegroup = new expressionstagegroup(); treatmentexpressionstagegroup.setgrouptitle("treatment"); treatmentexpressionstagegroup.setgroupid("group" + 3); treatmentexpressionstagegroup.setgroupnumericalid(3); list<expressionstage> treatmentexpressionstagelist = new linkedlist<expressionstage>(); for (int i = 82; i <= 90; i++) { treatmentexpressionstagelist.add(allexpressionstages.get(i)); } for (int i = 0; i <= 10; i++) { treatmentexpressionstagelist.add(allexpressionstages.get(i)); } treatmentexpressionstagegroup.setexpressionstagelist(treatmentexpressionstagelist); expressionstagegrouplist.add(treatmentexpressionstagegroup); expressionstagegroup celllineexpressionstagegroup = new expressionstagegroup(); celllineexpressionstagegroup.setgrouptitle("cell-line"); celllineexpressionstagegroup.setgroupid("group" + 4); celllineexpressionstagegroup.setgroupnumericalid(4); list<expressionstage> celllineexpressionstagelist = new linkedlist<expressionstage>(); for (int i = 98; i <= 103; i++) { celllineexpressionstagelist.add(allexpressionstages.get(i)); } for (int i = 68; i <= 74; i++) { celllineexpressionstagelist.add(allexpressionstages.get(i)); } for (int i = 91; i <= 96; i++) { celllineexpressionstagelist.add(allexpressionstages.get(i)); } for (int i = 45; i <= 46; i++) { celllineexpressionstagelist.add(allexpressionstages.get(i)); } for (int i = 30; i <= 31; i++) { celllineexpressionstagelist.add(allexpressionstages.get(i)); } celllineexpressionstagelist.add(allexpressionstages.get(55)); celllineexpressionstagegroup.setexpressionstagelist(celllineexpressionstagelist); expressionstagegrouplist.add(celllineexpressionstagegroup); expressionstageoptions.setexpressionstagegrouplist(expressionstagegrouplist); return expressionstageoptions; }