// Path: src/main/java/cz/brmlab/brmson/takepig/framework/TPLogEntry.java
// public enum TPLogEntry implements LogEntry {
// 	  ANS_TYPE, KEYTERM, PASSAGE, IE, ANS
// }
// 
// Path: src/main/java/cz/brmlab/brmson/takepig/framework/jcas/AnswerTypeJCasManipulator.java
// public class AnswerTypeJCasManipulator {
// 	/**
// 	 * Convert UIMA data model
// 	 * 
// 	 * @param questionView
// 	 * @return answerType
// 	 */
// 	public static String loadAnswerType(JCas questionView) {
// 		String result = null;
// 		AnnotationIndex<?> index = questionView.getAnnotationIndex(AnswerType.type);
// 		Iterator<?> it = index.iterator();
// 
// 		if (it.hasNext()) {
// 			AnswerType atype = (AnswerType) it.next();
// 			result = atype.getLabel();
// 		}
// 		return result;
// 	}
// 
// 	/**
// 	 * Stores (overwrite) answer type in a view
// 	 * 
// 	 * @param questionView
// 	 * @param type
// 	 */
// 	public static void storeAnswerType(JCas questionView, String type) {
// 		// Remove old content first! (otherwise, it would work only once)
// 		Iterator<?> it = questionView.getJFSIndexRepository().getAllIndexedFS(
// 				AnswerType.type);
// 		while (it.hasNext()) {
// 			AnswerType oaqaType = (AnswerType) it.next();
// 			oaqaType.removeFromIndexes();
// 		}
// 
// 		AnswerType oaqaType = new AnswerType(questionView);
// 		oaqaType.setLabel(type);
// 		oaqaType.addToIndexes();
// 	}
// }
// 
// Path: src/main/java/cz/brmlab/brmson/takepig/framework/jcas/ViewManager.java
// public class ViewManager {
// 
// 	public static JCas getView(JCas jcas, ViewType type) throws CASException {
// 		return getOrCreateView(jcas, type);
// 	}
// 
// 	public static JCas getOrCreateView(JCas jcas, ViewType type)
// 			throws CASException {
// 		String viewName = type.toString();
// 		try {
// 			return jcas.getView(viewName);
// 		} catch (Exception e) {
// 			jcas.createView(viewName);
// 			return jcas.getView(viewName);
// 		}
// 	}
// 
// }
// 
// Path: src/main/java/cz/brmlab/brmson/takepig/framework/jcas/ViewType.java
// public enum ViewType {
// 	ANS_TYPE, KEYTERM, PASSAGE, IE, ANS
// }


import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
import org.apache.uima.jcas.JCas;
import edu.cmu.lti.oaqa.ecd.log.AbstractLoggedComponent;
import edu.cmu.lti.oaqa.framework.BaseJCasHelper;
import edu.cmu.lti.oaqa.framework.types.InputElement;
import cz.brmlab.brmson.takepig.framework.TPLogEntry;
import cz.brmlab.brmson.takepig.framework.jcas.AnswerTypeJCasManipulator;
import cz.brmlab.brmson.takepig.framework.jcas.ViewManager;
import cz.brmlab.brmson.takepig.framework.jcas.ViewType;
package cz.brmlab.brmson.takepig.basephase;



public abstract class AbstractAnswerTypeExtractor extends AbstractLoggedComponent {
	protected JCas jcas;

	public abstract String extractAnswerTypes(String question);

	@Override
	public final void process(JCas jcas) throws AnalysisEngineProcessException {
		super.process(jcas);
// Path: src/main/java/cz/brmlab/brmson/takepig/framework/TPLogEntry.java
// public enum TPLogEntry implements LogEntry {
// 	  ANS_TYPE, KEYTERM, PASSAGE, IE, ANS
// }
// 
// Path: src/main/java/cz/brmlab/brmson/takepig/framework/jcas/AnswerTypeJCasManipulator.java
// public class AnswerTypeJCasManipulator {
// 	/**
// 	 * Convert UIMA data model
// 	 * 
// 	 * @param questionView
// 	 * @return answerType
// 	 */
// 	public static String loadAnswerType(JCas questionView) {
// 		String result = null;
// 		AnnotationIndex<?> index = questionView.getAnnotationIndex(AnswerType.type);
// 		Iterator<?> it = index.iterator();
// 
// 		if (it.hasNext()) {
// 			AnswerType atype = (AnswerType) it.next();
// 			result = atype.getLabel();
// 		}
// 		return result;
// 	}
// 
// 	/**
// 	 * Stores (overwrite) answer type in a view
// 	 * 
// 	 * @param questionView
// 	 * @param type
// 	 */
// 	public static void storeAnswerType(JCas questionView, String type) {
// 		// Remove old content first! (otherwise, it would work only once)
// 		Iterator<?> it = questionView.getJFSIndexRepository().getAllIndexedFS(
// 				AnswerType.type);
// 		while (it.hasNext()) {
// 			AnswerType oaqaType = (AnswerType) it.next();
// 			oaqaType.removeFromIndexes();
// 		}
// 
// 		AnswerType oaqaType = new AnswerType(questionView);
// 		oaqaType.setLabel(type);
// 		oaqaType.addToIndexes();
// 	}
// }
// 
// Path: src/main/java/cz/brmlab/brmson/takepig/framework/jcas/ViewManager.java
// public class ViewManager {
// 
// 	public static JCas getView(JCas jcas, ViewType type) throws CASException {
// 		return getOrCreateView(jcas, type);
// 	}
// 
// 	public static JCas getOrCreateView(JCas jcas, ViewType type)
// 			throws CASException {
// 		String viewName = type.toString();
// 		try {
// 			return jcas.getView(viewName);
// 		} catch (Exception e) {
// 			jcas.createView(viewName);
// 			return jcas.getView(viewName);
// 		}
// 	}
// 
// }
// 
// Path: src/main/java/cz/brmlab/brmson/takepig/framework/jcas/ViewType.java
// public enum ViewType {
// 	ANS_TYPE, KEYTERM, PASSAGE, IE, ANS
// }


// Path: src/main/java/cz/brmlab/brmson/takepig/basephase/AbstractAnswerTypeExtractor.java
import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
import org.apache.uima.jcas.JCas;
import edu.cmu.lti.oaqa.ecd.log.AbstractLoggedComponent;
import edu.cmu.lti.oaqa.framework.BaseJCasHelper;
import edu.cmu.lti.oaqa.framework.types.InputElement;
import cz.brmlab.brmson.takepig.framework.TPLogEntry;
import cz.brmlab.brmson.takepig.framework.jcas.AnswerTypeJCasManipulator;
import cz.brmlab.brmson.takepig.framework.jcas.ViewManager;
import cz.brmlab.brmson.takepig.framework.jcas.ViewType;

package cz.brmlab.brmson.takepig.basephase;



public abstract class AbstractAnswerTypeExtractor extends AbstractLoggedComponent {
	protected JCas jcas;

	public abstract String extractAnswerTypes(String question);

	@Override
	public final void process(JCas jcas) throws AnalysisEngineProcessException {
		super.process(jcas);
		this.jcas = jcas;