svn-gvsig-desktop / trunk / libraries / libFMap / src / com / iver / cit / gvsig / fmap / operations / strategies / StrategyManager.java @ 318
History | View | Annotate | Download (967 Bytes)
1 |
/* Generated by Together */
|
---|---|
2 |
|
3 |
package com.iver.cit.gvsig.fmap.operations.strategies; |
4 |
|
5 |
import com.iver.cit.gvsig.fmap.drivers.BoundedShapes; |
6 |
import com.iver.cit.gvsig.fmap.layers.FLyrVect; |
7 |
import com.iver.cit.gvsig.fmap.layers.VectorialAdapter; |
8 |
|
9 |
|
10 |
public class StrategyManager { |
11 |
/**
|
12 |
* Se encarga de, dada una clase que implementa el interfaz vectorial, seleccionar la estrategia ?ptima de acceso a las capas, devolviendo el objeto Strategy con la capa vectorial asociada.
|
13 |
*/
|
14 |
public static Strategy getStrategy(FLyrVect v) { |
15 |
if (v.getSource().getDriver() instanceof BoundedShapes){ |
16 |
return new ShpStrategy(v); |
17 |
}else{
|
18 |
return new DefaultStrategy(v); |
19 |
} |
20 |
} |
21 |
|
22 |
/**
|
23 |
* Crea un ShapeInfo en memoria o en disco en funci?n de la memoria disponible
|
24 |
*/
|
25 |
public static ShapeInfo createShapeInfo(VectorialAdapter adapter) { |
26 |
//TODO falta que implementar el DiskShapeInfo.
|
27 |
return new MemoryShapeInfo(); |
28 |
} |
29 |
} |