@@ -10,35 +10,35 @@ interface Unmarshaller { //TODO: <T> @see createUnmarshaller
1010 * @param {string } arg (description)
1111 * @returns {Object } (description)
1212 */
13- unmarshalString ( arg : string ) : Object ;
13+ unmarshalString ( arg :string ) : Object ;
1414
1515 /**
1616 * (description)
17- *
17+ *
1818 * @param {string } fileName (description)
1919 * @param {(unmarshalled:Object)=> void } callback (description)
2020 * @param {Object } options (description)
2121 */
22- unmarshalFile ( fileName : string , callback : ( unmarshalled : Object ) => void , options : Object ) : void ;
22+ unmarshalFile ( fileName :string , callback :( unmarshalled :Object ) => void , options :Object ) : void ;
2323
2424
2525 /**
2626 * (description)
27- *
27+ *
2828 * @param {string } url (description)
2929 * @param {(unmarshalled:Object)=> void } callback (description)
3030 * @param {Object } options (description)
3131 */
32- unmarshalURL ( url : string , callback : ( unmarshalled : Object ) => void , options : Object ) : void ;
32+ unmarshalURL ( url :string , callback :( unmarshalled :Object ) => void , options :Object ) : void ;
3333
3434 /**
3535 * (description)
36- *
36+ *
3737 * @param {Element } doc (description)
3838 * @param {string } scope (description)
3939 * @returns {Object } (description)
4040 */
41- unmarshalDocument ( doc : Element , scope : string ) : Object ;
41+ unmarshalDocument ( doc :Element , scope :string ) : Object ;
4242}
4343/**
4444 * (description)
@@ -48,19 +48,19 @@ interface Unmarshaller { //TODO: <T> @see createUnmarshaller
4848interface Marshaller { // TODO: generics like marshalString(object:T):string;
4949 /**
5050 * (description)
51- *
51+ *
5252 * @param {Object } object (description)
5353 * @returns {string } (description)
5454 */
55- marshalString ( object : Object ) : string ;
55+ marshalString ( object :Object ) : string ;
5656
5757 /**
5858 * (description)
59- *
59+ *
6060 * @param {Object } object (description)
6161 * @returns {Element } (description)
6262 */
63- marshalDocument ( object : Object ) : Element ;
63+ marshalDocument ( object :Object ) : Element ;
6464}
6565
6666declare module Jsonix {
@@ -70,107 +70,107 @@ declare module Jsonix {
7070 *
7171 * @param {any[] } s (description)
7272 */
73- constructor ( s : any [ ] ) ;
73+ constructor ( s :any [ ] ) ;
7474
7575 /**
7676 * (description)
7777 *
7878 * @param {string } name (description)
7979 * @returns {TypeInfo } (description)
8080 */
81- getTypeInfoByName ( name : string ) : TypeInfo ;
81+ getTypeInfoByName ( name :string ) :TypeInfo ;
8282
8383 /**
8484 * (description)
8585 *
8686 * @param {string } typeName (description)
8787 * @returns {TypeInfo } (description)
8888 */
89- getTypeInfoByTypeName ( typeName : string ) : TypeInfo ;
89+ getTypeInfoByTypeName ( typeName :string ) :TypeInfo ;
9090
9191 /**
9292 * (description)
9393 *
9494 * @param {string } typeNameKey (description)
9595 * @returns {TypeInfo } (description)
9696 */
97- getTypeInfoByTypeNameKey ( typeNameKey : string ) : TypeInfo ;
97+ getTypeInfoByTypeNameKey ( typeNameKey :string ) :TypeInfo ;
9898
99- getElementInfo ( name : string , scope : string ) : any ;
99+ getElementInfo ( name :string , scope :string ) :any ;
100100
101- getSubstitutionMembers ( name : string ) : any ;
101+ getSubstitutionMembers ( name :string ) :any ;
102102
103- createMarshaller ( ) : Marshaller ;
103+ createMarshaller ( ) :Marshaller ;
104104
105- createUnmarshaller ( ) : Unmarshaller ;
105+ createUnmarshaller ( ) :Unmarshaller ;
106106
107107 //TODO: createUnmarshaller<T>(type: T): Unmarshaller<T>;
108108
109- getNamespaceURI ( prefix : string ) : any ;
109+ getNamespaceURI ( prefix :string ) :any ;
110110
111- getPrefix ( namespaceURI : string , defaultPrefix : string ) : any ;
111+ getPrefix ( namespaceURI :string , defaultPrefix :string ) :any ;
112112
113- builtinTypeInfos : {
113+ builtinTypeInfos :{
114114 Jsonix : {
115115 Schema : {
116116 XSD : {
117- AnyType : { INSTANCE : { } } ,
118- AnySimpleType : { INSTANCE : { } } ,
119- AnyURI : { INSTANCE : { } } ,
120- Base64Binary : { INSTANCE : { } } ,
121- Boolean : { INSTANCE : { } } ,
122- Byte : { INSTANCE : { } } ,
123- Calendar : { INSTANCE : { } } ,
124- DateAsDate : { INSTANCE : { } } ,
125- Date : { INSTANCE : { } } ,
126- DateTimeAsDate : { INSTANCE : { } } ,
127- DateTime : { INSTANCE : { } } ,
128- Decimal : { INSTANCE : { } } ,
129- Double : { INSTANCE : { } } ,
130- Duration : { INSTANCE : { } } ,
131- Float : { INSTANCE : { } } ,
132- GDay : { INSTANCE : { } } ,
133- GMonth : { INSTANCE : { } } ,
134- GMonthDay : { INSTANCE : { } } ,
135- GYear : { INSTANCE : { } } ,
136- GYearMonth : { INSTANCE : { } } ,
137- HexBinary : { INSTANCE : { } } ,
138- ID : { INSTANCE : { } } ,
139- IDREF : { INSTANCE : { } } ,
140- IDREFS : { INSTANCE : { } } ,
141- Int : { INSTANCE : { } } ,
142- Integer : { INSTANCE : { } } ,
143- Language : { INSTANCE : { } } ,
144- Long : { INSTANCE : { } } ,
145- Name : { INSTANCE : { } } ,
146- NCName : { INSTANCE : { } } ,
147- NegativeInteger : { INSTANCE : { } } ,
148- NMToken : { INSTANCE : { } } ,
149- NMTokens : { INSTANCE : { } } ,
150- NonNegativeInteger : { INSTANCE : { } } ,
151- NonPositiveInteger : { INSTANCE : { } } ,
152- NormalizedString : { INSTANCE : { } } ,
153- Number : { INSTANCE : { } } ,
154- PositiveInteger : { INSTANCE : { } } ,
155- QName : { INSTANCE : { } } ,
156- Short : { INSTANCE : { } } ,
157- String : { INSTANCE : { } } ,
158- Strings : { INSTANCE : { } } ,
159- TimeAsDate : { INSTANCE : { } } ,
160- Time : { INSTANCE : { } } ,
161- Token : { INSTANCE : { } } ,
162- UnsignedByte : { INSTANCE : { } } ,
163- UnsignedInt : { INSTANCE : { } } ,
164- UnsignedLong : { INSTANCE : { } } ,
165- UnsignedShort : { INSTANCE : { } } ,
117+ AnyType : { INSTANCE : { } } ;
118+ AnySimpleType : { INSTANCE : { } } ;
119+ AnyURI : { INSTANCE : { } } ;
120+ Base64Binary : { INSTANCE : { } } ;
121+ Boolean : { INSTANCE : { } } ;
122+ Byte : { INSTANCE : { } } ;
123+ Calendar : { INSTANCE : { } } ;
124+ DateAsDate : { INSTANCE : { } } ;
125+ Date : { INSTANCE : { } } ;
126+ DateTimeAsDate : { INSTANCE : { } } ;
127+ DateTime : { INSTANCE : { } } ;
128+ Decimal : { INSTANCE : { } } ;
129+ Double : { INSTANCE : { } } ;
130+ Duration : { INSTANCE : { } } ;
131+ Float : { INSTANCE : { } } ;
132+ GDay : { INSTANCE : { } } ;
133+ GMonth : { INSTANCE : { } } ;
134+ GMonthDay : { INSTANCE : { } } ;
135+ GYear : { INSTANCE : { } } ;
136+ GYearMonth : { INSTANCE : { } } ;
137+ HexBinary : { INSTANCE : { } } ;
138+ ID : { INSTANCE : { } } ;
139+ IDREF : { INSTANCE : { } } ;
140+ IDREFS : { INSTANCE : { } } ;
141+ Int : { INSTANCE : { } } ;
142+ Integer : { INSTANCE : { } } ;
143+ Language : { INSTANCE : { } } ;
144+ Long : { INSTANCE : { } } ;
145+ Name : { INSTANCE : { } } ;
146+ NCName : { INSTANCE : { } } ;
147+ NegativeInteger : { INSTANCE : { } } ;
148+ NMToken : { INSTANCE : { } } ;
149+ NMTokens : { INSTANCE : { } } ;
150+ NonNegativeInteger : { INSTANCE : { } } ;
151+ NonPositiveInteger : { INSTANCE : { } } ;
152+ NormalizedString : { INSTANCE : { } } ;
153+ Number : { INSTANCE : { } } ;
154+ PositiveInteger : { INSTANCE : { } } ;
155+ QName : { INSTANCE : { } } ;
156+ Short : { INSTANCE : { } } ;
157+ String : { INSTANCE : { } } ;
158+ Strings : { INSTANCE : { } } ;
159+ TimeAsDate : { INSTANCE : { } } ;
160+ Time : { INSTANCE : { } } ;
161+ Token : { INSTANCE : { } } ;
162+ UnsignedByte : { INSTANCE : { } } ;
163+ UnsignedInt : { INSTANCE : { } } ;
164+ UnsignedLong : { INSTANCE : { } } ;
165+ UnsignedShort : { INSTANCE : { } } ;
166166 }
167167 }
168168 }
169169 } [ ] ;
170170
171171
172172 // private
173- elementInfos : ClassInfo [ ] ;
173+ elementInfos :ClassInfo [ ] ;
174174
175175 }
176176}
@@ -182,7 +182,7 @@ declare module Jsonix {
182182 * @interface Styled
183183 */
184184interface Styled {
185- //{ CLASS_NAME: string },
185+ CLASS_NAME : string ;
186186 mappingStyle : Object ;
187187}
188188
@@ -193,6 +193,7 @@ interface Styled {
193193 * @interface QName
194194 */
195195interface QName {
196+ CLASS_NAME : string ;
196197 key : string ;
197198 namespaceURI : string ;
198199 localPart : string ;
@@ -207,16 +208,34 @@ interface QName {
207208 * @interface TypeInfo
208209 */
209210interface TypeInfo {
210- name : string ,
211- baseTypeInfo : TypeInfo ,
211+ name : string ;
212+ baseTypeInfo : TypeInfo ;
213+ }
214+
215+ /**
216+ * (description)
217+ *
218+ * @interface EnumLeafInfo
219+ * @extends {TypeInfo }
220+ */
221+ interface EnumLeafInfo extends TypeInfo {
222+ name : string ;
223+ baseTypeInfo : TypeInfo ;
224+ entries : { [ name : string ] : string } ;
225+ keys : { [ index : number ] : string } ;
226+ values : { [ index : number ] : string } ;
227+ built : boolean ;
228+
212229}
213230
231+
214232/**
215233 * (description)
216234 *
217235 * @interface PropertyInfo
218236 */
219237interface PropertyInfo {
238+ CLASS_NAME : string ;
220239 name : string ;
221240 collection : boolean ;
222241 targetNamespace : string ;
@@ -246,7 +265,7 @@ interface AbstractElementPropertyInfo extends PropertyInfo {
246265 * @extends {AbstractElementPropertyInfo }
247266 */
248267interface ElementPropertyInfo extends AbstractElementPropertyInfo {
249- typeInfo : ClassInfo | string ;
268+ typeInfo : TypeInfo | string ;
250269 elementName : QName ;
251270}
252271
@@ -259,27 +278,28 @@ interface ElementPropertyInfo extends AbstractElementPropertyInfo {
259278 * @extends {Styled }
260279 */
261280interface ClassInfo extends TypeInfo , Styled {
281+ CLASS_NAME : string ;
262282 localName : string ;
263283 typeName : QName ;
264284 instanceFactory : { } ;
265285 properties : { [ index : number ] : PropertyInfo } ;
266286 propertiesMap : { [ name : string ] : PropertyInfo } ;
267287 //is inner class
268288 structure : {
269- elements : { [ fqn : string ] : PropertyInfo } ,
270- attributes : { } ,
271- anyAttribute : { } ,
272- value : { } ,
289+ elements : { [ fqn : string ] : PropertyInfo } ;
290+ attributes : { } ;
291+ anyAttribute : { } ;
292+ value : { } ;
273293 any : { }
274294 } ;
275- targetNamespace : string ,
276- defaultElementNamespaceURI : string ,
295+ targetNamespace : string ;
296+ defaultElementNamespaceURI : string ;
277297 defaultAttributeNamespaceURI : string
278- built : boolean ,
298+ built : boolean ;
279299 //TODO: confirm this syntax
280300 propertyInfoCreators : {
281301 aa : { aa } ;
282- anyAttribute : { aa } ,
302+ anyAttribute : { aa } ;
283303 ae : { ae } ;
284304 anyElement : { ae } ;
285305 a : { a } ;
0 commit comments