// Path: app/src/main/java/com/dalthed/tucan/Connection/AnswerObject.java
// public class AnswerObject {
// 	private String HTML_text;
// 	private String redirectURL;
// 	private String lastcalledURL;
// 	private CookieManager Cookies;
// 	/**
// 	 * RückgabeObjekt der BrowseMethods
// 	 * @param HTML HTML-Code
// 	 * @param redirect Redirect-URL aus dem HTTP-Header
// 	 * @param myCookies CookieManager mit relevanten Cookies
// 	 * @param lastcalledURL Zuletzt aufgerufene URL
// 	 */
// 	public AnswerObject(String HTML,String redirect,CookieManager myCookies,String lastcalledURL){
// 		this.HTML_text=HTML;
// 		this.redirectURL=redirect;
// 		this.Cookies=myCookies;
// 		this.lastcalledURL=lastcalledURL;
// 	}
// 	public String getHTML(){
// 		return this.HTML_text;
// 	}
// 	public String getRedirectURLString() {
// 		return this.redirectURL;
// 	}
// 	public String getLastCalledURL() {
// 		return this.lastcalledURL;
// 	}
// 	public CookieManager getCookieManager() {
// 		return this.Cookies;
// 	}
// 	
// }
// 
// Path: app/src/main/java/com/dalthed/tucan/adapters/UniApplicationAdapter.java
// public class UniApplicationAdapter extends ArrayAdapter<String> {
// 
// 	public final HashMap<Integer, ArrayList<String>> contentMap;
// 
// 	public static HashMap<Integer, ArrayList<String>> getEmptyContentMap() {
// 		return new HashMap<Integer, ArrayList<String>>() {
// 			{
// 				put(R.id.application_type, new ArrayList<String>());
// 				put(R.id.application_field, new ArrayList<String>());
// 				put(R.id.application_semester, new ArrayList<String>());
// 				put(R.id.application_status, new ArrayList<String>());
// 				put(R.id.application_begin, new ArrayList<String>());
// 				put(R.id.application_sent, new ArrayList<String>());
// 			}
// 		};
// 	}
// 
// 	public UniApplicationAdapter(Context context,
// 			HashMap<Integer, ArrayList<String>> contentMap) {
// 
// 		super(context, R.layout.application_row, R.id.application_field,
// 				contentMap.get(R.id.application_field));
// 		this.contentMap = contentMap;
// 	}
// 
// 	@Override
// 	public View getView(int position, View convertView, ViewGroup parent) {
// 
// 		View tempView = super.getView(position, convertView, parent);
// 		updateTextViewById(position, R.id.application_begin, tempView);
// 		updateTextViewById(position, R.id.application_semester, tempView);
// 		updateTextViewById(position, R.id.application_type, tempView);
// 		updateTextViewById(position, R.id.application_sent, tempView);
// 		updateTextViewById(position, R.id.application_status, tempView);
// 		return tempView;
// 	}
// 
// 	private void updateTextViewById(int position, int id, View parentView) {
// 		TextView tViewToUpdate = (TextView) parentView.findViewById(id);
// 		tViewToUpdate.setText(contentMap.get(id).get(position));
// 	}
// 
// }
// 
// Path: app/src/main/java/com/dalthed/tucan/exceptions/LostSessionException.java
// public class LostSessionException extends Exception {
// 
// 	public LostSessionException() {
// 		super();
// 	}
// 
// 	public LostSessionException(String detailMessage, Throwable throwable) {
// 		super(detailMessage, throwable);
// 	}
// 
// 	public LostSessionException(String detailMessage) {
// 		super(detailMessage);
// 	}
// 
// 	public LostSessionException(Throwable throwable) {
// 		super(throwable);
// 	}
// 
// }
// 
// Path: app/src/main/java/com/dalthed/tucan/exceptions/TucanDownException.java
// public class TucanDownException extends Exception {
// 
// 	/**
// 	 * 
// 	 */
// 	private static final long serialVersionUID = 1L;
// 	public TucanDownException() {
// 		super();
// 	}
// 	
// 	public TucanDownException(String ErrorMessage) {
// 		super(ErrorMessage);
// 	}
// 
// }


