public void generateGraphView(int selectedBook) {
		ArrayList<Integer> pagesInChapter = new ArrayList<>();
		for(int i = 0;i < selectedChapters.get(selectedBook).size();i++){
			int start = repository.get(selectedBook).getChapter(selectedChapters.get(selectedBook).get(i)).getStart();
			int end = repository.get(selectedBook).getChapter(selectedChapters.get(selectedBook).get(i)).getEnd();
			for(;start <= end;start++){
				pagesInChapter.add(start);
			}
		}
		g = new GraphView(repository.get(selectedBook), thisInstance, selectedChapters.get(selectedBook));
		if(pagesInChapter.size() != 0){
			g.instantiateGraph(redQueryList.get(selectedBook), greenQueryList.get(selectedBook), blueQueryList.get(selectedBook), pagesInChapter);
		}
		else {
			g.instantiateGraph(redQueryList.get(selectedBook), greenQueryList.get(selectedBook), blueQueryList.get(selectedBook), null);
		}
		//Clear any prior contents.
		if(currentForceDirectedGraph != null){
			forceDirectedNetwork.remove(currentForceDirectedGraph);
		}
		currentForceDirectedGraph = g.getDisplayGraph();
		//Build text view for graph view.
		String buildTileBarString = "";
		buildTileBarString += "Title: "+repository.get(selectedBook).getTitle() +"\nAuthor: "+repository.get(selectedBook).getAuthor()+"\n";
		buildTileBarString += g.getTextInformation();
		displayTextGraph.setText(buildTileBarString);
		updateGraphInterface();
	}