/**
 *  @author Pranava Raparla
 *  Created: October 4th, 2014
 *  Modified: October 4th, 2014
 */

package application;

import java.io.File;
import java.util.*;

import javafx.geometry.Point2D;



public class Model {
	
	public Model(){
		
	}
	
	/**
	 * pass parseInput the input string, and parseInput will return a List of AbstractActions to the View, which the
	 * View will handle applying to the correct AbstractDrawer. List can have NullActions if the input is parsed 
	 * to create no Actions. 
	 * @param inputString
	 * @return
	 */
	
	public List<AbstractAction> parseInput(String inputString){
		return null;
		
		
	}
	
	/**
	 * Similar to parseInput, but the input String is contained within a File.  Parse accordingly, and and return a List of AbstractActions.
	 * We will have NullActions to represent if the input is parsed and returns a non Action.
	 * @param inputFile
	 * @return
	 */
	public List<AbstractAction> parseFile(File inputFile){
		return null;
		
	}
	
	
	/**
	 * Pass in a workspace and store it in the Model
	 * @param workspace
	 */
	public void storeWorkspace(Workspace workspace){
		
	}
	
	/**
	 * Change the language the the back-end parser for parsing.
	 * @param language
	 */
	public void setLanguage(String language){
		
	}
	
	/**
	 * If a point on the Canvas is clicked, make the Drawer go to this point.  Pass in the start location, the end location,
	 * and the starting orientation and a List of Actions will be returned to correctly complete this Action.
	 * @param action
	 */
	public List<AbstractAction> handleManualDrawerClickEvent(Point2D start, double orientation, Point2D end){
		return null;
		
	}

}
@@ -130,20 +130,45 @@
 java.io.
+*;%0Aimport java.nio.file.
 File
+s
 ;%0Aimport
@@ -631,26 +631,210 @@
 %7B%0A%09%09
-return null;%0A%09%09%0A%09%09
+List%3CAbstractAction%3E listOfActions = new ArrayList%3CAbstractAction%3E();%0A%09%09String%5B%5D inputStringArray = inputString.split(%22//s+%22);%0A%09%09%0A%09%09for(String str: inputStringArray) %7B%0A%09%09%09%0A%09%09%7D%0A%09%09%0A%09%09return listOfActions;
 %0A%09%7D%0A
@@ -1161,39 +1161,371 @@
 putFile)%7B%0A%09%09
-return null;%0A%09%09
+Scanner myScanner;%0A%09%09String inputString = %22%22;%0A%09%09try %7B%0A%09%09%09myScanner = new Scanner(inputFile);%0A%09%09%09inputString = myScanner.useDelimiter(%22%5C%5CZ%22).next();%0A%09%09%7D catch (FileNotFoundException e) %7B%0A%09%09%09// TODO Auto-generated catch block%0A%09%09%09e.printStackTrace();%0A%09%09%7D finally %7B%0A%09%09%09if(myScanner != null)%0A%09%09%09%09myScanner.close();%0A%09%09%7D%0A%09%09return parseInput(inputString);
 %0A%09%7D%0A%09%0A%09%0A%09/**

Set up parsing for files, started container for parsing strings