--- /dev/null
+typeSimple = '\t<simpleType name="{}">\n\t\t<restriction base="{}"/>\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'
+
+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'
+
+
+if __name__ == '__main__' :
+ nomElt='Simple'
+ nomDuType='T_Simple'
+ nomDuTypeBase='int'
+ nomDuComplexe='T_Complexe'
+ nomDuCode='monCode'
+ minOccurs=1
+ maxOccurs=1
+
+ texteSimple=typeSimple.format(nomDuType, nomDuTypeBase)
+ texteElt=eltDsSequence.format(nomElt,nomDuCode,nomDuType,minOccurs,maxOccurs)
+
+ minOccurs=0
+ texteComplexe=debutTypeComplexe.format(nomDuComplexe)
+ texteComplexe+=texteElt
+ texteComplexe+=finTypeComplexe
+ texteEltComplexe=eltDsSequence.format(nomElt,nomDuCode,nomDuType,minOccurs,maxOccurs)
+
+ texteCata=debutTypeCata.format(nomDuCode)
+ texteCata+=texteEltComplexe
+ texteCata+=finTypeCata
+
+ eltRacine=eltCata.format(nomDuCode, 'T_'+nomDuCode)
+ print (texteSimple+texteComplexe+texteCata+eltRacine)
+
dictOPEREficasXML = dictPROCEficasXML
dictOPERXMLEficas = dictPROCXMLEficas
-dicoPourCast = { 'I' : int, 'R' : float, 'bool' : bool , }
+dictPourCast = { 'I' : int, 'R' : float, 'bool' : bool , }
+dictNomsDesTypes = { 'I' : 'int', 'R' : 'float', bool : 'bool' , 'TXM' : 'string', 'Fichier' : 'string' }
listeParamDeTypeTypeAttendu = ( 'defaut', 'sug', 'val_min', 'val_max', 'into', 'intoSug')
listeParamDeTypeStr = ('fr', 'docu', 'ang', 'nom' )
print ('\n\n')
print ('dictPROCXMLEficas')
pp.pprint(dictPROCXMLEficas)
+ print ('\n\n')
+ print ('dictNomsDesTypes')
+ pp.pprint(dictNomsDesTypes )
sys.path.insert(0,os.path.abspath(os.path.join(os.getcwd(),'..')))
-import Atmo.raw.atmo_test1 as modeleMetier
class X_MCSIMP:
# -------------
def buildObjPyxb(self) :
+ if not self.cata.modeleMetier : return
#print ('X_MCSIMP buildObjPyxb', self.nom, self)
self.monNomDeClasseModeleMetier='T_'+self.nom
- self.maClasseModeleMetier=getattr(modeleMetier,self.monNomDeClasseModeleMetier)
+ self.maClasseModeleMetier=getattr(self.cata.modeleMetier,self.monNomDeClasseModeleMetier)
if self.val != None : self.objPyxb=self.maClasseModeleMetier(self.val)
- else : self.objPyxb=self.maClasseModeleMetier()
+ else : self.objPyxb=self.maClasseModeleMetier()
#print ('fin X_MCSIMP', self.objPyxb, self.nom,self)
- def setValeur(self,val):
- print ('a faire PNPNPNPN')
+ def setValeurObjPyxb(self,newVal):
+ if not self.cata.modeleMetier : return
+ print ('setValeurObjPyxb')
+ if newVal != None : nvlObj=self.maClasseModeleMetier(newVal)
+ else : nvlObj=self.maClasseModeleMetier()
+ self.val=newVal
+ self.objPyxb=nvlObj
+ setattr(self.parent.objPyxb, self.nom, nvlObj)
class X_MCCOMPO:
# --------------
#
def buildObjPyxb(self,mc_list) :
+ if not self.cata.modeleMetier : return
print ('X_MCCOMPO buildObjPyxb', self.nom, self)
self.monNomDeClasseModeleMetier='T_'+self.nom
- self.maClasseModeleMetier=getattr(modeleMetier,self.monNomDeClasseModeleMetier)
+ self.maClasseModeleMetier=getattr(self.cata.modeleMetier,self.monNomDeClasseModeleMetier)
listArg=[]
for objAccas in mc_list :
- listArg.append(objAccas.objPyxb)
+ from Accas.A_MCLIST import MCList
+ if isinstance(objAccas,MCList) :
+ for mcfact in objAccas : listArg.append(mcfact.objPyxb)
+ else : listArg.append(objAccas.objPyxb)
+ print (listArg)
self.objPyxb=self.maClasseModeleMetier(*listArg)
- print ('fin MCCOMPO', self.objPyxb, self.nom,self,self.objPyxb.content())
-class X_MCFACT:
+class X_MCFACT :
# --------------
# Pour un MCFACT :
# le buildObjPyxb sera pris en charge par X_MCLIST
# on ne fait rien
def buildObjPyxb(self,mc_list):
+ #print ('X_MCFACT buildObjPyxb debut et fin', self.nom, self)
pass
class X_MCLIST:
# --------------
+
def buildObjPyxb(self,factList):
+ if not self.cata.modeleMetier : return
#print ('X_MCLIST buildObjPyxb', self.nom, self)
+
self.monNomDeClasseModeleMetier='T_'+self.nom
- self.maClasseModeleMetier=getattr(modeleMetier,self.monNomDeClasseModeleMetier)
- listArg=[]
+ self.maClasseModeleMetier=getattr(self.cata.modeleMetier,self.monNomDeClasseModeleMetier)
for objAccas in factList :
- #print objAccas.nom
+ listArg=[]
for objAccasFils in objAccas.mc_liste :
- #print (objAccasFils)
- #print (objAccasFils.nom)
- #print (objAccasFils.objPyxb)
listArg.append(objAccasFils.objPyxb)
- # print (objAccasFils.objPyxb)
- self.objPyxb=self.maClasseModeleMetier(*listArg)
- #print (self.objPyxb.content())
- #print ('fin MCLIST', self.objPyxb, self.nom,self)
+ objAccas.objPyxb=self.maClasseModeleMetier(*listArg)
+ #print (objAccas , 'ds MCLIST a pour obj pyxb', objAccas.objPyxb)
class X_JDC:
# ----------
def __init__(self):
- print ('--------- init du X_JDC')
+ #print ('X_JDC buildObjPyxb', self)
+ if not self.cata.modeleMetier : return
self.monNomDeClasseModeleMetier=self.code
- self.maClasseModeleMetier=getattr(modeleMetier,self.monNomDeClasseModeleMetier)
+ self.maClasseModeleMetier=getattr(self.cata.modeleMetier,self.monNomDeClasseModeleMetier)
self.objPyxb=self.maClasseModeleMetier()
+ #print ('fin X_JDC buildObjPyxb', self.objPyxb, self)
- def ajoutEtapeAPyxb(self,etape):
+ def enregistreEtapePyxb(self,etape):
# OK seulement si sequence (choice ? ...)
- print ('----------------------------------------------------------------------------------------------je suis la')
- self.objPyxb.append(etape.objPyxb)
- self.toxml()
+ print ('ds enregistreEtapePyxb', etape.nom)
+ if not self.cata.modeleMetier : return
+ self.objPyxb.append(etape.objPyxb)
+ #self.toXml()
- def toxml(self):
- print(self.objPyxb.toDOM().toprettyxml())
- print(self.objPyxb.toxml())
+ def toXml(self):
+ if not self.cata.modeleMetier : return
+ print(self.objPyxb.toDOM().toprettyxml())
+ print(self.objPyxb.toxml())
--- /dev/null
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import sys,os
+import types
+
+#import raw.efficas as efficas
+sys.path.insert(0,os.path.abspath(os.path.join(os.getcwd(),'..')))
+
+# ds l init du SIMP il manque siValide et fenetreIhm
+
+from mapDesTypes import dictSIMPEficasXML, dictSIMPXMLEficas
+from mapDesTypes import dictFACTEficasXML, dictFACTXMLEficas
+from mapDesTypes import dictPROCEficasXML, dictPROCXMLEficas
+from mapDesTypes import dictOPEREficasXML, dictOPERXMLEficas
+from mapDesTypes import dictBLOCEficasXML, dictBLOCXMLEficas
+from mapDesTypes import dictPourCast, dictNomsDesTypes
+from mapDesTypes import listeParamDeTypeTypeAttendu, listeParamDeTypeStr, dictPourCast
+from mapDesTypes import listeParamTjsSequence, listeParamSelonType
+
+
+from balises import *
+
+# -----------------
+class X_definition:
+# -----------------
+
+ def getCode(self):
+ if hasattr(self,'code') : return
+ obj=self
+ 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()
+
+
+
+# ----------------------------------------
+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)
+ 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 += finTypeComplexe
+ self.texteComplexe = texteComplexeVenantDesFils + self.texteComplexe
+
+ self.traduitMinMax()
+ self.texteElt=eltDsSequence.format(self.nom,self.code,self.nomDuTypeCree,self.minOccurs,self.maxOccurs)
+
+ def traduitMinMax(self):
+ # ____________________
+ # valable pour bloc, proc et oper
+ self.minOccurs = 0
+ self.maxOccurs = 1
+
+# ---------------------------------
+class X_FACT (X_definitionComposee):
+#--------- ------------------------
+ def traduitMinMax(self):
+ if self.max == '**' or self.max == float('inf') : self.maxOccurs="unbounded"
+ else : self.maxOccurs = self.max
+ self.minOccurs = self.min
+ if self.statut =='f' : self.minOccurs=0
+
+# ---------------------------------
+class X_OPER (X_definitionComposee):
+# ---------------------------------
+ pass
+
+# ----------------------------------
+class X_PROC (X_definitionComposee):
+#-----------------------------------
+ pass
+
+#-----------------------------------
+class X_BLOC (X_definitionComposee):
+#-----------------------------------
+ def dumpXsd(self):
+ X_definitionComposee.dumpXsd(self)
+
+#--------------------------------
+class X_SIMP (X_definition):
+#--------------------------------
+ def dumpXsd(self):
+ #print ('exploreObjet SIMP')
+ self.getCode()
+
+ # --> 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.texteComplexe = ""
+
+ # on se sert des listes si maxOccurs est > 0
+ if self.statut =='f' : minOccurs = 0
+ else : minOccurs = 1
+ self.texteElt = eltDsSequence.format(self.nom,self.code,self.nomDuTypeCree,minOccurs,1)
+
+
+ def traduitType(self):
+ # il faut traduire le min et le max
+ # il faut ajouter les regles
+ # il faut gerer les types tuple et fichier
+ return dictNomsDesTypes[self.type[0]]
+
+ def traduitValMinValMax(self):
+ self.maxInclusive=self.val_max
+ self.minInclusive=self.val_min
+ if self.val_min == float('-inf') and val_max== float('inf') : return
+ print ('il faut affiner le type du SIMP ', self.nom)
+ if self.val_max == '**' or self.val_max == float('inf') : self.maxInclusive=None
+ else : self.maxInclusive = self.val_max
+ if self.val_min == '**' or self.val_max == float('-inf') : self.maxInclusive=None
+ else : self.minInclusive = self.val_min
+
+ def traduitMinMax(self):
+ if self.min == 1 and self.max == 1 : return
+ print ('il faut creer une liste ' , self.nom)
+
+
+#-----------------
+class X_JDC_CATA :
+#-----------------
+
+ def dumpXsd(self):
+ self.texteSimple = ""
+ self.texteComplexe = ""
+ self.nomDuTypeCree='T_'+self.code
+ self.texteCata = debutTypeCata.format(self.nomDuTypeCree)
+ for commande in self.commandes :
+ commande.code=self.code
+ commande.dumpXsd()
+ self.texteSimple += commande.texteSimple
+ 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)
+
--- /dev/null
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import sys,os
+import raw.efficas as efficas
+import types
+
+sys.path.insert(0,os.path.abspath(os.path.join(os.getcwd(),'..')))
+
+
+from Accas import *
+
+
+# ds l init du SIMP il manque siValide et fenetreIhm
+
+from mapDesTypes import dictSIMPEficasXML, dictSIMPXMLEficas
+from mapDesTypes import dictFACTEficasXML, dictFACTXMLEficas
+from mapDesTypes import dictPROCEficasXML, dictPROCXMLEficas
+from mapDesTypes import dictOPEREficasXML, dictOPERXMLEficas
+from mapDesTypes import dictBLOCEficasXML, dictBLOCXMLEficas
+from mapDesTypes import dictPourCast
+from mapDesTypes import listeParamDeTypeTypeAttendu, listeParamDeTypeStr, dictPourCast
+from mapDesTypes import listeParamTjsSequence, listeParamSelonType
+
+
+# ------------------------------
+class objetDefinitionAccas:
+# ------------------------------
+
+ def argumentXMLToEficas(self):
+ # ---------------------------
+ # Attention, pas de validation pour l instant
+ # il faut verifier la coherence entre les types contenus dans defaut, sug ... et le typeAttendu
+ # tout cela dans une fonction verifie pas faite -)
+
+ # Recuperation parametres
+ self.dictArgsEficas={}
+ for nomXMLArg in dir(self) :
+ if nomXMLArg in self.dictATraiter :
+ nomEficasArg=self.dictATraiter[nomXMLArg]
+ argu=getattr(self,nomXMLArg)
+ if argu==None : continue
+
+ if type(nomEficasArg) == types.DictionaryType:
+ for nomXML in list(nomEficasArg.keys()):
+ arguDecoupe=getattr(argu,nomXML)
+ nomEficasDecoupe=nomEficasArg[nomXML]
+ if arguDecoupe == None : continue
+ self.dictArgsEficas[nomEficasDecoupe]=arguDecoupe
+ else :
+ self.dictArgsEficas[nomEficasArg] = argu
+
+ # Cast dans le bon type des parametres si necessaire
+ if 'min' in list(self.dictArgsEficas.keys()):
+ self.dictArgsEficas['min']=int(self.dictArgsEficas['min'])
+
+ if 'max' in list(self.dictArgsEficas.keys()):
+ if self.dictArgsEficas['max']== -1 : self.dictArgsEficas['max']="**"
+ else : self.dictArgsEficas['max']=int(self.dictArgsEficas['max'])
+
+ for param in list(self.dictArgsEficas.keys()):
+ if param in listeParamDeTypeStr :
+ self.dictArgsEficas[param]=unicode(self.dictArgsEficas[param])
+
+ # En 2.7 a revoir en 3 ? necessaire
+ self.nomObj=str(self.nom)
+
+ def getAccasEquivalent(self):
+ # ---------------------------
+ return self.nomObj, self.objAccas
+#
+
+# ---------------------------------------------------------
+class objetComposeDefinitionAccas (objetDefinitionAccas):
+# ---------------------------------------------------------
+ def exploreArbre(self,cata):
+ # --------------------------
+ liste=[]
+ for obj in self.content(): liste.append(obj)
+ #liste.reverse()
+ # PNPNPN essayer de comprendre reverse ou non
+
+ for obj in liste:
+ if hasattr(obj,'explore') : obj.explore(cata)
+ if hasattr(obj,'getAccasEquivalent') :
+ nom,objetAccas=obj.getAccasEquivalent()
+ self.dictArgsEficas[nom]=objetAccas
+
+# ----------------------------------------------------
+class monSIMP (efficas.T_SIMP, objetDefinitionAccas):
+# ----------------------------------------------------
+
+ def explore(self,cata):
+ # --------------------
+ #print ("je passe dans explore pour SIMP ", self.nom)
+ self.dictATraiter= dictSIMPXMLEficas
+ self.argumentXMLToEficas()
+
+ self.objAccas=A_SIMP.SIMP(**self.dictArgsEficas)
+ self.objAccas.nom=self.nomObj
+
+ def argumentXMLToEficas(self):
+ # ----------------------------
+ #print self.nom
+ objetDefinitionAccas.argumentXMLToEficas(self)
+
+ if self.attendTuple() :
+ #nbDElts=type(listeDElt[0])
+ print self.nomTypeAttendu
+
+
+ self.traiteLesSequences()
+ print (self.dictArgsEficas)
+ #self.convertitLesTypes()
+
+ def attendListe(self):
+ # ---------------
+ if 'max' in self.dictArgsEficas :
+ if self.dictArgsEficas['max'] > 1 : return True
+ if self.dictArgsEficas['max'] == "**" : return True
+ return False
+
+ def attendTuple(self):
+ # -----------------
+ if self.dictArgsEficas['typ'] != 'tuple' : return False
+ return True
+
+ def attendTXM(self):
+ # ----------------
+ if self.dictArgsEficas['typ'] == 'TXM' : return True
+ return False
+
+
+ def traiteLesSequences(self):
+ # ---------------------------
+ listeDeListe=self.attendListe()
+ for param in listeParamTjsSequence :
+ if param in self.dictArgsEficas :
+ if listeDeListe == False:
+ listeDElt=self.dictArgsEficas[param][0].content()
+ listeRetour=self.convertitListeDsLeBonType(listeDElt)
+ self.dictArgsEficas[param]=listeRetour
+ else :
+ listeResultat=[]
+ # on transforme en liste pour traiter chaque elt de la liste
+ for i in range(len(self.dictArgsEficas[param])):
+ if self.dictArgsEficas[param][i].typesimple != None :
+ lesElts=self.dictArgsEficas[param][i].typesimple
+ else :
+ lesElts=self.dictArgsEficas[param][i].content()
+ if (not(isinstance(lesElts,list)) and not (isinstance(lesElts,tuple))):
+ lesElts=(lesElts,)
+ lesEltsTransformes=self.convertitListeDsLeBonType(lesElts)
+ lesEltsTransformes=self.convertitListeDsLeBonType(lesElts)
+ listeResultat.append(lesEltsTransformes)
+ self.dictArgsEficas[param]=listeResultat
+ #print ('fin de traiteLesSequences pour', self.nom, ' param :', param, 'listeResultat',self.dictArgsEficas[param])
+
+
+ def convertitListeDsLeBonType(self,listeDElt):
+ # -------------------------------------------
+ # Cas des Tuples non traites
+ typeAttendu = self.dictArgsEficas['typ']
+ if typeAttendu in list(dictPourCast.keys()):
+ nouvelleListe=[]
+ castDsLeTypeAttendu=dictPourCast[typeAttendu]
+ for valeurACaster in listeDElt :
+ val=castDsLeTypeAttendu(valeurACaster)
+ nouvelleListe.append(val)
+ return nouvelleListe
+ elif self.attendTuple() :
+ nbDElts=type(listeDElt[0]).n
+
+ else : return listeDElt
+
+
+
+ def convertitLesTypes(self):
+ # ------------------------
+ # Cas des Tuples non traites
+ # Cas des fonctions utilisateurs non traites
+
+ typeAttendu = self.dictArgsEficas['typ']
+ if typeAttendu in list(dictPourCast.keys()):
+ castDsLeTypeAttendu=dictPourCast[typeAttendu]
+ for param in listeParamDeTypeTypeAttendu :
+ if param in list(self.dictArgsEficas.keys()):
+ if param in listeParamEnListeSelonType or param in listeParamTjsEnListe :
+ print ('typeAttendu',typeAttendu)
+ print (self.dictArgsEficas[param])
+ print (self.dictArgsEficas[param].content())
+ print (self.dictArgsEficas[param].content())
+ return
+ valeurACaster=self.dictArgsEficas[param].typesimple
+ if not isinstance(valeurACaster, (list, tuple)) :
+ val=castDsLeTypeAttendu(valeurACaster)
+ self.dictArgsEficas[param]=val
+ else :
+ liste=[]
+ for val in valeurACaster : liste.append(castDsLeTypeAttendu(val))
+ self.dictArgsEficas[param]=liste
+
+
+# -------------------------------------------------------
+class monFACT(efficas.T_FACT, objetComposeDefinitionAccas):
+# -------------------------------------------------------
+ def explore(self,cata):
+ # --------------------
+ #print "je passe dans explore pour FACT ", self.nom
+
+ self.dictATraiter= dictFACTXMLEficas
+ self.argumentXMLToEficas()
+ self.exploreArbre(cata)
+ self.objAccas=A_FACT.FACT(**self.dictArgsEficas)
+
+
+# ---------------------------------------------------------
+class monPROC(efficas.T_PROC, objetComposeDefinitionAccas):
+# ---------------------------------------------------------
+ def explore(self,cata):
+ # --------------------
+ print "je passe dans explore pour PROC ", self.nom
+ self.dictATraiter= dictPROCXMLEficas
+ self.argumentXMLToEficas()
+ self.exploreArbre(cata)
+ self.dictArgsEficas['op']=None
+
+ self.objAccas=A_PROC.PROC(**self.dictArgsEficas)
+ setattr(cata, self.nomObj,self.objAccas)
+ cata.contexteXML[self.nomObj]=self.objAccas
+
+# ---------------------------------------------------------
+class monOPER(efficas.T_OPER, objetComposeDefinitionAccas):
+# ---------------------------------------------------------
+ def explore(self,cata):
+# ------------------------
+ print "je passe dans explore pour OPER", self.nom
+ self.cata=cata
+ self.dictATraiter= dictOPERXMLEficas
+ self.argumentXMLToEficas()
+ self.exploreArbre(cata)
+
+ textCreationClasse='class '+str(self.typeCree)+'(ASSD): pass\n'
+ exec(textCreationClasse,globals())
+ maClasseCreee=globals()[self.typeCree]
+ self.dictArgsEficas['sd_prod'] = maClasseCreee
+ cata.contexteXML[self.typeCree] = maClasseCreee
+
+ self.dictArgsEficas['op'] = None
+ self.objAccas=A_OPER.OPER(**self.dictArgsEficas)
+ setattr(cata, self.nomObj,self.objAccas)
+ cata.contexteXML[self.nomObj] = self.objAccas
+
+# ---------------------------------------------------------
+class monBLOC(efficas.T_BLOC, objetComposeDefinitionAccas):
+# ---------------------------------------------------------
+ def explore(self,cata):
+# ------------------------
+ print ('je passe dans explore pour BLOC', self.nom)
+ self.cata=cata
+ self.dictATraiter= dictBLOCXMLEficas
+ self.argumentXMLToEficas()
+ self.exploreArbre(cata)
+ self.objAccas=A_BLOC.BLOC(**self.dictArgsEficas)
+ setattr(cata, self.nomObj,self.objAccas)
+ cata.contexteXML[self.nomObj] = self.objAccas
+
+# ------------------------------
+class monCata(efficas.T_cata):
+# ------------------------------
+ def exploreCata(self):
+ # On positionne le contexte ACCAS
+ self.JdC = JDC_CATA (code = 'MED', execmodul = None,)
+ self.contexteXML={}
+ objAExplorer=self.commandes[0]
+ for obj in objAExplorer.content():
+ if hasattr(obj,'explore') : obj.explore(self)
+ #print dir(self.JdC)
+
+
+ #def dumpXSD(self):
+ # for etape in self.contexteXML.values() :
+ # etape.dumpXSD()
+
+efficas.T_SIMP._SetSupersedingClass(monSIMP)
+efficas.T_FACT._SetSupersedingClass(monFACT)
+efficas.T_PROC._SetSupersedingClass(monPROC)
+efficas.T_OPER._SetSupersedingClass(monOPER)
+efficas.T_BLOC._SetSupersedingClass(monBLOC)
+efficas.T_cata._SetSupersedingClass(monCata)
+
+if __name__ == "__main__":
+# print dir(efficas)
+# print dir(efficas.T_SIMP)
+
+ #xml = open('cata_test1.xml').read()
+ xml = open('cata.xml').read()
+ SchemaMed = efficas.CreateFromDocument(xml)
+ SchemaMed.exploreCata()
+ #SchemaMed.dumpXSD()
+