diff --git a/src/data/TaxonType.java b/src/data/TaxonType.java index 008c128d6abb687bed5a11f529d536b011268bfe..a5b2f4c37737518a297ff9d4b6984323552f9dc6 100644 --- a/src/data/TaxonType.java +++ b/src/data/TaxonType.java @@ -1,12 +1,12 @@ package data; /** - * Enumeration of classifications of Taxa. + * Enumeration of classifications of Taxontype. * @author Christopher W. Schankula * */ -//Changed to only capitalizing the first character + public enum TaxonType { Kingdom, Phylum, Class, Order, Family, Genus, Species, Subspecies; diff --git a/src/search/Histogram.java b/src/search/Histogram.java index 3e8ef105d2187c466f6dc3cf167c22ce6f742a71..f8d145eebf90b1eb6966017992783715843a6ba7 100644 --- a/src/search/Histogram.java +++ b/src/search/Histogram.java @@ -38,12 +38,18 @@ public class Histogram { int max = 0; int scale = 100; Iterable<Integer> results = record.keys(); + + //Finds the max individual count for (Integer year: results) { if (max < record.get(year)) max =record.get(year); } + + //Based the scale on the max System.out.println(" |" + (new String(new char[scale]).replace('\0', '-')) + "|"); String format = "%1$-5d|%2$-" + (scale + 1) + "s"; + + //Print out histogram based on scale for (Integer year: results) { String s = "="; int loopc = (int) ((float)(record.get(year)/ (float) max) * scale); @@ -56,7 +62,11 @@ public class Histogram { System.out.format("Scale: one = is %d individuals.\n", max / scale); } - + /** + * Gets the count of the record + * + * @param sum count of the record + */ public static int sum(Iterable<Record> records) { int sum = 0; for (Record r: records) @@ -64,8 +74,4 @@ public class Histogram { return sum; } - public static void main(String[] args) { - - } - -} + \ No newline at end of file diff --git a/src/sort/Bound.java b/src/sort/Bound.java index 990bac2766133a87334256150c9108509b01fb03..d6b4b7f3c65aa330faebca302ac14480fcbc3c75 100644 --- a/src/sort/Bound.java +++ b/src/sort/Bound.java @@ -1,5 +1,9 @@ package sort; - +/** + * Enumeration of bound types. + * @author Christopher W. Schankula + * + */ public enum Bound { LOWER, UPPER, LOWHIGH, ANY, EQUALS; } diff --git a/tomcat/windows-script.py b/tomcat/windows-script.py index f19d8f69ccd091aedd03a2abda6303925acd5592..fc7b96d8653de6a2a070f4c04d7c8af4f64bd94b 100644 --- a/tomcat/windows-script.py +++ b/tomcat/windows-script.py @@ -1,25 +1,24 @@ import subprocess -pathToTomcat = "C:\\Users\\liang\\Documents\\Git\\Trawl\\src\\tomcat" # REPLACE ME - CUSTOM +pathToTomcat = "\"C:\\Users\\Ray Liu\\Desktop\\Uni\\Second year\\2xb3\\2XB3" # REPLACE ME - CUSTOM -pathToSrc = "\\webapps\\Trawl\\bin\\com\\example\\" -pathToFin = "\\webapps\\Trawl\\WEB-INF\\classes\\com\\example\\" -pathClasspath = pathToTomcat + "\\lib\\servlet-api.jar;" + pathToTomcat + "\\webapps\\Trawl\\bin" +pathToSrc = "\\bin\"" +pathToFin = "\\tomcat\\webapps\\Trawl\\WEB-INF\\classes\"" +#pathClasspath = pathToTomcat + "\\lib\\servlet-api.jar;" + pathToTomcat + "\\webapps\\Trawl\\bin" -compileCMD1 = "javac -cp " + pathClasspath + " " + pathToTomcat + pathToSrc + "web\\Director.java" -compileCMD2 = "javac -cp " + pathClasspath + " " + pathToTomcat + pathToSrc + "model\\TrawlExpert.java" +# compileCMD1 = "javac -cp " + pathClasspath + " " + pathToTomcat + pathToSrc + "web\\Director.java" +# compileCMD2 = "javac -cp " + pathClasspath + " " + pathToTomcat + pathToSrc + "model\\TrawlExpert.java" # print(compileCMD1) # print(compileCMD2) -copyCMD1 = "copy " + pathToTomcat + pathToSrc + "web\\Director.class" + " " + pathToTomcat + pathToFin + "web\\Director.class" -copyCMD2 = "copy " + pathToTomcat + pathToSrc + "model\\TrawlExpert.class" + " " + pathToTomcat + pathToFin + "model\\TrawlExpert.class" +copyCMD1 = "xcopy " + pathToTomcat + pathToSrc + " " + pathToTomcat + pathToFin + " " + "/E" + + +#print(copyCMD1) -# print(copyCMD1) -# print(copyCMD2) # Command Processes -subprocess.call(compileCMD1, shell=True) -subprocess.call(compileCMD2, shell=True) + subprocess.call(copyCMD1, shell=True) -subprocess.call(copyCMD2, shell=True) \ No newline at end of file +