Revision 1828 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/LayerFactory.java
LayerFactory.java | ||
---|---|---|
44 | 44 |
import com.hardcode.driverManager.DriverLoadException; |
45 | 45 |
import com.hardcode.driverManager.DriverManager; |
46 | 46 |
|
47 |
import com.hardcode.gdbms.engine.customQuery.QueryManager; |
|
47 | 48 |
import com.hardcode.gdbms.engine.data.DataSourceFactory; |
48 | 49 |
import com.hardcode.gdbms.engine.instruction.FieldNotFoundException; |
49 | 50 |
|
... | ... | |
55 | 56 |
import com.iver.cit.gvsig.fmap.drivers.VectorialFileDriver; |
56 | 57 |
import com.iver.cit.gvsig.fmap.drivers.WithDefaultLegend; |
57 | 58 |
import com.iver.cit.gvsig.fmap.drivers.wfs.WFSDriver; |
59 |
import com.iver.cit.gvsig.fmap.layers.layerOperations.AlphanumericData; |
|
60 |
import com.iver.cit.gvsig.fmap.operations.arcview.ArcJoin; |
|
58 | 61 |
import com.iver.cit.gvsig.fmap.rendering.LegendFactory; |
59 | 62 |
import com.iver.cit.gvsig.fmap.rendering.VectorialLegend; |
60 | 63 |
|
... | ... | |
85 | 88 |
private static String driversPath = "../FMap 03/drivers"; |
86 | 89 |
private static DriverManager driverManager; |
87 | 90 |
|
88 |
private static DataSourceFactory dataSourceFactory = new DataSourceFactory();
|
|
91 |
private static DataSourceFactory dataSourceFactory; |
|
89 | 92 |
|
90 | 93 |
/** |
91 | 94 |
* Map en el que se guarda para cada fuente de datos a?adida al sistema, el |
... | ... | |
97 | 100 |
*/ |
98 | 101 |
private static TreeMap sourceAdapter; |
99 | 102 |
|
100 |
/**
|
|
103 |
/* |
|
101 | 104 |
* Crea un RandomVectorialFile con el driver que se le pasa como par?metro |
102 | 105 |
* y guard?ndose el nombre del fichero para realizar los accesos, la capa |
103 | 106 |
* tendr? asociada la proyecci?n que se pasa como parametro tambi?n |
... | ... | |
112 | 115 |
* |
113 | 116 |
* @throws DriverException |
114 | 117 |
* @throws DriverIOException |
115 |
*/
|
|
118 |
* |
|
116 | 119 |
public static FLayer createLayer(String layerName, String driverName, |
117 | 120 |
File f, IProjection proj) throws DriverException { |
118 | 121 |
//Se obtiene el driver que lee |
... | ... | |
132 | 135 |
|
133 | 136 |
return null; |
134 | 137 |
} |
135 |
|
|
138 |
*/ |
|
136 | 139 |
/** |
137 | 140 |
* Crea un RandomVectorialFile con el driver que se le pasa como par?metro |
138 | 141 |
* y guard?ndose el nombre del fichero para realizar los accesos, la capa |
... | ... | |
164 | 167 |
} |
165 | 168 |
|
166 | 169 |
try { |
170 |
|
|
167 | 171 |
// Le asignamos tambi?n una legenda por defecto acorde con |
168 | 172 |
// el tipo de shape que tenga. Tampoco s? si es aqu? el |
169 | 173 |
// sitio adecuado, pero en fin.... |
... | ... | |
385 | 389 |
logger.error(failures[i]); |
386 | 390 |
} |
387 | 391 |
|
388 |
dataSourceFactory.setDriverManager(driverManager); |
|
392 |
getDataSourceFactory().setDriverManager(driverManager); |
|
393 |
QueryManager.registerQuery("arcjoin", new ArcJoin()); |
|
389 | 394 |
} |
390 | 395 |
} |
391 | 396 |
|
... | ... | |
403 | 408 |
* @return Returns the dataSourceFactory. |
404 | 409 |
*/ |
405 | 410 |
public static DataSourceFactory getDataSourceFactory() { |
411 |
if (dataSourceFactory == null){ |
|
412 |
dataSourceFactory = new DataSourceFactory(); |
|
413 |
} |
|
406 | 414 |
return dataSourceFactory; |
407 | 415 |
} |
408 | 416 |
} |
Also available in: Unified diff