Revision 25789 branches/v2_0_0_prep/libraries/libFMap_dalfile/src/org/gvsig/fmap/dal/store/shp/SHPNewStoreParameters.java
SHPNewStoreParameters.java | ||
---|---|---|
29 | 29 |
|
30 | 30 |
import org.gvsig.fmap.dal.feature.FeatureType; |
31 | 31 |
import org.gvsig.fmap.dal.feature.NewFeatureStoreParameters; |
32 |
import org.gvsig.fmap.dal.store.dbf.DBFLibrary; |
|
33 |
import org.gvsig.fmap.dal.store.dbf.DBFNewStoreParameters; |
|
34 |
import org.gvsig.tools.ToolsLocator; |
|
35 |
import org.gvsig.tools.dynobject.DelegatedDynObject; |
|
36 |
import org.gvsig.tools.dynobject.DynClass; |
|
37 |
import org.gvsig.tools.dynobject.DynField; |
|
38 |
import org.gvsig.tools.dynobject.DynObjectManager; |
|
32 | 39 |
|
33 | 40 |
public class SHPNewStoreParameters extends SHPStoreParameters implements |
34 | 41 |
NewFeatureStoreParameters { |
35 | 42 |
|
43 |
public static final String DYNCLASS_NAME = "SHPNewStoreParameters"; |
|
44 |
|
|
36 | 45 |
private FeatureType defaultFeatureType; |
37 | 46 |
|
47 |
protected static DynClass DYNCLASS = null; |
|
48 |
|
|
49 |
protected static void registerDynClass() { |
|
50 |
DynObjectManager dynman = ToolsLocator.getDynObjectManager(); |
|
51 |
DynClass dynClass; |
|
52 |
DynField field; |
|
53 |
if (DYNCLASS == null) { |
|
54 |
|
|
55 |
dynClass = dynman.add(DYNCLASS_NAME, |
|
56 |
"new SHP File Store parameters"); |
|
57 |
dynClass.extend(SHPStoreParameters.DYNCLASS); |
|
58 |
dynClass.extend(dynman.get(DBFNewStoreParameters.DYNCLASS_NAME)); |
|
59 |
DYNCLASS = dynClass; |
|
60 |
} |
|
61 |
|
|
62 |
} |
|
63 |
|
|
64 |
protected void initialize() { |
|
65 |
this.delegatedDynObjet = (DelegatedDynObject) ToolsLocator |
|
66 |
.getDynObjectManager().createDynObject(DYNCLASS); |
|
67 |
} |
|
68 |
|
|
69 |
public byte getCodePage() { |
|
70 |
return ((Byte) this.getDynValue(SHPLibrary.DYNFIELD_CODEPAGE_NAME)) |
|
71 |
.byteValue(); |
|
72 |
} |
|
73 |
|
|
74 |
public void setCodePage(byte value) { |
|
75 |
// TODO check value |
|
76 |
setDynValue(DBFLibrary.DYNFIELD_CODEPAGE_NAME, new Byte(value)); |
|
77 |
} |
|
78 |
|
|
38 | 79 |
public FeatureType getDefaultFeatureType() { |
39 | 80 |
return this.defaultFeatureType; |
40 | 81 |
} |
Also available in: Unified diff