svn-gvsig-desktop / branches / org.gvsig.desktop-2018a / org.gvsig.desktop.compat.cdc / org.gvsig.basicformats / src / main / java / org / gvsig / basicformats / FormatsFile.java @ 43876
History | View | Annotate | Download (2.44 KB)
1 |
|
---|---|
2 |
package org.gvsig.basicformats; |
3 |
|
4 |
import java.io.File; |
5 |
import java.io.IOException; |
6 |
import org.gvsig.basicformats.impl.DefaultCLRFile; |
7 |
import org.gvsig.basicformats.impl.DefaultCPGFile; |
8 |
import org.gvsig.basicformats.impl.DefaultHDRFile; |
9 |
import org.gvsig.basicformats.impl.DefaultPRJFile; |
10 |
import org.gvsig.basicformats.impl.DefaultSTXFile; |
11 |
import org.gvsig.basicformats.impl.DefaultWLDFile; |
12 |
|
13 |
public class FormatsFile { |
14 |
|
15 |
public static CPGFile createCFGFile() { |
16 |
return new DefaultCPGFile(); |
17 |
} |
18 |
|
19 |
public static CPGFile getCFGFile(File file) { |
20 |
try {
|
21 |
DefaultCPGFile format = new DefaultCPGFile();
|
22 |
format.read(file); |
23 |
return format;
|
24 |
} catch (IOException ex) { |
25 |
return null; |
26 |
} |
27 |
} |
28 |
|
29 |
public static HDRFile createHDRFile() { |
30 |
return new DefaultHDRFile(); |
31 |
} |
32 |
|
33 |
public static HDRFile getHDRFile(File file) { |
34 |
try {
|
35 |
DefaultHDRFile format = new DefaultHDRFile();
|
36 |
format.read(file); |
37 |
return format;
|
38 |
} catch (IOException ex) { |
39 |
return null; |
40 |
} |
41 |
} |
42 |
|
43 |
public static PRJFile createPRJFile() { |
44 |
return new DefaultPRJFile(); |
45 |
} |
46 |
|
47 |
public static PRJFile getPRJFile(File file) { |
48 |
try {
|
49 |
DefaultPRJFile format = new DefaultPRJFile();
|
50 |
format.read(file); |
51 |
return format;
|
52 |
} catch (IOException ex) { |
53 |
return null; |
54 |
} |
55 |
} |
56 |
|
57 |
public static STXFile createSTXFile() { |
58 |
return new DefaultSTXFile(); |
59 |
} |
60 |
|
61 |
public static STXFile getSTXFile(File file) { |
62 |
try {
|
63 |
DefaultSTXFile format = new DefaultSTXFile();
|
64 |
format.read(file); |
65 |
return format;
|
66 |
} catch (IOException ex) { |
67 |
return null; |
68 |
} |
69 |
} |
70 |
|
71 |
public static WLDFile createWLDFile() { |
72 |
return new DefaultWLDFile(); |
73 |
} |
74 |
|
75 |
public static WLDFile getWLDFile(File file) { |
76 |
try {
|
77 |
DefaultWLDFile format = new DefaultWLDFile();
|
78 |
format.read(file); |
79 |
return format;
|
80 |
} catch (IOException ex) { |
81 |
return null; |
82 |
} |
83 |
} |
84 |
|
85 |
public static CLRFile createCLRFile() { |
86 |
return new DefaultCLRFile(); |
87 |
} |
88 |
|
89 |
public static CLRFile getCLRFile(File file) { |
90 |
try {
|
91 |
DefaultCLRFile format = new DefaultCLRFile();
|
92 |
format.read(file); |
93 |
return format;
|
94 |
} catch (IOException ex) { |
95 |
return null; |
96 |
} |
97 |
} |
98 |
|
99 |
} |