1 package org.codehaus.xfire.aegis.type;
2
3 import java.util.Map;
4 import java.util.Set;
5
6 import org.codehaus.xfire.aegis.AegisService;
7 import org.codehaus.xfire.aegis.mapping.TypeRegistry;
8 import org.codehaus.xfire.fault.XFireFault;
9 import org.codehaus.xfire.wsdl.WSDLType;
10 import org.dom4j.Element;
11 import org.dom4j.QName;
12
13
14 /***
15 * An Aegis Type. Something that is read/written.
16 *
17 * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a>
18 * @since Aug 19, 2004
19 */
20 public abstract class Type
21 implements WSDLType
22 {
23 private QName qName;
24 private QName schemaType;
25 private String ognl;
26 private String name;
27 private String documentation;
28 private String minOccurs;
29 private String maxOccurs;
30
31 public Type()
32 {
33 minOccurs = "1";
34 maxOccurs = "1";
35 }
36
37 public abstract void write( Element element, Map context ) throws XFireFault;
38
39 public abstract void read( Element element, Map context ) throws XFireFault;
40
41 public abstract void writeSchema( Element element );
42
43 public abstract void configure( Element configuration, AegisService service, TypeRegistry reg );
44
45 public boolean isComplex()
46 {
47 return false;
48 }
49
50 public Set getDependencies()
51 {
52 return null;
53 }
54
55 public String getOgnl()
56 {
57 return ognl;
58 }
59
60 public void setOgnl( String ognl )
61 {
62 this.ognl = ognl;
63 }
64
65 public QName getQName()
66 {
67 return qName;
68 }
69
70 public void setQName( QName name )
71 {
72 qName = name;
73 }
74
75 public String getName()
76 {
77 return name;
78 }
79
80 public void setName(String name)
81 {
82 this.name = name;
83 }
84
85 public QName getSchemaType()
86 {
87 return schemaType;
88 }
89
90 public void setSchemaType(QName schemaType)
91 {
92 this.schemaType = schemaType;
93 }
94
95 public String getDocumentation()
96 {
97 return documentation;
98 }
99
100 public void setDocumentation(String documentation)
101 {
102 this.documentation = documentation;
103 }
104
105 public String getMaxOccurs()
106 {
107 return maxOccurs;
108 }
109
110 public void setMaxOccurs(String maxOccurs)
111 {
112 this.maxOccurs = maxOccurs;
113 }
114
115 public String getMinOccurs()
116 {
117 return minOccurs;
118 }
119
120 public void setMinOccurs(String minOccurs)
121 {
122 this.minOccurs = minOccurs;
123 }
124 }