Revision 65
org.gvsig.educa.thematicmap/trunk/org.gvsig.educa.thematicmap/org.gvsig.educa.thematicmap.lib/org.gvsig.educa.thematicmap.lib.impl/src/main/java/org/gvsig/educa/thematicmap/impl/DefaultThematicMapFileServices.java | ||
---|---|---|
28 | 28 |
|
29 | 29 |
import org.gvsig.educa.thematicmap.ThematicMapFileServices; |
30 | 30 |
import org.gvsig.educa.thematicmap.impl.util.FileUtils; |
31 |
import org.gvsig.educa.thematicmap.impl.util.FilenameUtils; |
|
31 | 32 |
import org.gvsig.educa.thematicmap.impl.util.IOUtils; |
32 | 33 |
import org.gvsig.educa.thematicmap.impl.util.PersistenceUtils; |
33 | 34 |
import org.gvsig.fmap.mapcontext.MapContext; |
... | ... | |
37 | 38 |
import org.gvsig.tools.persistence.exception.PersistenceException; |
38 | 39 |
|
39 | 40 |
/** |
41 |
* <p> |
|
42 |
* Default implementation of {@link ThematicMapFileServices} |
|
43 |
* </p> |
|
44 |
* <p> |
|
45 |
* Delegates almost all methods in {@link FilenameUtils} |
|
46 |
* </p> |
|
47 |
* |
|
40 | 48 |
* @author gvSIG Team |
41 | 49 |
* @version $Id$ |
42 | 50 |
* |
... | ... | |
52 | 60 |
persistenceManager = ToolsLocator.getPersistenceManager(); |
53 | 61 |
} |
54 | 62 |
|
63 |
/** {@inheridDoc} */ |
|
55 | 64 |
public void unzipFile(File zipFile, File outputFloder) throws ZipException, |
56 | 65 |
IOException { |
57 | 66 |
FileUtils.unzipFile(zipFile, outputFloder); |
58 | 67 |
} |
59 | 68 |
|
69 |
/** {@inheridDoc} */ |
|
60 | 70 |
public void zipFolder(File rootFolder, File targetFile) throws IOException { |
61 | 71 |
FileUtils.zipFolder(rootFolder, targetFile); |
62 | 72 |
} |
63 | 73 |
|
74 |
/** {@inheridDoc} */ |
|
64 | 75 |
public boolean isWritableFolder(File folder) { |
65 | 76 |
return FileUtils.isWritableFolder(folder); |
66 | 77 |
} |
67 | 78 |
|
79 |
/** {@inheridDoc} */ |
|
68 | 80 |
public boolean isReadableFolder(File folder) { |
69 | 81 |
return FileUtils.isReadableFolder(folder); |
70 | 82 |
} |
71 | 83 |
|
84 |
/** {@inheridDoc} */ |
|
72 | 85 |
public boolean isReadableFile(File file) { |
73 | 86 |
return FileUtils.isReadableFile(file); |
74 | 87 |
} |
75 | 88 |
|
89 |
/** {@inheridDoc} */ |
|
76 | 90 |
public File getWritableFolder(File baseFolder, String baseName) { |
77 | 91 |
return FileUtils.getWritableFolder(baseFolder, baseName); |
78 | 92 |
} |
79 | 93 |
|
94 |
/** {@inheridDoc} */ |
|
80 | 95 |
public File getNewWritableFolder(File baseFolder, String baseName) { |
81 | 96 |
return FileUtils.getNewWritableFolder(baseFolder, baseName); |
82 | 97 |
} |
83 | 98 |
|
99 |
/** {@inheridDoc} */ |
|
84 | 100 |
public File getNewFileName(File baseFolder, String name) { |
85 | 101 |
return FileUtils.getNewFileName(baseFolder, name); |
86 | 102 |
} |
87 | 103 |
|
104 |
/** {@inheridDoc} */ |
|
88 | 105 |
public File getRelativeTo(File path, File basePath) { |
89 | 106 |
return FileUtils.getRelativeTo(path, basePath); |
90 | 107 |
} |
91 | 108 |
|
109 |
/** {@inheridDoc} */ |
|
92 | 110 |
public MapContext loadMapContext(File mapContext, File relativaPathFolder) |
93 | 111 |
throws IOException, PersistenceException { |
94 | 112 |
InputStream is = null; |
Also available in: Unified diff