package net.woodyfolsom.cs6601.p2;

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

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamImplicit;

@XStreamAlias("survey")
public class Survey {
	private Map<Integer,String> dishes = new HashMap<Integer,String>();
	private Map<Integer,String> categories = new HashMap<Integer,String>();
	
	@XStreamImplicit(itemFieldName="diner")
	private List<Diner> diners = new ArrayList<Diner>();
	
	public Diner getDiner(int dinerIndex) {
		return diners.get(dinerIndex);
	}
	
	public int getDinerCount() {
		return diners.size();
	}
	
	public String getDish(int dishId) {
		return dishes.get(dishId);
	}
	
	public int getDishCount() {
		return dishes.size();
	}
	
	public String getCategory(int catId) {
		return categories.get(catId);
	}
	
	public int getCategoryCount() {
		return categories.size();
	}
}
