01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2002-2006, GeoTools Project Managment Committee (PMC)
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation;
09: * version 2.1 of the License.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: */
16: package org.geotools.gml3.bindings;
17:
18: import javax.xml.namespace.QName;
19: import com.vividsolutions.jts.geom.Geometry;
20: import org.geotools.xml.*;
21:
22: /**
23: * Binding object for the type http://www.opengis.net/gml:LocationPropertyType.
24: *
25: * <p>
26: * <pre>
27: * <code>
28: * <complexType name="LocationPropertyType">
29: * <annotation>
30: * <documentation>Convenience property for generalised location.
31: * A representative location for plotting or analysis.
32: * Often augmented by one or more additional geometry properties with more specific semantics.</documentation>
33: * <documentation>Deprecated in GML 3.1.0</documentation>
34: * </annotation>
35: * <sequence minOccurs="0">
36: * <choice>
37: * <element ref="gml:_Geometry"/>
38: * <element ref="gml:LocationKeyWord"/>
39: * <element ref="gml:LocationString"/>
40: * <element ref="gml:Null"/>
41: * </choice>
42: * </sequence>
43: * <attributeGroup ref="gml:AssociationAttributeGroup"/>
44: * </complexType>
45: *
46: * </code>
47: * </pre>
48: * </p>
49: *
50: * @generated
51: */
52: public class LocationPropertyTypeBinding extends AbstractComplexBinding {
53: /**
54: * @generated
55: */
56: public QName getTarget() {
57: return GML.LocationPropertyType;
58: }
59:
60: /**
61: * <!-- begin-user-doc -->
62: * <!-- end-user-doc -->
63: *
64: * @generated modifiable
65: */
66: public Class getType() {
67: return Geometry.class;
68: }
69:
70: /**
71: * <!-- begin-user-doc -->
72: * <!-- end-user-doc -->
73: *
74: * @generated modifiable
75: */
76: public Object parse(ElementInstance instance, Node node,
77: Object value) throws Exception {
78: return node.getChildValue(Geometry.class);
79: }
80:
81: public Object getProperty(Object object, QName name)
82: throws Exception {
83: if (GML._Geometry.equals(name)) {
84: return object;
85: }
86:
87: return null;
88: }
89: }
|