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