Skip to content

Commit 9381971

Browse files
author
akramhar
committed
DLL renames and moved some constants
1 parent 9e371af commit 9381971

2 files changed

Lines changed: 20 additions & 25 deletions

File tree

src/main/java/edu/umassmed/omega/commons/constants/OmegaGenericConstants.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,6 @@ public class OmegaGenericConstants {
5757
+ "src" + File.separator + "main" + File.separator + "resources"
5858
+ File.separator + "images";
5959
public final static String OMEGA_IMGS_FOLDER = "images";
60-
public final static String OMEGA_SPT_FOLDER_2 = "." + File.separator
61-
+ "src" + File.separator + "main" + File.separator + "resources"
62-
+ File.separator + "sptWinPlugin";
63-
public final static String OMEGA_SPT_FOLDER = "sptWinPlugin";
64-
public final static String OMEGA_SPT_DLL = "omega-spt-stats";
6560
public final static String OMEGA_ERROR_INTERPOLATION_FOLDER_2 = "."
6661
+ File.separator + "src" + File.separator + "main" + File.separator
6762
+ "resources" + File.separator + "errorInterpolation";

src/main/java/edu/umassmed/omega/commons/utilities/OmegaFileUtilities.java

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@
3838
import edu.umassmed.omega.commons.exceptions.OmegaCoreExceptionFileManager;
3939

4040
public class OmegaFileUtilities {
41-
42-
// TODO need to throw exceptions here instead of hard fail
43-
public static InputStream getSptDllFilename(final String fileName) {
44-
final String s = OmegaGenericConstants.OMEGA_SPT_FOLDER + "/"
45-
+ fileName;
46-
// System.out.println(s);
47-
final ClassLoader cl = OmegaFileUtilities.class.getClassLoader();
48-
return cl.getResourceAsStream(s);
49-
}
50-
41+
42+
// // TODO need to throw exceptions here instead of hard fail
43+
// public static InputStream getSptDllFilename(final String fileName) {
44+
// final String s = OmegaGenericConstants.OMEGA_SPT_FOLDER + "/"
45+
// + fileName;
46+
// // System.out.println(s);
47+
// final ClassLoader cl = OmegaFileUtilities.class.getClassLoader();
48+
// return cl.getResourceAsStream(s);
49+
// }
50+
5151
public static InputStream getErrorInterpolationFilename(
5252
final String fileName) {
5353
final String s = OmegaGenericConstants.OMEGA_ERROR_INTERPOLATION_FOLDER
@@ -57,50 +57,50 @@ public static InputStream getErrorInterpolationFilename(
5757
final ClassLoader cl = OmegaFileUtilities.class.getClassLoader();
5858
return cl.getResourceAsStream(s);
5959
}
60-
60+
6161
public static InputStream getImageFilename(final String imageName) {
6262
final String s = OmegaGenericConstants.OMEGA_IMGS_FOLDER + "/"
6363
+ imageName;
6464
// System.out.println(s);
6565
final ClassLoader cl = OmegaFileUtilities.class.getClassLoader();
6666
return cl.getResourceAsStream(s);
6767
}
68-
68+
6969
private static void copyFile(final File f1, final File f2,
7070
final boolean append) throws IOException {
7171
final FileWriter fw = new FileWriter(f2, append);
7272
final BufferedWriter bw = new BufferedWriter(fw);
7373
final FileReader fr = new FileReader(f1);
7474
final BufferedReader br = new BufferedReader(fr);
75-
75+
7676
String line = br.readLine();
7777
while (line != null) {
7878
bw.write(line);
7979
bw.write("\n");
8080
line = br.readLine();
8181
}
82-
82+
8383
bw.close();
8484
br.close();
8585
br.close();
8686
fr.close();
8787
}
88-
88+
8989
public static void copyFile(final File f1, final File f2)
9090
throws IOException {
9191
OmegaFileUtilities.copyFile(f1, f2, false);
9292
}
93-
93+
9494
public static void appendFile(final File f1, final File f2)
9595
throws IOException {
9696
OmegaFileUtilities.copyFile(f1, f2, true);
9797
}
98-
98+
9999
public static boolean directoryExists(final String dirName) {
100100
final File dir = new File(dirName);
101101
return dir.exists();
102102
}
103-
103+
104104
public static void createDirectory(final String dirName)
105105
throws OmegaCoreExceptionFileManager {
106106
final File dir = new File(dirName);
@@ -110,7 +110,7 @@ public static void createDirectory(final String dirName)
110110
throw new OmegaCoreExceptionFileManager(
111111
"createDirectory: directory " + dirName + " already exists");
112112
}
113-
113+
114114
public static void emptyDirectory(final String dirName)
115115
throws OmegaCoreExceptionFileManager {
116116
final File dir = new File(dirName);
@@ -127,7 +127,7 @@ public static void emptyDirectory(final String dirName)
127127
}
128128
}
129129
}
130-
130+
131131
private static void deleteDirectory(final String dirName)
132132
throws OmegaCoreExceptionFileManager {
133133
final File dir = new File(dirName);

0 commit comments

Comments
 (0)