Reformat and clean up "tools" package
This commit is contained in:
@@ -8,13 +8,12 @@ import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author RonanLana
|
||||
*
|
||||
This application main objective is to read Vega-related information from
|
||||
the item's description report back missing nodes for these items.
|
||||
|
||||
Estimated parse time: 10 seconds
|
||||
* <p>
|
||||
* This application main objective is to read Vega-related information from
|
||||
* the item's description report back missing nodes for these items.
|
||||
* <p>
|
||||
* Estimated parse time: 10 seconds
|
||||
*/
|
||||
public class CashVegaChecker {
|
||||
private static final File OUTPUT_FILE = ToolConstants.getOutputFile("vega_checker_report.txt");
|
||||
@@ -40,7 +39,7 @@ public class CashVegaChecker {
|
||||
token.getChars(i, j, dest, 0);
|
||||
|
||||
d = new String(dest);
|
||||
return(d.trim());
|
||||
return (d.trim());
|
||||
}
|
||||
|
||||
private static String getValue(String token) {
|
||||
@@ -56,36 +55,33 @@ public class CashVegaChecker {
|
||||
token.getChars(i, j, dest, 0);
|
||||
|
||||
d = new String(dest);
|
||||
return(d.trim());
|
||||
return (d.trim());
|
||||
}
|
||||
|
||||
private static void forwardCursor(int st) {
|
||||
String line = null;
|
||||
|
||||
try {
|
||||
while(status >= st && (line = bufferedReader.readLine()) != null) {
|
||||
while (status >= st && (line = bufferedReader.readLine()) != null) {
|
||||
simpleToken(line);
|
||||
}
|
||||
}
|
||||
catch(Exception e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private static void simpleToken(String token) {
|
||||
if(token.contains("/imgdir")) {
|
||||
if (token.contains("/imgdir")) {
|
||||
status -= 1;
|
||||
}
|
||||
else if(token.contains("imgdir")) {
|
||||
} else if (token.contains("imgdir")) {
|
||||
status += 1;
|
||||
}
|
||||
}
|
||||
|
||||
private static void translateItemToken(String token) {
|
||||
if(token.contains("/imgdir")) {
|
||||
if (token.contains("/imgdir")) {
|
||||
status -= 1;
|
||||
}
|
||||
else if(token.contains("imgdir")) {
|
||||
} else if (token.contains("imgdir")) {
|
||||
status += 1;
|
||||
|
||||
if (status == 2) {
|
||||
@@ -101,10 +97,9 @@ public class CashVegaChecker {
|
||||
}
|
||||
|
||||
private static void translateVegaToken(String token) {
|
||||
if(token.contains("/imgdir")) {
|
||||
if (token.contains("/imgdir")) {
|
||||
status -= 1;
|
||||
}
|
||||
else if(token.contains("imgdir")) {
|
||||
} else if (token.contains("imgdir")) {
|
||||
status += 1;
|
||||
} else {
|
||||
if (status == 2) {
|
||||
@@ -122,7 +117,7 @@ public class CashVegaChecker {
|
||||
bufferedReader = new BufferedReader(fileReader);
|
||||
|
||||
String line;
|
||||
while((line = bufferedReader.readLine())!=null){
|
||||
while ((line = bufferedReader.readLine()) != null) {
|
||||
translateItemToken(line);
|
||||
}
|
||||
|
||||
@@ -141,7 +136,7 @@ public class CashVegaChecker {
|
||||
bufferedReader = new BufferedReader(fileReader);
|
||||
|
||||
String line;
|
||||
while((line = bufferedReader.readLine())!=null){
|
||||
while ((line = bufferedReader.readLine()) != null) {
|
||||
translateVegaToken(line);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user