Commit 76cdbd0d authored by Jonathan Shahen's avatar Jonathan Shahen
Browse files

Small alterations

parent c9f00073
...@@ -23,7 +23,6 @@ import org.apache.commons.cli.CommandLineParser; ...@@ -23,7 +23,6 @@ import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.HelpFormatter; import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.OptionBuilder; import org.apache.commons.cli.OptionBuilder;
import org.apache.commons.cli.Options; import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
public class ConverterInstance { public class ConverterInstance {
...@@ -152,17 +151,7 @@ public class ConverterInstance { ...@@ -152,17 +151,7 @@ public class ConverterInstance {
logger.info(timing.toString()); logger.info(timing.toString());
} catch (ParseException e) { } catch (Exception e) {
if (logger.getLevel() == Level.FINEST) {
e.printStackTrace();
}
logger.severe(e.getMessage());
} catch (SecurityException e) {
if (logger.getLevel() == Level.FINEST) {
e.printStackTrace();
}
logger.severe(e.getMessage());
} catch (IOException e) {
if (logger.getLevel() == Level.FINEST) { if (logger.getLevel() == Level.FINEST) {
e.printStackTrace(); e.printStackTrace();
} }
......
package mohawk.converter.helper;
public class RoleTimeSlotHelper {
}
package mohawk.global;
import java.io.File;
import java.io.FilenameFilter;
public class FileExtensions {
public String Mohawk = ".mohawk";
public String Mohawk_T = ".mohawk.T";
public String ASAPTime_SA = ".asaptime.sa";
public String ASAPTime_NSA = ".asaptime.nsa";
public String TRole = ".trole";
public String TRule = ".trule";
public String[] getFileExtensions() {
return new String[] { Mohawk, Mohawk_T, ASAPTime_SA, ASAPTime_NSA, TRole, TRule };
}
public static FilenameFilter getFilter(String ext) {
return new FilenameFilter() {
public boolean accept(File dir, String name) {
return name.toLowerCase().endsWith(ext);
}
};
}
public static File[] getFiles(String directory, FilenameFilter filter) {
File dir = new File(directory);
if (!dir.isDirectory()) { return null; }
File[] files = dir.listFiles(filter);
return files;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment