1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.ws.commons.schema;
18
19
20
21
22
23
24
25 public class XmlSchemaSimpleType extends XmlSchemaType {
26
27 XmlSchemaSimpleTypeContent content;
28
29
30
31
32 public XmlSchemaSimpleType(XmlSchema schema) {
33 super(schema);
34 }
35
36 public XmlSchemaSimpleTypeContent getContent() {
37 return content;
38 }
39
40 public void setContent(XmlSchemaSimpleTypeContent content) {
41 this.content = content;
42 }
43
44 public String toString(String prefix, int tab) {
45 String xml = new String();
46
47 for (int i = 0; i < tab; i++)
48 xml += "\t";
49
50 if (!prefix.equals("") && prefix.indexOf(":") == -1)
51 prefix += ":";
52
53
54 xml += "<" + prefix + "simpleType>\n";
55
56 if (content != null)
57 xml += content.toString(prefix, (tab + 1));
58
59 for (int i = 0; i < tab; i++)
60 xml += "\t";
61
62 xml += "</" + prefix + "simpleType>\n";
63 return xml;
64 }
65
66 }
67