Revision 4439 org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.impl/src/main/java/org/gvsig/raster/impl/datastruct/DatasetBandImpl.java
DatasetBandImpl.java | ||
---|---|---|
61 | 61 |
// |
62 | 62 |
private int nBandsInThisProvider = 0; |
63 | 63 |
|
64 |
/** |
|
65 |
* Constructor |
|
66 |
*/ |
|
64 | 67 |
public DatasetBandImpl() { |
65 | 68 |
|
66 | 69 |
} |
... | ... | |
250 | 253 |
try { |
251 | 254 |
URI uri = state.getURI("fileName"); |
252 | 255 |
if(uri != null) { |
253 |
File file = new File(uri); |
|
254 |
if(file.isFile() && file.exists()) |
|
255 |
fileName = file.getAbsolutePath(); |
|
256 |
else { |
|
257 |
fileName = uri.toString(); |
|
258 |
if(uri.getScheme() == null || "file".equalsIgnoreCase(uri.getScheme())) |
|
259 |
fileName = uri.getPath(); |
|
260 |
} |
|
256 |
fileName = uri.toString(); |
|
257 |
if (uri.getScheme() != null && "FILE".equalsIgnoreCase(uri.getScheme())) { |
|
258 |
File file = new File(uri); |
|
259 |
if (file.isFile() && file.exists()) { |
|
260 |
fileName = file.getAbsolutePath(); |
|
261 |
} else { |
|
262 |
fileName = uri.getPath(); |
|
263 |
} |
|
264 |
} |
|
261 | 265 |
} |
262 | 266 |
} catch(ClassCastException e) { |
263 | 267 |
fileName = state.getString("fileName"); |
... | ... | |
289 | 293 |
state.set("rasterBufBandToDrawList", rasterBufBandToDrawList); |
290 | 294 |
} |
291 | 295 |
|
296 |
/** |
|
297 |
* Register persistence |
|
298 |
*/ |
|
292 | 299 |
public static void registerPersistence() { |
293 | 300 |
PersistenceManager manager = ToolsLocator.getPersistenceManager(); |
294 | 301 |
DynStruct definition = manager.getDefinition(PERSISTENT_NAME); |
Also available in: Unified diff