from __future__ import absolute_import
from Noyau import N_BLOC
from Ihm import I_ENTITE
-from . import A_MCBLOC
+from Accas import A_MCBLOC
+from Efi2Xsd.AccasXsd import X_BLOC
-class BLOC(N_BLOC.BLOC,I_ENTITE.ENTITE):
+
+class BLOC(N_BLOC.BLOC,X_BLOC,I_ENTITE.ENTITE):
class_instance=A_MCBLOC.MCBLOC
def __init__(self,*tup,**args):
I_ENTITE.ENTITE.__init__(self)
from Noyau import N_ETAPE
from Validation import V_ETAPE
from Ihm import I_ETAPE
+from Efi2Xsd.MCAccasXsd import X_MCCOMPO
-class ETAPE(I_ETAPE.ETAPE,V_ETAPE.ETAPE,
- N_ETAPE.ETAPE):
+class ETAPE(I_ETAPE.ETAPE,V_ETAPE.ETAPE,X_MCCOMPO,N_ETAPE.ETAPE):
def __init__(self,oper=None,reuse=None,args={}):
- # Pas de constructeur pour B_ETAPE.ETAPE
+ #print ('ETAPE accas', oper.nom)
N_ETAPE.ETAPE.__init__(self,oper,reuse,args)
V_ETAPE.ETAPE.__init__(self)
from __future__ import absolute_import
from Noyau import N_FACT
from Ihm import I_ENTITE
-from . import A_MCFACT
-from . import A_MCLIST
+from Accas import A_MCFACT
+from Accas import A_MCLIST
+from Efi2Xsd.AccasXsd import X_FACT
-class FACT(N_FACT.FACT,I_ENTITE.ENTITE):
+
+class FACT(N_FACT.FACT,X_FACT,I_ENTITE.ENTITE):
class_instance=A_MCFACT.MCFACT
list_instance=A_MCLIST.MCList
def __init__(self,*tup,**args):
from Validation import V_JDC
from Extensions import jdc
from Ihm import I_JDC
+from Efi2Xsd.MCAccasXsd import X_JDC
-class JDC(jdc.JDC,I_JDC.JDC,V_JDC.JDC,N_JDC.JDC):
+class JDC(jdc.JDC,I_JDC.JDC,X_JDC,V_JDC.JDC,N_JDC.JDC):
from .A_ASSD import CO,assd
def __init__(self,*pos,**args):
N_JDC.JDC.__init__(self,*pos,**args)
+ X_JDC.__init__(self)
V_JDC.JDC.__init__(self)
I_JDC.JDC.__init__(self)
jdc.JDC.__init__(self)
from . import A_JDC
from Noyau import N_JDC_CATA
from Ihm import I_JDC_CATA
+from Efi2Xsd.AccasXsd import X_JDC_CATA
-class JDC_CATA(I_JDC_CATA.JDC_CATA,N_JDC_CATA.JDC_CATA):
+class JDC_CATA(I_JDC_CATA.JDC_CATA,N_JDC_CATA.JDC_CATA,X_JDC_CATA):
class_instance=A_JDC.JDC
def __init__(self,*pos,**kw):
#print pos
from Validation import V_MACRO_ETAPE
from Ihm import I_MACRO_ETAPE
from .A_ASSD import CO
+from Efi2Xsd.MCAccasXsd import X_MCCOMPO
class MACRO_ETAPE(I_MACRO_ETAPE.MACRO_ETAPE,
+ X_MCCOMPO,
V_MACRO_ETAPE.MACRO_ETAPE,
N_MACRO_ETAPE.MACRO_ETAPE):
typeCO=CO
from Noyau import N_MCBLOC
from Validation import V_MCBLOC
from Ihm import I_MCBLOC
+from Efi2Xsd.MCAccasXsd import X_MCCOMPO
-class MCBLOC(I_MCBLOC.MCBLOC,N_MCBLOC.MCBLOC,V_MCBLOC.MCBLOC):
+
+class MCBLOC(I_MCBLOC.MCBLOC,N_MCBLOC.MCBLOC,X_MCCOMPO,V_MCBLOC.MCBLOC):
def __init__(self,val,definition,nom,parent):
N_MCBLOC.MCBLOC.__init__(self,val,definition,nom,parent)
V_MCBLOC.MCBLOC.__init__(self)
from Noyau import N_MCFACT
from Validation import V_MCFACT
from Ihm import I_MCFACT
+from Efi2Xsd.MCAccasXsd import X_MCFACT
-class MCFACT(I_MCFACT.MCFACT,N_MCFACT.MCFACT,V_MCFACT.MCFACT):
+class MCFACT(I_MCFACT.MCFACT,N_MCFACT.MCFACT,X_MCFACT,V_MCFACT.MCFACT):
def __init__(self,val,definition,nom,parent):
N_MCFACT.MCFACT.__init__(self,val,definition,nom,parent)
V_MCFACT.MCFACT.__init__(self)
from Noyau import N_MCLIST
from Validation import V_MCLIST
from Ihm import I_MCLIST
+from Efi2Xsd.MCAccasXsd import X_MCLIST
-class MCList(I_MCLIST.MCList,N_MCLIST.MCList,V_MCLIST.MCList):
+
+class MCList(I_MCLIST.MCList,N_MCLIST.MCList,X_MCLIST,V_MCLIST.MCList):
def __init__(self):
N_MCLIST.MCList.__init__(self)
from Noyau import N_MCSIMP
from Validation import V_MCSIMP
from Ihm import I_MCSIMP
+from Efi2Xsd.MCAccasXsd import X_MCSIMP
-class MCSIMP(I_MCSIMP.MCSIMP,N_MCSIMP.MCSIMP,V_MCSIMP.MCSIMP):
+class MCSIMP(I_MCSIMP.MCSIMP,N_MCSIMP.MCSIMP,X_MCSIMP,V_MCSIMP.MCSIMP):
def __init__(self,val,definition,nom,parent):
N_MCSIMP.MCSIMP.__init__(self,val,definition,nom,parent)
V_MCSIMP.MCSIMP.__init__(self)
from __future__ import absolute_import
from Noyau import N_OPER
from Ihm import I_ENTITE
-from . import A_ETAPE
+from Accas import A_ETAPE
+from Efi2Xsd.AccasXsd import X_OPER
-class OPER(N_OPER.OPER,I_ENTITE.ENTITE):
+
+class OPER(N_OPER.OPER,X_OPER,I_ENTITE.ENTITE):
class_instance=A_ETAPE.ETAPE
def __init__(self,*tup,**args):
I_ENTITE.ENTITE.__init__(self)
from __future__ import absolute_import
from Noyau import N_PROC
from Ihm import I_ENTITE
-from . import A_PROC_ETAPE
+from Accas import A_PROC_ETAPE
+from Efi2Xsd.AccasXsd import X_PROC
-class PROC(N_PROC.PROC,I_ENTITE.ENTITE):
+class PROC(N_PROC.PROC,X_PROC,I_ENTITE.ENTITE):
class_instance=A_PROC_ETAPE.PROC_ETAPE
def __init__(self,*tup,**args):
- #print tup
- #print args
+ #print (tup)
+ #print (args)
I_ENTITE.ENTITE.__init__(self)
N_PROC.PROC.__init__(self,*tup,**args)
from Noyau import N_PROC_ETAPE
from Validation import V_PROC_ETAPE
from Ihm import I_PROC_ETAPE
+from Efi2Xsd.MCAccasXsd import X_MCCOMPO
class PROC_ETAPE(I_PROC_ETAPE.PROC_ETAPE,
V_PROC_ETAPE.PROC_ETAPE,
+ X_MCCOMPO,
N_PROC_ETAPE.PROC_ETAPE):
def __init__(self,oper=None,args={}):
N_PROC_ETAPE.PROC_ETAPE.__init__(self,oper=oper,args=args)
from __future__ import absolute_import
from Noyau import N_SIMP
from Ihm import I_ENTITE
-from . import A_MCSIMP
+from Accas import A_MCSIMP
+from Efi2Xsd.AccasXsd import X_SIMP
-class SIMP(N_SIMP.SIMP,I_ENTITE.ENTITE):
+class SIMP(N_SIMP.SIMP,X_SIMP,I_ENTITE.ENTITE):
class_instance=A_MCSIMP.MCSIMP
def __init__(self,*tup,**args):
#print tup
<simpleType name="T_Niveau4SIMP">
<restriction base="int"/>
</simpleType>
- <complexType name="T_Niveau3Fact" minOccurs="1" maxOccurs="1">
- <sequence>
+ <complexType name="T_Niveau3Fact" >
+ <sequence minOccurs="0" maxOccurs="6">
<element name="Niveau4SIMP" type="Atmos:T_Niveau4SIMP" minOccurs="1" maxOccurs="1"/>
</sequence>
</complexType>
- <complexType name="T_Niveau2Fact" minOccurs="1" maxOccurs="4">
- <sequence>
+ <complexType name="T_Niveau2Fact" >
+ <sequence minOccurs="0" maxOccurs="4">
<element name="Niveau3SIMP" type="Atmos:T_Niveau3SIMP" minOccurs="1" maxOccurs="1"/>
- <element name="Niveau3Fact" type="Atmos:T_Niveau3Fact"/>
+ <element name="Niveau3Fact" type="Atmos:T_Niveau3Fact" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
- <complexType name="T_Niveau1Fact" minOccurs="1" maxOccurs="4">
- <sequence>
+ <complexType name="T_Niveau1Fact" >
+ <sequence minOccurs="0" maxOccurs="4">
<element name="Niveau2SIMP" type="Atmos:T_Niveau2SIMP" minOccurs="1" maxOccurs="1"/>
- <element name="Niveau2Fact" type="Atmos:T_Niveau2Fact"/>
+ <element name="Niveau2Fact" type="Atmos:T_Niveau2Fact" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
- <complexType name="T_Wind" minOccurs="0" maxOccurs="1">
- <sequence>
+ <complexType name="T_Wind" >
+ <sequence minOccurs="0" maxOccurs="1">
<element name="Niveau1SIMP" type="Atmos:T_Niveau1SIMP" minOccurs="1" maxOccurs="1"/>
- <element name="Niveau1Fact" type="Atmos:T_Niveau1Fact"/>
+ <element name="Niveau1Fact" type="Atmos:T_Niveau1Fact" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
<complexType name="T_Atmos">
<choice minOccurs="0" maxOccurs="unbounded">
- <element name="Wind" type="Atmos:T_Wind"/>
+ <element name="Wind" type="Atmos:T_Wind" />
</choice>
</complexType> <element name="Atmos" type="Atmos:T_Atmos"/>
</schema>
--- /dev/null
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2012-2013 EDF
+#
+# This file is part of SALOME HYDRO module.
+#
+# SALOME HYDRO module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# SALOME HYDRO module is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with SALOME HYDRO module. If not, see <http://www.gnu.org/licenses/>.
+
+import types
+from Accas import *
+
+
+
+JdC = JDC_CATA(code='Atmos',regles = (UN_PARMI('Wind',)),
+ )
+Wind = PROC( nom="Wind", op = None,
+ FACTA = FACT( statut='o',
+ VinAetBnotC = SIMP(statut = "o", typ = 'I'),
+ SousFactInAetBnotC = FACT( statut='o',
+ S1 = SIMP(statut = "o", typ = 'I'),
+ S2 = SIMP(statut = "o", typ = 'I'),
+ ),
+ ),
+ FACTB = FACT( statut='o',
+ VinAetBnotC = SIMP(statut = "o", typ = 'I'),
+ SousFactInAetBnotC = FACT( statut='o',
+ S1 = SIMP(statut = "o", typ = 'I'),
+ S2 = SIMP(statut = "o", typ = 'I'),
+ ),
+ ),
+ FACTC = FACT( statut='o',
+ VinAetBnotC = SIMP(statut = "o", typ = 'R'),
+ SousFactInAetBnotC = FACT( statut='o',
+ S1 = SIMP(statut = "o", typ = 'I'),
+ S2 = SIMP(statut = "o", typ = 'R'),
+ ),
+ ),
+ FACTD = FACT( statut='o',
+ # identique FACTC
+ # donc pas de creation de Type mais utilisation de ceux de FACTC
+ VinAetBnotC = SIMP(statut = "o", typ = 'R'),
+ SousFactInAetBnotC = FACT( statut='o',
+ S1 = SIMP(statut = "o", typ = 'I'),
+ S2 = SIMP(statut = "o", typ = 'R'),
+ ),
+ ),
+ FACTE = FACT( statut='o',
+ S3 = SIMP(statut = "o", typ = 'I'),
+ BinEetFNotG = BLOC(condition="S3 == 0",
+ S4 = SIMP(statut = "o", typ = 'I'),
+ ),
+ ),
+ FACTF = FACT( statut='o',
+ S3 = SIMP(statut = "o", typ = 'I'),
+ BinEetFNotG = BLOC(condition="S3 == 0",
+ S4 = SIMP(statut = "o", typ = 'I'),
+ ),
+ ),
+ FACTG = FACT( statut='o',
+ S3 = SIMP(statut = "o", typ = 'I'),
+ BinEetFNotG = BLOC(condition="S3 == 1",
+ S4 = SIMP(statut = "o", typ = 'I'),
+ ),
+ ),
+)
+
--- /dev/null
+# -*- coding: utf-8 -*-
+import raw.cata_genere_fact as mdm
+s1=mdm.T_Niveau1SIMP(1)
+s2=mdm.T_Niveau2SIMP(2)
+s31=mdm.T_Niveau3SIMP(3)
+s4=mdm.T_Niveau4SIMP(4)
+s32=mdm.T_Niveau3SIMP(5)
+s6=mdm.T_Niveau4SIMP(6)
+
+f31=mdm.T_Niveau3Fact(s4)
+f32=mdm.T_Niveau3Fact(s6)
+
+#f2=mdm.T_Niveau2Fact(s31,f31)
+f2=mdm.T_Niveau2Fact(s32,f32)
+# ligne suivante nonok ?
+#f2=mdm.T_Niveau2Fact(s31,f31,s32,f32)
+#f2=mdm.T_Niveau2Fact(s31) # ok --> s obligatoire et f facultatif
+#f2=mdm.T_Niveau2Fact(f31) # nok
+f1=mdm.T_Niveau1Fact(s2,f2)
+wind=mdm.T_Wind(s1,f1)
+jdd=mdm.Atmos(wind)
+#print (jdd.toxml())
+print(jdd.toDOM().toprettyxml())
--- /dev/null
+<?xml version="1.0" ?>
+<ns1:Atmos xmlns:ns1="http://chercheurs.edf.com/logiciels/Atmos">
+ <ns1:Wind>
+ <ns1:Niveau1SIMP>1</ns1:Niveau1SIMP>
+ <ns1:Niveau1Fact>
+ <ns1:Niveau2SIMP>2</ns1:Niveau2SIMP>
+ <ns1:Niveau2Fact>
+ <ns1:Niveau3SIMP>5</ns1:Niveau3SIMP>
+ <ns1:Niveau3Fact>
+ <ns1:Niveau4SIMP>6</ns1:Niveau4SIMP>
+ </ns1:Niveau3Fact>
+ </ns1:Niveau2Fact>
+ </ns1:Niveau1Fact>
+ </ns1:Wind>
+</ns1:Atmos>
+
--- /dev/null
+<?xml version="1.0" ?>
+<ns1:Atmos xmlns:ns1="http://chercheurs.edf.com/logiciels/Atmos">
+ <ns1:Wind>
+ <ns1:Niveau1SIMP>1</ns1:Niveau1SIMP>
+ <ns1:Niveau1Fact>
+ <ns1:Niveau2SIMP>2</ns1:Niveau2SIMP>
+ <ns1:Niveau2Fact>
+ <ns1:Niveau3SIMP>3</ns1:Niveau3SIMP>
+ <ns1:Niveau3Fact>
+ <ns1:Niveau4SIMP>4</ns1:Niveau4SIMP>
+ </ns1:Niveau3Fact>
+ <ns1:Niveau3SIMP>5</ns1:Niveau3SIMP>
+ <ns1:Niveau3Fact>
+ <ns1:Niveau4SIMP>6</ns1:Niveau4SIMP>
+ </ns1:Niveau3Fact>
+ </ns1:Niveau2Fact>
+ </ns1:Niveau1Fact>
+ </ns1:Wind>
+</ns1:Atmos>
+