01: /* Copyright (c) 2001 - 2007 TOPP - www.openplans.org. All rights reserved.
02: * This code is licensed under the GPL 2.0 license, availible at the root
03: * application directory.
04: */
05: package org.geoserver.ows.xml.v1_0;
06:
07: import net.opengis.ows.OwsFactory;
08: import net.opengis.ows.SectionsType;
09: import org.geotools.xml.AbstractComplexBinding;
10: import org.geotools.xml.ElementInstance;
11: import org.geotools.xml.Node;
12: import javax.xml.namespace.QName;
13:
14: /**
15: * Binding object for the type http://www.opengis.net/ows:SectionsType.
16: *
17: * <p>
18: * <pre>
19: * <code>
20: * <complexType name="SectionsType">
21: * <annotation>
22: * <documentation>Unordered list of zero or more names of requested sections in complete service metadata document. Each Section value shall contain an allowed section name as specified by each OWS specification. See Sections parameter subclause for more information. </documentation>
23: * </annotation>
24: * <sequence>
25: * <element maxOccurs="unbounded" minOccurs="0" name="Section" type="string"/>
26: * </sequence>
27: * </complexType>
28: *
29: * </code>
30: * </pre>
31: * </p>
32: *
33: * @generated
34: */
35: public class SectionsTypeBinding extends AbstractComplexBinding {
36: OwsFactory owsfactory;
37:
38: public SectionsTypeBinding(OwsFactory owsfactory) {
39: this .owsfactory = owsfactory;
40: }
41:
42: /**
43: * @generated
44: */
45: public QName getTarget() {
46: return OWS.SECTIONSTYPE;
47: }
48:
49: /**
50: * <!-- begin-user-doc -->
51: * <!-- end-user-doc -->
52: *
53: * @generated modifiable
54: */
55: public Class getType() {
56: return SectionsType.class;
57: }
58:
59: /**
60: * <!-- begin-user-doc -->
61: * <!-- end-user-doc -->
62: *
63: * @generated modifiable
64: */
65: public Object parse(ElementInstance instance, Node node,
66: Object value) throws Exception {
67: SectionsType sections = owsfactory.createSectionsType();
68: sections.getSection().addAll(node.getChildValues("Section"));
69:
70: return sections;
71: }
72: }
|