Revision 24017 branches/v2_0_0_prep/libraries/libFMap_data/src/org/gvsig/fmap/data/feature/impl/DefaultFeatureStore.java
DefaultFeatureStore.java | ||
---|---|---|
33 | 33 |
import org.gvsig.fmap.data.feature.FeatureSet; |
34 | 34 |
import org.gvsig.fmap.data.feature.FeatureStore; |
35 | 35 |
import org.gvsig.fmap.data.feature.FeatureStoreNotification; |
36 |
import org.gvsig.fmap.data.feature.FeatureStoreParameters; |
|
36 | 37 |
import org.gvsig.fmap.data.feature.FeatureType; |
37 | 38 |
import org.gvsig.fmap.data.feature.exceptions.AlreadyEditingException; |
38 | 39 |
import org.gvsig.fmap.data.feature.exceptions.ConcurrentDataModificationException; |
39 | 40 |
import org.gvsig.fmap.data.feature.exceptions.CreateFeatureException; |
40 | 41 |
import org.gvsig.fmap.data.feature.exceptions.DataExportException; |
41 | 42 |
import org.gvsig.fmap.data.feature.exceptions.DataIndexException; |
42 |
import org.gvsig.fmap.data.feature.exceptions.FeatureNotAllowedForThisStoreException;
|
|
43 |
import org.gvsig.fmap.data.feature.exceptions.FeatureTypeNotAllowedForThisStoreException;
|
|
43 |
import org.gvsig.fmap.data.feature.exceptions.IllegalFeatureException;
|
|
44 |
import org.gvsig.fmap.data.feature.exceptions.IllegalFeatureTypeException;
|
|
44 | 45 |
import org.gvsig.fmap.data.feature.exceptions.FinishEditingException; |
45 | 46 |
import org.gvsig.fmap.data.feature.exceptions.GetFeatureTypeException; |
46 | 47 |
import org.gvsig.fmap.data.feature.exceptions.NeedEditingModeException; |
... | ... | |
574 | 575 |
} |
575 | 576 |
|
576 | 577 |
private void checkIsOwnFeature(Feature feature) |
577 |
throws FeatureNotAllowedForThisStoreException {
|
|
578 |
throws IllegalFeatureException {
|
|
578 | 579 |
if (((DefaultFeature) feature).getStore() != this) { |
579 |
throw new FeatureNotAllowedForThisStoreException(this.getName());
|
|
580 |
throw new IllegalFeatureException(this.getName());
|
|
580 | 581 |
} |
581 | 582 |
// FIXME: fixFeatureType no vale para el checkIsOwnFeature |
582 | 583 |
// fixFeatureType((DefaultFeatureType) feature.getType()); |
... | ... | |
789 | 790 |
// notifyChange(FeatureStoreNotification.AFTER_FINISHEDITING); |
790 | 791 |
} |
791 | 792 |
|
792 |
public void export(FeatureExplorer explorer, DataStoreParameters params)
|
|
793 |
public void export(FeatureExplorer explorer, FeatureStoreParameters params)
|
|
793 | 794 |
throws DataException { |
794 | 795 |
|
795 | 796 |
if (this.getFeatureTypes().size() != 1) { |
... | ... | |
798 | 799 |
} |
799 | 800 |
try { |
800 | 801 |
FeatureType type = this.getDefaultFeatureType(); |
801 |
explorer.add(params, type); |
|
802 |
params.setDefaultFeatureType(type); |
|
803 |
explorer.add(params); |
|
802 | 804 |
|
803 | 805 |
DataManager manager = DALLocator.getDataManager(); |
804 | 806 |
FeatureStore target = (FeatureStore) manager |
... | ... | |
958 | 960 |
} |
959 | 961 |
|
960 | 962 |
} |
961 |
throw new FeatureTypeNotAllowedForThisStoreException(getName());
|
|
963 |
throw new IllegalFeatureTypeException(getName());
|
|
962 | 964 |
} |
963 | 965 |
|
964 | 966 |
public void validateFeatures(int mode) throws DataException { |
Also available in: Unified diff