01: package org.geotools.wms.v1_1_1.bindings;
02:
03: import org.geotools.data.ows.CRSEnvelope;
04: import org.geotools.xml.*;
05:
06: import javax.xml.namespace.QName;
07:
08: /**
09: * Binding object for the type :_BoundingBox.
10: *
11: * <p>
12: * <pre>
13: * <code>
14: * <xs:complexType name="_BoundingBox">
15: * <xs:attribute name="SRS" use="required"/>
16: * <xs:attribute name="minx" use="required"/>
17: * <xs:attribute name="miny" use="required"/>
18: * <xs:attribute name="maxx" use="required"/>
19: * <xs:attribute name="maxy" use="required"/>
20: * <xs:attribute name="resx"/>
21: * <xs:attribute name="resy"/>
22: * </xs:complexType>
23: *
24: * </code>
25: * </pre>
26: * </p>
27: *
28: * @generated
29: */
30: public class _BoundingBoxBinding extends AbstractComplexBinding {
31:
32: /**
33: * @generated
34: */
35: public QName getTarget() {
36: return WMSV1_1_1._BoundingBox;
37: }
38:
39: /**
40: * <!-- begin-user-doc -->
41: * <!-- end-user-doc -->
42: *
43: * @generated modifiable
44: */
45: public Class getType() {
46: return CRSEnvelope.class;
47: }
48:
49: /**
50: * <!-- begin-user-doc -->
51: * <!-- end-user-doc -->
52: *
53: * @generated modifiable
54: */
55: public Object parse(ElementInstance instance, Node node,
56: Object value) throws Exception {
57: CRSEnvelope ret = new CRSEnvelope();
58: ret.setEPSGCode((String) node.getAttributeValue("SRS"));
59: ret.setMaxX(Double.parseDouble((String) node
60: .getAttributeValue("maxx")));
61: ret.setMaxY(Double.parseDouble((String) node
62: .getAttributeValue("maxy")));
63: ret.setMinX(Double.parseDouble((String) node
64: .getAttributeValue("minx")));
65: ret.setMinY(Double.parseDouble((String) node
66: .getAttributeValue("miny")));
67: return ret;
68: }
69:
70: }
|