summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsiddharth <rsiddharth@ninthfloor.org>2013-11-11 14:47:33 +0530
committerrsiddharth <rsiddharth@ninthfloor.org>2013-11-11 14:47:33 +0530
commitddc8211514bef14b1a25fcb1cf74f68735427e06 (patch)
tree11ace4e6d31ce70dfadaa2e5de6f823b8ce8acd4
parent7b6205cc62304fcae4bc923100157aa2a173bb62 (diff)
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.
-rw-r--r--conversion/ConvertFile.java8
-rw-r--r--status/PresentFile.java1
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;
}