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 :_LatLonBoundingBox.
10: *
11: * <p>
12: * <pre>
13: * <code>
14: * <xs:complexType name="_LatLonBoundingBox">
15: * <xs:attribute name="minx" use="required"/>
16: * <xs:attribute name="miny" use="required"/>
17: * <xs:attribute name="maxx" use="required"/>
18: * <xs:attribute name="maxy" use="required"/>
19: * </xs:complexType>
20: *
21: * </code>
22: * </pre>
23: * </p>
24: *
25: * @generated
26: */
27: public class _LatLonBoundingBoxBinding extends AbstractComplexBinding {
28:
29: /**
30: * @generated
31: */
32: public QName getTarget() {
33: return WMSV1_1_1._LatLonBoundingBox;
34: }
35:
36: /**
37: * <!-- begin-user-doc -->
38: * <!-- end-user-doc -->
39: *
40: * @generated modifiable
41: */
42: public Class getType() {
43: return CRSEnvelope.class;
44: }
45:
46: /**
47: * <!-- begin-user-doc -->
48: * <!-- end-user-doc -->
49: *
50: * @generated modifiable
51: */
52: public Object parse(ElementInstance instance, Node node,
53: Object value) throws Exception {
54: CRSEnvelope ret = new CRSEnvelope();
55: ret.setEPSGCode("EPSG:4326");
56: ret.setMaxX(Double.parseDouble((String) node
57: .getAttributeValue("maxx")));
58: ret.setMaxY(Double.parseDouble((String) node
59: .getAttributeValue("maxy")));
60: ret.setMinX(Double.parseDouble((String) node
61: .getAttributeValue("minx")));
62: ret.setMinY(Double.parseDouble((String) node
63: .getAttributeValue("miny")));
64: return ret;
65: }
66:
67: }
|