import sys,os
import types
+# CONTEXT est accessible (__init__.py de Noyau)
+
#import raw.efficas as efficas
sys.path.insert(0,os.path.abspath(os.path.join(os.getcwd(),'..')))
while ( not hasattr(obj,'code') ): obj=obj.pere
self.code = obj.code
- def genealogie(self):
- texte=self.nom
- obj=self
- while ( hasattr(obj,'pere') ):
- texte=obj.pere.nom+'_'+texte
- obj=obj.pere
- return 'T_'+texte
-
- def nomSimple(self):
- return 'T_'+self.nom
- #return self.genealogie()
+ #def genealogie(self,n):
+ # texte=self.nom
+ # obj=self
+ # j=1
+ # while ( hasattr(obj,'pere') ):
+ # texte=obj.pere.nom+'_'+texte
+ # obj=obj.pere
+ # j=j+1
+ # if j > n : return (True, 'T_'+texte)
+ # return (False, 'T_'+texte)
+ def definitNomDuTypePyxb(self):
+ self.aCreer = True
+ cata = CONTEXT.getCurrentCata()
+ nom='T_'+self.nom
+ if not (nom in cata.dictTypesXSD.keys()) :
+ cata.dictTypesXSD[nom] = [self,]
+ return nom
+ self.aCreer = False
+ if nom == 'T_Consigne' : return nom
+ listePossible=cata.dictTypesXSD[nom]
+ indice=0
+ while (indice < len(listePossible)) :
+ objAComparer=listePossible[indice]
+ if self.compare(objAComparer) : return objAComparer.nomDuTypePyxb
+ indice += 1
+ self.aCreer = True
+ cata.dictTypesXSD[nom].append(self)
+ nomAlter='T_'+self.nom+'_'+str(indice)
+ return nomAlter
+ # def existeDeja(self,nom):
+ # if nom in cata.dictTypesXSD.keys() :
+ # self.aCreer = False
+ # return cata.dictTypesXSD[nom]
+ # else :
+ # cata.dictTypesXSD[nom] = self
+ # return None
# ----------------------------------------
class X_definitionComposee (X_definition):
# ----------------------------------------
-
- 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 = debutTypeComplexe.format(self.nomDuTypeCree)
+ def CreeTexteComplexeVenantDesFils(self):
texteComplexeVenantDesFils=""
for nom in self.ordre_mc:
mcFils = self.entites[nom]
self.texteComplexe += mcFils.texteElt
self.texteSimple += mcFils.texteSimple
texteComplexeVenantDesFils += mcFils.texteComplexe
- self.texteComplexe += finTypeComplexe
- self.texteComplexe = texteComplexeVenantDesFils + self.texteComplexe
+ return texteComplexeVenantDesFils
+
+ def dumpXsd(self):
+ #print ('------------------------------------------------')
+ #print ('dumpXsd de ' , self.nom)
+
+ self.getCode()
+ self.nomDuTypePyxb = self.definitNomDuTypePyxb()
+ self.texteSimple = "" # on n ajoute pas de type simple
self.traduitMinMax()
- self.texteElt=eltDsSequence.format(self.nom,self.code,self.nomDuTypeCree,self.minOccurs,self.maxOccurs)
+ # pour accepter les PROC et ...
+ #
+ if self.aCreer :
+ self.texteComplexe = debutTypeCompo.format(self.nomDuTypePyxb,self.minOccurs,self.maxOccurs)
+ texteComplexeVenantDesFils=self.CreeTexteComplexeVenantDesFils()
+ self.texteComplexe = texteComplexeVenantDesFils + self.texteComplexe
+ self.texteComplexe += finTypeCompo
+ else :
+ self.texteComplexe = ""
+
+ minDsSequence=0
+ if hasattr(self, 'statut') and self.statut=='f' : minDsSequence=0
+ maxDsSequence=1
+ if self.label in ('BLOC', 'FACT'):
+ self.texteElt=eltCompoDsSequence.format(self.nom,self.code,self.nomDuTypePyxb,minDsSequence,maxDsSequence)
+ else :
+ self.texteElt=eltCompoDsSequenceSiProc.format(self.nom,self.code,self.nomDuTypePyxb)
+ #print (self.texteComplexe)
+ #print ('------------------------------------------------')
def traduitMinMax(self):
# ____________________
self.minOccurs = 0
self.maxOccurs = 1
+ def compare(self,autreMC):
+ if self.label != autreMC.label : return False
+ for attr in ( 'regles', 'fr', 'defaut', 'min' ,'max', 'position' , 'docu' ) :
+ val1=getattr(self,attr)
+ val2=getattr(autreMC,attr)
+ if val1 != val2 : return False
+ for defFille in self.entites.keys():
+ if defFille not in autreMC.entites.keys() : return False
+ if not self.entites[defFille].compare(autreMC.entites[defFille]) : return False
+ return True
+
# ---------------------------------
class X_FACT (X_definitionComposee):
#--------- ------------------------
class X_BLOC (X_definitionComposee):
#-----------------------------------
def dumpXsd(self):
- X_definitionComposee.dumpXsd(self)
+ #print ('------------------------------------------------')
+ #print ('dumpXsd de ' , self.nom)
+
+ self.getCode()
+ self.nomDuTypePyxb = self.definitNomDuTypePyxb()
+ self.texteSimple = "" # on n ajoute pas de type simple
+
+ # Pour les blocs le minOccurs vaut 0 et le max 1
+ if self.aCreer :
+ self.texteComplexe = debutTypeSubst.format(self.nomDuTypePyxb)
+ texteComplexeVenantDesFils=self.CreeTexteComplexeVenantDesFils()
+ self.texteComplexe = texteComplexeVenantDesFils + self.texteComplexe
+ self.texteComplexe += finTypeSubst
+ else :
+ self.texteComplexe = ""
+
+ self.texteElt=substDsSequence.format(self.code,self.nomDuTypePyxb,0,1)
+
+ #print ('------------------------------------------------')
+
+ def compare(self,autreMC):
+ if self.label != autreMC.label : return False
+ for attr in ( 'condition', 'regles', ):
+ val1=getattr(self,attr)
+ val2=getattr(autreMC,attr)
+ if val1 != val2 : return False
+ for defFille in self.entites.keys():
+ if defFille not in autreMC.entites.keys() : return False
+ if not self.entites[defFille].compare(autreMC.entites[defFille]) : return False
+ return True
+
#--------------------------------
class X_SIMP (X_definition):
def dumpXsd(self):
#print ('exploreObjet SIMP')
self.getCode()
+ self.aCreer = True
# --> homonymie on peut utiliser genealogie
#self.traduitMinMax()
#self.traduitValMinValMax()
self.nomDuTypeDeBase = self.traduitType()
- self.nomDuTypeCree = self.nomSimple()
- self.texteSimple = typeSimple.format(self.nomDuTypeCree, self.nomDuTypeDeBase)
+ self.nomDuTypePyxb = self.definitNomDuTypePyxb()
+ if self.aCreer == True :
+ if self.into != None:
+ self.texteSimple = debutTypeSimpleWithInto.format (self.nomDuTypePyxb, self.nomDuTypeDeBase)
+ for val in self.into :
+ self.texteSimple += typeSimpleWithInto.format(val)
+ self.texteSimple += finTypeSimpleWithInto
+ else :
+ self.texteSimple = typeSimple.format(self.nomDuTypePyxb, self.nomDuTypeDeBase)
+ else :
+ # le type existe deja
+ self.texteSimple=""
self.texteComplexe = ""
# on se sert des listes si maxOccurs est > 0
+ # a gerer dans le dump
if self.statut =='f' : minOccurs = 0
else : minOccurs = 1
- self.texteElt = eltDsSequence.format(self.nom,self.code,self.nomDuTypeCree,minOccurs,1)
+ self.texteElt = eltDsSequence.format(self.nom,self.code,self.nomDuTypePyxb,minOccurs,1)
def traduitType(self):
def traduitMinMax(self):
if self.min == 1 and self.max == 1 : return
print ('il faut creer une liste ' , self.nom)
-
+
+ def compare(self,autreMC):
+ if self.label != autreMC.label : return False
+ for attr in ( 'type', 'ang', 'fr', 'into', 'intoSug' , 'siValide', 'defaut', 'min' ,'max' ,'homo' ,'position' ,'val_min' , 'val_max' , 'docu' , 'validators' , 'sug' ) :
+ val1=getattr(self,attr)
+ val2=getattr(autreMC,attr)
+ if val1 != val2 : return False
+ return True
#-----------------
class X_JDC_CATA :
#-----------------
def dumpXsd(self):
+
self.texteSimple = ""
self.texteComplexe = ""
- self.nomDuTypeCree='T_'+self.code
- self.texteCata = debutTypeCata.format(self.nomDuTypeCree)
+ self.nomDuTypePyxb='T_'+self.code
+ self.texteCata = debutTypeCata.format(self.nomDuTypePyxb)
for commande in self.commandes :
commande.code=self.code
commande.dumpXsd()
self.texteSimple += commande.texteComplexe
self.texteCata += commande.texteElt
self.texteCata += finTypeCata
- self.texteElt=eltCata.format(self.code, self.nomDuTypeCree)
- print (self.texteSimple)
- print (self.texteComplexe)
- print (self.texteCata)
- print (self.texteElt)
+ self.texteElt=eltCata.format(self.code,self.code, self.nomDuTypePyxb)
+
+ 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)
# -------------
def buildObjPyxb(self) :
+ # self.valeur tient compte de la valeur par defaut
+ # utiliser getValeur ? expression numpy
if not self.cata.modeleMetier : return
- #print ('X_MCSIMP buildObjPyxb', self.nom, self)
- self.monNomDeClasseModeleMetier='T_'+self.nom
- self.maClasseModeleMetier=getattr(self.cata.modeleMetier,self.monNomDeClasseModeleMetier)
+ #print ('X_MCSIMP buildObjPyxb', self.nom, self,self.valeur)
+ self.monNomClasseModeleMetier='T_'+self.nom
+ self.maClasseModeleMetier=getattr(self.cata.modeleMetier,self.monNomClasseModeleMetier)
#print (self.maClasseModeleMetier)
- #print (self.val)
- if self.val != None : self.objPyxb=self.maClasseModeleMetier(self.val)
- else : self.objPyxb=self.maClasseModeleMetier()
+ #print (self.valeur)
+ if self.valeur != None : self.objPyxb=self.maClasseModeleMetier(self.valeur)
+ elif self.definition.into != None and 'TXM' in self.definition.type : self.objPyxb = None
+ else : self.objPyxb=self.maClasseModeleMetier()
#print ('fin X_MCSIMP', self.objPyxb, self.nom,self)
def setValeurObjPyxb(self,newVal):
+ print ('dans setValeurObjPyxb')
if not self.cata.modeleMetier : return
+ try :
+ print (self.nom , ' a pour pere', self.perePyxb, self.perePyxb.nom)
+ except :
+ print ("je sors du setValeur")
+ return
if newVal != None : nvlObj=self.maClasseModeleMetier(newVal)
else : nvlObj=self.maClasseModeleMetier()
self.val=newVal
indexOC=0
- print ('avant', self.perePyxb.objPyxb.orderedContent())
+ print ('avant',self.nom, self.perePyxb.objPyxb.orderedContent())
for i in self.perePyxb.objPyxb.orderedContent():
if id(i._Content__value) == id(self.objPyxb) : break
indexOC +=1
maSequence = getattr(self.perePyxb.objPyxb, self.nom)
if isinstance(maSequence, pyxb.binding.basis.simpleTypeDefinition):
- print indexOC
#maSequence=nvlObj
setattr(self.perePyxb.objPyxb, self.nom, nvlObj)
- print ('milieu',self.perePyxb.objPyxb.orderedContent())
self.perePyxb.objPyxb.orderedContent()[indexOC]=self.perePyxb.objPyxb.orderedContent()[-1]
del(self.perePyxb.objPyxb.orderedContent()[-1])
- print ('apres',self.perePyxb.objPyxb.orderedContent())
else :
index=0
for i in maSequence:
#print (self.perePyxb.objPyxb.orderedContent())
#print (monBinding)
+ def deletePyxbObject(self):
+ print ('je passe par la', self, self.nom)
class X_MCCOMPO:
if not self.cata.modeleMetier : return
#print ('_______________________________________')
#print ('X_MCCOMPO buildObjPyxb', self.nom, self, mc_list)
- self.monNomDeClasseModeleMetier='T_'+self.nom
- self.maClasseModeleMetier=getattr(self.cata.modeleMetier,self.monNomDeClasseModeleMetier)
+ self.monNomClasseModeleMetier='T_'+self.nom
+ self.maClasseModeleMetier=getattr(self.cata.modeleMetier,self.monNomClasseModeleMetier)
listArg=[]
for objAccas in mc_list :
- listArg.append(objAccas.objPyxb)
- objAccas.perePyxb=self
+ # on remonte les mots-clefs des blocs
+ #print (type (objAccas))
+ if type (objAccas.objPyxb) == list :
+ for fils in objAccas.objPyxb :
+ listArg.append(fils.objPyxb)
+ fils.perePyxb=self
+ print (fils.nom ,' a pour pere Pyxb', self, self.nom)
+ else :
+ listArg.append(objAccas.objPyxb)
+ objAccas.perePyxb=self
+ print (objAccas.nom ,' a pour pere Pyxb', self, self.nom)
#print ( objAccas.nom, ' a pour perepyxb ' , objAccas.perePyxb.nom)
self.objPyxb=self.maClasseModeleMetier(*listArg)
#print ('Fin ', self.nom, self.objPyxb)
#print ('_______________________________________')
+
+ def deletePyxbObject(self):
+ print ('******************************************')
+ print ('je passe par la', self, self.nom)
+ print (self.perePyxb)
+ print (dir(self))
+ print ('******************************************')
+
+
+
+
+class X_MCBLOC (X_MCCOMPO):
+# --------------------------
+ def buildObjPyxb(self,mc_list):
+ if not self.cata.modeleMetier : return
+ self.perePyxb=None
+ #print ('_______________________________________')
+ print ('X_MCBLOC buildObjPyxb', self.nom, self, mc_list)
+ import traceback
+ #traceback.print_stack()
+ # il faut attacher les objets au pere
+ self.objPyxb=[]
+ for objAccas in mc_list :
+ self.objPyxb.append(objAccas)
+ #print ('Fin ', self.nom, self.objPyxb)
+ #print ('_______________________________________')
+
+
+
class X_MCLIST (X_MCCOMPO):
# --------------------------
def buildObjPyxb(self,mc_list):
#print ('_______________________________________')
- #print ('X_MCLIST buildObjPyxb traite ds X_MCFACT', self.nom, self)
- self.monNomDeClasseModeleMetier='T_'+self.nom
- self.maClasseModeleMetier=getattr(self.cata.modeleMetier,self.monNomDeClasseModeleMetier)
+ #print ('X_MCLIST buildObjPyxb traite ds X_MCLIST', self.nom, self)
+ if not self.cata.modeleMetier : return
+ self.monNomClasseModeleMetier='T_'+self.nom
+ self.maClasseModeleMetier=getattr(self.cata.modeleMetier,self.monNomClasseModeleMetier)
listArg=[]
# MCList est une liste
for nbDeSequence in self :
for objAccas in nbDeSequence.mc_liste :
- listArg.append(objAccas.objPyxb)
- objAccas.perePyxb=self
+ #print (type (objAccas))
+ #print (objAccas.nom, objAccas.objPyxb, type(objAccas.objPyxb))
+ #print ( type (objAccas.objPyxb) == list )
+ if type (objAccas.objPyxb) == list :
+ #print ('ds le if')
+ for fils in objAccas.objPyxb :
+ listArg.append(fils.objPyxb)
+ fils.perePyxb=self
+ print (fils.nom ,' a pour pere Pyxb', self, self.nom)
+ else :
+ listArg.append(objAccas.objPyxb)
+ objAccas.perePyxb=self
+ print (objAccas.nom ,' a pour pere Pyxb', self, self.nom)
+ #listArg.append(objAccas.objPyxb)
+ #objAccas.perePyxb=self
#print ( objAccas.nom, ' a pour perepyxb ' , objAccas.perePyxb.nom)
+
+ #print ('X_MCLIST', self.nom, self, listArg)
self.objPyxb=self.maClasseModeleMetier(*listArg)
- #print ('X_MCFACT', self.nom, self, listArg)
- #print ('fin buildObjPyxb traite ds X_MCFACT', self.nom, self)
- #print ('_______________________________________')
+ print ('fin buildObjPyxb traite ds X_MCLIST', self.nom, self, self.objPyxb)
+ print ('_______________________________________')
class X_MCFACT (X_MCCOMPO):
# -------------------------
pass
-class X_JDC:
-# ----------
+class X_JDC (X_MCCOMPO):
+# ---------------------
def __init__(self):
#print ('_______________________________________')
#print ('X_JDC buildObjPyxb', self)
+ self.source=None
if not self.cata.modeleMetier : return
- self.monNomDeClasseModeleMetier=self.code
- self.maClasseModeleMetier=getattr(self.cata.modeleMetier,self.monNomDeClasseModeleMetier)
+ self.monNomClasseModeleMetier=self.code
+ self.maClasseModeleMetier=getattr(self.cata.modeleMetier,self.monNomClasseModeleMetier)
self.objPyxb=self.maClasseModeleMetier()
pyxb.GlobalValidationConfig._setContentInfluencesGeneration(pyxb.GlobalValidationConfig.ALWAYS)
pyxb.GlobalValidationConfig._setInvalidElementInContent(pyxb.GlobalValidationConfig.RAISE_EXCEPTION)
def enregistreEtapePyxb(self,etape):
# OK seulement si sequence (choice ? ...)
- #print ('ds enregistreEtapePyxb', etape.nom)
+ print ('ds enregistreEtapePyxb', etape.nom)
if not self.cata.modeleMetier : return
+ if self.source== "xml" : return
self.objPyxb.append(etape.objPyxb)
etape.perePyxb = self
#self.toXml()
print(self.objPyxb.toDOM().toprettyxml())
print(self.objPyxb.toxml())
+
+ def analyseFromXML(self):
+ print ("je suis la")
+ if self.procedure == "" : return
+ self.source='xml'
+ self.objPyxb=self.cata.modeleMetier.CreateFromDocument(self.procedure)
+ for objEtape in self.objPyxb.content():
+ print ('analyse de ', objEtape)
+ dictArgs= (self.pyxbToDict(objEtape))
+ #objEtape.monNomClasseAccas=objEtape.monNomClasseModeleMetier[2:-2]
+ #maClasseAccas=getattr(self.cata,objEtape.monNomClasseAccas)
+ print ( '________________')
+ print (objEtape.dictArgs)
+ print ( '________________')
+ #objAccasEtape=maClasseAccas(**(objEtape.dictArgs))
+ self.source='None'
+
+ def pyxbToDict(self,objAAnalyser):
+ if objAAnalyser is None: return
+ dictArgs = {}
+ if isinstance(objAAnalyser, pyxb.binding.basis.simpleTypeDefinition):
+ if isinstance(objAAnalyser, types.StringTypes): return pyxb.utils.utility.QuotedEscaped(objAAnalyser,)
+ if isinstance(objAAnalyser, (types.NoneType, types.BooleanType, types.FloatType, types.IntType, types.LongType)):
+ return repr(objAAnalyser)
+ #pour une enum getattr(value dans le type)
+ # return pythonLiteral(ReferenceFacet(facet=value, **kw))
+ return objAAnalyser
+ for expandedName, elementDeclaration in objAAnalyser._ElementMap.items():
+ objPyxbName = expandedName.localName()
+ objPyxbValue = getattr(objAAnalyser, objPyxbName)
+ print (objPyxbName,objPyxbValue)
+ if objPyxbValue == None or objPyxbValue == [] : continue
+ if elementDeclaration.isPlural():
+ dictArgs[objPyxbName] = []
+ for objPyxb in objPyxbValue : dictArgs[objPyxbName].append(self.pyxbToDict(objPyxb))
+ else:
+ dictArgs[objPyxbName] = self.pyxbToDict(getattr(objAAnalyser, objPyxbName))
+ print ("***********************************")
+ print (objAAnalyser)
+ print (dictArgs)
+ for i in dictArgs.keys(): print (i, " ", dictArgs[i], " ", type(dictArgs[i]))
+ print ("***********************************")
+ return dictArgs
+
+# def analyseContent(self,objAAnalyser):
+# objAAnalyser.dictArgs={}
+# for objContenu in objAAnalyser.content():
+# #print ('j analyse ', objContenu)
+# objContenu.monNomClasseModeleMetier=str(objContenu.__class__).split('.')[-1]
+# objContenu.monNomClasseAccas=objContenu.monNomClasseModeleMetier[2:-2]
+# #maClasseAccas=classeAccasPere.entites[objContenu.monNomClasseAccas]
+# if objContenu._IsSimpleTypeContent():
+# print (objContenu.monNomClasseAccas,objContenu.pythonLiteral())
+# print (objContenu.monNomClasseAccas,objContenu.xsdLiteral())
+# #chaine=objContenu.pythonLiteral().split('(')[1].split(')')[0]
+# print (dir(objContenu))
+# objAAnalyser.dictArgs[objContenu.monNomClasseAccas]=None
+# #objAAnalyser.dictArgs[objContenu.monNomClasseAccas]=objContenu.pythonLiteral()
+# else :
+# self.analyseContent(objContenu)
+# objAAnalyser.dictArgs[objContenu.monNomClasseAccas]=objContenu.dictArgs
+ #print ( '________________')
+ #print (objAAnalyser.monNomClasseAccas)
+ #for i in objAAnalyser.dictArgs : print (i, objAAnalyser.dictArgs[i])
+ #print ( '________________')
+
+
if __name__ == "__main__":
print ('a faire')
+texteDebut='<?xml version="1.0" encoding="UTF-8"?>\n<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:{}="http://chercheurs.edf.com/logiciels/{}" targetNamespace="http://chercheurs.edf.com/logiciels/{}" elementFormDefault="qualified" attributeFormDefault="qualified"\n>'
+texteFin='</schema>'
+
+# SIMP
typeSimple = '\t<simpleType name="{}">\n\t\t<restriction base="{}"/>\n\t</simpleType>\n'
+debutTypeSimpleWithInto = '\t<simpleType name="{}">\n\t\t<restriction base="{}">\n'
+typeSimpleWithInto = '\t\t\t<enumeration value="{}"/>\n'
+finTypeSimpleWithInto = '\t\t</restriction>\n\t</simpleType>\n'
eltDsSequence = '\t\t\t<element name="{}" type="{}:{}" minOccurs="{}" maxOccurs="{}"/>\n'
-debutTypeComplexe = '\t<complexType name="{}">\n\t\t<sequence>\n'
-finTypeComplexe = '\t\t</sequence>\n\t</complexType>\n'
+# COMPO
+debutTypeCompo = '\t<complexType name="{}" >\n\t\t<sequence minOccurs="{}" maxOccurs="{}">\n'
+finTypeCompo = '\t\t</sequence>\n\t</complexType>\n'
+eltCompoDsSequence = '\t\t\t<element name="{}" type="{}:{}" minOccurs="{}" maxOccurs="{}"/>\n'
+eltCompoDsSequenceSiProc = '\t\t\t<element name="{}" type="{}:{}" />\n'
+
+# BLOC
+debutTypeSubst = '\t<group name="{}"> \n\t\t<sequence>\n'
+finTypeSubst = '\t\t</sequence>\n\t</group>\n'
+substDsSequence = '\t\t\t<group ref="{}:{}" minOccurs="{}" maxOccurs="{}"/>\n'
+
+# CATA
debutTypeCata = '\t<complexType name="{}">\n\t\t<choice minOccurs="0" maxOccurs="unbounded">\n'
finTypeCata = '\t\t</choice>\n\t</complexType> '
-
-eltCata = '<element name="JDD" type="{}:{}"/>\n'
+eltCata = '\t<element name="{}" type="{}:{}"/>\n'
if __name__ == '__main__' :
dictOPERXMLEficas = dictPROCXMLEficas
dictPourCast = { 'I' : int, 'R' : float, 'bool' : bool , }
-dictNomsDesTypes = { 'I' : 'int', 'R' : 'float', bool : 'bool' , 'TXM' : 'string', 'Fichier' : 'string' }
+dictNomsDesTypes = { 'I' : 'int', 'R' : 'float', bool : 'boolean' , 'TXM' : 'string', 'Fichier' : 'string', 'Repertoire':'string', 'FichierNoAbs' : 'string', 'FichierOuRepertoire':'string' }
listeParamDeTypeTypeAttendu = ( 'defaut', 'sug', 'val_min', 'val_max', 'into', 'intoSug')
listeParamDeTypeStr = ('fr', 'docu', 'ang', 'nom' )
#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
self.traiteLesSequences()
- print (self.dictArgsEficas)
#self.convertitLesTypes()
def attendListe(self):
for param in listeParamTjsSequence :
if param in self.dictArgsEficas :
if listeDeListe == False:
- listeDElt=self.dictArgsEficas[param][0].content()
+ #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])
listeRetour=self.convertitListeDsLeBonType(listeDElt)
+ #print (listeRetour)
+ #print ('________________________________')
self.dictArgsEficas[param]=listeRetour
else :
listeResultat=[]
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 = 'MED', execmodul = None,)
+ self.JdC = JDC_CATA (code = 'Atmo', execmodul = None,)
self.contexteXML={}
objAExplorer=self.commandes[0]
for obj in objAExplorer.content():