import com.dalthed.tucan.exceptions.LostSessionException;
import com.dalthed.tucan.exceptions.TucanDownException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import android.content.Context;
import android.widget.ListAdapter;
import com.dalthed.tucan.R;
import com.dalthed.tucan.Connection.AnswerObject;
import com.dalthed.tucan.adapters.UniApplicationAdapter;
/**
 *	This file is part of TuCan Mobile.
 *
 *	TuCan Mobile is free software: you can redistribute it and/or modify
 *	it under the terms of the GNU General Public License as published by
 *	the Free Software Foundation, either version 3 of the License, or
 *	(at your option) any later version.
 *
 *	TuCan Mobile is distributed in the hope that it will be useful,
 *	but WITHOUT ANY WARRANTY; without even the implied warranty of
 *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *	GNU General Public License for more details.
 *
 *	You should have received a copy of the GNU General Public License
 *	along with TuCan Mobile.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.dalthed.tucan.scraper;





public class UniApplicationScraper extends BasicScraper {

	private static final ArrayList<Integer> orderList = new ArrayList<Integer>() {
		{
			add(R.id.application_type);
			add(R.id.application_field);
			add(R.id.application_semester);
			add(R.id.application_status);
			add(R.id.application_begin);
			add(R.id.application_sent);
		}
	};

	public UniApplicationScraper(Context context, AnswerObject result) {
		super(context, result);
	}

	@Override
	public ListAdapter scrapeAdapter(int mode) throws LostSessionException,
// Path: app/src/main/java/com/dalthed/tucan/Connection/AnswerObject.java
// public class AnswerObject {
// 	private String HTML_text;
// 	private String redirectURL;
// 	private String lastcalledURL;
// 	private CookieManager Cookies;
// 	/**
// 	 * RückgabeObjekt der BrowseMethods
// 	 * @param HTML HTML-Code
// 	 * @param redirect Redirect-URL aus dem HTTP-Header
// 	 * @param myCookies CookieManager mit relevanten Cookies
// 	 * @param lastcalledURL Zuletzt aufgerufene URL
// 	 */
// 	public AnswerObject(String HTML,String redirect,CookieManager myCookies,String lastcalledURL){
// 		this.HTML_text=HTML;
// 		this.redirectURL=redirect;
// 		this.Cookies=myCookies;
// 		this.lastcalledURL=lastcalledURL;
// 	}
// 	public String getHTML(){
// 		return this.HTML_text;
// 	}
// 	public String getRedirectURLString() {
// 		return this.redirectURL;
// 	}
// 	public String getLastCalledURL() {
// 		return this.lastcalledURL;
// 	}
// 	public CookieManager getCookieManager() {
// 		return this.Cookies;
// 	}
// 	
// }
// 
// Path: app/src/main/java/com/dalthed/tucan/adapters/UniApplicationAdapter.java
// public class UniApplicationAdapter extends ArrayAdapter<String> {
// 
// 	public final HashMap<Integer, ArrayList<String>> contentMap;
// 
// 	public static HashMap<Integer, ArrayList<String>> getEmptyContentMap() {
// 		return new HashMap<Integer, ArrayList<String>>() {
// 			{
// 				put(R.id.application_type, new ArrayList<String>());
// 				put(R.id.application_field, new ArrayList<String>());
// 				put(R.id.application_semester, new ArrayList<String>());
// 				put(R.id.application_status, new ArrayList<String>());
// 				put(R.id.application_begin, new ArrayList<String>());
// 				put(R.id.application_sent, new ArrayList<String>());
// 			}
// 		};
// 	}
// 
// 	public UniApplicationAdapter(Context context,
// 			HashMap<Integer, ArrayList<String>> contentMap) {
// 
// 		super(context, R.layout.application_row, R.id.application_field,
// 				contentMap.get(R.id.application_field));
// 		this.contentMap = contentMap;
// 	}
// 
// 	@Override
// 	public View getView(int position, View convertView, ViewGroup parent) {
// 
// 		View tempView = super.getView(position, convertView, parent);
// 		updateTextViewById(position, R.id.application_begin, tempView);
// 		updateTextViewById(position, R.id.application_semester, tempView);
// 		updateTextViewById(position, R.id.application_type, tempView);
// 		updateTextViewById(position, R.id.application_sent, tempView);
// 		updateTextViewById(position, R.id.application_status, tempView);
// 		return tempView;
// 	}
// 
// 	private void updateTextViewById(int position, int id, View parentView) {
// 		TextView tViewToUpdate = (TextView) parentView.findViewById(id);
// 		tViewToUpdate.setText(contentMap.get(id).get(position));
// 	}
// 
// }
// 
// Path: app/src/main/java/com/dalthed/tucan/exceptions/LostSessionException.java
// public class LostSessionException extends Exception {
// 
// 	public LostSessionException() {
// 		super();
// 	}
// 
// 	public LostSessionException(String detailMessage, Throwable throwable) {
// 		super(detailMessage, throwable);
// 	}
// 
// 	public LostSessionException(String detailMessage) {
// 		super(detailMessage);
// 	}
// 
// 	public LostSessionException(Throwable throwable) {
// 		super(throwable);
// 	}
// 
// }
// 
// Path: app/src/main/java/com/dalthed/tucan/exceptions/TucanDownException.java
// public class TucanDownException extends Exception {
// 
// 	/**
// 	 * 
// 	 */
// 	private static final long serialVersionUID = 1L;
// 	public TucanDownException() {
// 		super();
// 	}
// 	
// 	public TucanDownException(String ErrorMessage) {
// 		super(ErrorMessage);
// 	}
// 
// }


// Path: app/src/main/java/com/dalthed/tucan/scraper/UniApplicationScraper.java
import com.dalthed.tucan.exceptions.LostSessionException;
import com.dalthed.tucan.exceptions.TucanDownException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import android.content.Context;
import android.widget.ListAdapter;
import com.dalthed.tucan.R;
import com.dalthed.tucan.Connection.AnswerObject;
import com.dalthed.tucan.adapters.UniApplicationAdapter;

/**
 *	This file is part of TuCan Mobile.
 *
 *	TuCan Mobile is free software: you can redistribute it and/or modify
 *	it under the terms of the GNU General Public License as published by
 *	the Free Software Foundation, either version 3 of the License, or
 *	(at your option) any later version.
 *
 *	TuCan Mobile is distributed in the hope that it will be useful,
 *	but WITHOUT ANY WARRANTY; without even the implied warranty of
 *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *	GNU General Public License for more details.
 *
 *	You should have received a copy of the GNU General Public License
 *	along with TuCan Mobile.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.dalthed.tucan.scraper;





public class UniApplicationScraper extends BasicScraper {

	private static final ArrayList<Integer> orderList = new ArrayList<Integer>() {
		{
			add(R.id.application_type);
			add(R.id.application_field);
			add(R.id.application_semester);
			add(R.id.application_status);
			add(R.id.application_begin);
			add(R.id.application_sent);
		}
	};

	public UniApplicationScraper(Context context, AnswerObject result) {
		super(context, result);
	}

	@Override
	public ListAdapter scrapeAdapter(int mode) throws LostSessionException,
			TucanDownException {