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.gml2.bindings;
17:
18: import javax.xml.namespace.QName;
19: import org.geotools.feature.Feature;
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:FeatureAssociationType.
26: *
27: * <p>
28: * <pre>
29: * <code>
30: * <complexType name="FeatureAssociationType">
31: * <annotation>
32: * <documentation> An instance of this type (e.g. a
33: * featureMember) can either enclose or point to a
34: * feature (or feature collection); this type can be
35: * restricted in an application schema to allow only
36: * specified features as valid participants in the association.
37: * When serving as a simple link that references a remote
38: * feature instance, the value of the gml:remoteSchema
39: * attribute can be used to locate a schema fragment
40: * that constrains the target instance. </documentation>
41: * </annotation>
42: * <sequence minOccurs="0">
43: * <element ref="gml:_Feature"/>
44: * </sequence>
45: * <attributeGroup ref="xlink:simpleLink"/>
46: * <attribute ref="gml:remoteSchema" use="optional"/>
47: * </complexType>
48: *
49: * </code>
50: * </pre>
51: * </p>
52: *
53: * @generated
54: */
55: public class GMLFeatureAssociationTypeBinding extends
56: AbstractComplexBinding {
57: /**
58: * @generated
59: */
60: public QName getTarget() {
61: return GML.FeatureAssociationType;
62: }
63:
64: /**
65: * <!-- begin-user-doc -->
66: * <!-- end-user-doc -->
67: *
68: * @generated modifiable
69: */
70: public Class getType() {
71: return Feature.class;
72: }
73:
74: /**
75: * <!-- begin-user-doc -->
76: * <!-- end-user-doc -->
77: *
78: * @generated modifiable
79: */
80: public Object parse(ElementInstance instance, Node node,
81: Object value) throws Exception {
82: return node.getChildValue(Feature.class);
83:
84: //TODO: xlink and remoteSchema attributes, hard to do because of streaming
85: }
86: }
|