print ('self.maClasseModeleMetierFactory', self.maClasseModeleMetierFactory)
else : self.needFactory=False
else :
+ print ('_____________________uuuuuuuuuuuuuuuuuuuu')
+ print (self.cata.DicoNomTypeDifferentNomElt)
+ print ('_____________________uuuuuuuuuuuuuuuuuuuu')
self.monNomClasseModeleMetier='T_'+self.nom
+ if self.monNomClasseModeleMetier=='T_termeLE' : monNomClasseModeleMetier= 'T_termeLE_1'
if self.nom in list(self.cata.DicoNomTypeDifferentNomElt.keys()) :
self.monNomClasseModeleMetier=self.cata.DicoNomTypeDifferentNomElt[self.nom][self.nomComplet()]
self.maClasseModeleMetier=getattr(self.cata.modeleMetier,self.monNomClasseModeleMetier)
else : self.needFactory=False
if self.valeur != None :
- if self.needFactory : self.objPyxb=self.maClasseModeleMetierFactory(self.valeur)
+ if self.needFactory :
+ if self.definition.max > 1 :
+ print (self.monNomClasseModeleMetier)
+ exit()
+ self.objPyxb=self.maClasseModeleMetier(self.valeur)
+ else : self.objPyxb=self.maClasseModeleMetierFactory(self.valeur)
else : self.objPyxb=self.maClasseModeleMetier(self.valeur)
else :
if self.needFactory : self.objPyxb=None
max=obj[0].definition.max
else : max = 1
if max == 1 :
- print ('kkkkkkkkkkkkkkkkkkkkk',obj, type(obj))
- if not(issubclass(type(obj), pyxb.binding.basis.enumeration_mixin) ):
- newOrderedContent.append(self.objPyxb.orderedContent()[list(map(lambda o:id(o.value), self.objPyxb.orderedContent())).index(id(obj))] )
- else :
- newOrderedContent.append(self.objPyxb.orderedContent()[list(map(lambda o:type(o.value), self.objPyxb.orderedContent())).index(type(obj))] )
+ #if not(issubclass(type(obj), pyxb.binding.basis.enumeration_mixin) ):
+ # newOrderedContent.append(self.objPyxb.orderedContent()[list(map(lambda o:id(o.value), self.objPyxb.orderedContent())).index(id(obj))] )
+ #else :
+ # newOrderedContent.append(self.objPyxb.orderedContent()[list(map(lambda o:type(o.value), self.objPyxb.orderedContent())).index(type(obj))] )
+ # PN 22 sept 2020 . pourquoi pas toujours l id. le tyoe ne convient pas en cas d union d enum
+ newOrderedContent.append(self.objPyxb.orderedContent()[list(map(lambda o:id(o.value), self.objPyxb.orderedContent())).index(id(obj))] )
else : # element Pural
for c in self.objPyxb.orderedContent() :
if isinstance(c._Content__value,list) and isinstance(c._Content__value[0], type(obj[0].objPyxb)): newOrderedContent.append(c)