@SuppressWarnings("rawtypes")
	public List<Debate> getDebateList() {
		
		List<Debate> debateList = new ArrayList<Debate>();
		Element root = document.getRootElement();
		Element debateElement;
		Debate debate;
		for (Iterator i = root.elementIterator("debate"); i.hasNext();) {
			debateElement = (Element)i.next();
			if (debateElement.element("isDeleted").getText().equals("false")) {
				String id = debateElement.element("id").getText()
						, topic = debateElement.element("topic").getText()
						, description = debateElement.element("description").getText()
						, maxTurns = debateElement.element("maxTurns").getText()
						, turnDuration = debateElement.element("turnDuration").getText()
						, maxTime = debateElement.element("maxTime").getText()
						, timeLeft = debateElement.element("timeLeft").getText()
						, materials = debateElement.element("materials").getText()
						, status = debateElement.element("status").getText()
						, isDeleted = debateElement.element("isDeleted").getText()
						, memberA = debateElement.element("memberA").getText()
						, memberB = debateElement.element("memberB").getText()
						, winner = debateElement.element("winner").getText()
						, teamALeader = debateElement.element("teamALeader").getText()
						, teamBLeader = debateElement.element("teamBLeader").getText()
						, teamARep = debateElement.element("teamARep").getText()
						, teamBRep = debateElement.element("teamBRep").getText()
						, currentTurnTeam = debateElement.element("currentTurnTeam").getText();
				String[] teamA = memberA.split(",");
				String[] teamB = memberB.split(",");
				String[][] team;
				if (teamA.length > teamB.length) {
					team = new String[2][teamA.length];
				} else {
					team = new String[2][teamB.length];
				}
				for (int j = 0; j < teamA.length; j++) {
					team[0][j] = teamA[j];
				}
				for (int j = 0; j < teamB.length; j++) {
					team[1][j] = teamB[j];
				}
				int maxTurnsValue = 0;
				if (maxTurns != null) {
					maxTurnsValue = Integer.parseInt(maxTurns);
				}
				boolean isDeleteValue = false;
				if (isDeleted != null) {
					if (isDeleted.equals("true")) {
						isDeleteValue = true;
					}
				}
				String[] teamLeader = {teamALeader, teamBLeader}
							, teamRep = {teamARep, teamBRep};
				int turnLeft = 0;
				if (turnDuration != null) {
					turnLeft = Integer.parseInt(turnDuration);
				}
				debate = new Debate(id, maxTurnsValue, topic, description, team, winner
						, maxTime, materials, teamLeader, teamRep, isDeleteValue, currentTurnTeam
						, status, turnLeft, timeLeft);
				debateList.add(debate);
			}
			
		}
		return debateList;
	}