Revision 44753 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/featureset/DefaultFeatureSet.java
DefaultFeatureSet.java | ||
---|---|---|
31 | 31 |
|
32 | 32 |
import org.gvsig.fmap.dal.exception.DataException; |
33 | 33 |
import org.gvsig.fmap.dal.feature.EditableFeature; |
34 |
import org.gvsig.fmap.dal.feature.EditableFeatureAttributeDescriptor; |
|
35 |
import org.gvsig.fmap.dal.feature.EditableFeatureType; |
|
34 | 36 |
import org.gvsig.fmap.dal.feature.Feature; |
37 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
|
35 | 38 |
import org.gvsig.fmap.dal.feature.FeatureIndexes; |
36 | 39 |
import org.gvsig.fmap.dal.feature.FeatureQuery; |
37 | 40 |
import org.gvsig.fmap.dal.feature.FeatureQueryOrder; |
... | ... | |
44 | 47 |
import org.gvsig.fmap.dal.feature.exception.FeatureSetInitializeException; |
45 | 48 |
import org.gvsig.fmap.dal.feature.impl.DefaultFeatureStore; |
46 | 49 |
import org.gvsig.fmap.dal.feature.impl.DefaultFeatureStoreTransforms; |
50 |
import org.gvsig.fmap.dal.feature.impl.DefaultFeatureType; |
|
47 | 51 |
import org.gvsig.fmap.dal.feature.spi.FeatureSetProvider; |
48 | 52 |
import org.gvsig.tools.dispose.DisposableIterator; |
49 | 53 |
import org.gvsig.tools.dispose.DisposeUtils; |
... | ... | |
76 | 80 |
protected Feature featureToIgnoreNotification; |
77 | 81 |
protected DefaultFeatureStoreTransforms transform; |
78 | 82 |
protected FeatureQuery queryForProvider; |
79 |
protected FeatureType defatulFeatureType;
|
|
83 |
protected FeatureType defaultFeatureType;
|
|
80 | 84 |
protected FeatureType defatulFeatureTypeForProvider; |
81 | 85 |
protected boolean ignoreChanges; |
82 | 86 |
|
... | ... | |
105 | 109 |
this.featureTypes = new ArrayList(); |
106 | 110 |
if (this.query.getFeatureTypeId() == null |
107 | 111 |
&& this.query.getAttributeNames() == null) { |
108 |
this.defatulFeatureType = this.store.getDefaultFeatureType();
|
|
112 |
this.defaultFeatureType = this.store.getDefaultFeatureType();
|
|
109 | 113 |
this.featureTypes.addAll(this.store.getFeatureTypes()); |
110 | 114 |
} else { |
111 |
this.defatulFeatureType = this.store.getFeatureType(this.query); |
|
112 |
this.featureTypes.add(this.defatulFeatureType); |
|
115 |
this.defaultFeatureType = this.store.getFeatureType(this.query); |
|
116 |
List<EditableFeatureAttributeDescriptor> cols = this.query.getExtraColumn().getColumns(); |
|
117 |
if (this.query!=null && cols!=null && !cols.isEmpty()) { |
|
118 |
DefaultFeatureType featureTypeExtraCols = (DefaultFeatureType) this.defaultFeatureType.getCopy(); |
|
119 |
featureTypeExtraCols.setExtraColumn(this.query.getExtraColumn()); |
|
120 |
this.defaultFeatureType = featureTypeExtraCols; |
|
121 |
} |
|
122 |
this.featureTypes.add(this.defaultFeatureType); |
|
113 | 123 |
} |
114 | 124 |
if (this.transform != null && !this.transform.isEmpty()) { |
115 | 125 |
this.fixQueryForProvider(this.queryForProvider, this.transform); |
116 | 126 |
} else { |
117 |
this.defatulFeatureTypeForProvider = this.defatulFeatureType;
|
|
127 |
this.defatulFeatureTypeForProvider = this.defaultFeatureType;
|
|
118 | 128 |
} |
119 | 129 |
|
120 | 130 |
FeatureIndexes indexes = store.getIndexes(); |
... | ... | |
136 | 146 |
DefaultFeatureStoreTransforms transformsToUse) throws DataException { |
137 | 147 |
theQueryForProvider.clearAttributeNames(); |
138 | 148 |
FeatureType ftype = |
139 |
transformsToUse.getSourceFeatureTypeFrom(this.defatulFeatureType);
|
|
149 |
transformsToUse.getSourceFeatureTypeFrom(this.defaultFeatureType);
|
|
140 | 150 |
theQueryForProvider.setFeatureTypeId(ftype.getId()); |
141 | 151 |
this.defatulFeatureTypeForProvider = ftype; |
142 | 152 |
|
... | ... | |
213 | 223 |
} |
214 | 224 |
|
215 | 225 |
public FeatureType getDefaultFeatureType() { |
216 |
return this.defatulFeatureType;
|
|
226 |
return this.defaultFeatureType;
|
|
217 | 227 |
} |
218 | 228 |
|
219 | 229 |
public List getFeatureTypes() { |
... | ... | |
289 | 299 |
this.query = null; |
290 | 300 |
this.queryForProvider = null; |
291 | 301 |
this.featureTypes = null; |
292 |
this.defatulFeatureType = null;
|
|
302 |
this.defaultFeatureType = null;
|
|
293 | 303 |
this.defatulFeatureTypeForProvider = null; |
294 | 304 |
} |
295 | 305 |
|
Also available in: Unified diff