Revision 38533 branches/v2_0_0_prep/libraries/libFMap_dal/src/org/gvsig/fmap/dal/feature/spi/AbstractFeatureStoreProviderFactory.java
AbstractFeatureStoreProviderFactory.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.util.List; |
4 | 4 |
|
5 |
import org.gvsig.fmap.dal.DALLocator; |
|
6 |
import org.gvsig.fmap.dal.DataManager; |
|
7 |
import org.gvsig.fmap.dal.DataStoreProviderFactory; |
|
8 |
import org.gvsig.fmap.dal.DataTypes; |
|
9 |
import org.gvsig.fmap.dal.feature.EditableFeatureType; |
|
5 | 10 |
import org.gvsig.fmap.dal.feature.FeatureStoreProviderFactory; |
11 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
6 | 12 |
import org.gvsig.fmap.dal.spi.AbstractDataStoreProviderFactory; |
7 | 13 |
|
8 | 14 |
public abstract class AbstractFeatureStoreProviderFactory extends |
... | ... | |
13 | 19 |
super(name, description); |
14 | 20 |
} |
15 | 21 |
|
16 |
public List getSupportedGeometries() { |
|
17 |
return null; |
|
18 |
} |
|
19 |
|
|
20 | 22 |
public int allowMultipleGeometryTypes() { |
21 | 23 |
return UNKNOWN; |
22 | 24 |
} |
... | ... | |
24 | 26 |
public int allowEditableFeatureType() { |
25 | 27 |
return UNKNOWN; |
26 | 28 |
} |
29 |
|
|
30 |
public List getSupportedDataTypes() { |
|
31 |
// null means all supported |
|
32 |
return null; |
|
33 |
} |
|
34 |
|
|
35 |
public List getSupportedGeometryTypesSubtypes() { |
|
36 |
// null means all supported |
|
37 |
return null; |
|
38 |
} |
|
39 |
|
|
40 |
public boolean allowsMandatoryAttributes() { |
|
41 |
return true; |
|
42 |
} |
|
43 |
|
|
44 |
public boolean allowsPrimaryKeyAttributes() { |
|
45 |
return true; |
|
46 |
} |
|
27 | 47 |
|
48 |
/** |
|
49 |
* @return dummy feature type. Must be overridden by subclasses |
|
50 |
* |
|
51 |
*/ |
|
52 |
public FeatureType createDefaultFeatureType() { |
|
53 |
DataManager dm = DALLocator.getDataManager(); |
|
54 |
EditableFeatureType eft = dm.createFeatureType(); |
|
55 |
|
|
56 |
if (allowEditableFeatureType() == DataStoreProviderFactory.YES) { |
|
57 |
return eft; |
|
58 |
} else { |
|
59 |
return eft.getNotEditableCopy(); |
|
60 |
} |
|
61 |
} |
|
62 |
|
|
28 | 63 |
} |
Also available in: Unified diff