Revision 46875 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureStore.java
DefaultFeatureStore.java | ||
---|---|---|
598 | 598 |
return envelope; |
599 | 599 |
} |
600 | 600 |
FeatureAttributeDescriptor attrdesc = this.getDefaultFeatureType().getDefaultGeometryAttribute(); |
601 |
if (attrdesc == null || !attrdesc.isComputed()) {
|
|
601 |
if (attrdesc == null || (!attrdesc.isComputed() && this.getTransforms().isEmpty())) {
|
|
602 | 602 |
return null; |
603 | 603 |
} |
604 | 604 |
final int index = attrdesc.getIndex(); |
... | ... | |
1358 | 1358 |
if (!this.provider.supportsAppendMode()) { |
1359 | 1359 |
mode = MODE_FULLEDIT; |
1360 | 1360 |
} |
1361 |
if (!this.canBeEdited()) { |
|
1362 |
throw new IllegalStateException(this.getName()); |
|
1363 |
} |
|
1361 | 1364 |
switch (mode) { |
1362 | 1365 |
case MODE_QUERY: |
1363 | 1366 |
throw new IllegalStateException(this.getName()); |
1364 | 1367 |
|
1365 | 1368 |
case MODE_FULLEDIT: |
1366 |
if (!this.transforms.isEmpty()) { |
|
1367 |
throw new IllegalStateException(this.getName()); |
|
1368 |
} |
|
1369 | 1369 |
if (notifyChange(FeatureStoreNotification.BEFORE_STARTEDITING, |
1370 | 1370 |
newSessionCode, mode).isCanceled()) { |
1371 | 1371 |
return; |
... | ... | |
1385 | 1385 |
break; |
1386 | 1386 |
|
1387 | 1387 |
case MODE_APPEND: |
1388 |
if (!this.transforms.isEmpty()) { |
|
1389 |
throw new IllegalStateException(this.getName()); |
|
1390 |
} |
|
1391 | 1388 |
if (notifyChange(FeatureStoreNotification.BEFORE_STARTEDITING, |
1392 | 1389 |
newSessionCode, mode).isCanceled()) { |
1393 | 1390 |
return; |
... | ... | |
1403 | 1400 |
if (!this.provider.supportsPassThroughMode()) { |
1404 | 1401 |
throw new IllegalStateException(this.getName()); |
1405 | 1402 |
} |
1406 |
if (!this.transforms.isEmpty()) { |
|
1407 |
throw new IllegalStateException(this.getName()); |
|
1408 |
} |
|
1409 | 1403 |
if (notifyChange(FeatureStoreNotification.BEFORE_STARTEDITING, |
1410 | 1404 |
newSessionCode, mode).isCanceled()) { |
1411 | 1405 |
return; |
... | ... | |
3383 | 3377 |
if (this.transforms.hasDynValue(name)) { |
3384 | 3378 |
return true; |
3385 | 3379 |
} |
3380 |
if (this.provider.hasDynValue(name)) { |
|
3381 |
return true; |
|
3382 |
} |
|
3383 |
if (METADATA_PROVIDER.equalsIgnoreCase(name)) { |
|
3384 |
return true; |
|
3385 |
} else if (METADATA_CONTAINERNAME.equalsIgnoreCase(name)) { |
|
3386 |
return true; |
|
3387 |
} else if (METADATA_FEATURETYPE.equalsIgnoreCase(name)) { |
|
3388 |
return true; |
|
3389 |
} |
|
3386 | 3390 |
return this.metadata.hasDynValue(name); |
3387 | 3391 |
} |
3388 | 3392 |
|
... | ... | |
4046 | 4050 |
return false; |
4047 | 4051 |
} |
4048 | 4052 |
} |
4053 |
|
|
4054 |
public boolean canBeEdited() { |
|
4055 |
return this.transforms.isEmpty(); |
|
4056 |
} |
|
4049 | 4057 |
} |
Also available in: Unified diff