/*
 *	Modulname:	Choice
 *	Autor:		Eyer Leander
 *	Datum:		08.05.2006
 *
 *	(c) Copyright 2005
 */
package survey.model;

import org.w3c.dom.Element;

/**
 * A choice in a Mutliple Choice Questionaire
 */
public class Choice {

	private String id;
	private String label;

	/** Constructor */
	public Choice(Element choiceRoot) {
		parseFromXML(choiceRoot);
	}

	/** Create the element from the information in the xml definition */
	private void parseFromXML(Element choiceRoot) {
		id = choiceRoot.getAttribute("id");
		label = choiceRoot.getAttribute("label");
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getLabel() {
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	public String toString() {
		return label;
	}
}

