]> SALOME platform Git repositories - modules/eficas.git/commitdiff
Salome HOME
Ajout de cas tests atmo....
authorEric Fayolle <eric.fayolle@edf.fr>
Wed, 11 Apr 2018 15:47:02 +0000 (17:47 +0200)
committerEric Fayolle <eric.fayolle@edf.fr>
Wed, 11 Apr 2018 15:47:02 +0000 (17:47 +0200)
Atmo/README.txt
Atmo/cata-v0.xml
Atmo/modele_atmo_test1.py
Atmo/modele_atmo_test2.py [new file with mode: 0644]
Atmo/modele_atmo_test2.xsd [new file with mode: 0755]
Atmo/modele_atmo_test3.py [new file with mode: 0644]
Atmo/modele_atmo_test3.xsd [new file with mode: 0755]
Atmo/modele_atmo_test4.py [new file with mode: 0644]
Atmo/modele_atmo_test4.xsd [new file with mode: 0755]

index d76a5105fa97709ae5241ea96910ce1ec4652512..8d99a232260e82275c67e5a1a8550ace1ab4e59d 100644 (file)
@@ -1,4 +1,9 @@
 pyxbgen -u modele_atmo.xsd -m atmo --write-for-customization
+/local/PyXB-1.2.6/scripts/pyxbgen  -u modele_atmo_test1.xsd -m atmo1 --write-for-customization
+/local/PyXB-1.2.6/scripts/pyxbgen  -u modele_atmo_test2.xsd -m atmo2 --write-for-customization
+/local/PyXB-1.2.6/scripts/pyxbgen  -u modele_atmo_test3.xsd -m atmo3 --write-for-customization
+/local/PyXB-1.2.6/scripts/pyxbgen  -u modele_atmo_test4.xsd -m atmo4 --write-for-customization
+
 /local/PyXB-1.2.6/scripts/pyxbgen  -u modele_atmo.xsd -m atmo --write-for-customization
 /local/PyXB-1.2.6/scripts/pyxbgen  -u model_atmo_ext.xsd -m atmo_ext --write-for-customization
 
