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.AcceptFormatsType;
08: import net.opengis.ows.OwsFactory;
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:AcceptFormatsType.
16: *
17: * <p>
18: * <pre>
19: * <code>
20: * <complexType name="AcceptFormatsType">
21: * <annotation>
22: * <documentation>Prioritized sequence of zero or more GetCapabilities operation response formats desired by client, with preferred formats listed first. Each response format shall be identified by its MIME type. See AcceptFormats parameter use subclause for more information. </documentation>
23: * </annotation>
24: * <sequence>
25: * <element maxOccurs="unbounded" minOccurs="0" name="OutputFormat" type="ows:MimeType"/>
26: * </sequence>
27: * </complexType>
28: *
29: * </code>
30: * </pre>
31: * </p>
32: *
33: * @generated
34: */
35: public class AcceptFormatsTypeBinding extends AbstractComplexBinding {
36: OwsFactory owsfactory;
37:
38: public AcceptFormatsTypeBinding(OwsFactory owsfactory) {
39: this .owsfactory = owsfactory;
40: }
41:
42: /**
43: * @generated
44: */
45: public QName getTarget() {
46: return OWS.ACCEPTFORMATSTYPE;
47: }
48:
49: /**
50: * <!-- begin-user-doc -->
51: * <!-- end-user-doc -->
52: *
53: * @generated modifiable
54: */
55: public Class getType() {
56: return AcceptFormatsType.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: AcceptFormatsType acceptFormats = owsfactory
68: .createAcceptFormatsType();
69: acceptFormats.getOutputFormat().addAll(
70: node.getChildValues("OutputFormat"));
71:
72: return acceptFormats;
73: }
74: }
|