From ddc8211514bef14b1a25fcb1cf74f68735427e06 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Mon, 11 Nov 2013 14:47:33 +0530 Subject: Now status/PresentFile class also contains the fileContent. This fileContent will be be used later to analyze the difference between the content of original scruffy file and the content of the scruffy file which is parsed through different Parsers. --- conversion/ConvertFile.java | 8 +++++--- status/PresentFile.java | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/conversion/ConvertFile.java b/conversion/ConvertFile.java index 7d6f308..f3a83af 100644 --- a/conversion/ConvertFile.java +++ b/conversion/ConvertFile.java @@ -35,6 +35,9 @@ public class ConvertFile { htmlFile = new CreateHtmlFile(); } public void convert(File file) { + readFile = new ReadFile(file); + String fileContent = readFile.getContent(); + /** * takes the present file reference * for use outside this method. @@ -42,13 +45,12 @@ public class ConvertFile { PresentFile.file = file; PresentFile.name = null; PresentFile.author = null; - readFile = new ReadFile(file); - String fileContent = readFile.getContent(); + PresentFile.fileContent = fileContent; + if(!fileContent.equals("")) { // start conversion. for(Parser p:parsers) { fileContent = p.parse(fileContent); - } } // Write to corresponding html file. diff --git a/status/PresentFile.java b/status/PresentFile.java index 168575d..cd40b6c 100644 --- a/status/PresentFile.java +++ b/status/PresentFile.java @@ -31,6 +31,7 @@ public class PresentFile { public static String name; public static String author; public static File file; + public static String fileContent; } -- cgit v1.2.3