4242
4343import org .apache .commons .lang3 .Validate ;
4444import org .hisrc .jsonix .compilation .jsonschema .JsonixJsonSchemaConstants ;
45- import org .hisrc .jsonix .compilation .jsonschema .XmlSchemaJsonSchemaConstants ;
4645import org .hisrc .jsonix .compilation .jsonschema .typeinfo .builtin .Base64BinaryTypeInfoProducer ;
4746import org .hisrc .jsonix .compilation .jsonschema .typeinfo .builtin .BooleanTypeInfoProducer ;
4847import org .hisrc .jsonix .compilation .jsonschema .typeinfo .builtin .DecimalTypeInfoProducer ;
7271
7372public class CreateTypeInfoProducer <T , C extends T , O > implements MTypeInfoVisitor <T , C , TypeInfoProducer <T , C >> {
7473
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-
7974 private Map <QName , TypeInfoProducer <T , C >> XSD_TYPE_MAPPING = new HashMap <QName , TypeInfoProducer <T , C >>();
8075 {
8176 XSD_TYPE_MAPPING .put (XmlSchemaConstants .ANYTYPE ,
@@ -101,65 +96,60 @@ public class CreateTypeInfoProducer<T, C extends T, O> implements MTypeInfoVisit
10196 new BuiltinLeafInfoProducer <T , C , O >(XmlSchemaConstants .IDREFS ));
10297 XSD_TYPE_MAPPING .put (XmlSchemaConstants .IDREFS ,
10398 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 ));
108103 XSD_TYPE_MAPPING .put (XmlSchemaConstants .NMTOKEN ,
109- new NormalizedStringTypeInfoProducer <T , C , O >( XmlSchemaConstants .NMTOKEN ));
104+ new NormalizedStringTypeInfoProducer <T , C , O >(XmlSchemaConstants .NMTOKEN ));
110105 XSD_TYPE_MAPPING .put (XmlSchemaConstants .NMTOKENS ,
111106 new NormalizedStringTypeInfoProducer <T , C , O >(XmlSchemaConstants .NMTOKENS ));
112107 XSD_TYPE_MAPPING .put (XmlSchemaConstants .BOOLEAN , new BooleanTypeInfoProducer <T , C , O >());
113108 XSD_TYPE_MAPPING .put (XmlSchemaConstants .BASE64BINARY , new Base64BinaryTypeInfoProducer <T , C , O >());
114109 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 ));
117111 XSD_TYPE_MAPPING .put (XmlSchemaConstants .DECIMAL ,
118- new DecimalTypeInfoProducer <T , C , O >( XmlSchemaConstants .DECIMAL ));
112+ new DecimalTypeInfoProducer <T , C , O >(XmlSchemaConstants .DECIMAL ));
119113 XSD_TYPE_MAPPING .put (XmlSchemaConstants .INTEGER ,
120114 new IntegerTypeInfoProducer <T , C , O >(XmlSchemaConstants .INTEGER ));
121115 XSD_TYPE_MAPPING .put (XmlSchemaConstants .NONPOSITIVEINTEGER ,
122- new IntegerTypeInfoProducer <T , C , O >( XmlSchemaConstants .NONPOSITIVEINTEGER ));
116+ new IntegerTypeInfoProducer <T , C , O >(XmlSchemaConstants .NONPOSITIVEINTEGER ));
123117 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 ));
133123 XSD_TYPE_MAPPING .put (XmlSchemaConstants .NONNEGATIVEINTEGER ,
134124 new IntegerTypeInfoProducer <T , C , O >(XmlSchemaConstants .NONNEGATIVEINTEGER ));
135125 XSD_TYPE_MAPPING .put (XmlSchemaConstants .UNSIGNEDLONG ,
136- new IntegerTypeInfoProducer <T , C , O >( XmlSchemaConstants .UNSIGNEDLONG ));
126+ new IntegerTypeInfoProducer <T , C , O >(XmlSchemaConstants .UNSIGNEDLONG ));
137127 XSD_TYPE_MAPPING .put (XmlSchemaConstants .UNSIGNEDINT ,
138- new IntegerTypeInfoProducer <T , C , O >( XmlSchemaConstants .UNSIGNEDINT ));
128+ new IntegerTypeInfoProducer <T , C , O >(XmlSchemaConstants .UNSIGNEDINT ));
139129 XSD_TYPE_MAPPING .put (XmlSchemaConstants .UNSIGNEDSHORT ,
140- new IntegerTypeInfoProducer <T , C , O >( XmlSchemaConstants .UNSIGNEDSHORT ));
130+ new IntegerTypeInfoProducer <T , C , O >(XmlSchemaConstants .UNSIGNEDSHORT ));
141131 XSD_TYPE_MAPPING .put (XmlSchemaConstants .UNSIGNEDBYTE ,
142- new IntegerTypeInfoProducer <T , C , O >( XmlSchemaConstants .UNSIGNEDBYTE ));
132+ new IntegerTypeInfoProducer <T , C , O >(XmlSchemaConstants .UNSIGNEDBYTE ));
143133 XSD_TYPE_MAPPING .put (XmlSchemaConstants .POSITIVEINTEGER ,
144- new IntegerTypeInfoProducer <T , C , O >( XmlSchemaConstants .POSITIVEINTEGER ));
134+ new IntegerTypeInfoProducer <T , C , O >(XmlSchemaConstants .POSITIVEINTEGER ));
145135 XSD_TYPE_MAPPING .put (XmlSchemaConstants .DOUBLE ,
146136 new DecimalTypeInfoProducer <T , C , O >(XmlSchemaConstants .DOUBLE ));
147137 XSD_TYPE_MAPPING .put (XmlSchemaConstants .ANYURI ,
148- new NormalizedStringTypeInfoProducer <T , C , O >( XmlSchemaConstants .ANYURI ));
138+ new NormalizedStringTypeInfoProducer <T , C , O >(XmlSchemaConstants .ANYURI ));
149139 XSD_TYPE_MAPPING .put (XmlSchemaConstants .ANYURI ,
150140 new NormalizedStringTypeInfoProducer <T , C , O >(XmlSchemaConstants .ANYURI ));
151141 XSD_TYPE_MAPPING .put (XmlSchemaConstants .QNAME , new QNameTypeInfoProducer <T , C , O >());
152142 // XSD_TYPE_MAPPING.put(XmlSchemaConstants.NOTATION, new
153143 // BuiltinLeafInfoProducer<T, C, O>("Notation"));
154144 XSD_TYPE_MAPPING .put (XmlSchemaConstants .DURATION , new DurationTypeInfoProducer <T , C , O >());
155145 XSD_TYPE_MAPPING .put (XmlSchemaConstants .DATETIME ,
156- new XMLGregorianCalendarTypeInfoProducer <T , C , O >( XmlSchemaConstants .DATETIME ));
146+ new XMLGregorianCalendarTypeInfoProducer <T , C , O >(XmlSchemaConstants .DATETIME ));
157147 XSD_TYPE_MAPPING .put (XmlSchemaConstants .TIME ,
158148 new XMLGregorianCalendarTypeInfoProducer <T , C , O >(XmlSchemaConstants .TIME ));
159149 XSD_TYPE_MAPPING .put (XmlSchemaConstants .DATE ,
160- new XMLGregorianCalendarTypeInfoProducer <T , C , O >( XmlSchemaConstants .DATE ));
150+ new XMLGregorianCalendarTypeInfoProducer <T , C , O >(XmlSchemaConstants .DATE ));
161151 XSD_TYPE_MAPPING .put (XmlSchemaConstants .GYEARMONTH ,
162- new XMLGregorianCalendarTypeInfoProducer <T , C , O >( XmlSchemaConstants .GYEARMONTH ));
152+ new XMLGregorianCalendarTypeInfoProducer <T , C , O >(XmlSchemaConstants .GYEARMONTH ));
163153 XSD_TYPE_MAPPING .put (XmlSchemaConstants .GYEAR ,
164154 new XMLGregorianCalendarTypeInfoProducer <T , C , O >(XmlSchemaConstants .GYEAR ));
165155 XSD_TYPE_MAPPING .put (XmlSchemaConstants .GMONTHDAY ,
0 commit comments