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