01: package org.geotools.ml.bindings;
02:
03: import java.util.ArrayList;
04: import java.util.List;
05:
06: import javax.xml.namespace.QName;
07:
08: import org.geotools.xml.AbstractComplexBinding;
09: import org.geotools.xml.ElementInstance;
10: import org.geotools.xml.Node;
11:
12: /**
13: * Strategy object for the type http://mails/refractions/net:mailsType.
14: *
15: * <p>
16: * <pre>
17: * <code>
18: * <xsd:complexType name="mailsType">
19: * <xsd:sequence maxOccurs="unbounded" minOccurs="0">
20: * <xsd:element name="mail" type="ml:mailType"/>
21: * </xsd:sequence>
22: * </xsd:complexType>
23: *
24: * </code>
25: * </pre>
26: * </p>
27: *
28: * @generated
29: */
30: public class MLMailsTypeBinding extends AbstractComplexBinding {
31:
32: /**
33: * @generated
34: */
35: public QName getTarget() {
36: return ML.MAILSTYPE;
37: }
38:
39: public Class getType() {
40: return List.class;
41: }
42:
43: /**
44: * <!-- begin-user-doc -->
45: * <!-- end-user-doc -->
46: *
47: * @generated modifiable
48: */
49: public Object parse(ElementInstance instance, Node node,
50: Object value) throws Exception {
51:
52: ArrayList list = new ArrayList();
53: List children = node.getChildren();
54: for (int i = 0; i < children.size(); i++) {
55: list.add(((Node) children.get(i)).getValue());
56: }
57:
58: return list;
59: }
60: }
|