Revision 44077 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/DefaultFeatureAttributeDescriptor.java
DefaultFeatureAttributeDescriptor.java | ||
---|---|---|
33 | 33 |
import org.cresques.cts.IProjection; |
34 | 34 |
import org.gvsig.fmap.crs.CRSFactory; |
35 | 35 |
import org.gvsig.fmap.dal.DataStore; |
36 |
import org.gvsig.fmap.dal.feature.EditableFeatureAttributeDescriptor; |
|
37 | 36 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
38 | 37 |
import org.gvsig.fmap.dal.feature.FeatureAttributeEmulator; |
39 | 38 |
import org.gvsig.fmap.dal.feature.FeatureAttributeGetter; |
... | ... | |
43 | 42 |
import org.gvsig.fmap.geom.GeometryException; |
44 | 43 |
import org.gvsig.fmap.geom.GeometryLocator; |
45 | 44 |
import org.gvsig.fmap.geom.type.GeometryType; |
45 |
import org.gvsig.timesupport.Interval; |
|
46 |
import org.gvsig.timesupport.TimeSupportLocator; |
|
46 | 47 |
import org.gvsig.tools.ToolsLocator; |
47 | 48 |
import org.gvsig.tools.dataTypes.CoercionException; |
48 | 49 |
import org.gvsig.tools.dataTypes.DataType; |
... | ... | |
91 | 92 |
protected Map additionalInfo; |
92 | 93 |
protected boolean isAutomatic; |
93 | 94 |
protected boolean isTime = false; |
95 |
protected Interval interval; |
|
94 | 96 |
protected FeatureAttributeGetter featureAttributeGetter = null; |
95 | 97 |
protected FeatureAttributeEmulator featureAttributeEmulator = null; |
96 | 98 |
protected boolean indexed = false; |
... | ... | |
315 | 317 |
return this.SRS; |
316 | 318 |
} |
317 | 319 |
|
320 |
@Override |
|
321 |
public Interval getInterval() { |
|
322 |
return this.interval; |
|
323 |
} |
|
324 |
|
|
318 | 325 |
public IProjection getSRS(WeakReference storeRef) { |
319 | 326 |
if( this.SRS==null ) { |
320 | 327 |
FeatureStore store = (FeatureStore) storeRef.get(); |
... | ... | |
466 | 473 |
public void loadFromState(PersistentState state) |
467 | 474 |
throws PersistenceException { |
468 | 475 |
allowNull = state.getBoolean("allowNull"); |
469 |
dataType |
|
470 |
= ToolsLocator.getDataTypesManager().get(state.getInt("dataType")); |
|
476 |
dataType = ToolsLocator.getDataTypesManager().get(state.getInt("dataType")); |
|
471 | 477 |
// FIXME how persist dateFormat ??? |
472 | 478 |
// dateFormat; |
473 | 479 |
defaultValue = state.get("defaultValue"); |
... | ... | |
494 | 500 |
geometrySubType = state.getInt("geometrySubType"); |
495 | 501 |
additionalInfo = (Map) state.get("aditionalInfo"); |
496 | 502 |
isAutomatic = state.getBoolean("isAutomatic"); |
503 |
isTime = state.getBoolean("isTime"); |
|
504 |
if( state.hasValue("intervalStart") ) { |
|
505 |
long intervalStart = state.getLong("intervalStart"); |
|
506 |
long intervalEnd = state.getLong("intervalEnd"); |
|
507 |
interval = TimeSupportLocator.getManager().createRelativeInterval(intervalStart, intervalEnd); |
|
508 |
} else { |
|
509 |
interval = null; |
|
510 |
} |
|
497 | 511 |
} |
498 | 512 |
|
499 | 513 |
@Override |
Also available in: Unified diff