Revision 37496 branches/v2_0_0_prep/libraries/libFMap_dal/src/org/gvsig/fmap/dal/feature/impl/DefaultFeatureStoreTransforms.java
DefaultFeatureStoreTransforms.java | ||
---|---|---|
17 | 17 |
import org.gvsig.fmap.dal.feature.spi.FeatureProvider; |
18 | 18 |
import org.gvsig.tools.ToolsLocator; |
19 | 19 |
import org.gvsig.tools.dynobject.DynStruct; |
20 |
import org.gvsig.tools.dynobject.exception.DynFieldNotFoundException; |
|
20 | 21 |
import org.gvsig.tools.persistence.Persistent; |
21 | 22 |
import org.gvsig.tools.persistence.PersistentState; |
22 | 23 |
import org.gvsig.tools.persistence.exception.PersistenceException; |
... | ... | |
55 | 56 |
checkEditingMode(); |
56 | 57 |
if (transform.getDefaultFeatureType()!=null){ |
57 | 58 |
if( ! transform.getFeatureTypes().contains(transform.getDefaultFeatureType())) { |
58 |
throw new IllegalArgumentException(); // FIXME: A?adir tipo especifico.
|
|
59 |
throw new IllegalArgumentException(); // FIXME: A�adir tipo especifico.
|
|
59 | 60 |
} |
60 | 61 |
this.transforms.add(transform); |
62 |
transform.setSourceMetadata(this.store.metadata); |
|
61 | 63 |
this.notifyChangeToStore(); |
62 | 64 |
if (this.isTramsformValues == null |
63 | 65 |
|| (!this.isTramsformValues.booleanValue())) { |
... | ... | |
121 | 123 |
} |
122 | 124 |
|
123 | 125 |
private class TransformTemporalList extends ArrayList { |
126 |
/** |
|
127 |
* |
|
128 |
*/ |
|
129 |
private static final long serialVersionUID = 1677014259279944000L; |
|
124 | 130 |
private FeatureType targetFType; |
125 | 131 |
|
126 | 132 |
public boolean add(Object arg0) { |
... | ... | |
221 | 227 |
|
222 | 228 |
public void setFeatureStore(FeatureStore featureStore) { |
223 | 229 |
if (this.store != null) { |
224 |
throw new IllegalStateException();// FIXME: A?adir tipo especifico.
|
|
230 |
throw new IllegalStateException();// FIXME: A�adir tipo especifico.
|
|
225 | 231 |
} |
226 | 232 |
this.store = (DefaultFeatureStore) featureStore; |
227 | 233 |
} |
... | ... | |
293 | 299 |
|
294 | 300 |
} |
295 | 301 |
|
302 |
public Object getDynValue(String name) throws DynFieldNotFoundException { |
|
303 |
if( ! this.transforms.isEmpty() ) { |
|
304 |
FeatureStoreTransform transform = (FeatureStoreTransform) transforms.get(this.transforms.size()-1); |
|
305 |
if( transform.hasDynValue(name) ) { |
|
306 |
return transform.getDynValue(name); |
|
307 |
} |
|
308 |
} |
|
309 |
throw new DynFieldNotFoundException(name, "transforms"); |
|
310 |
} |
|
311 |
|
|
312 |
public void setDynValue(String name, Object value) throws DynFieldNotFoundException { |
|
313 |
if( ! this.transforms.isEmpty() ) { |
|
314 |
FeatureStoreTransform transform = (FeatureStoreTransform) transforms.get(this.transforms.size()-1); |
|
315 |
transform.setDynValue(name, value); |
|
316 |
} |
|
317 |
} |
|
318 |
|
|
319 |
public boolean hasDynValue(String name) { |
|
320 |
if( ! this.transforms.isEmpty() ) { |
|
321 |
FeatureStoreTransform transform = (FeatureStoreTransform) transforms.get(this.transforms.size()-1); |
|
322 |
if( transform.hasDynValue(name) ) { |
|
323 |
return true; |
|
324 |
} |
|
325 |
} |
|
326 |
return false; |
|
327 |
} |
|
328 |
|
|
296 | 329 |
} |
Also available in: Unified diff