Subversion Repository Public Repository

litesoft

Diff Revisions 947 vs 948 for /trunk/Java/core/Server/src/org/litesoft/orsup/DB_Import.java

Diff revisions: vs.
  @@ -1,19 +1,17 @@
1 1 // This Source Code is in the Public Domain per: http://unlicense.org
2 2 package org.litesoft.orsup;
3 3
4 - import java.io.*;
5 -
6 4 import org.litesoft.logger.*;
7 5 import org.litesoft.orsup.base.*;
8 6 import org.litesoft.util.*;
9 7
10 - public class DB_Import extends DB_ImportSupport
11 - {
8 + import java.io.*;
9 +
10 + public class DB_Import extends DB_ImportSupport {
12 11 protected static Logger sLogger = LoggerFactory.getLogger( DB_Import.class );
13 12
14 13 public static void importCSV( File pDir, String... pFileNames )
15 - throws IOException
16 - {
14 + throws IOException {
17 15 importCSV( pDir, FileUtils.filesToReaders( pDir, pFileNames ) );
18 16 }
19 17
  @@ -24,22 +22,19 @@
24 22 * @throws IOException
25 23 */
26 24 public static void importCSV( File pReferenceDir, Reader... pReaders )
27 - throws IOException
28 - {
25 + throws IOException {
29 26 UnfilteringFinder zFinder = DataStoreLocator.get().getUnfilteredFinder();
30 27
31 28 new ImportFromMap().process( sLogger, zFinder, pReferenceDir, new ImportToMap().process( sLogger, zFinder, pReaders ).getLineMap() );
32 29 }
33 30
34 31 public static Object importCSVtoMemo( Reader... pReaders )
35 - throws IOException
36 - {
32 + throws IOException {
37 33 return new ImportToMap().process( sLogger, DataStoreLocator.get().getUnfilteredFinder(), pReaders );
38 34 }
39 35
40 36 public static void importCSVfromMemo( File pReferenceDir, Object pCSVtoMemo )
41 - throws IOException
42 - {
37 + throws IOException {
43 38 new ImportFromMap().process( sLogger, DataStoreLocator.get().getUnfilteredFinder(), pReferenceDir, ((ImportToMap) pCSVtoMemo).getLineMap() );
44 39 }
45 40 }