01: package org.geotools.xml.gml;
02:
03: import org.geotools.feature.AttributeType;
04: import org.geotools.feature.GeometryAttributeType;
05:
06: /**
07: * Created for GML generated FeatureTypes. Represents a Choice type. This is a
08: * pale, weak imitation of the real thing and as soon as the new FeatureModel comes around
09: * it will be thrown away.
10: *
11: *
12: * This is temporary and only for use by the parser. It should never be public or in common use.
13: *
14: * @author Jesse
15: *
16: */
17: interface ChoiceAttributeType extends AttributeType {
18: /**
19: * Gets the choices
20: * @return the potential types
21: */
22: public Class[] getChoices();
23:
24: /**
25: * Yet another hack in order to use our FeatureType. Converts object to the "real" attribute type.
26: *
27: * Best to explain by Example.
28: * <p>
29: * Consider a choice between Polygon and MultiPolygon. It doesn't make sense
30: * to be a Geometry Attribute Type since normal attribute type inspection will allow
31: * users/clients to set Points and lines as legal attribute. For parsing purposes,
32: * this make the FeatureType a little more accurate. It is not perfect of course since
33: * The choice Line, Polygon and MultiPolygon still has to be of Type Geometry but it is a little better.
34: * </p>
35: */
36: public Object convert(Object obj);
37:
38: interface Geometry extends ChoiceAttributeType,
39: GeometryAttributeType {
40: }
41: }
|