Revision 29289 branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/dal/store/mysql/MySQLStoreProvider.java
MySQLStoreProvider.java | ||
---|---|---|
59 | 59 |
public final static Logger logger = LoggerFactory |
60 | 60 |
.getLogger(MySQLStoreProvider.class); |
61 | 61 |
|
62 |
public static String NAME = "MySQLStore";
|
|
62 |
public static String NAME = "MySQL"; |
|
63 | 63 |
public static String DESCRIPTION = "MySQL source"; |
64 | 64 |
private static final String DYNCLASS_NAME = "MySQLStore"; |
65 | 65 |
private static DynClass DYNCLASS = null; |
... | ... | |
94 | 94 |
this.myParams = params; |
95 | 95 |
super.init(params); |
96 | 96 |
|
97 |
this.dynObject = (DelegatedDynObject) ToolsLocator
|
|
97 |
this.metadata = (DelegatedDynObject) ToolsLocator
|
|
98 | 98 |
.getDynObjectManager().createDynObject(DYNCLASS); |
99 | 99 |
|
100 |
this.dynObject.setDynValue("DefaultSRS", null);
|
|
101 |
this.dynObject.setDynValue("Envelope", null);
|
|
100 |
this.metadata.setDynValue("DefaultSRS", null);
|
|
101 |
this.metadata.setDynValue("Envelope", null);
|
|
102 | 102 |
} |
103 | 103 |
|
104 | 104 |
protected JDBCHelper createHelper() throws InitializeException { |
... | ... | |
200 | 200 |
|
201 | 201 |
|
202 | 202 |
|
203 |
public boolean canWriteGeometry(int geometryType) throws DataException { |
|
203 |
public boolean canWriteGeometry(int geometryType, int geometrySubtype) |
|
204 |
throws DataException { |
|
204 | 205 |
FeatureAttributeDescriptor geomAttr = this.store |
205 | 206 |
.getDefaultFeatureType().getAttributeDescriptor( |
206 | 207 |
this.store.getDefaultFeatureType() |
... | ... | |
208 | 209 |
if (geomAttr == null) { |
209 | 210 |
return false; |
210 | 211 |
} |
212 |
if (geometrySubtype != Geometry.SUBTYPES.GEOM2D) { |
|
213 |
return false; |
|
214 |
} |
|
215 |
|
|
211 | 216 |
switch (geomAttr.getGeometryType()) { |
212 | 217 |
case Geometry.TYPES.GEOMETRY: |
213 | 218 |
return true; |
Also available in: Unified diff