index bf1f56f0786b905581914a69f5e69af16b38f222..db5781c4f68102cce046ec358d299a3db65b1ce1 100755 (executable)
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>\r
-<!--Sample XML file generated by XMLSpy v2015 rel. 4 (http://www.altova.com)-->\r
 <cata efficas:nom="Atmo" xmlns="http://chercheurs.edf.com/logiciels/efficas" xmlns:efficas="http://chercheurs.edf.com/logiciels/efficas" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://chercheurs.edf.com/logiciels/efficas ../Efi2Xsd/ModeleEficas/Model%20Efficas%20(1.1)%20%20v9.xsd">\r
 <commandes>\r
 \r
index b4540d3c6d6b5cc135e5990ea9072c29754f8510..15f7322ca79d92691775a0f49518cdb950825a49 100644 (file)
@@ -1,4 +1,4 @@
-import raw.atmo_test1 as mdm
+import raw.atmo1 as mdm
 
 my_Wind_Speed=mdm.T_Wind_Speed(0)
 my_Value=mdm.T_Value(0)
@@ -12,3 +12,15 @@ my_Mesure1=mdm.T_Mesure1(my_Value1,my_Unit1)
 
 my_Wind=mdm.T_Wind(my_Wind_Speed1,my_Mesure1,my_B_enter_mesure)
 my_Atmos=mdm.Atmos(my_Wind)
+xmls=my_Atmos.toxml()
+xmls=my_Atmos.toDOM().toprettyxml()
+
+open('modele_atmo_test1.xml', 'w').write(xmls)
+
+# ou
+# liste=[my_Value1,my_Unit1]
+# my_Mesure1=mdm.T_Mesure1(*liste)
+
+# my_Wind=mdm.T_Wind(my_Wind_Speed1,my_Mesure1,my_B_enter_mesure)
+# my_Atmos=mdm.Atmos(my_Wind)
+# my_Atmos.toxml()
diff --git a/Atmo/modele_atmo_test2.py b/Atmo/modele_atmo_test2.py
new file mode 100644 (file)
index 0000000..7910845
--- /dev/null
@@ -0,0 +1,27 @@
+import raw.atmo2 as mdm
+
+my_Wind_Speed=mdm.T_Wind_Speed(0)
+my_Value=mdm.T_Value(0)
+my_Unit=mdm.T_Unit(0)
+my_Mesure=mdm.T_Mesure(my_Value,my_Unit)
+# my_B_enter_mesure=mdm.T_B_enter_mesure(my_Wind_Speed,my_Mesure)
+
+my_Wind_Speed1=mdm.T_Wind_Speed1(1)
+my_Value1=mdm.T_Value1(1)
+my_Unit1=mdm.T_Unit1(1)
+my_Mesure1=mdm.T_Mesure1(my_Value1,my_Unit1)
+
+# my_Wind=mdm.T_Wind(my_Wind_Speed1,my_Mesure1)
+# my_Wind.append(my_Wind_Speed)
+# my_Wind.append(my_Mesure)
+# ou
+# my_Wind.extend([my_Wind_Speed,my_Mesure])
+# ou
+my_Wind=mdm.T_Wind(my_Wind_Speed1,my_Mesure1,my_Wind_Speed,my_Mesure)
+
+
+my_Atmos=mdm.Atmos(my_Wind)
+xmls=my_Atmos.toxml()
+xmls=my_Atmos.toDOM().toprettyxml()
+
+open('modele_atmo_test2.xml', 'w').write(xmls)
diff --git a/Atmo/modele_atmo_test2.xsd b/Atmo/modele_atmo_test2.xsd
new file mode 100755 (executable)
index 0000000..eac7c63
--- /dev/null
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XMLSpy v2015 rel. 4 (http://www.altova.com) by USER1 (EDF-DSP) -->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:atmos="http://chercheurs.edf.com/logiciels/atmos" targetNamespace="http://chercheurs.edf.com/logiciels/atmos" elementFormDefault="qualified" attributeFormDefault="qualified">
+       <simpleType name="T_Wind_Speed1">
+               <restriction base="int"/>
+       </simpleType>
+       <simpleType name="T_Speed_Unit1">
+               <restriction base="string"/>
+       </simpleType>
+       <simpleType name="T_Wind_Speed">
+               <restriction base="int"/>
+       </simpleType>
+       <simpleType name="T_Speed_Unit">
+               <restriction base="string"/>
+       </simpleType>
+       <simpleType name="T_Value">
+               <restriction base="int"/>
+       </simpleType>
+       <simpleType name="T_Unit">
+               <restriction base="string"/>
+       </simpleType>
+       <simpleType name="T_Value1">
+               <restriction base="int"/>
+       </simpleType>
+       <simpleType name="T_Unit1">
+               <restriction base="string"/>
+       </simpleType>
+       <complexType name="T_Atmos">
+               <sequence>
+                       <element name="Wind" type="atmos:T_Wind" minOccurs="1" maxOccurs="1"/>
+               </sequence>
+       </complexType>
+       <complexType name="T_Mesure1">
+               <sequence maxOccurs="4">
+                       <element name="Value1" type="atmos:T_Value1"/>
+                       <element name="Unit1" type="atmos:T_Unit1"/>
+               </sequence>
+       </complexType>
+       <complexType name="T_Mesure">
+               <sequence maxOccurs="4">
+                       <element name="Value" type="atmos:T_Value"/>
+                       <element name="Unit" type="atmos:T_Unit"/>
+               </sequence>
+       </complexType>
+       <complexType name="T_Wind">
+               <sequence>
+                       <element name="Wind_Speed1" type="atmos:T_Wind_Speed1"/>
+                       <element name="Mesure1" type="atmos:T_Mesure1"/>
+                       <group ref="atmos:T_B_enter_mesure" minOccurs="0"/>
+               </sequence>
+       </complexType>
+       <element name="Atmos" type="atmos:T_Atmos"/>
+       <group name="T_B_enter_mesure">
+               <sequence>
+                       <element name="Wind_Speed" type="atmos:T_Wind_Speed"/>
+                       <element name="Mesure" type="atmos:T_Mesure"/>
+               </sequence>
+       </group>
+</schema>
diff --git a/Atmo/modele_atmo_test3.py b/Atmo/modele_atmo_test3.py
new file mode 100644 (file)
index 0000000..ad37948
--- /dev/null
@@ -0,0 +1,27 @@
+import raw.atmo3 as mdm
+
+my_Wind_Speed=mdm.T_Wind_Speed(0)
+my_Value=mdm.T_Value(0)
+my_Unit=mdm.T_Unit(0)
+my_Mesure=mdm.T_Mesure(my_Value,my_Unit)
+#on peut instancier l'élément global directement
+my_B_enter_mesure=mdm.B_enter_mesure(my_Wind_Speed,my_Mesure)
+my_Wind_Speed1=mdm.T_Wind_Speed1(1)
+my_Value1=mdm.T_Value1(1)
+my_Unit1=mdm.T_Unit1(1)
+my_Mesure1=mdm.T_Mesure1(my_Value1,my_Unit1)
+
+my_Wind=mdm.T_Wind(my_Wind_Speed1,my_Mesure1,my_B_enter_mesure)
+my_Atmos=mdm.Atmos(my_Wind)
+xmls=my_Atmos.toxml()
+xmls=my_Atmos.toDOM().toprettyxml()
+
+open('modele_atmo_test3.xml', 'w').write(xmls)
+
+# ou
+# liste=[my_Value1,my_Unit1]
+# my_Mesure1=mdm.T_Mesure1(*liste)
+
+# my_Wind=mdm.T_Wind(my_Wind_Speed1,my_Mesure1,my_B_enter_mesure)
+# my_Atmos=mdm.Atmos(my_Wind)
+# my_Atmos.toxml()
diff --git a/Atmo/modele_atmo_test3.xsd b/Atmo/modele_atmo_test3.xsd
new file mode 100755 (executable)
index 0000000..b79cdcf
--- /dev/null
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XMLSpy v2015 rel. 4 (http://www.altova.com) by USER1 (EDF-DSP) -->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:atmos="http://chercheurs.edf.com/logiciels/atmos" targetNamespace="http://chercheurs.edf.com/logiciels/atmos" elementFormDefault="qualified" attributeFormDefault="qualified">
+       <simpleType name="T_Wind_Speed1">
+               <restriction base="int"/>
+       </simpleType>
+       <simpleType name="T_Speed_Unit1">
+               <restriction base="string"/>
+       </simpleType>
+       <simpleType name="T_Wind_Speed">
+               <restriction base="int"/>
+       </simpleType>
+       <simpleType name="T_Speed_Unit">
+               <restriction base="string"/>
+       </simpleType>
+       <simpleType name="T_Value">
+               <restriction base="int"/>
+       </simpleType>
+       <simpleType name="T_Unit">
+               <restriction base="string"/>
+       </simpleType>
+       <simpleType name="T_Value1">
+               <restriction base="int"/>
+       </simpleType>
+       <simpleType name="T_Unit1">
+               <restriction base="string"/>
+       </simpleType>
+       <complexType name="T_Atmos">
+               <sequence>
+                       <element name="Wind" type="atmos:T_Wind" minOccurs="1" maxOccurs="1"/>
+               </sequence>
+       </complexType>
+       <complexType name="T_Mesure1">
+               <sequence maxOccurs="4">
+                       <element name="Value1" type="atmos:T_Value1"/>
+                       <element name="Unit1" type="atmos:T_Unit1"/>
+               </sequence>
+       </complexType>
+       <complexType name="T_Mesure">
+               <sequence maxOccurs="4">
+                       <element name="Value" type="atmos:T_Value"/>
+                       <element name="Unit" type="atmos:T_Unit"/>
+               </sequence>
+       </complexType>
+       <complexType name="T_Wind">
+               <sequence>
+                       <element name="Wind_Speed1" type="atmos:T_Wind_Speed1"/>
+                       <element name="Mesure1" type="atmos:T_Mesure1"/>
+                       <element ref="atmos:B_enter_mesure" minOccurs="0" maxOccurs="1"/>
+               </sequence>
+       </complexType>
+       <complexType name="T_B_enter_mesure">
+               <sequence>
+                       <element name="Wind_Speed" type="atmos:T_Wind_Speed"/>
+                       <element name="Mesure" type="atmos:T_Mesure"/>
+               </sequence>
+       </complexType>
+       <element name="Atmos" type="atmos:T_Atmos"/>
+       <element name="B_enter_mesure" type="atmos:T_B_enter_mesure"/>
+</schema>
diff --git a/Atmo/modele_atmo_test4.py b/Atmo/modele_atmo_test4.py
new file mode 100644 (file)
index 0000000..54b99be
--- /dev/null
@@ -0,0 +1,37 @@
+import raw.atmo4 as mdm
+
+my_Wind_Speed=mdm.T_Wind_Speed(0)
+my_Value=mdm.T_Value(0)
+my_Unit=mdm.T_Unit(0)
+my_Mesure=mdm.T_Mesure(my_Value,my_Unit)
+# my_B_enter_mesure=mdm.T_B_enter_mesure(my_Wind_Speed,my_Mesure)
+
+my_Wind_Speed1=mdm.T_Wind_Speed1(1)
+my_Value1=mdm.T_Value1(1)
+my_Unit1=mdm.T_Unit1(1)
+my_Mesure1=mdm.T_Mesure1(my_Value1,my_Unit1)
+
+# my_Wind=mdm.T_Wind(my_Wind_Speed1,my_Mesure1)
+# my_Wind.append(my_Wind_Speed)
+# my_Wind.append(my_Mesure)
+# ou
+# my_Wind.extend([my_Wind_Speed,my_Mesure])
+# ou
+my_Wind=mdm.T_Wind(my_Wind_Speed1,my_Mesure1,my_Wind_Speed,my_Mesure)
+
+
+my_Atmos=mdm.Atmos(my_Wind)
+xmls=my_Atmos.toxml()
+xmls=my_Atmos.toDOM().toprettyxml()
+
+open('modele_atmo_test4.xml', 'w').write(xmls)
+
+import pyxb
+class T_Wind_Speed2 (pyxb.binding.datatypes.int):
+    
+     """An atomic simple type."""
+    
+     _ExpandedName = pyxb.namespace.ExpandedName(mdm.Namespace, u'T_Wind_Speed2')
+     _XSDLocation = pyxb.utils.utility.Location('', 0, 0)
+     _Documentation = None
+mdm.Namespace.addCategoryObject('typeBinding', u'T_Wind_Speed2', T_Wind_Speed2)
diff --git a/Atmo/modele_atmo_test4.xsd b/Atmo/modele_atmo_test4.xsd
new file mode 100755 (executable)
index 0000000..87fa0e3
--- /dev/null
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XMLSpy v2015 rel. 4 (http://www.altova.com) by USER1 (EDF-DSP) -->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:atmos="http://chercheurs.edf.com/logiciels/atmos" targetNamespace="http://chercheurs.edf.com/logiciels/atmos" elementFormDefault="qualified" attributeFormDefault="qualified">
+       <simpleType name="T_Wind_Speed1">
+               <restriction base="int"/>
+       </simpleType>
+       <simpleType name="T_Speed_Unit1">
+               <restriction base="string"/>
+       </simpleType>
+       <simpleType name="T_Wind_Speed">
+               <restriction base="int"/>
+       </simpleType>
+       <simpleType name="T_Speed_Unit">
+               <restriction base="string"/>
+       </simpleType>
+       <simpleType name="T_Value">
+               <restriction base="int"/>
+       </simpleType>
+       <simpleType name="T_Unit">
+               <restriction base="string"/>
+       </simpleType>
+       <simpleType name="T_Value1">
+               <restriction base="int"/>
+       </simpleType>
+       <simpleType name="T_Unit1">
+               <restriction base="string"/>
+       </simpleType>
+       <complexType name="T_Atmos">
+               <sequence>
+                       <element name="Wind" type="atmos:T_Wind" minOccurs="1" maxOccurs="1"/>
+               </sequence>
+       </complexType>
+       <complexType name="T_Mesure1">
+               <sequence maxOccurs="4">
+                       <element name="Value1" type="atmos:T_Value1"/>
+                       <element name="Unit1" type="atmos:T_Unit1"/>
+               </sequence>
+       </complexType>
+       <complexType name="T_Mesure">
+               <sequence maxOccurs="4">
+                       <element name="Value" type="atmos:T_Value"/>
+                       <element name="Unit" type="atmos:T_Unit"/>
+               </sequence>
+       </complexType>
+       <complexType name="T_Wind">
+               <sequence>
+                       <element name="Wind_Speed1" type="atmos:T_Wind_Speed1"/>
+                       <element name="Mesure1" type="atmos:T_Mesure1"/>
+                       <sequence>
+                               <element name="Wind_Speed" type="atmos:T_Wind_Speed"/>
+                               <element name="Mesure" type="atmos:T_Mesure"/>
+                       </sequence>
+               </sequence>
+       </complexType>
+       <complexType name="T_B_enter_mesure"/>
+       <element name="Atmos" type="atmos:T_Atmos"/>
+</schema>