1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.ws.commons.schema;
21
22 import javax.xml.namespace.QName;
23
24
25
26
27
28
29
30
31
32 public class XmlSchemaComplexContentRestriction extends XmlSchemaContent {
33
34
35
36
37 public XmlSchemaComplexContentRestriction() {
38 attributes = new XmlSchemaObjectCollection();
39 }
40
41
42 XmlSchemaAnyAttribute anyAttribute;
43
44 public void setAnyAttribute(XmlSchemaAnyAttribute anyAttribute) {
45 this.anyAttribute = anyAttribute;
46 }
47
48 public XmlSchemaAnyAttribute getAnyAttribute() {
49 return this.anyAttribute;
50 }
51
52
53
54
55 XmlSchemaObjectCollection attributes;
56
57 public XmlSchemaObjectCollection getAttributes() {
58 return this.attributes;
59 }
60
61
62 QName baseTypeName;
63
64 public void setBaseTypeName(QName baseTypeName) {
65 this.baseTypeName = baseTypeName;
66 }
67
68 public QName getBaseTypeName() {
69 return this.baseTypeName;
70 }
71
72
73
74
75 XmlSchemaParticle particle;
76
77 public XmlSchemaParticle getParticle() {
78 return this.particle;
79 }
80
81 public void setParticle(XmlSchemaParticle particle) {
82 this.particle = particle;
83 }
84
85 public String toString(String prefix, int tab) {
86 String xml = new String();
87 for (int i = 0; i < tab; i++)
88 xml += "\t";
89 if (!prefix.equals("") && prefix.indexOf(":") == -1)
90 prefix += ":";
91
92 xml += "<" + prefix + "restriction>\n";
93
94 if (particle != null)
95 xml += particle.toString(prefix, (tab + 1));
96
97 for (int i = 0; i < tab; i++)
98 xml += "\t";
99
100 xml += "</" + prefix + "restriction>\n";
101 return xml;
102 }
103 }
104