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.LinearRing;
20: import org.geotools.xml.*;
21:
22: /**
23: * Binding object for the type http://www.opengis.net/gml:LinearRingPropertyType.
24: *
25: * <p>
26: * <pre>
27: * <code>
28: * <complexType name="LinearRingPropertyType">
29: * <annotation>
30: * <documentation>Encapsulates a ring to represent properties in features or geometry collections.</documentation>
31: * </annotation>
32: * <choice>
33: * <element ref="gml:LinearRing"/>
34: * </choice>
35: * </complexType>
36: *
37: * </code>
38: * </pre>
39: * </p>
40: *
41: * @generated
42: */
43: public class LinearRingPropertyTypeBinding extends
44: AbstractComplexBinding {
45: /**
46: * @generated
47: */
48: public QName getTarget() {
49: return GML.LinearRingPropertyType;
50: }
51:
52: /**
53: * <!-- begin-user-doc -->
54: * <!-- end-user-doc -->
55: *
56: * @generated modifiable
57: */
58: public Class getType() {
59: return LinearRing.class;
60: }
61:
62: /**
63: * <!-- begin-user-doc -->
64: * <!-- end-user-doc -->
65: *
66: * @generated modifiable
67: */
68: public Object parse(ElementInstance instance, Node node,
69: Object value) throws Exception {
70: return node.getChildValue(LinearRing.class);
71: }
72:
73: public Object getProperty(Object object, QName name) {
74: if (GML.LinearRing.equals(name)) {
75: //return the linear ring, which is the object passed in
76: return object;
77: }
78:
79: return null;
80: }
81: }
|