01: /* Copyright (c) 2001 - 2007 TOPP - www.openplans.org. All rights reserved.
02: * This code is licensed under the GPL 2.0 license, availible at the root
03: * application directory.
04: */
05: package org.geoserver.wfs.xml;
06:
07: import org.geotools.feature.Name;
08: import org.geotools.feature.type.ProfileImpl;
09: import org.geotools.gml3.GMLSchema;
10: import org.geotools.gml3.bindings.GML;
11: import java.util.HashSet;
12: import java.util.LinkedHashSet;
13: import java.util.Set;
14:
15: public class GML3Profile extends TypeMappingProfile {
16: static Set profiles = new HashSet();
17:
18: static {
19: // set with guaranteed iteration order, so that we can put deprecated elements only
20: // after the ones that replaced them
21: Set profile = new LinkedHashSet();
22:
23: //basic
24: profile.add(new Name(GML.NAMESPACE, GML.MeasureType
25: .getLocalPart()));
26:
27: //geomtetries
28: //profile.add( new Name( GML.NAMESPACE, GML.PointType.getLocalPart() ) );
29: profile.add(new Name(GML.NAMESPACE, GML.PointPropertyType
30: .getLocalPart()));
31: //profile.add( new Name( GML.NAMESPACE, GML.MultiPointType.getLocalPart() ) );
32: profile.add(new Name(GML.NAMESPACE, GML.MultiPointPropertyType
33: .getLocalPart()));
34:
35: //profile.add( new Name( GML.NAMESPACE, GML.LineStringType.getLocalPart() ) );
36: profile.add(new Name(GML.NAMESPACE, GML.LineStringPropertyType
37: .getLocalPart()));
38: //profile.add( new Name( GML.NAMESPACE, GML.MultiLineStringType.getLocalPart() ) );
39: profile.add(new Name(GML.NAMESPACE,
40: GML.MultiLineStringPropertyType.getLocalPart()));
41:
42: //profile.add( new Name( GML.NAMESPACE, GML.CurveType.getLocalPart() ) );
43: profile.add(new Name(GML.NAMESPACE, GML.CurvePropertyType
44: .getLocalPart()));
45: //profile.add( new Name( GML.NAMESPACE, GML.MultiCurveType.getLocalPart() ) );
46: profile.add(new Name(GML.NAMESPACE, GML.MultiCurvePropertyType
47: .getLocalPart()));
48:
49: profile.add(new Name(GML.NAMESPACE, GML.SurfacePropertyType
50: .getLocalPart()));
51: //profile.add( new Name( GML.NAMESPACE, GML.MultiSurfaceType.getLocalPart() ) );
52: profile.add(new Name(GML.NAMESPACE,
53: GML.MultiSurfacePropertyType.getLocalPart()));
54:
55: // register polygon and multipolygon only after surface, the iteration order
56: // will make sure surface is found before in any encoding attempt, this way we
57: // are still able to handle polygons, but we don't use them by default
58: //profile.add( new Name( GML.NAMESPACE, GML.PolygonType.getLocalPart() ) );
59: profile.add(new Name(GML.NAMESPACE, GML.PolygonPropertyType
60: .getLocalPart()));
61: //profile.add( new Name( GML.NAMESPACE, GML.MultiPolygonType.getLocalPart() ) );
62: profile.add(new Name(GML.NAMESPACE,
63: GML.MultiPolygonPropertyType.getLocalPart()));
64:
65: //profile.add( new Name( GML.NAMESPACE, GML.AbstractGeometryType.getLocalPart() ) );
66: profile.add(new Name(GML.NAMESPACE, GML.GeometryPropertyType
67: .getLocalPart()));
68: profiles.add(new ProfileImpl(new GMLSchema(), profile));
69: }
70:
71: public GML3Profile() {
72: super(profiles);
73: }
74: }
|