trivial refactoring: isFile renamed to isIntervalFile and made public

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3541 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
asivache 2010-06-14 14:02:23 +00:00
parent c3b68cc58d
commit 7b7d3341f0
1 changed files with 6 additions and 3 deletions

View File

@ -47,7 +47,7 @@ public class IntervalUtils {
for (String fileOrInterval : argument.split(";")) {
// if it's a file, add items to raw interval list
if (isFile(fileOrInterval))
if (isIntervalFile(fileOrInterval))
rawIntervals.addAll(GenomeLocParser.intervalFileToList(fileOrInterval));
// otherwise treat as an interval -> parse and add to raw interval list
@ -85,7 +85,7 @@ public class IntervalUtils {
* @param str token to identify as a filename.
* @return true if the token looks like a filename, or false otherwise.
*/
private static boolean isFile(String str) {
public static boolean isIntervalFile(String str) {
// should we define list of file extensions as a public array somewhere?
// is regex or endsiwth better?
if (str.toUpperCase().endsWith(".BED") || str.toUpperCase().endsWith(".LIST") ||
@ -99,5 +99,8 @@ public class IntervalUtils {
"Please rename your file with the appropriate extension.");
else return false;
}
}
}