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 org.apache.ws.commons.schema.constants.Constants;
23
24 import javax.xml.namespace.QName;
25
26
27
28
29
30
31 public class XmlSchemaType extends XmlSchemaAnnotated {
32
33 Object baseSchemaType;
34 XmlSchemaDatatype dataType;
35 XmlSchemaDerivationMethod deriveBy, finalDerivation, finalResolved;
36 boolean isMixed;
37
38
39 String name;
40
41 XmlSchema schema;
42
43
44
45
46 public XmlSchemaType(XmlSchema schema) {
47 this.schema = schema;
48 finalDerivation = new XmlSchemaDerivationMethod(Constants.BlockConstants.NONE);
49 }
50
51 public Object getBaseSchemaType() {
52 return baseSchemaType;
53 }
54
55 public XmlSchemaDatatype getDataType() {
56 return dataType;
57 }
58
59 public XmlSchemaDerivationMethod getDeriveBy() {
60 return deriveBy;
61 }
62
63 public XmlSchemaDerivationMethod getFinal() {
64 return finalDerivation;
65 }
66
67 public void setFinal(XmlSchemaDerivationMethod finalDerivation) {
68 this.finalDerivation = finalDerivation;
69 }
70
71 public XmlSchemaDerivationMethod getFinalResolved() {
72 return finalResolved;
73 }
74
75 public boolean isMixed() {
76 return isMixed;
77 }
78
79 public void setMixed(boolean isMixed) {
80 this.isMixed = isMixed;
81 }
82
83 public String getName() {
84 return name;
85 }
86
87 public void setName(String name) {
88 this.name = name;
89 }
90
91 public QName getQName() {
92 if(name == null) {
93 return null;
94 }
95 return new QName(schema.logicalTargetNamespace, name);
96 }
97 }