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 com.vividsolutions.jts.geom.LineString;
21: import com.vividsolutions.jts.geom.MultiLineString;
22: import org.geotools.xml.*;
23:
24: /**
25: * Binding object for the type http://www.opengis.net/gml:CurvePropertyType.
26: *
27: * <p>
28: * <pre>
29: * <code>
30: * <complexType name="CurvePropertyType">
31: * <annotation>
32: * <documentation>A property that has a curve as its value domain can either be an appropriate geometry element encapsulated in an
33: * element of this type or an XLink reference to a remote geometry element (where remote includes geometry elements located elsewhere
34: * in the same document). Either the reference or the contained element must be given, but neither both nor none.</documentation>
35: * </annotation>
36: * <sequence minOccurs="0">
37: * <element ref="gml:_Curve"/>
38: * </sequence>
39: * <attributeGroup ref="gml:AssociationAttributeGroup">
40: * <annotation>
41: * <documentation>This attribute group includes the XLink attributes (see xlinks.xsd). XLink is used in GML to reference remote
42: * resources (including those elsewhere in the same document). A simple link element can be constructed by including a specific
43: * set of XLink attributes. The XML Linking Language (XLink) is currently a Proposed Recommendation of the World Wide Web Consortium.
44: * XLink allows elements to be inserted into XML documents so as to create sophisticated links between resources; such links can be used
45: * to reference remote properties. A simple link element can be used to implement pointer functionality, and this functionality has been built
46: * into various GML 3 elements by including the gml:AssociationAttributeGroup.</documentation>
47: * </annotation>
48: * </attributeGroup>
49: * </complexType>
50: *
51: * </code>
52: * </pre>
53: * </p>
54: *
55: * @generated
56: */
57: public class CurvePropertyTypeBinding extends AbstractComplexBinding {
58: /**
59: * @generated
60: */
61: public QName getTarget() {
62: return GML.CurvePropertyType;
63: }
64:
65: /**
66: * <!-- begin-user-doc -->
67: * <!-- end-user-doc -->
68: *
69: * @generated modifiable
70: */
71: public Class getType() {
72: return LineString.class;
73: }
74:
75: /**
76: * <!-- begin-user-doc -->
77: * <!-- end-user-doc -->
78: *
79: * @generated modifiable
80: */
81: public Object parse(ElementInstance instance, Node node,
82: Object value) throws Exception {
83: return node.getChildValue(LineString.class);
84: }
85:
86: public Object getProperty(Object object, QName name)
87: throws Exception {
88: if (GML._Curve.equals(name)) {
89: return object;
90: }
91:
92: return null;
93: }
94: }
|