01: package org.geotools.wms.v1_1_1.bindings;
02:
03: import javax.xml.namespace.QName;
04:
05: import org.geotools.data.ows.StyleImpl;
06: import org.geotools.util.SimpleInternationalString;
07: import org.geotools.xml.AbstractComplexBinding;
08: import org.geotools.xml.ElementInstance;
09: import org.geotools.xml.Node;
10: import org.opengis.layer.StyleSheetURL;
11: import org.opengis.layer.StyleURL;
12:
13: /**
14: * Binding object for the type :_Style.
15: *
16: * <p>
17: * <pre>
18: * <code>
19: * <xs:complexType name="_Style">
20: * <xs:sequence>
21: * <xs:element ref="Name"/>
22: * <xs:element ref="Title"/>
23: * <xs:element minOccurs="0" ref="Abstract"/>
24: * <xs:element maxOccurs="unbounded" minOccurs="0" ref="LegendURL"/>
25: * <xs:element minOccurs="0" ref="StyleSheetURL"/>
26: * <xs:element minOccurs="0" ref="StyleURL"/>
27: * </xs:sequence>
28: * </xs:complexType>
29: *
30: * </code>
31: * </pre>
32: * </p>
33: *
34: * @generated
35: */
36: public class _StyleBinding extends AbstractComplexBinding {
37:
38: /**
39: * @generated
40: */
41: public QName getTarget() {
42: return WMSV1_1_1._Style;
43: }
44:
45: /**
46: * <!-- begin-user-doc -->
47: * <!-- end-user-doc -->
48: *
49: * @generated modifiable
50: */
51: public Class getType() {
52: return StyleImpl.class;
53: }
54:
55: /**
56: * <!-- begin-user-doc -->
57: * <!-- end-user-doc -->
58: *
59: * @generated modifiable
60: */
61: public Object parse(ElementInstance instance, Node node,
62: Object value) throws Exception {
63: StyleImpl ret = new StyleImpl();
64:
65: // Currently un-implemented
66: //ret.setStyleURL((StyleURL)node.getChildValue("StyleURL"));
67: //ret.setStyleSheetURL((StyleSheetURL)node.getChildValue("StyleSheetURL"));
68: //ret.setLegendURLs(node.getChildValues("LegendURL"));
69: if (node.getChildValue("Abstract") != null)
70: ret.setAbstract(new SimpleInternationalString((String) node
71: .getChildValue("Abstract")));
72: if (node.getChildValue("Title") != null)
73: ret.setTitle(new SimpleInternationalString((String) node
74: .getChildValue("Title")));
75: ret.setName((String) node.getChildValue("Name"));
76:
77: return ret;
78: }
79:
80: }
|