// Path: src/main/java/technology/tabula/tabula_web/App.java
// public class App {
// 
// 	private static final String VERSION = "1.1.0";
// 	
// 	public static void main(String[] args) throws JsonIOException, JsonSyntaxException, IOException, WorkspaceException {
// 		staticFiles.location("/public");
// 		RouteOverview.enableRouteOverview();
// 		
// 		WorkspaceDAO workspaceDAO = new FileWorkspaceDAO(Settings.getDataDir());
// 				
// 	    path("/", new IndexRouteGroup(workspaceDAO));
// 	    path("/pdfs/", new PdfsRouteGroup(workspaceDAO));
// 	    path("/pdf/", new PdfRouteGroup(workspaceDAO));
// 	    path("/queue/", new JobProgressRouteGroup());
// 
// 	    get("/version", (req, rsp) -> {
// 			rsp.type("application/json");
// 			return String.format("{ \"api\": \"%s\" }", VERSION);
// 		});
// 	}
// }
// 
// Path: src/main/java/technology/tabula/tabula_web/JsonTransformer.java
// public class JsonTransformer implements ResponseTransformer {
// 
//     private Gson gson = new Gson();
// 
//     @Override
//     public String render(Object model) {
//         return gson.toJson(model);
//     }
// 
// }
// 
// Path: src/main/java/technology/tabula/tabula_web/workspace/WorkspaceDAO.java
// public interface WorkspaceDAO {
// 	
// 	Workspace getWorkspace() throws WorkspaceException;
// 
// 	void addDocument(WorkspaceDocument we, List<DocumentPage> pages) throws WorkspaceException;
// 
// 	void deleteDocument(String documentId) throws WorkspaceException;
// 
// 	WorkspaceDocument getDocumentMetadata(String documentId) throws WorkspaceException;
// 
// 	List<DocumentPage> getDocumentPages(String documentId) throws WorkspaceException;
// 
// 	String getDocumentPath(String documentId);
// 	
// 	String getDocumentDir(String documentId);
// 
// 	String getDataDir();
// 	
// 	void addFile(InputStream stream, String documentId, String filename) throws WorkspaceException;
// 
// }


import java.util.Scanner;
import spark.RouteGroup;
import technology.tabula.tabula_web.App;
import technology.tabula.tabula_web.JsonTransformer;
import technology.tabula.tabula_web.workspace.WorkspaceDAO;
import static spark.Spark.*;
package technology.tabula.tabula_web.routes;






public class IndexRouteGroup implements RouteGroup {

    private static final String index;

    static {
        index = new Scanner(App.class.getClassLoader().getResourceAsStream("public/index.html"), "UTF-8").useDelimiter("\\A").next();
    }

    private static final String[] indexes = new String[]{"pdf/:file_id", "help", "about"};
// Path: src/main/java/technology/tabula/tabula_web/App.java
// public class App {
// 
// 	private static final String VERSION = "1.1.0";
// 	
// 	public static void main(String[] args) throws JsonIOException, JsonSyntaxException, IOException, WorkspaceException {
// 		staticFiles.location("/public");
// 		RouteOverview.enableRouteOverview();
// 		
// 		WorkspaceDAO workspaceDAO = new FileWorkspaceDAO(Settings.getDataDir());
// 				
// 	    path("/", new IndexRouteGroup(workspaceDAO));
// 	    path("/pdfs/", new PdfsRouteGroup(workspaceDAO));
// 	    path("/pdf/", new PdfRouteGroup(workspaceDAO));
// 	    path("/queue/", new JobProgressRouteGroup());
// 
// 	    get("/version", (req, rsp) -> {
// 			rsp.type("application/json");
// 			return String.format("{ \"api\": \"%s\" }", VERSION);
// 		});
// 	}
// }
// 
// Path: src/main/java/technology/tabula/tabula_web/JsonTransformer.java
// public class JsonTransformer implements ResponseTransformer {
// 
//     private Gson gson = new Gson();
// 
//     @Override
//     public String render(Object model) {
//         return gson.toJson(model);
//     }
// 
// }
// 
// Path: src/main/java/technology/tabula/tabula_web/workspace/WorkspaceDAO.java
// public interface WorkspaceDAO {
// 	
// 	Workspace getWorkspace() throws WorkspaceException;
// 
// 	void addDocument(WorkspaceDocument we, List<DocumentPage> pages) throws WorkspaceException;
// 
// 	void deleteDocument(String documentId) throws WorkspaceException;
// 
// 	WorkspaceDocument getDocumentMetadata(String documentId) throws WorkspaceException;
// 
// 	List<DocumentPage> getDocumentPages(String documentId) throws WorkspaceException;
// 
// 	String getDocumentPath(String documentId);
// 	
// 	String getDocumentDir(String documentId);
// 
// 	String getDataDir();
// 	
// 	void addFile(InputStream stream, String documentId, String filename) throws WorkspaceException;
// 
// }


// Path: src/main/java/technology/tabula/tabula_web/routes/IndexRouteGroup.java
import java.util.Scanner;
import spark.RouteGroup;
import technology.tabula.tabula_web.App;
import technology.tabula.tabula_web.JsonTransformer;
import technology.tabula.tabula_web.workspace.WorkspaceDAO;
import static spark.Spark.*;

package technology.tabula.tabula_web.routes;






public class IndexRouteGroup implements RouteGroup {

    private static final String index;

    static {
        index = new Scanner(App.class.getClassLoader().getResourceAsStream("public/index.html"), "UTF-8").useDelimiter("\\A").next();
    }

    private static final String[] indexes = new String[]{"pdf/:file_id", "help", "about"};
    private WorkspaceDAO workspaceDAO;