42
42
43
43
import org .apache .commons .lang3 .Validate ;
44
44
import org .hisrc .jsonix .compilation .jsonschema .JsonixJsonSchemaConstants ;
45
- import org .hisrc .jsonix .compilation .jsonschema .XmlSchemaJsonSchemaConstants ;
46
45
import org .hisrc .jsonix .compilation .jsonschema .typeinfo .builtin .Base64BinaryTypeInfoProducer ;
47
46
import org .hisrc .jsonix .compilation .jsonschema .typeinfo .builtin .BooleanTypeInfoProducer ;
48
47
import org .hisrc .jsonix .compilation .jsonschema .typeinfo .builtin .DecimalTypeInfoProducer ;
72
71
73
72
public class CreateTypeInfoProducer <T , C extends T , O > implements MTypeInfoVisitor <T , C , TypeInfoProducer <T , C >> {
74
73
75
- private static final String IDREFS_TYPE_INFO_NAME = "IDREFS" ;
76
- private static final String IDREF_TYPE_INFO_NAME = "IDREF" ;
77
- private static final String ID_TYPE_INFO_NAME = "ID" ;
78
-
79
74
private Map <QName , TypeInfoProducer <T , C >> XSD_TYPE_MAPPING = new HashMap <QName , TypeInfoProducer <T , C >>();
80
75
{
81
76
XSD_TYPE_MAPPING .put (XmlSchemaConstants .ANYTYPE ,
@@ -101,65 +96,60 @@ public class CreateTypeInfoProducer<T, C extends T, O> implements MTypeInfoVisit
101
96
new BuiltinLeafInfoProducer <T , C , O >(XmlSchemaConstants .IDREFS ));
102
97
XSD_TYPE_MAPPING .put (XmlSchemaConstants .IDREFS ,
103
98
new BuiltinLeafInfoProducer <T , C , O >(XmlSchemaConstants .IDREFS ));
104
- XSD_TYPE_MAPPING .put (XmlSchemaConstants .ENTITY , new
105
- NormalizedStringTypeInfoProducer <T , C , O >(XmlSchemaConstants .ENTITY ));
106
- XSD_TYPE_MAPPING .put (XmlSchemaConstants .ENTITIES , new
107
- NormalizedStringTypeInfoProducer <T , C , O >(XmlSchemaConstants .ENTITIES ));
99
+ XSD_TYPE_MAPPING .put (XmlSchemaConstants .ENTITY ,
100
+ new NormalizedStringTypeInfoProducer <T , C , O >(XmlSchemaConstants .ENTITY ));
101
+ XSD_TYPE_MAPPING .put (XmlSchemaConstants .ENTITIES ,
102
+ new NormalizedStringTypeInfoProducer <T , C , O >(XmlSchemaConstants .ENTITIES ));
108
103
XSD_TYPE_MAPPING .put (XmlSchemaConstants .NMTOKEN ,
109
- new NormalizedStringTypeInfoProducer <T , C , O >( XmlSchemaConstants .NMTOKEN ));
104
+ new NormalizedStringTypeInfoProducer <T , C , O >(XmlSchemaConstants .NMTOKEN ));
110
105
XSD_TYPE_MAPPING .put (XmlSchemaConstants .NMTOKENS ,
111
106
new NormalizedStringTypeInfoProducer <T , C , O >(XmlSchemaConstants .NMTOKENS ));
112
107
XSD_TYPE_MAPPING .put (XmlSchemaConstants .BOOLEAN , new BooleanTypeInfoProducer <T , C , O >());
113
108
XSD_TYPE_MAPPING .put (XmlSchemaConstants .BASE64BINARY , new Base64BinaryTypeInfoProducer <T , C , O >());
114
109
XSD_TYPE_MAPPING .put (XmlSchemaConstants .HEXBINARY , new HexBinaryTypeInfoProducer <T , C , O >());
115
- XSD_TYPE_MAPPING .put (XmlSchemaConstants .FLOAT ,
116
- new DecimalTypeInfoProducer <T , C , O >( XmlSchemaConstants .FLOAT ));
110
+ XSD_TYPE_MAPPING .put (XmlSchemaConstants .FLOAT , new DecimalTypeInfoProducer <T , C , O >(XmlSchemaConstants .FLOAT ));
117
111
XSD_TYPE_MAPPING .put (XmlSchemaConstants .DECIMAL ,
118
- new DecimalTypeInfoProducer <T , C , O >( XmlSchemaConstants .DECIMAL ));
112
+ new DecimalTypeInfoProducer <T , C , O >(XmlSchemaConstants .DECIMAL ));
119
113
XSD_TYPE_MAPPING .put (XmlSchemaConstants .INTEGER ,
120
114
new IntegerTypeInfoProducer <T , C , O >(XmlSchemaConstants .INTEGER ));
121
115
XSD_TYPE_MAPPING .put (XmlSchemaConstants .NONPOSITIVEINTEGER ,
122
- new IntegerTypeInfoProducer <T , C , O >( XmlSchemaConstants .NONPOSITIVEINTEGER ));
116
+ new IntegerTypeInfoProducer <T , C , O >(XmlSchemaConstants .NONPOSITIVEINTEGER ));
123
117
XSD_TYPE_MAPPING .put (XmlSchemaConstants .NEGATIVEINTEGER ,
124
- new IntegerTypeInfoProducer <T , C , O >( XmlSchemaConstants .NEGATIVEINTEGER ));
125
- XSD_TYPE_MAPPING .put (XmlSchemaConstants .LONG ,
126
- new IntegerTypeInfoProducer <T , C , O >( XmlSchemaConstants .LONG ));
127
- XSD_TYPE_MAPPING .put (XmlSchemaConstants .INT ,
128
- new IntegerTypeInfoProducer <T , C , O >( XmlSchemaConstants .INT ));
129
- XSD_TYPE_MAPPING .put (XmlSchemaConstants .SHORT ,
130
- new IntegerTypeInfoProducer <T , C , O >( XmlSchemaConstants .SHORT ));
131
- XSD_TYPE_MAPPING .put (XmlSchemaConstants .BYTE ,
132
- new IntegerTypeInfoProducer <T , C , O >( XmlSchemaConstants .BYTE ));
118
+ new IntegerTypeInfoProducer <T , C , O >(XmlSchemaConstants .NEGATIVEINTEGER ));
119
+ XSD_TYPE_MAPPING .put (XmlSchemaConstants .LONG , new IntegerTypeInfoProducer <T , C , O >(XmlSchemaConstants .LONG ));
120
+ XSD_TYPE_MAPPING .put (XmlSchemaConstants .INT , new IntegerTypeInfoProducer <T , C , O >(XmlSchemaConstants .INT ));
121
+ XSD_TYPE_MAPPING .put (XmlSchemaConstants .SHORT , new IntegerTypeInfoProducer <T , C , O >(XmlSchemaConstants .SHORT ));
122
+ XSD_TYPE_MAPPING .put (XmlSchemaConstants .BYTE , new IntegerTypeInfoProducer <T , C , O >(XmlSchemaConstants .BYTE ));
133
123
XSD_TYPE_MAPPING .put (XmlSchemaConstants .NONNEGATIVEINTEGER ,
134
124
new IntegerTypeInfoProducer <T , C , O >(XmlSchemaConstants .NONNEGATIVEINTEGER ));
135
125
XSD_TYPE_MAPPING .put (XmlSchemaConstants .UNSIGNEDLONG ,
136
- new IntegerTypeInfoProducer <T , C , O >( XmlSchemaConstants .UNSIGNEDLONG ));
126
+ new IntegerTypeInfoProducer <T , C , O >(XmlSchemaConstants .UNSIGNEDLONG ));
137
127
XSD_TYPE_MAPPING .put (XmlSchemaConstants .UNSIGNEDINT ,
138
- new IntegerTypeInfoProducer <T , C , O >( XmlSchemaConstants .UNSIGNEDINT ));
128
+ new IntegerTypeInfoProducer <T , C , O >(XmlSchemaConstants .UNSIGNEDINT ));
139
129
XSD_TYPE_MAPPING .put (XmlSchemaConstants .UNSIGNEDSHORT ,
140
- new IntegerTypeInfoProducer <T , C , O >( XmlSchemaConstants .UNSIGNEDSHORT ));
130
+ new IntegerTypeInfoProducer <T , C , O >(XmlSchemaConstants .UNSIGNEDSHORT ));
141
131
XSD_TYPE_MAPPING .put (XmlSchemaConstants .UNSIGNEDBYTE ,
142
- new IntegerTypeInfoProducer <T , C , O >( XmlSchemaConstants .UNSIGNEDBYTE ));
132
+ new IntegerTypeInfoProducer <T , C , O >(XmlSchemaConstants .UNSIGNEDBYTE ));
143
133
XSD_TYPE_MAPPING .put (XmlSchemaConstants .POSITIVEINTEGER ,
144
- new IntegerTypeInfoProducer <T , C , O >( XmlSchemaConstants .POSITIVEINTEGER ));
134
+ new IntegerTypeInfoProducer <T , C , O >(XmlSchemaConstants .POSITIVEINTEGER ));
145
135
XSD_TYPE_MAPPING .put (XmlSchemaConstants .DOUBLE ,
146
136
new DecimalTypeInfoProducer <T , C , O >(XmlSchemaConstants .DOUBLE ));
147
137
XSD_TYPE_MAPPING .put (XmlSchemaConstants .ANYURI ,
148
- new NormalizedStringTypeInfoProducer <T , C , O >( XmlSchemaConstants .ANYURI ));
138
+ new NormalizedStringTypeInfoProducer <T , C , O >(XmlSchemaConstants .ANYURI ));
149
139
XSD_TYPE_MAPPING .put (XmlSchemaConstants .ANYURI ,
150
140
new NormalizedStringTypeInfoProducer <T , C , O >(XmlSchemaConstants .ANYURI ));
151
141
XSD_TYPE_MAPPING .put (XmlSchemaConstants .QNAME , new QNameTypeInfoProducer <T , C , O >());
152
142
// XSD_TYPE_MAPPING.put(XmlSchemaConstants.NOTATION, new
153
143
// BuiltinLeafInfoProducer<T, C, O>("Notation"));
154
144
XSD_TYPE_MAPPING .put (XmlSchemaConstants .DURATION , new DurationTypeInfoProducer <T , C , O >());
155
145
XSD_TYPE_MAPPING .put (XmlSchemaConstants .DATETIME ,
156
- new XMLGregorianCalendarTypeInfoProducer <T , C , O >( XmlSchemaConstants .DATETIME ));
146
+ new XMLGregorianCalendarTypeInfoProducer <T , C , O >(XmlSchemaConstants .DATETIME ));
157
147
XSD_TYPE_MAPPING .put (XmlSchemaConstants .TIME ,
158
148
new XMLGregorianCalendarTypeInfoProducer <T , C , O >(XmlSchemaConstants .TIME ));
159
149
XSD_TYPE_MAPPING .put (XmlSchemaConstants .DATE ,
160
- new XMLGregorianCalendarTypeInfoProducer <T , C , O >( XmlSchemaConstants .DATE ));
150
+ new XMLGregorianCalendarTypeInfoProducer <T , C , O >(XmlSchemaConstants .DATE ));
161
151
XSD_TYPE_MAPPING .put (XmlSchemaConstants .GYEARMONTH ,
162
- new XMLGregorianCalendarTypeInfoProducer <T , C , O >( XmlSchemaConstants .GYEARMONTH ));
152
+ new XMLGregorianCalendarTypeInfoProducer <T , C , O >(XmlSchemaConstants .GYEARMONTH ));
163
153
XSD_TYPE_MAPPING .put (XmlSchemaConstants .GYEAR ,
164
154
new XMLGregorianCalendarTypeInfoProducer <T , C , O >(XmlSchemaConstants .GYEAR ));
165
155
XSD_TYPE_MAPPING .put (XmlSchemaConstants .GMONTHDAY ,
0 commit comments