From ddbe46982d1fabab8b7383ca0bf236a7e20b36dd Mon Sep 17 00:00:00 2001 From: "pascale.noyret" Date: Mon, 28 May 2018 13:33:53 +0200 Subject: [PATCH] preparation rc2b de la 85 --- Efi2Xsd/AccasXsd.py | 51 ++++---------------------- Efi2Xsd/MCAccasXsd.py | 6 +-- Efi2Xsd/balises.py | 19 +--------- Efi2Xsd/readerEfiXsd.py | 16 ++------ InterfaceQT4/monWidgetPlusieursBase.py | 2 +- 5 files changed, 16 insertions(+), 78 deletions(-) mode change 100755 => 100644 Efi2Xsd/AccasXsd.py mode change 100755 => 100644 Efi2Xsd/MCAccasXsd.py mode change 100755 => 100644 Efi2Xsd/readerEfiXsd.py diff --git a/Efi2Xsd/AccasXsd.py b/Efi2Xsd/AccasXsd.py old mode 100755 new mode 100644 index 2d800504..e05e7be4 --- a/Efi2Xsd/AccasXsd.py +++ b/Efi2Xsd/AccasXsd.py @@ -70,8 +70,6 @@ class X_definitionComposee (X_definition): self.traduitMinMax() self.texteElt=eltDsSequence.format(self.nom,self.code,self.nomDuTypeCree,self.minOccurs,self.maxOccurs) - #print (self.texteComplexe) - #print ('------------------------------------------------') def traduitMinMax(self): # ____________________ @@ -102,29 +100,7 @@ class X_PROC (X_definitionComposee): class X_BLOC (X_definitionComposee): #----------------------------------- def dumpXsd(self): - #print ('------------------------------------------------') - #print ('dumpXsd de ' , self.nom) - - self.getCode() - self.nomDuTypeCree = self.nomSimple() - self.texteSimple = "" # on n ajoute pas de type simple - - self.texteComplexe = debutTypeSubst.format(self.nomDuTypeCree) - texteComplexeVenantDesFils="" - for nom in self.ordre_mc: - mcFils = self.entites[nom] - mcFils.dumpXsd() - self.texteComplexe += mcFils.texteElt - self.texteSimple += mcFils.texteSimple - texteComplexeVenantDesFils += mcFils.texteComplexe - self.texteComplexe += finTypeSubst - self.texteComplexe = texteComplexeVenantDesFils + self.texteComplexe - - self.traduitMinMax() - # Pour les blocs le minOccurs vaut 0 bien sur - self.minOccurs=0 - self.texteElt=substDsSequence.format(self.code,self.nomDuTypeCree,self.minOccurs,self.maxOccurs) - #print ('------------------------------------------------') + X_definitionComposee.dumpXsd(self) #-------------------------------- class X_SIMP (X_definition): @@ -138,13 +114,7 @@ class X_SIMP (X_definition): #self.traduitValMinValMax() self.nomDuTypeDeBase = self.traduitType() self.nomDuTypeCree = self.nomSimple() - if self.into != None: - self.texteSimple = debutTypeSimpleWithInto.format (self.nomDuTypeCree, self.nomDuTypeDeBase) - for val in self.into : - self.texteSimple += typeSimpleWithInto.format(val) - self.texteSimple += finTypeSimpleWithInto - else : - self.texteSimple = typeSimple.format(self.nomDuTypeCree, self.nomDuTypeDeBase) + self.texteSimple = typeSimple.format(self.nomDuTypeCree, self.nomDuTypeDeBase) self.texteComplexe = "" # on se sert des listes si maxOccurs est > 0 @@ -179,7 +149,6 @@ class X_JDC_CATA : #----------------- def dumpXsd(self): - self.texteSimple = "" self.texteComplexe = "" self.nomDuTypeCree='T_'+self.code @@ -191,15 +160,9 @@ class X_JDC_CATA : self.texteSimple += commande.texteComplexe self.texteCata += commande.texteElt self.texteCata += finTypeCata - self.texteElt=eltCata.format(self.code,self.code, self.nomDuTypeCree) - - self.texteXSD = texteDebut.format(self.code,self.code,self.code) - self.texteXSD += self.texteSimple - self.texteXSD += self.texteCata - self.texteXSD += self.texteElt - self.texteXSD += texteFin - #print (self.texteSimple) - #print (self.texteCata) - #print (self.texteElt) - print (self.texteXSD) + self.texteElt=eltCata.format(self.code, self.nomDuTypeCree) + print (self.texteSimple) + print (self.texteComplexe) + print (self.texteCata) + print (self.texteElt) diff --git a/Efi2Xsd/MCAccasXsd.py b/Efi2Xsd/MCAccasXsd.py old mode 100755 new mode 100644 index 79ee53d5..eb20219c --- a/Efi2Xsd/MCAccasXsd.py +++ b/Efi2Xsd/MCAccasXsd.py @@ -13,7 +13,7 @@ class X_MCSIMP: def buildObjPyxb(self) : if not self.cata.modeleMetier : return - print ('X_MCSIMP buildObjPyxb', self.nom, self) + #print ('X_MCSIMP buildObjPyxb', self.nom, self) self.monNomDeClasseModeleMetier='T_'+self.nom self.maClasseModeleMetier=getattr(self.cata.modeleMetier,self.monNomDeClasseModeleMetier) if self.val != None : self.objPyxb=self.maClasseModeleMetier(self.val) @@ -45,9 +45,8 @@ class X_MCCOMPO: if isinstance(objAccas,MCList) : for mcfact in objAccas : listArg.append(mcfact.objPyxb) else : listArg.append(objAccas.objPyxb) - #print (listArg) + print (listArg) self.objPyxb=self.maClasseModeleMetier(*listArg) - class X_MCFACT : # -------------- @@ -61,6 +60,7 @@ class X_MCFACT : class X_MCLIST: # -------------- + def buildObjPyxb(self,factList): if not self.cata.modeleMetier : return diff --git a/Efi2Xsd/balises.py b/Efi2Xsd/balises.py index 0451a0f1..c0eee995 100644 --- a/Efi2Xsd/balises.py +++ b/Efi2Xsd/balises.py @@ -1,28 +1,13 @@ -texteDebut='\n' -texteFin='' - -# SIMP typeSimple = '\t\n\t\t\n\t\n' -debutTypeSimpleWithInto = '\t\n\t\t\n' -typeSimpleWithInto = '\t\t\t\n' -finTypeSimpleWithInto = '\t\t\n\t\n' eltDsSequence = '\t\t\t\n' -# COMPO debutTypeComplexe = '\t\n\t\t\n' finTypeComplexe = '\t\t\n\t\n' -eltCompoDsSequence = '\t\t\t\n' - -# BLOC -debutTypeSubst = '\t minOccurs="{}" maxOccurs="{}"\n\t\t\n' -finTypeSubst = '\t\t\n\t\n' -substDsSequence = '\t\t\t\n' - -# CATA debutTypeCata = '\t\n\t\t\n' finTypeCata = '\t\t\n\t ' -eltCata = '\t\n' + +eltCata = '\n' if __name__ == '__main__' : diff --git a/Efi2Xsd/readerEfiXsd.py b/Efi2Xsd/readerEfiXsd.py old mode 100755 new mode 100644 index c98a16cd..82883038 --- a/Efi2Xsd/readerEfiXsd.py +++ b/Efi2Xsd/readerEfiXsd.py @@ -94,8 +94,6 @@ class monSIMP (efficas.T_SIMP, objetDefinitionAccas): #print ("je passe dans explore pour SIMP ", self.nom) self.dictATraiter= dictSIMPXMLEficas self.argumentXMLToEficas() - #print (self.dictArgsEficas) - self.objAccas=A_SIMP.SIMP(**self.dictArgsEficas) self.objAccas.nom=self.nomObj @@ -111,6 +109,7 @@ class monSIMP (efficas.T_SIMP, objetDefinitionAccas): self.traiteLesSequences() + print (self.dictArgsEficas) #self.convertitLesTypes() def attendListe(self): @@ -137,15 +136,8 @@ class monSIMP (efficas.T_SIMP, objetDefinitionAccas): for param in listeParamTjsSequence : if param in self.dictArgsEficas : if listeDeListe == False: - #print ('________________________________') - listeDElt=[] - for i in range(len(self.dictArgsEficas[param])): - # ou typesimple ? - # ici on ne sait pas si on est un type simple ou complexe ? - listeDElt.append(self.dictArgsEficas[param][i].content()[0]) + listeDElt=self.dictArgsEficas[param][0].content() listeRetour=self.convertitListeDsLeBonType(listeDElt) - #print (listeRetour) - #print ('________________________________') self.dictArgsEficas[param]=listeRetour else : listeResultat=[] @@ -276,10 +268,8 @@ class monBLOC(efficas.T_BLOC, objetComposeDefinitionAccas): class monCata(efficas.T_cata): # ------------------------------ def exploreCata(self): - # PNPNPN --> il faut revoir ce mecanisme - self.modeleMetier = None # On positionne le contexte ACCAS - self.JdC = JDC_CATA (code = 'Atmo', execmodul = None,) + self.JdC = JDC_CATA (code = 'MED', execmodul = None,) self.contexteXML={} objAExplorer=self.commandes[0] for obj in objAExplorer.content(): diff --git a/InterfaceQT4/monWidgetPlusieursBase.py b/InterfaceQT4/monWidgetPlusieursBase.py index 0e794877..a039eaf4 100644 --- a/InterfaceQT4/monWidgetPlusieursBase.py +++ b/InterfaceQT4/monWidgetPlusieursBase.py @@ -36,7 +36,7 @@ from PyQt5.QtCore import QTimer, QSize, Qt from Extensions.i18n import tr from InterfaceQT4.feuille import Feuille -from UiQT5.desWidgetPlusieursBase import Ui_WidgetPlusieursBase +from desWidgetPlusieursBase import Ui_WidgetPlusieursBase from InterfaceQT4.politiquesValidation import PolitiquePlusieurs from InterfaceQT4.qtSaisie import SaisieValeur from InterfaceQT4.gereListe import GereListe -- 2.39.2