Revision 33329
trunk/libraries/libIverUtiles/src/org/gvsig/tools/file/PathGenerator.java | ||
---|---|---|
109 | 109 |
File filePath=new File(path); |
110 | 110 |
if (isAbsolutePath && filePath.exists()) |
111 | 111 |
return path; |
112 |
return new File(basePath, path).getAbsolutePath(); |
|
112 |
filePath=new File(basePath, path); |
|
113 |
if (filePath.exists()) |
|
114 |
return filePath.getAbsolutePath(); |
|
115 |
return null; |
|
113 | 116 |
} |
114 | 117 |
|
115 | 118 |
/** |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FLayers.java | ||
---|---|---|
1269 | 1269 |
} catch (DriverLoadException e1) { |
1270 | 1270 |
throw new DriverLayerException(name,e1); |
1271 | 1271 |
} |
1272 |
layer = LayerFactory.createLayer(name, (VectorialFileDriver) d, |
|
1273 |
new File(pathGenerator.getAbsolutePath((String)xml.getStringProperty("file"))), |
|
1272 |
String path=pathGenerator.getAbsolutePath((String)xml.getStringProperty("file")); |
|
1273 |
if (path!=null){ |
|
1274 |
layer = LayerFactory.createLayer(name, (VectorialFileDriver) d, |
|
1275 |
new File(pathGenerator.getAbsolutePath((String)xml.getStringProperty("file"))), |
|
1276 |
proj); |
|
1277 |
}else{ |
|
1278 |
layer = LayerFactory.createLayer(name, (VectorialFileDriver) d, |
|
1279 |
new File(xml.getStringProperty("absolutePath")), |
|
1274 | 1280 |
proj); |
1281 |
} |
|
1275 | 1282 |
|
1276 | 1283 |
|
1277 |
|
|
1278 | 1284 |
} |
1279 | 1285 |
if (xml.contains("db")) { |
1280 | 1286 |
|
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FLyrVect.java | ||
---|---|---|
1201 | 1201 |
} |
1202 | 1202 |
if (source instanceof VectorialFileAdapter) { |
1203 | 1203 |
xml.putProperty("type", "vectorial"); |
1204 |
xml.putProperty("absolutePath",((VectorialFileAdapter) source) |
|
1205 |
.getFile().getAbsolutePath()); |
|
1204 | 1206 |
xml.putProperty("file", pathGenerator.getPath(((VectorialFileAdapter) source) |
1205 | 1207 |
.getFile().getAbsolutePath())); |
1206 | 1208 |
try { |
trunk/extensions/extRasterTools-SE/src/org/gvsig/fmap/raster/layers/FLyrRasterSE.java | ||
---|---|---|
973 | 973 |
*/ |
974 | 974 |
public XMLEntity getXMLEntityWithoutChecks() throws XMLException { |
975 | 975 |
XMLEntity xml = super.getXMLEntity(); |
976 |
if(getFile() != null) |
|
976 |
if(getFile() != null){ |
|
977 |
xml.putProperty("absolutePath", getFile().getAbsolutePath()); |
|
977 | 978 |
xml.putProperty("file", pathGenerator.getPath(getFile().getAbsolutePath())); |
979 |
} |
|
978 | 980 |
xml.putProperty("driverName", "gvSIG Raster Driver"); |
979 | 981 |
|
980 | 982 |
// Si no hay ning?n Status aplicamos el StatusLayerRaster que se usa por defecto |
... | ... | |
1004 | 1006 |
loadingFromProject = true; |
1005 | 1007 |
|
1006 | 1008 |
try { |
1007 |
params = new File(pathGenerator.getAbsolutePath(xml.getStringProperty("file"))); |
|
1008 |
|
|
1009 |
String path=pathGenerator.getAbsolutePath((String)xml.getStringProperty("file")); |
|
1010 |
if (path!=null){ |
|
1011 |
params = new File(pathGenerator.getAbsolutePath(xml.getStringProperty("file"))); |
|
1012 |
}else{ |
|
1013 |
params = new File(xml.getStringProperty("absolutePath")); |
|
1014 |
} |
|
1015 |
|
|
1009 | 1016 |
if(params != null && getName() != null && getName().compareTo("") != 0) { |
1010 | 1017 |
try { |
1011 | 1018 |
enableAwake(); |
Also available in: Unified diff