1 package net.sourceforge.addam.util;
2
3 import java.io.File;
4
5 /**
6 * Created by IntelliJ IDEA.
7 * User: TIM3
8 * Date: Oct 28, 2006
9 * Time: 1:54:43 PM
10 * To change this template use File | Settings | File Templates.
11 */
12 public class TableUtil {
13 public static String getTableName(File file) {
14 String filename = file.getName();
15 if (filename.toLowerCase().endsWith(".csv")) {
16 return filename.replace(".csv","");
17 }
18 return null;
19 }
20
21
22 public static String getFileName(String tableName) {
23 return tableName + ".csv";
24 }
25 }