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 read( Element element, int occurrence, Map context ) throws XFireFault;
42
43 public abstract void writeSchema( Element element );
44
45 public abstract void configure( Element configuration, AegisService service, TypeRegistry reg );
46
47 public boolean isComplex()
48 {
49 return false;
50 }
51
52 public Set getDependencies()
53 {
54 return null;
55 }
56
57 public String getOgnl()
58 {
59 return ognl;
60 }
61
62 public void setOgnl( String ognl )
63 {
64 this.ognl = ognl;
65 }
66
67 public QName getQName()
68 {
69 return qName;
70 }
71
72 public void setQName( QName name )
73 {
74 qName = name;
75 }
76
77 public String getName()
78 {
79 return name;
80 }
81
82 public void setName(String name)
83 {
84 this.name = name;
85 }
86
87 public QName getSchemaType()
88 {
89 return schemaType;
90 }
91
92 public void setSchemaType(QName schemaType)
93 {
94 this.schemaType = schemaType;
95 }
96
97 public String getDocumentation()
98 {
99 return documentation;
100 }
101
102 public void setDocumentation(String documentation)
103 {
104 this.documentation = documentation;
105 }
106
107 public String getMaxOccurs()
108 {
109 return maxOccurs;
110 }
111
112 public void setMaxOccurs(String maxOccurs)
113 {
114 this.maxOccurs = maxOccurs;
115 }
116
117 public String getMinOccurs()
118 {
119 return minOccurs;
120 }
121
122 public void setMinOccurs(String minOccurs)
123 {
124 this.minOccurs = minOccurs;
125 }
126 }