@@ -753,27 +753,32 @@ if(Jsonix.Util.Type.exists(h)){return h.typeInfo
753753} } , CLASS_NAME :"Jsonix.Binding.Unmarshaller" } ) ;
754754Jsonix . Binding . Unmarshaller . Simplified = Jsonix . Class ( Jsonix . Binding . Unmarshaller , Jsonix . Binding . ElementUnmarshaller . Simplified , { CLASS_NAME :"Jsonix.Binding.Unmarshaller.Simplified" } ) ;
755755Jsonix . Model . TypeInfo = Jsonix . Class ( { name :null , initialize :function ( ) { } , CLASS_NAME :"Jsonix.Model.TypeInfo" } ) ;
756- Jsonix . Model . ClassInfo = Jsonix . Class ( Jsonix . Model . TypeInfo , Jsonix . Mapping . Styled , { name :null , baseTypeInfo :null , instanceFactory :null , properties :null , structure :null , defaultElementNamespaceURI :"" , defaultAttributeNamespaceURI :"" , built :false , initialize :function ( q , j ) { Jsonix . Model . TypeInfo . prototype . initialize . apply ( this , [ ] ) ;
757- Jsonix . Mapping . Styled . prototype . initialize . apply ( this , [ j ] ) ;
758- Jsonix . Util . Ensure . ensureObject ( q ) ;
759- var p = q . name || q . n || undefined ;
760- Jsonix . Util . Ensure . ensureString ( p ) ;
761- this . name = p ;
762- var l = q . defaultElementNamespaceURI || q . dens || "" ;
763- this . defaultElementNamespaceURI = l ;
764- var k = q . defaultAttributeNamespaceURI || q . dans || "" ;
765- this . defaultAttributeNamespaceURI = k ;
766- var o = q . baseTypeInfo || q . bti || null ;
767- this . baseTypeInfo = o ;
768- var n = q . instanceFactory || q . inF || undefined ;
769- if ( Jsonix . Util . Type . exists ( n ) ) { Jsonix . Util . Ensure . ensureFunction ( n ) ;
770- this . instanceFactory = n
771- } this . properties = [ ] ;
772- var r = q . propertyInfos || q . ps || [ ] ;
773- Jsonix . Util . Ensure . ensureArray ( r ) ;
774- for ( var m = 0 ;
775- m < r . length ;
776- m ++ ) { this . p ( r [ m ] )
756+ Jsonix . Model . ClassInfo = Jsonix . Class ( Jsonix . Model . TypeInfo , Jsonix . Mapping . Styled , { name :null , localName :null , typeName :null , baseTypeInfo :null , instanceFactory :null , properties :null , structure :null , defaultElementNamespaceURI :"" , defaultAttributeNamespaceURI :"" , built :false , initialize :function ( u , l ) { Jsonix . Model . TypeInfo . prototype . initialize . apply ( this , [ ] ) ;
757+ Jsonix . Mapping . Styled . prototype . initialize . apply ( this , [ l ] ) ;
758+ Jsonix . Util . Ensure . ensureObject ( u ) ;
759+ var t = u . name || u . n || undefined ;
760+ Jsonix . Util . Ensure . ensureString ( t ) ;
761+ this . name = t ;
762+ var o = u . localName || u . ln || null ;
763+ this . localName = o ;
764+ var p = u . defaultElementNamespaceURI || u . dens || "" ;
765+ this . defaultElementNamespaceURI = p ;
766+ var n = u . defaultAttributeNamespaceURI || u . dans || "" ;
767+ this . defaultAttributeNamespaceURI = n ;
768+ var s = u . baseTypeInfo || u . bti || null ;
769+ this . baseTypeInfo = s ;
770+ var r = u . instanceFactory || u . inF || undefined ;
771+ if ( Jsonix . Util . Type . exists ( r ) ) { Jsonix . Util . Ensure . ensureFunction ( r ) ;
772+ this . instanceFactory = r
773+ } var m = u . typeName || u . tn || undefined ;
774+ if ( Jsonix . Util . Type . exists ( m ) ) { this . typeName = Jsonix . XML . QName . fromObject ( m )
775+ } else { if ( Jsonix . Util . Type . exists ( o ) ) { this . typeName = new Jsonix . XML . QName ( p , o )
776+ } } this . properties = [ ] ;
777+ var v = u . propertyInfos || u . ps || [ ] ;
778+ Jsonix . Util . Ensure . ensureArray ( v ) ;
779+ for ( var q = 0 ;
780+ q < v . length ;
781+ q ++ ) { this . p ( v [ q ] )
777782} } , destroy :function ( ) { } , build :function ( i , j ) { if ( ! this . built ) { this . baseTypeInfo = i . resolveTypeInfo ( this . baseTypeInfo , j ) ;
778783if ( Jsonix . Util . Type . exists ( this . baseTypeInfo ) ) { this . baseTypeInfo . build ( i , j )
779784} for ( var f = 0 ;
@@ -2123,10 +2128,11 @@ Jsonix.Schema.XSD.IDREF.INSTANCE.LIST=new Jsonix.Schema.XSD.List(Jsonix.Schema.X
21232128Jsonix . Schema . XSD . IDREFS = Jsonix . Class ( Jsonix . Schema . XSD . List , { name :"IDREFS" , initialize :function ( ) { Jsonix . Schema . XSD . List . prototype . initialize . apply ( this , [ Jsonix . Schema . XSD . IDREF . INSTANCE , Jsonix . Schema . XSD . qname ( "IDREFS" ) , " " ] )
21242129} , CLASS_NAME :"Jsonix.Schema.XSD.IDREFS" } ) ;
21252130Jsonix . Schema . XSD . IDREFS . INSTANCE = new Jsonix . Schema . XSD . IDREFS ( ) ;
2126- Jsonix . Context = Jsonix . Class ( Jsonix . Mapping . Styled , { modules :[ ] , typeInfos :null , elementInfos :null , options :null , substitutionMembersMap :null , scopedElementInfosMap :null , initialize :function ( i , l ) { Jsonix . Mapping . Styled . prototype . initialize . apply ( this , [ l ] ) ;
2131+ Jsonix . Context = Jsonix . Class ( Jsonix . Mapping . Styled , { modules :[ ] , typeInfos :null , typeNameKeyToTypeInfo : null , elementInfos :null , options :null , substitutionMembersMap :null , scopedElementInfosMap :null , initialize :function ( i , l ) { Jsonix . Mapping . Styled . prototype . initialize . apply ( this , [ l ] ) ;
21272132this . modules = [ ] ;
21282133this . elementInfos = [ ] ;
21292134this . typeInfos = { } ;
2135+ this . typeNameKeyToTypeInfo = { } ;
21302136this . registerBuiltinTypeInfos ( ) ;
21312137this . namespacePrefixes = { } ;
21322138this . prefixNamespaces = { } ;
@@ -2171,8 +2177,9 @@ c.buildElementInfos(this)
21712177} } , registerTypeInfo :function ( d ) { Jsonix . Util . Ensure . ensureObject ( d ) ;
21722178var c = d . name || d . n || null ;
21732179Jsonix . Util . Ensure . ensureString ( c ) ;
2174- this . typeInfos [ c ] = d
2175- } , resolveTypeInfo :function ( f , j ) { if ( ! Jsonix . Util . Type . exists ( f ) ) { return null
2180+ this . typeInfos [ c ] = d ;
2181+ if ( d . typeName && d . typeName . key ) { this . typeNameKeyToTypeInfo [ d . typeName . key ] = d
2182+ } } , resolveTypeInfo :function ( f , j ) { if ( ! Jsonix . Util . Type . exists ( f ) ) { return null
21762183} else { if ( f instanceof Jsonix . Model . TypeInfo ) { return f
21772184} else { if ( Jsonix . Util . Type . isString ( f ) ) { var g ;
21782185if ( f . length > 0 && f . charAt ( 0 ) === "." ) { var h = j . name || j . n || undefined ;
@@ -2201,6 +2208,7 @@ if(Jsonix.Util.Type.exists(k.scope)){i=this.resolveTypeInfo(k.scope,m).name
22012208if ( ! Jsonix . Util . Type . isObject ( j ) ) { j = { } ;
22022209this . scopedElementInfosMap [ i ] = j
22032210} j [ k . elementName . key ] = k
2211+ } , getTypeInfoByTypeNameKey :function ( b ) { return this . typeNameKeyToTypeInfo [ b ]
22042212} , getElementInfo :function ( o , m ) { if ( Jsonix . Util . Type . exists ( m ) ) { var j = m . name ;
22052213var k = this . scopedElementInfosMap [ j ] ;
22062214if ( Jsonix . Util . Type . exists ( k ) ) { var n = k [ o . key ] ;
0 commit comments