01: /**
02: *
03: */package org.geotools.feature.iso.simple;
04:
05: import org.opengis.feature.type.AttributeDescriptor;
06: import org.opengis.feature.type.AttributeType;
07: import org.opengis.feature.type.Name;
08: import org.opengis.feature.type.PropertyType;
09:
10: class IndexDescriptor implements AttributeDescriptor {
11: /**
12: *
13: */
14: ArraySimpleFeature feature;
15: int index;
16:
17: protected IndexDescriptor(ArraySimpleFeature feature, int index) {
18: this .feature = feature;
19: this .index = index;
20: }
21:
22: public boolean isNillable() {
23: return true;
24: }
25:
26: public AttributeType getType() {
27: return this .feature.type.getType(index);
28: }
29:
30: public int getMinOccurs() {
31: return 1;
32: }
33:
34: public int getMaxOccurs() {
35: return 1;
36: }
37:
38: public void putUserData(Object arg0, Object arg1) {
39: }
40:
41: public Object getUserData(Object arg0) {
42: return null;
43: }
44:
45: public Name getName() {
46: return this .feature.type.getType(index).getName();
47: }
48:
49: public PropertyType type() {
50: return this .feature.type.getType(index);
51: }
52:
53: public Object getDefaultValue() {
54: return null;
55: }
56: }
|