@@ -854,7 +854,7 @@ while(d){if(c===d){return true
854854} d = d . baseTypeInfo
855855} return false
856856} , CLASS_NAME :"Jsonix.Model.TypeInfo" } ) ;
857- Jsonix . Model . ClassInfo = Jsonix . Class ( Jsonix . Model . TypeInfo , Jsonix . Mapping . Styled , { name :null , localName :null , typeName :null , instanceFactory :null , properties :null , structure :null , targetNamespace :"" , defaultElementNamespaceURI :"" , defaultAttributeNamespaceURI :"" , built :false , initialize :function ( w , m ) { Jsonix . Model . TypeInfo . prototype . initialize . apply ( this , [ ] ) ;
857+ Jsonix . Model . ClassInfo = Jsonix . Class ( Jsonix . Model . TypeInfo , Jsonix . Mapping . Styled , { name :null , localName :null , typeName :null , instanceFactory :null , properties :null , propertiesMap : null , structure :null , targetNamespace :"" , defaultElementNamespaceURI :"" , defaultAttributeNamespaceURI :"" , built :false , initialize :function ( w , m ) { Jsonix . Model . TypeInfo . prototype . initialize . apply ( this , [ ] ) ;
858858Jsonix . Mapping . Styled . prototype . initialize . apply ( this , [ m ] ) ;
859859Jsonix . Util . Ensure . ensureObject ( w ) ;
860860var v = w . name || w . n || undefined ;
@@ -878,12 +878,14 @@ if(Jsonix.Util.Type.exists(o)){if(Jsonix.Util.Type.isString(o)){this.typeName=ne
878878} else { this . typeName = Jsonix . XML . QName . fromObject ( o )
879879} } else { if ( Jsonix . Util . Type . exists ( q ) ) { this . typeName = new Jsonix . XML . QName ( n , q )
880880} } this . properties = [ ] ;
881+ this . propertiesMap = { } ;
881882var x = w . propertyInfos || w . ps || [ ] ;
882883Jsonix . Util . Ensure . ensureArray ( x ) ;
883884for ( var s = 0 ;
884885s < x . length ;
885886s ++ ) { this . p ( x [ s ] )
886- } } , destroy :function ( ) { } , build :function ( i , j ) { if ( ! this . built ) { this . baseTypeInfo = i . resolveTypeInfo ( this . baseTypeInfo , j ) ;
887+ } } , getPropertyInfoByName :function ( b ) { return this . propertiesMap [ b ]
888+ } , destroy :function ( ) { } , build :function ( i , j ) { if ( ! this . built ) { this . baseTypeInfo = i . resolveTypeInfo ( this . baseTypeInfo , j ) ;
887889if ( Jsonix . Util . Type . exists ( this . baseTypeInfo ) ) { this . baseTypeInfo . build ( i , j )
888890} for ( var f = 0 ;
889891f < this . properties . length ;
@@ -977,6 +979,7 @@ return this.addProperty(new this.mappingStyle.valuePropertyInfo(b,{mappingStyle:
977979} , addDefaultNamespaces :function ( b ) { if ( Jsonix . Util . Type . isObject ( b ) ) { if ( ! Jsonix . Util . Type . isString ( b . defaultElementNamespaceURI ) ) { b . defaultElementNamespaceURI = this . defaultElementNamespaceURI
978980} if ( ! Jsonix . Util . Type . isString ( b . defaultAttributeNamespaceURI ) ) { b . defaultAttributeNamespaceURI = this . defaultAttributeNamespaceURI
979981} } } , addProperty :function ( b ) { this . properties . push ( b ) ;
982+ this . propertiesMap [ b . name ] = b ;
980983return this
981984} , CLASS_NAME :"Jsonix.Model.ClassInfo" } ) ;
982985Jsonix . Model . ClassInfo . prototype . propertyInfoCreators = { aa :Jsonix . Model . ClassInfo . prototype . aa , anyAttribute :Jsonix . Model . ClassInfo . prototype . aa , ae :Jsonix . Model . ClassInfo . prototype . ae , anyElement :Jsonix . Model . ClassInfo . prototype . ae , a :Jsonix . Model . ClassInfo . prototype . a , attribute :Jsonix . Model . ClassInfo . prototype . a , em :Jsonix . Model . ClassInfo . prototype . em , elementMap :Jsonix . Model . ClassInfo . prototype . em , e :Jsonix . Model . ClassInfo . prototype . e , element :Jsonix . Model . ClassInfo . prototype . e , es :Jsonix . Model . ClassInfo . prototype . es , elements :Jsonix . Model . ClassInfo . prototype . es , er :Jsonix . Model . ClassInfo . prototype . er , elementRef :Jsonix . Model . ClassInfo . prototype . er , ers :Jsonix . Model . ClassInfo . prototype . ers , elementRefs :Jsonix . Model . ClassInfo . prototype . ers , v :Jsonix . Model . ClassInfo . prototype . v , value :Jsonix . Model . ClassInfo . prototype . v } ;
@@ -1059,19 +1062,31 @@ this.scope=i
10591062this . scope = c . resolveTypeInfo ( this . scope , d ) ;
10601063this . built = true
10611064} } , CLASS_NAME :"Jsonix.Model.ElementInfo" } ) ;
1062- Jsonix . Model . PropertyInfo = Jsonix . Class ( { name :null , collection :false , targetNamespace :"" , defaultElementNamespaceURI :"" , defaultAttributeNamespaceURI :"" , built :false , initialize :function ( l ) { Jsonix . Util . Ensure . ensureObject ( l ) ;
1063- var i = l . name || l . n || undefined ;
1064- Jsonix . Util . Ensure . ensureString ( i ) ;
1065- this . name = i ;
1066- var k = l . defaultElementNamespaceURI || l . dens || l . targetNamespace || l . tns || "" ;
1067- this . defaultElementNamespaceURI = k ;
1068- var g = l . targetNamespace || l . tns || l . defaultElementNamespaceURI || l . dens || this . defaultElementNamespaceURI ;
1069- this . targetNamespace = g ;
1070- var j = l . defaultAttributeNamespaceURI || l . dans || "" ;
1071- this . defaultAttributeNamespaceURI = j ;
1072- var h = l . collection || l . col || false ;
1073- this . collection = h
1074- } , build :function ( c , d ) { if ( ! this . built ) { this . doBuild ( c , d ) ;
1065+ Jsonix . Model . PropertyInfo = Jsonix . Class ( { name :null , collection :false , targetNamespace :"" , defaultElementNamespaceURI :"" , defaultAttributeNamespaceURI :"" , built :false , initialize :function ( r ) { Jsonix . Util . Ensure . ensureObject ( r ) ;
1066+ var p = r . name || r . n || undefined ;
1067+ Jsonix . Util . Ensure . ensureString ( p ) ;
1068+ this . name = p ;
1069+ var m = r . defaultElementNamespaceURI || r . dens || r . targetNamespace || r . tns || "" ;
1070+ this . defaultElementNamespaceURI = m ;
1071+ var j = r . targetNamespace || r . tns || r . defaultElementNamespaceURI || r . dens || this . defaultElementNamespaceURI ;
1072+ this . targetNamespace = j ;
1073+ var k = r . defaultAttributeNamespaceURI || r . dans || "" ;
1074+ this . defaultAttributeNamespaceURI = k ;
1075+ var o = r . collection || r . col || false ;
1076+ this . collection = o ;
1077+ var n = r . required || r . rq || false ;
1078+ this . required = n ;
1079+ if ( this . collection ) { var l ;
1080+ if ( Jsonix . Util . Type . isNumber ( r . minOccurs ) ) { l = r . minOccurs
1081+ } else { if ( Jsonix . Util . Type . isNumber ( r . mno ) ) { l = r . mno
1082+ } else { l = 1
1083+ } } this . minOccurs = l ;
1084+ var q ;
1085+ if ( Jsonix . Util . Type . isNumber ( r . maxOccurs ) ) { q = r . maxOccurs
1086+ } else { if ( Jsonix . Util . Type . isNumber ( r . mxo ) ) { q = r . mxo
1087+ } else { q = null
1088+ } } this . maxOccurs = q
1089+ } } , build :function ( c , d ) { if ( ! this . built ) { this . doBuild ( c , d ) ;
10751090this . built = true
10761091} } , doBuild :function ( c , d ) { throw new Error ( "Abstract method [doBuild]." )
10771092} , buildStructure :function ( c , d ) { throw new Error ( "Abstract method [buildStructure]." )
0 commit comments