summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJerzy ZAGORSKI <xendoo@gmail.com>2010-06-23 11:30:48 +0200
committerJerzy ZAGORSKI <xendoo@gmail.com>2010-06-23 11:32:10 +0200
commitbecf12cccbfbd8bba07c660313a7e3a6f136375f (patch)
treecb6eaf93bc8b7e84b095773a9814a5009766b2d7
parentfc8834606933e68454ae03338b04d724d84d7b7f (diff)
downloadscilab-becf12cccbfbd8bba07c660313a7e3a6f136375f.zip
scilab-becf12cccbfbd8bba07c660313a7e3a6f136375f.tar.gz
changes to compatibility patterns parMap->map, xcosIndex(1)->index(1,1)
Change-Id: Icd8d0c86f8a217b1e76f34603f5bc17ad9f5500b
-rw-r--r--scilab/modules/xcos/etc/SimulinkImportConfiguration.xsd12
-rw-r--r--scilab/modules/xcos/etc/simulinkImportBlocks.xml76
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/PatternElement.java50
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/Int2StrParameters.java20
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/IntegerParameters.java20
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/ObjectFactory.java66
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/RealParameters.java20
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/RealValueMap.java21
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/Str2IntParameters.java20
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/StringParameters.java20
10 files changed, 175 insertions, 150 deletions
diff --git a/scilab/modules/xcos/etc/SimulinkImportConfiguration.xsd b/scilab/modules/xcos/etc/SimulinkImportConfiguration.xsd
index bd416a2..0d160bc 100644
--- a/scilab/modules/xcos/etc/SimulinkImportConfiguration.xsd
+++ b/scilab/modules/xcos/etc/SimulinkImportConfiguration.xsd
@@ -44,7 +44,7 @@
44 <!-- parameters that in name, and have different string values ex:CSCOPE SCOPE --> 44 <!-- parameters that in name, and have different string values ex:CSCOPE SCOPE -->
45 <xsd:complexType name="StringParameters"> 45 <xsd:complexType name="StringParameters">
46 <xsd:sequence> 46 <xsd:sequence>
47 <xsd:element name="parMap" type="StringValueMap" minOccurs="1" maxOccurs="unbounded"/> 47 <xsd:element name="map" type="StringValueMap" minOccurs="1" maxOccurs="unbounded"/>
48 </xsd:sequence> 48 </xsd:sequence>
49 <xsd:attribute name="sim" type="xsd:string" use="required"/> 49 <xsd:attribute name="sim" type="xsd:string" use="required"/>
50 <xsd:attribute name="xcos" type="xsd:string" use="required"/> 50 <xsd:attribute name="xcos" type="xsd:string" use="required"/>
@@ -58,7 +58,7 @@
58 <!-- parameters that needs to be calculated before setting --> 58 <!-- parameters that needs to be calculated before setting -->
59 <xsd:complexType name="IntegerParameters"> 59 <xsd:complexType name="IntegerParameters">
60 <xsd:sequence> 60 <xsd:sequence>
61 <xsd:element name="parMap" type="IntegerValueMap" minOccurs="1" maxOccurs="unbounded"/> 61 <xsd:element name="map" type="IntegerValueMap" minOccurs="1" maxOccurs="unbounded"/>
62 </xsd:sequence> 62 </xsd:sequence>
63 <xsd:attribute name="sim" type="xsd:string" use="required"/> 63 <xsd:attribute name="sim" type="xsd:string" use="required"/>
64 <xsd:attribute name="xcos" type="xsd:string" use="required"/> 64 <xsd:attribute name="xcos" type="xsd:string" use="required"/>
@@ -72,7 +72,7 @@
72 72
73 <xsd:complexType name="Str2IntParameters"> 73 <xsd:complexType name="Str2IntParameters">
74 <xsd:sequence> 74 <xsd:sequence>
75 <xsd:element name="parMap" type="Str2IntValueMap" minOccurs="1" maxOccurs="unbounded"/> 75 <xsd:element name="map" type="Str2IntValueMap" minOccurs="1" maxOccurs="unbounded"/>
76 </xsd:sequence> 76 </xsd:sequence>
77 <xsd:attribute name="sim" type="xsd:string" use="required"/> 77 <xsd:attribute name="sim" type="xsd:string" use="required"/>
78 <xsd:attribute name="xcos" type="xsd:string" use="required"/> 78 <xsd:attribute name="xcos" type="xsd:string" use="required"/>
@@ -86,7 +86,7 @@
86 86
87 <xsd:complexType name="Int2StrParameters"> 87 <xsd:complexType name="Int2StrParameters">
88 <xsd:sequence> 88 <xsd:sequence>
89 <xsd:element name="parMap" type="Int2StrValueMap" minOccurs="1" maxOccurs="unbounded"/> 89 <xsd:element name="map" type="Int2StrValueMap" minOccurs="1" maxOccurs="unbounded"/>
90 </xsd:sequence> 90 </xsd:sequence>
91 <xsd:attribute name="sim" type="xsd:string" use="required"/> 91 <xsd:attribute name="sim" type="xsd:string" use="required"/>
92 <xsd:attribute name="xcos" type="xsd:string" use="required"/> 92 <xsd:attribute name="xcos" type="xsd:string" use="required"/>
@@ -99,7 +99,7 @@
99 99
100 <xsd:complexType name="RealParameters"> 100 <xsd:complexType name="RealParameters">
101 <xsd:sequence> 101 <xsd:sequence>
102 <xsd:element name="parMap" type="RealValueMap" minOccurs="1" maxOccurs="unbounded"/> 102 <xsd:element name="map" type="RealValueMap" minOccurs="1" maxOccurs="unbounded"/>
103 </xsd:sequence> 103 </xsd:sequence>
104 <xsd:attribute name="sim" type="xsd:string" use="optional"/> 104 <xsd:attribute name="sim" type="xsd:string" use="optional"/>
105 <xsd:attribute name="xcos" type="xsd:string" use="required"/> 105 <xsd:attribute name="xcos" type="xsd:string" use="required"/>
@@ -108,7 +108,7 @@
108 108
109 <xsd:complexType name="RealValueMap"> 109 <xsd:complexType name="RealValueMap">
110 <xsd:attribute name="simName" type="xsd:string" use="required"/> 110 <xsd:attribute name="simName" type="xsd:string" use="required"/>
111 <xsd:attribute name="xcosIndex" type="xsd:integer" use="required"/> 111 <xsd:attribute name="index" type="xsd:string" use="required"/>
112 </xsd:complexType> 112 </xsd:complexType>
113 <!--Its possible that Ill have to add more parameter types, such as: boolean --> 113 <!--Its possible that Ill have to add more parameter types, such as: boolean -->
114</xsd:schema> 114</xsd:schema>
diff --git a/scilab/modules/xcos/etc/simulinkImportBlocks.xml b/scilab/modules/xcos/etc/simulinkImportBlocks.xml
index 4f10820..8fc4b46 100644
--- a/scilab/modules/xcos/etc/simulinkImportBlocks.xml
+++ b/scilab/modules/xcos/etc/simulinkImportBlocks.xml
@@ -4,12 +4,12 @@
4 <!--Zero or more repetitions:--> 4 <!--Zero or more repetitions:-->
5 <string sim="string" xcos="string" description="string"> 5 <string sim="string" xcos="string" description="string">
6 <!--1 or more repetitions:--> 6 <!--1 or more repetitions:-->
7 <parMap simVal="string" xcosVal="string"/> 7 <map simVal="string" xcosVal="string"/>
8 </string> 8 </string>
9 <!--Zero or more repetitions:--> 9 <!--Zero or more repetitions:-->
10 <integer sim="string" xcos="string" description="string"> 10 <integer sim="string" xcos="string" description="string">
11 <!--1 or more repetitions:--> 11 <!--1 or more repetitions:-->
12 <parMap simVal="100" xcosVal="100"/> 12 <map simVal="100" xcosVal="100"/>
13 </integer> 13 </integer>
14 <!--Zero or more repetitions:--> 14 <!--Zero or more repetitions:-->
15 <simple sim="string" xcos="string" description="string"/> 15 <simple sim="string" xcos="string" description="string"/>
@@ -22,18 +22,18 @@
22 <!--Zero or more repetitions:--> 22 <!--Zero or more repetitions:-->
23 <string sim="string" xcos="string" description="string"> 23 <string sim="string" xcos="string" description="string">
24 <!--1 or more repetitions:--> 24 <!--1 or more repetitions:-->
25 <parMap simVal="string" xcosVal="string"/> 25 <map simVal="string" xcosVal="string"/>
26 </string> 26 </string>
27 <!--Zero or more repetitions:--> 27 <!--Zero or more repetitions:-->
28 <integer sim="string" xcos="string" description="string"> 28 <integer sim="string" xcos="string" description="string">
29 <!--1 or more repetitions:--> 29 <!--1 or more repetitions:-->
30 <parMap simVal="100" xcosVal="100"/> 30 <map simVal="100" xcosVal="100"/>
31 </integer> 31 </integer>
32 <!--Zero or more repetitions:--> 32 <!--Zero or more repetitions:-->
33 <simple sim="string" xcos="string" description="string"/> 33 <simple sim="string" xcos="string" description="string"/>
34 <str2int sim="ZeroCross" xcos="zero_crossing" description="Enable zero-crossing detection"> 34 <str2int sim="ZeroCross" xcos="zero_crossing" description="Enable zero-crossing detection">
35 <parMap simVal="off" xcosVal="0"/> 35 <map simVal="off" xcosVal="0"/>
36 <parMap simVal="on" xcosVal="1"/> 36 <map simVal="on" xcosVal="1"/>
37 </str2int> 37 </str2int>
38 <!-- 38 <!--
39 * - "interfaceFunctionName" 39 * - "interfaceFunctionName"
@@ -95,23 +95,23 @@
95 <simple sim="BlockType" xcos="c"></simple> 95 <simple sim="BlockType" xcos="c"></simple>
96 96
97 <str2int sim="ZeroCross" xcos="nzcross" description="Enable zero-crossing detection"> 97 <str2int sim="ZeroCross" xcos="nzcross" description="Enable zero-crossing detection">
98 <parMap simVal="off" xcosVal="0"/> 98 <map simVal="off" xcosVal="0"/>
99 <parMap simVal="on" xcosVal="1"/> 99 <map simVal="on" xcosVal="1"/>
100 </str2int> 100 </str2int>
101 <str2int sim="ExternalReset" xcos="With re-initialization" description=""> 101 <str2int sim="ExternalReset" xcos="With re-initialization" description="">
102 <!-- TODO: {'none'} | 'rising' | 'falling' | 'either' | 'level' | 'level hold' --> 102 <!-- TODO: {'none'} | 'rising' | 'falling' | 'either' | 'level' | 'level hold' -->
103 <parMap simVal="none" xcosVal="0"/> 103 <map simVal="none" xcosVal="0"/>
104 </str2int> 104 </str2int>
105 <str2int sim="LimitOutput" xcos="rpar" description=""> 105 <str2int sim="LimitOutput" xcos="rpar" description="">
106 <parMap simVal="off" xcosVal="0"/> 106 <map simVal="off" xcosVal="0"/>
107 <parMap simVal="on" xcosVal="1"/> 107 <map simVal="on" xcosVal="1"/>
108 </str2int> 108 </str2int>
109 <real xcos="rpar"> 109 <real xcos="rpar">
110 <parMap simName="UpperStaturationLimit" xcosIndex="0"/> 110 <map simName="UpperStaturationLimit" index="0,0"/>
111 <parMap simName="LowerSaturationLimit" xcosIndex="1"/> 111 <map simName="LowerSaturationLimit" index="0,1"/>
112 </real> 112 </real>
113 <real xcos="state"> 113 <real xcos="state">
114 <parMap simName="InitialCondition" xcosIndex="0"/> 114 <map simName="InitialCondition" index="0,0"/>
115 </real> 115 </real>
116 </block> 116 </block>
117 <!-- StateSpace Block compatibility pattern --> 117 <!-- StateSpace Block compatibility pattern -->
@@ -120,13 +120,13 @@
120 <simple sim="FunctionType" xcos="4"></simple> 120 <simple sim="FunctionType" xcos="4"></simple>
121 <simple sim="BlockType" xcos="c"></simple> 121 <simple sim="BlockType" xcos="c"></simple>
122 <real xcos="rpar"> 122 <real xcos="rpar">
123 <parMap simName="A" xcosIndex="0"/> 123 <map simName="A" index="0,0"/>
124 <parMap simName="B" xcosIndex="1"/> 124 <map simName="B" index="0,1"/>
125 <parMap simName="C" xcosIndex="2"/> 125 <map simName="C" index="0,2"/>
126 <parMap simName="D" xcosIndex="3"/> 126 <map simName="D" index="0,3"/>
127 </real> 127 </real>
128 <real xcos="state"> 128 <real xcos="state">
129 <parMap simName="X0" xcosIndex="0"/> 129 <map simName="X0" index="0,0"/>
130 </real> 130 </real>
131 </block> 131 </block>
132 <!-- Transport-Delay Block compatibility pattern --> 132 <!-- Transport-Delay Block compatibility pattern -->
@@ -135,12 +135,12 @@
135 <simple sim="FunctionType" xcos="4"></simple> 135 <simple sim="FunctionType" xcos="4"></simple>
136 <simple sim="BlockType" xcos="x"></simple> 136 <simple sim="BlockType" xcos="x"></simple>
137 <str2int sim="FixedBuffer" xcos="???" description=""> 137 <str2int sim="FixedBuffer" xcos="???" description="">
138 <parMap simVal="off" xcosVal="0"/> 138 <map simVal="off" xcosVal="0"/>
139 <parMap simVal="on" xcosVal="1"/> 139 <map simVal="on" xcosVal="1"/>
140 </str2int> 140 </str2int>
141 <real xcos="rpar"> 141 <real xcos="rpar">
142 <parMap simName="DelayTime" xcosIndex="0"/> 142 <map simName="DelayTime" index="0,0"/>
143 <parMap simName="InitialOutput" xcosIndex="1"/> 143 <map simName="InitialOutput" index="0,1"/>
144 </real> 144 </real>
145 <!-- 145 <!--
146 <integer xcos="ipar" count="1"> 146 <integer xcos="ipar" count="1">
@@ -154,12 +154,12 @@
154 <simple sim="FunctionType" xcos="4"></simple> 154 <simple sim="FunctionType" xcos="4"></simple>
155 <simple sim="BlockType" xcos="d"></simple> 155 <simple sim="BlockType" xcos="d"></simple>
156 <str2int sim="FixedBuffer" xcos="???" description=""> 156 <str2int sim="FixedBuffer" xcos="???" description="">
157 <parMap simVal="off" xcosVal="0"/> 157 <map simVal="off" xcosVal="0"/>
158 <parMap simVal="on" xcosVal="1"/> 158 <map simVal="on" xcosVal="1"/>
159 </str2int> 159 </str2int>
160 <real xcos="rpar"> 160 <real xcos="rpar">
161 <parMap simName="MaximumDelay" xcosIndex="0"/> 161 <map simName="MaximumDelay" index="0,0"/>
162 <parMap simName="InitialOutput" xcosIndex="1"/> 162 <map simName="InitialOutput" index="0,1"/>
163 </real> 163 </real>
164 <!-- 164 <!--
165 <integer xcos="ipar" count="1"> 165 <integer xcos="ipar" count="1">
@@ -179,8 +179,8 @@
179 "> 179 ">
180 <!-- TODO: ZeroCross for the second time, create general parameter --> 180 <!-- TODO: ZeroCross for the second time, create general parameter -->
181 <str2int sim="ZeroCross" xcos="zero_crossing" description="Enable zero-crossing detection"> 181 <str2int sim="ZeroCross" xcos="zero_crossing" description="Enable zero-crossing detection">
182 <parMap simVal="off" xcosVal="0"/> 182 <map simVal="off" xcosVal="0"/>
183 <parMap simVal="on" xcosVal="1"/> 183 <map simVal="on" xcosVal="1"/>
184 </str2int> 184 </str2int>
185 </block> 185 </block>
186 <!--Add Block Compatibility Pattern:--> 186 <!--Add Block Compatibility Pattern:-->
@@ -199,12 +199,12 @@
199 <simple sim="unavailable" xcos="Datatype" description="should be inherited from inputs"/> 199 <simple sim="unavailable" xcos="Datatype" description="should be inherited from inputs"/>
200 <!-- TODO: '++-' to [1 , 1 , -1], some special handling needed --> 200 <!-- TODO: '++-' to [1 , 1 , -1], some special handling needed -->
201 <str2int sim="Inputs" xcos="Number of inputs or sign vector" description="String with +/- to vec [1/-1]"> 201 <str2int sim="Inputs" xcos="Number of inputs or sign vector" description="String with +/- to vec [1/-1]">
202 <parMap simVal="+" xcosVal="1"/> 202 <map simVal="+" xcosVal="1"/>
203 <parMap simVal="-" xcosVal="-1"/> 203 <map simVal="-" xcosVal="-1"/>
204 </str2int> 204 </str2int>
205 <str2int sim=" SaturateOnIntegerOverflow" xcos="Do on Overflow" description=""> 205 <str2int sim=" SaturateOnIntegerOverflow" xcos="Do on Overflow" description="">
206 <parMap simVal="on" xcosVal="1"/> 206 <map simVal="on" xcosVal="1"/>
207 <parMap simVal="off" xcosVal="0"/> 207 <map simVal="off" xcosVal="0"/>
208 </str2int> 208 </str2int>
209 </block> 209 </block>
210 <!--Algebraic Constraint Compatibility Pattern:--> 210 <!--Algebraic Constraint Compatibility Pattern:-->
@@ -214,15 +214,15 @@
214 <!--Assignment Compatibility Pattern:--> 214 <!--Assignment Compatibility Pattern:-->
215 <block sim="Assignment" xcos="Assignment" description="no description"> 215 <block sim="Assignment" xcos="Assignment" description="no description">
216 <integer sim="NumberOfDimensions" xcos="Number of output dimensions" description=""> 216 <integer sim="NumberOfDimensions" xcos="Number of output dimensions" description="">
217 <parMap simVal="1" xcosVal="1"/> 217 <map simVal="1" xcosVal="1"/>
218 </integer> 218 </integer>
219 <str2int sim="IndexMode" xcos="Index Base" description=""> 219 <str2int sim="IndexMode" xcos="Index Base" description="">
220 <parMap simVal="Zero-based" xcosVal="0"/> 220 <map simVal="Zero-based" xcosVal="0"/>
221 <parMap simVal="One-based" xcosVal="1"/> 221 <map simVal="One-based" xcosVal="1"/>
222 </str2int> 222 </str2int>
223 <str2int sim="IndexOptionArray" xcos="Index Option" description=""> 223 <str2int sim="IndexOptionArray" xcos="Index Option" description="">
224 <parMap simVal="Zero-based" xcosVal="0"/> 224 <map simVal="Zero-based" xcosVal="0"/>
225 <parMap simVal="One-based" xcosVal="1"/> 225 <map simVal="One-based" xcosVal="1"/>
226 </str2int> 226 </str2int>
227 <!--TODO: IndexOptions: See IndexOptionArray parameter for more information. 227 <!--TODO: IndexOptions: See IndexOptionArray parameter for more information.
228 'Assign all' | {'Index vector (dialog)'} | 'Index vector (port)' | 'Starting index (dialog)' | 'Starting index (port)' 228 'Assign all' | {'Index vector (dialog)'} | 'Index vector (port)' | 'Starting index (dialog)' | 'Starting index (port)'
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/PatternElement.java b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/PatternElement.java
index 7afdd5a..796a266 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/PatternElement.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/PatternElement.java
@@ -137,7 +137,7 @@ public class PatternElement {
137 IntegerParameters integerParam = integerParamIter.next(); 137 IntegerParameters integerParam = integerParamIter.next();
138 if(integerParam.getSim().contentEquals(paramName)){ 138 if(integerParam.getSim().contentEquals(paramName)){
139 String returnValue = integerParam.getXcos() + ": "; 139 String returnValue = integerParam.getXcos() + ": ";
140 Iterator<IntegerValueMap> valueMapIter = integerParam.getParMap().iterator(); 140 Iterator<IntegerValueMap> valueMapIter = integerParam.getMap().iterator();
141 //while (valueMapIter.hasNext()){ 141 //while (valueMapIter.hasNext()){
142 returnValue += simulinkValue; 142 returnValue += simulinkValue;
143 //} 143 //}
@@ -163,7 +163,7 @@ public class PatternElement {
163 Str2IntParameters str2intParam = str2intParamIter.next(); 163 Str2IntParameters str2intParam = str2intParamIter.next();
164 if(str2intParam.getSim().contentEquals(paramName)){ 164 if(str2intParam.getSim().contentEquals(paramName)){
165 String returnValue = str2intParam.getXcos() + ": "; 165 String returnValue = str2intParam.getXcos() + ": ";
166 Iterator<Str2IntValueMap> valueMapIter = str2intParam.getParMap().iterator(); 166 Iterator<Str2IntValueMap> valueMapIter = str2intParam.getMap().iterator();
167 while (valueMapIter.hasNext()){ 167 while (valueMapIter.hasNext()){
168 Str2IntValueMap valueMap = valueMapIter.next(); 168 Str2IntValueMap valueMap = valueMapIter.next();
169 if(valueMap.getSimVal().contentEquals(simulinkValue)){ 169 if(valueMap.getSimVal().contentEquals(simulinkValue)){
@@ -339,14 +339,22 @@ public class PatternElement {
339 * Check if state 339 * Check if state
340 */ 340 */
341 if(realParam.getXcos().contentEquals("state")){ 341 if(realParam.getXcos().contentEquals("state")){
342 Iterator<RealValueMap> valueMapIter = realParam.getParMap().iterator(); 342 Iterator<RealValueMap> valueMapIter = realParam.getMap().iterator();
343 stateData=new double[1][10]; //FIXME: add count to realParameters 343 stateData=new double[1][10]; //FIXME: add count to realParameters
344 while (valueMapIter.hasNext()){ 344 while (valueMapIter.hasNext()){
345 RealValueMap valueMap = valueMapIter.next(); 345 RealValueMap valueMap = valueMapIter.next();
346 stateData[0][valueMap.getXcosIndex().intValue()] = Double.parseDouble(data.getParameter(valueMap.getSimName())); 346 /**
347 * Position parameter read by parser is string and looks like this "55,43"
348 * \\W is used to strip string from non-word characters
349 * \\s+ to split string around whitespaces
350 */
351 String[] position = valueMap.getIndex().replaceAll("\\W", " ").trim().split("\\s+");
352 int x = Integer.parseInt(position[0]);
353 int y = Integer.parseInt(position[1]);
354 stateData[x][y] = Double.parseDouble(data.getParameter(valueMap.getSimName()));
347 if(LOG.isTraceEnabled()){ 355 if(LOG.isTraceEnabled()){
348 LOG.trace(currentBlock.getXcos() + "state:"); 356 LOG.trace(currentBlock.getXcos() + "state:");
349 LOG.trace(stateData[0][valueMap.getXcosIndex().intValue()]); 357 LOG.trace(stateData[x][y]);
350 } 358 }
351 } 359 }
352 return new ScilabDouble(stateData); 360 return new ScilabDouble(stateData);
@@ -369,14 +377,23 @@ public class PatternElement {
369 * Check if state 377 * Check if state
370 */ 378 */
371 if(realParam.getXcos().contentEquals("dstate")){ 379 if(realParam.getXcos().contentEquals("dstate")){
372 Iterator<RealValueMap> valueMapIter = realParam.getParMap().iterator(); 380 Iterator<RealValueMap> valueMapIter = realParam.getMap().iterator();
373 stateData=new double[1][10]; //FIXME: add count to realParameters 381 stateData=new double[1][10]; //FIXME: add count to realParameters
374 while (valueMapIter.hasNext()){ 382 while (valueMapIter.hasNext()){
375 RealValueMap valueMap = valueMapIter.next(); 383 RealValueMap valueMap = valueMapIter.next();
376 stateData[0][valueMap.getXcosIndex().intValue()] = Double.parseDouble(data.getParameter(valueMap.getSimName())); 384 /**
385 * Position parameter read by parser is string and looks like this "55,43"
386 * \\W is used to strip string from non-word characters
387 * \\s+ to split string around whitespaces
388 */
389 String[] position = valueMap.getIndex().replaceAll("\\W", " ").trim().split("\\s+");
390 int x = Integer.parseInt(position[0]);
391 int y = Integer.parseInt(position[1]);
392
393 stateData[x][y] = Double.parseDouble(data.getParameter(valueMap.getSimName()));
377 if(LOG.isTraceEnabled()){ 394 if(LOG.isTraceEnabled()){
378 LOG.trace(currentBlock.getXcos() + "state:"); 395 LOG.trace(currentBlock.getXcos() + "state:");
379 LOG.trace(stateData[0][valueMap.getXcosIndex().intValue()]); 396 LOG.trace(stateData[x][y]);
380 } 397 }
381 } 398 }
382 return new ScilabDouble(stateData); 399 return new ScilabDouble(stateData);
@@ -424,7 +441,7 @@ public class PatternElement {
424 */ 441 */
425 if(str2intParam.getXcos().contentEquals("nzcross")){ 442 if(str2intParam.getXcos().contentEquals("nzcross")){
426 String nzcross = data.getParameter(str2intParam.getSim()); 443 String nzcross = data.getParameter(str2intParam.getSim());
427 Iterator<Str2IntValueMap> valueMapIter = str2intParam.getParMap().iterator(); 444 Iterator<Str2IntValueMap> valueMapIter = str2intParam.getMap().iterator();
428 while (valueMapIter.hasNext()){ 445 while (valueMapIter.hasNext()){
429 Str2IntValueMap valueMap = valueMapIter.next(); 446 Str2IntValueMap valueMap = valueMapIter.next();
430 if(valueMap.getSimVal().contentEquals(nzcross)){ 447 if(valueMap.getSimVal().contentEquals(nzcross)){
@@ -454,14 +471,23 @@ public class PatternElement {
454 * Check if rpar 471 * Check if rpar
455 */ 472 */
456 if(realParam.getXcos().contentEquals("rpar")){ 473 if(realParam.getXcos().contentEquals("rpar")){
457 Iterator<RealValueMap> valueMapIter = realParam.getParMap().iterator(); 474 Iterator<RealValueMap> valueMapIter = realParam.getMap().iterator();
458 rparData=new double[1][10]; //FIXME: add count to realParameters 475 rparData=new double[1][10]; //FIXME: add count to realParameters
459 while (valueMapIter.hasNext()){ 476 while (valueMapIter.hasNext()){
460 RealValueMap valueMap = valueMapIter.next(); 477 RealValueMap valueMap = valueMapIter.next();
461 rparData[0][valueMap.getXcosIndex().intValue()] = Double.parseDouble(data.getParameter(valueMap.getSimName())); 478 /**
479 * Position parameter read by parser is string and looks like this "55,43"
480 * \\W is used to strip string from non-word characters
481 * \\s+ to split string around whitespaces
482 */
483 String[] position = valueMap.getIndex().replaceAll("\\W", " ").trim().split("\\s+");
484 int x = Integer.parseInt(position[0]);
485 int y = Integer.parseInt(position[1]);
486
487 rparData[x][y] = Double.parseDouble(data.getParameter(valueMap.getSimName()));
462 if(LOG.isTraceEnabled()){ 488 if(LOG.isTraceEnabled()){
463 LOG.trace(currentBlock.getXcos() + "rpar:"); 489 LOG.trace(currentBlock.getXcos() + "rpar:");
464 LOG.trace(rparData[0][valueMap.getXcosIndex().intValue()]); 490 LOG.trace(rparData[x][y]);
465 } 491 }
466 } 492 }
467 return new ScilabDouble(rparData); 493 return new ScilabDouble(rparData);
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/Int2StrParameters.java b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/Int2StrParameters.java
index 35cc83e..59ae4f8 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/Int2StrParameters.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/Int2StrParameters.java
@@ -20,7 +20,7 @@ import javax.xml.bind.annotation.XmlType;
20 * &lt;complexContent> 20 * &lt;complexContent>
21 * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 21 * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
22 * &lt;sequence> 22 * &lt;sequence>
23 * &lt;element name="parMap" type="{}Int2StrValueMap" maxOccurs="unbounded"/> 23 * &lt;element name="map" type="{}Int2StrValueMap" maxOccurs="unbounded"/>
24 * &lt;/sequence> 24 * &lt;/sequence>
25 * &lt;attribute name="sim" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> 25 * &lt;attribute name="sim" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
26 * &lt;attribute name="xcos" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> 26 * &lt;attribute name="xcos" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
@@ -34,12 +34,12 @@ import javax.xml.bind.annotation.XmlType;
34 */ 34 */
35@XmlAccessorType(XmlAccessType.FIELD) 35@XmlAccessorType(XmlAccessType.FIELD)
36@XmlType(name = "Int2StrParameters", propOrder = { 36@XmlType(name = "Int2StrParameters", propOrder = {
37 "parMap" 37 "map"
38}) 38})
39public class Int2StrParameters { 39public class Int2StrParameters {
40 40
41 @XmlElement(required = true) 41 @XmlElement(required = true)
42 protected List<Int2StrValueMap> parMap; 42 protected List<Int2StrValueMap> map;
43 @XmlAttribute(required = true) 43 @XmlAttribute(required = true)
44 protected String sim; 44 protected String sim;
45 @XmlAttribute(required = true) 45 @XmlAttribute(required = true)
@@ -48,18 +48,18 @@ public class Int2StrParameters {
48 protected String description; 48 protected String description;
49 49
50 /** 50 /**
51 * Gets the value of the parMap property. 51 * Gets the value of the map property.
52 * 52 *
53 * <p> 53 * <p>
54 * This accessor method returns a reference to the live list, 54 * This accessor method returns a reference to the live list,
55 * not a snapshot. Therefore any modification you make to the 55 * not a snapshot. Therefore any modification you make to the
56 * returned list will be present inside the JAXB object. 56 * returned list will be present inside the JAXB object.
57 * This is why there is not a <CODE>set</CODE> method for the parMap property. 57 * This is why there is not a <CODE>set</CODE> method for the map property.
58 * 58 *
59 * <p> 59 * <p>
60 * For example, to add a new item, do as follows: 60 * For example, to add a new item, do as follows:
61 * <pre> 61 * <pre>
62 * getParMap().add(newItem); 62 * getMap().add(newItem);
63 * </pre> 63 * </pre>
64 * 64 *
65 * 65 *
@@ -69,11 +69,11 @@ public class Int2StrParameters {
69 * 69 *
70 * 70 *
71 */ 71 */
72 public List<Int2StrValueMap> getParMap() { 72 public List<Int2StrValueMap> getMap() {
73 if (parMap == null) { 73 if (map == null) {
74 parMap = new ArrayList<Int2StrValueMap>(); 74 map = new ArrayList<Int2StrValueMap>();
75 } 75 }
76 return this.parMap; 76 return this.map;
77 } 77 }
78 78
79 /** 79 /**
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/IntegerParameters.java b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/IntegerParameters.java
index b902464..ebf17b3 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/IntegerParameters.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/IntegerParameters.java
@@ -20,7 +20,7 @@ import javax.xml.bind.annotation.XmlType;
20 * &lt;complexContent> 20 * &lt;complexContent>
21 * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 21 * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
22 * &lt;sequence> 22 * &lt;sequence>
23 * &lt;element name="parMap" type="{}IntegerValueMap" maxOccurs="unbounded"/> 23 * &lt;element name="map" type="{}IntegerValueMap" maxOccurs="unbounded"/>
24 * &lt;/sequence> 24 * &lt;/sequence>
25 * &lt;attribute name="sim" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> 25 * &lt;attribute name="sim" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
26 * &lt;attribute name="xcos" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> 26 * &lt;attribute name="xcos" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
@@ -34,12 +34,12 @@ import javax.xml.bind.annotation.XmlType;
34 */ 34 */
35@XmlAccessorType(XmlAccessType.FIELD) 35@XmlAccessorType(XmlAccessType.FIELD)
36@XmlType(name = "IntegerParameters", propOrder = { 36@XmlType(name = "IntegerParameters", propOrder = {
37 "parMap" 37 "map"
38}) 38})
39public class IntegerParameters { 39public class IntegerParameters {
40 40
41 @XmlElement(required = true) 41 @XmlElement(required = true)
42 protected List<IntegerValueMap> parMap; 42 protected List<IntegerValueMap> map;
43 @XmlAttribute(required = true) 43 @XmlAttribute(required = true)
44 protected String sim; 44 protected String sim;
45 @XmlAttribute(required = true) 45 @XmlAttribute(required = true)
@@ -48,18 +48,18 @@ public class IntegerParameters {
48 protected String description; 48 protected String description;
49 49
50 /** 50 /**
51 * Gets the value of the parMap property. 51 * Gets the value of the map property.
52 * 52 *
53 * <p> 53 * <p>
54 * This accessor method returns a reference to the live list, 54 * This accessor method returns a reference to the live list,
55 * not a snapshot. Therefore any modification you make to the 55 * not a snapshot. Therefore any modification you make to the
56 * returned list will be present inside the JAXB object. 56 * returned list will be present inside the JAXB object.
57 * This is why there is not a <CODE>set</CODE> method for the parMap property. 57 * This is why there is not a <CODE>set</CODE> method for the map property.
58 * 58 *
59 * <p> 59 * <p>
60 * For example, to add a new item, do as follows: 60 * For example, to add a new item, do as follows:
61 * <pre> 61 * <pre>
62 * getParMap().add(newItem); 62 * getMap().add(newItem);
63 * </pre> 63 * </pre>
64 * 64 *
65 * 65 *
@@ -69,11 +69,11 @@ public class IntegerParameters {
69 * 69 *
70 * 70 *
71 */ 71 */
72 public List<IntegerValueMap> getParMap() { 72 public List<IntegerValueMap> getMap() {
73 if (parMap == null) { 73 if (map == null) {
74 parMap = new ArrayList<IntegerValueMap>(); 74 map = new ArrayList<IntegerValueMap>();
75 } 75 }
76 return this.parMap; 76 return this.map;
77 } 77 }
78 78
79 /** 79 /**
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/ObjectFactory.java b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/ObjectFactory.java
index 2efdb43..82855cc 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/ObjectFactory.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/ObjectFactory.java
@@ -34,11 +34,11 @@ public class ObjectFactory {
34 } 34 }
35 35
36 /** 36 /**
37 * Create an instance of {@link StringValueMap } 37 * Create an instance of {@link RealParameters }
38 * 38 *
39 */ 39 */
40 public StringValueMap createStringValueMap() { 40 public RealParameters createRealParameters() {
41 return new StringValueMap(); 41 return new RealParameters();
42 } 42 }
43 43
44 /** 44 /**
@@ -50,27 +50,27 @@ public class ObjectFactory {
50 } 50 }
51 51
52 /** 52 /**
53 * Create an instance of {@link IntegerParameters } 53 * Create an instance of {@link Block }
54 * 54 *
55 */ 55 */
56 public IntegerParameters createIntegerParameters() { 56 public Block createBlock() {
57 return new IntegerParameters(); 57 return new Block();
58 } 58 }
59 59
60 /** 60 /**
61 * Create an instance of {@link Block } 61 * Create an instance of {@link IntegerValueMap }
62 * 62 *
63 */ 63 */
64 public Block createBlock() { 64 public IntegerValueMap createIntegerValueMap() {
65 return new Block(); 65 return new IntegerValueMap();
66 } 66 }
67 67
68 /** 68 /**
69 * Create an instance of {@link Int2StrParameters } 69 * Create an instance of {@link GeneralParameters }
70 * 70 *
71 */ 71 */
72 public Int2StrParameters createInt2StrParameters() { 72 public GeneralParameters createGeneralParameters() {
73 return new Int2StrParameters(); 73 return new GeneralParameters();
74 } 74 }
75 75
76 /** 76 /**
@@ -82,43 +82,43 @@ public class ObjectFactory {
82 } 82 }
83 83
84 /** 84 /**
85 * Create an instance of {@link RealValueMap } 85 * Create an instance of {@link StringValueMap }
86 * 86 *
87 */ 87 */
88 public RealValueMap createRealValueMap() { 88 public StringValueMap createStringValueMap() {
89 return new RealValueMap(); 89 return new StringValueMap();
90 } 90 }
91 91
92 /** 92 /**
93 * Create an instance of {@link RealParameters } 93 * Create an instance of {@link Str2IntParameters }
94 * 94 *
95 */ 95 */
96 public RealParameters createRealParameters() { 96 public Str2IntParameters createStr2IntParameters() {
97 return new RealParameters(); 97 return new Str2IntParameters();
98 } 98 }
99 99
100 /** 100 /**
101 * Create an instance of {@link IntegerValueMap } 101 * Create an instance of {@link RealValueMap }
102 * 102 *
103 */ 103 */
104 public IntegerValueMap createIntegerValueMap() { 104 public RealValueMap createRealValueMap() {
105 return new IntegerValueMap(); 105 return new RealValueMap();
106 } 106 }
107 107
108 /** 108 /**
109 * Create an instance of {@link Int2StrValueMap } 109 * Create an instance of {@link SimpleParameter }
110 * 110 *
111 */ 111 */
112 public Int2StrValueMap createInt2StrValueMap() { 112 public SimpleParameter createSimpleParameter() {
113 return new Int2StrValueMap(); 113 return new SimpleParameter();
114 } 114 }
115 115
116 /** 116 /**
117 * Create an instance of {@link SimpleParameter } 117 * Create an instance of {@link Int2StrValueMap }
118 * 118 *
119 */ 119 */
120 public SimpleParameter createSimpleParameter() { 120 public Int2StrValueMap createInt2StrValueMap() {
121 return new SimpleParameter(); 121 return new Int2StrValueMap();
122 } 122 }
123 123
124 /** 124 /**
@@ -130,19 +130,19 @@ public class ObjectFactory {
130 } 130 }
131 131
132 /** 132 /**
133 * Create an instance of {@link Str2IntParameters } 133 * Create an instance of {@link Int2StrParameters }
134 * 134 *
135 */ 135 */
136 public Str2IntParameters createStr2IntParameters() { 136 public Int2StrParameters createInt2StrParameters() {
137 return new Str2IntParameters(); 137 return new Int2StrParameters();
138 } 138 }
139 139
140 /** 140 /**
141 * Create an instance of {@link GeneralParameters } 141 * Create an instance of {@link IntegerParameters }
142 * 142 *
143 */ 143 */
144 public GeneralParameters createGeneralParameters() { 144 public IntegerParameters createIntegerParameters() {
145 return new GeneralParameters(); 145 return new IntegerParameters();
146 } 146 }
147 147
148 /** 148 /**
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/RealParameters.java b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/RealParameters.java
index 2074110e..7ca1fb8 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/RealParameters.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/RealParameters.java
@@ -20,7 +20,7 @@ import javax.xml.bind.annotation.XmlType;
20 * &lt;complexContent> 20 * &lt;complexContent>
21 * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 21 * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
22 * &lt;sequence> 22 * &lt;sequence>
23 * &lt;element name="parMap" type="{}RealValueMap" maxOccurs="unbounded"/> 23 * &lt;element name="map" type="{}RealValueMap" maxOccurs="unbounded"/>
24 * &lt;/sequence> 24 * &lt;/sequence>
25 * &lt;attribute name="sim" type="{http://www.w3.org/2001/XMLSchema}string" /> 25 * &lt;attribute name="sim" type="{http://www.w3.org/2001/XMLSchema}string" />
26 * &lt;attribute name="xcos" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> 26 * &lt;attribute name="xcos" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
@@ -34,12 +34,12 @@ import javax.xml.bind.annotation.XmlType;
34 */ 34 */
35@XmlAccessorType(XmlAccessType.FIELD) 35@XmlAccessorType(XmlAccessType.FIELD)
36@XmlType(name = "RealParameters", propOrder = { 36@XmlType(name = "RealParameters", propOrder = {
37 "parMap" 37 "map"
38}) 38})
39public class RealParameters { 39public class RealParameters {
40 40
41 @XmlElement(required = true) 41 @XmlElement(required = true)
42 protected List<RealValueMap> parMap; 42 protected List<RealValueMap> map;
43 @XmlAttribute 43 @XmlAttribute
44 protected String sim; 44 protected String sim;
45 @XmlAttribute(required = true) 45 @XmlAttribute(required = true)
@@ -48,18 +48,18 @@ public class RealParameters {
48 protected String description; 48 protected String description;
49 49
50 /** 50 /**
51 * Gets the value of the parMap property. 51 * Gets the value of the map property.
52 * 52 *
53 * <p> 53 * <p>
54 * This accessor method returns a reference to the live list, 54 * This accessor method returns a reference to the live list,
55 * not a snapshot. Therefore any modification you make to the 55 * not a snapshot. Therefore any modification you make to the
56 * returned list will be present inside the JAXB object. 56 * returned list will be present inside the JAXB object.
57 * This is why there is not a <CODE>set</CODE> method for the parMap property. 57 * This is why there is not a <CODE>set</CODE> method for the map property.
58 * 58 *
59 * <p> 59 * <p>
60 * For example, to add a new item, do as follows: 60 * For example, to add a new item, do as follows:
61 * <pre> 61 * <pre>
62 * getParMap().add(newItem); 62 * getMap().add(newItem);
63 * </pre> 63 * </pre>
64 * 64 *
65 * 65 *
@@ -69,11 +69,11 @@ public class RealParameters {
69 * 69 *
70 * 70 *
71 */ 71 */
72 public List<RealValueMap> getParMap() { 72 public List<RealValueMap> getMap() {
73 if (parMap == null) { 73 if (map == null) {
74 parMap = new ArrayList<RealValueMap>(); 74 map = new ArrayList<RealValueMap>();
75 } 75 }
76 return this.parMap; 76 return this.map;
77 } 77 }
78 78
79 /** 79 /**
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/RealValueMap.java b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/RealValueMap.java
index f356786..f68d28b 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/RealValueMap.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/RealValueMap.java
@@ -1,7 +1,6 @@
1 1
2package org.scilab.modules.xcos.simulink.patterns; 2package org.scilab.modules.xcos.simulink.patterns;
3 3
4import java.math.BigInteger;
5import javax.xml.bind.annotation.XmlAccessType; 4import javax.xml.bind.annotation.XmlAccessType;
6import javax.xml.bind.annotation.XmlAccessorType; 5import javax.xml.bind.annotation.XmlAccessorType;
7import javax.xml.bind.annotation.XmlAttribute; 6import javax.xml.bind.annotation.XmlAttribute;
@@ -18,7 +17,7 @@ import javax.xml.bind.annotation.XmlType;
18 * &lt;complexContent> 17 * &lt;complexContent>
19 * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 18 * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
20 * &lt;attribute name="simName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> 19 * &lt;attribute name="simName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
21 * &lt;attribute name="xcosIndex" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" /> 20 * &lt;attribute name="index" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
22 * &lt;/restriction> 21 * &lt;/restriction>
23 * &lt;/complexContent> 22 * &lt;/complexContent>
24 * &lt;/complexType> 23 * &lt;/complexType>
@@ -33,7 +32,7 @@ public class RealValueMap {
33 @XmlAttribute(required = true) 32 @XmlAttribute(required = true)
34 protected String simName; 33 protected String simName;
35 @XmlAttribute(required = true) 34 @XmlAttribute(required = true)
36 protected BigInteger xcosIndex; 35 protected String index;
37 36
38 /** 37 /**
39 * Gets the value of the simName property. 38 * Gets the value of the simName property.
@@ -60,27 +59,27 @@ public class RealValueMap {
60 } 59 }
61 60
62 /** 61 /**
63 * Gets the value of the xcosIndex property. 62 * Gets the value of the index property.
64 * 63 *
65 * @return 64 * @return
66 * possible object is 65 * possible object is
67 * {@link BigInteger } 66 * {@link String }
68 * 67 *
69 */ 68 */
70 public BigInteger getXcosIndex() { 69 public String getIndex() {
71 return xcosIndex; 70 return index;
72 } 71 }
73 72
74 /** 73 /**
75 * Sets the value of the xcosIndex property. 74 * Sets the value of the index property.
76 * 75 *
77 * @param value 76 * @param value
78 * allowed object is 77 * allowed object is
79 * {@link BigInteger } 78 * {@link String }
80 * 79 *
81 */ 80 */
82 public void setXcosIndex(BigInteger value) { 81 public void setIndex(String value) {
83 this.xcosIndex = value; 82 this.index = value;
84 } 83 }
85 84
86} 85}
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/Str2IntParameters.java b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/Str2IntParameters.java
index 5f5413b..6bc51c9 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/Str2IntParameters.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/Str2IntParameters.java
@@ -20,7 +20,7 @@ import javax.xml.bind.annotation.XmlType;
20 * &lt;complexContent> 20 * &lt;complexContent>
21 * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 21 * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
22 * &lt;sequence> 22 * &lt;sequence>
23 * &lt;element name="parMap" type="{}Str2IntValueMap" maxOccurs="unbounded"/> 23 * &lt;element name="map" type="{}Str2IntValueMap" maxOccurs="unbounded"/>
24 * &lt;/sequence> 24 * &lt;/sequence>
25 * &lt;attribute name="sim" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> 25 * &lt;attribute name="sim" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
26 * &lt;attribute name="xcos" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> 26 * &lt;attribute name="xcos" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
@@ -34,12 +34,12 @@ import javax.xml.bind.annotation.XmlType;
34 */ 34 */
35@XmlAccessorType(XmlAccessType.FIELD) 35@XmlAccessorType(XmlAccessType.FIELD)
36@XmlType(name = "Str2IntParameters", propOrder = { 36@XmlType(name = "Str2IntParameters", propOrder = {
37 "parMap" 37 "map"
38}) 38})
39public class Str2IntParameters { 39public class Str2IntParameters {
40 40
41 @XmlElement(required = true) 41 @XmlElement(required = true)
42 protected List<Str2IntValueMap> parMap; 42 protected List<Str2IntValueMap> map;
43 @XmlAttribute(required = true) 43 @XmlAttribute(required = true)
44 protected String sim; 44 protected String sim;
45 @XmlAttribute(required = true) 45 @XmlAttribute(required = true)
@@ -48,18 +48,18 @@ public class Str2IntParameters {
48 protected String description; 48 protected String description;
49 49
50 /** 50 /**
51 * Gets the value of the parMap property. 51 * Gets the value of the map property.
52 * 52 *
53 * <p> 53 * <p>
54 * This accessor method returns a reference to the live list, 54 * This accessor method returns a reference to the live list,
55 * not a snapshot. Therefore any modification you make to the 55 * not a snapshot. Therefore any modification you make to the
56 * returned list will be present inside the JAXB object. 56 * returned list will be present inside the JAXB object.
57 * This is why there is not a <CODE>set</CODE> method for the parMap property. 57 * This is why there is not a <CODE>set</CODE> method for the map property.
58 * 58 *
59 * <p> 59 * <p>
60 * For example, to add a new item, do as follows: 60 * For example, to add a new item, do as follows:
61 * <pre> 61 * <pre>
62 * getParMap().add(newItem); 62 * getMap().add(newItem);
63 * </pre> 63 * </pre>
64 * 64 *
65 * 65 *
@@ -69,11 +69,11 @@ public class Str2IntParameters {
69 * 69 *
70 * 70 *
71 */ 71 */
72 public List<Str2IntValueMap> getParMap() { 72 public List<Str2IntValueMap> getMap() {
73 if (parMap == null) { 73 if (map == null) {
74 parMap = new ArrayList<Str2IntValueMap>(); 74 map = new ArrayList<Str2IntValueMap>();
75 } 75 }
76 return this.parMap; 76 return this.map;
77 } 77 }
78 78
79 /** 79 /**
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/StringParameters.java b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/StringParameters.java
index 2f89a6a..bc90748 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/StringParameters.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/StringParameters.java
@@ -20,7 +20,7 @@ import javax.xml.bind.annotation.XmlType;
20 * &lt;complexContent> 20 * &lt;complexContent>
21 * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 21 * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
22 * &lt;sequence> 22 * &lt;sequence>
23 * &lt;element name="parMap" type="{}StringValueMap" maxOccurs="unbounded"/> 23 * &lt;element name="map" type="{}StringValueMap" maxOccurs="unbounded"/>
24 * &lt;/sequence> 24 * &lt;/sequence>
25 * &lt;attribute name="sim" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> 25 * &lt;attribute name="sim" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
26 * &lt;attribute name="xcos" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> 26 * &lt;attribute name="xcos" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
@@ -34,12 +34,12 @@ import javax.xml.bind.annotation.XmlType;
34 */ 34 */
35@XmlAccessorType(XmlAccessType.FIELD) 35@XmlAccessorType(XmlAccessType.FIELD)
36@XmlType(name = "StringParameters", propOrder = { 36@XmlType(name = "StringParameters", propOrder = {
37 "parMap" 37 "map"
38}) 38})
39public class StringParameters { 39public class StringParameters {
40 40
41 @XmlElement(required = true) 41 @XmlElement(required = true)
42 protected List<StringValueMap> parMap; 42 protected List<StringValueMap> map;
43 @XmlAttribute(required = true) 43 @XmlAttribute(required = true)
44 protected String sim; 44 protected String sim;
45 @XmlAttribute(required = true) 45 @XmlAttribute(required = true)
@@ -48,18 +48,18 @@ public class StringParameters {
48 protected String description; 48 protected String description;
49 49
50 /** 50 /**
51 * Gets the value of the parMap property. 51 * Gets the value of the map property.
52 * 52 *
53 * <p> 53 * <p>
54 * This accessor method returns a reference to the live list, 54 * This accessor method returns a reference to the live list,
55 * not a snapshot. Therefore any modification you make to the 55 * not a snapshot. Therefore any modification you make to the
56 * returned list will be present inside the JAXB object. 56 * returned list will be present inside the JAXB object.
57 * This is why there is not a <CODE>set</CODE> method for the parMap property. 57 * This is why there is not a <CODE>set</CODE> method for the map property.
58 * 58 *
59 * <p> 59 * <p>
60 * For example, to add a new item, do as follows: 60 * For example, to add a new item, do as follows:
61 * <pre> 61 * <pre>
62 * getParMap().add(newItem); 62 * getMap().add(newItem);
63 * </pre> 63 * </pre>
64 * 64 *
65 * 65 *
@@ -69,11 +69,11 @@ public class StringParameters {
69 * 69 *
70 * 70 *
71 */ 71 */
72 public List<StringValueMap> getParMap() { 72 public List<StringValueMap> getMap() {
73 if (parMap == null) { 73 if (map == null) {
74 parMap = new ArrayList<StringValueMap>(); 74 map = new ArrayList<StringValueMap>();
75 } 75 }
76 return this.parMap; 76 return this.map;
77 } 77 }
78 78
79 /** 79 /**