summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJerzy ZAGORSKI <xendoo@gmail.com>2010-06-20 17:23:58 +0200
committerJerzy ZAGORSKI <xendoo@gmail.com>2010-06-22 12:19:48 +0200
commit4fd60f8ee65605d746eee20efee47ff2a4b4db6e (patch)
tree5cbf4a63175530798bacf00b5c49110af8dc066b
parent7416c2e9f434add85e4a334db5a04d66d5738c20 (diff)
downloadscilab-4fd60f8ee65605d746eee20efee47ff2a4b4db6e.zip
scilab-4fd60f8ee65605d746eee20efee47ff2a4b4db6e.tar.gz
added RealParameters to compatibility pattern schema
Change-Id: Idfc6d79875201ff9f9e321d976557dd8e4047598
-rw-r--r--scilab/modules/xcos/etc/SimulinkImportConfiguration.xsd15
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/Block.java34
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/ObjectFactory.java82
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/RealParameters.java151
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/RealValueMap.java86
5 files changed, 334 insertions, 34 deletions
diff --git a/scilab/modules/xcos/etc/SimulinkImportConfiguration.xsd b/scilab/modules/xcos/etc/SimulinkImportConfiguration.xsd
index 847a015..bd416a2 100644
--- a/scilab/modules/xcos/etc/SimulinkImportConfiguration.xsd
+++ b/scilab/modules/xcos/etc/SimulinkImportConfiguration.xsd
@@ -29,6 +29,7 @@
29 <xsd:element name="simple" type="SimpleParameter" minOccurs="0" maxOccurs="unbounded"/> 29 <xsd:element name="simple" type="SimpleParameter" minOccurs="0" maxOccurs="unbounded"/>
30 <xsd:element name="str2int" type="Str2IntParameters" minOccurs="0" maxOccurs="unbounded"/> 30 <xsd:element name="str2int" type="Str2IntParameters" minOccurs="0" maxOccurs="unbounded"/>
31 <xsd:element name="int2str" type="Int2StrParameters" minOccurs="0" maxOccurs="unbounded"/> 31 <xsd:element name="int2str" type="Int2StrParameters" minOccurs="0" maxOccurs="unbounded"/>
32 <xsd:element name="real" type="RealParameters" minOccurs="0" maxOccurs="unbounded"/>
32 </xsd:sequence> 33 </xsd:sequence>
33 <xsd:attribute name="sim" type="xsd:string" use="required"/> 34 <xsd:attribute name="sim" type="xsd:string" use="required"/>
34 <xsd:attribute name="xcos" type="xsd:string" use="required"/> 35 <xsd:attribute name="xcos" type="xsd:string" use="required"/>
@@ -95,5 +96,19 @@
95 <xsd:attribute name="simVal" type="xsd:integer" use="required"/> 96 <xsd:attribute name="simVal" type="xsd:integer" use="required"/>
96 <xsd:attribute name="xcosVal" type="xsd:string" use="required"/> 97 <xsd:attribute name="xcosVal" type="xsd:string" use="required"/>
97 </xsd:complexType> 98 </xsd:complexType>
99
100 <xsd:complexType name="RealParameters">
101 <xsd:sequence>
102 <xsd:element name="parMap" type="RealValueMap" minOccurs="1" maxOccurs="unbounded"/>
103 </xsd:sequence>
104 <xsd:attribute name="sim" type="xsd:string" use="optional"/>
105 <xsd:attribute name="xcos" type="xsd:string" use="required"/>
106 <xsd:attribute name="description" type="xsd:string" use="optional"/>
107 </xsd:complexType>
108
109 <xsd:complexType name="RealValueMap">
110 <xsd:attribute name="simName" type="xsd:string" use="required"/>
111 <xsd:attribute name="xcosIndex" type="xsd:integer" use="required"/>
112 </xsd:complexType>
98 <!--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 -->
99</xsd:schema> 114</xsd:schema>
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/Block.java b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/Block.java
index 99e8c68..d912036 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/Block.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/Block.java
@@ -25,6 +25,7 @@ import javax.xml.bind.annotation.XmlType;
25 * &lt;element name="simple" type="{}SimpleParameter" maxOccurs="unbounded" minOccurs="0"/> 25 * &lt;element name="simple" type="{}SimpleParameter" maxOccurs="unbounded" minOccurs="0"/>
26 * &lt;element name="str2int" type="{}Str2IntParameters" maxOccurs="unbounded" minOccurs="0"/> 26 * &lt;element name="str2int" type="{}Str2IntParameters" maxOccurs="unbounded" minOccurs="0"/>
27 * &lt;element name="int2str" type="{}Int2StrParameters" maxOccurs="unbounded" minOccurs="0"/> 27 * &lt;element name="int2str" type="{}Int2StrParameters" maxOccurs="unbounded" minOccurs="0"/>
28 * &lt;element name="real" type="{}RealParameters" maxOccurs="unbounded" minOccurs="0"/>
28 * &lt;/sequence> 29 * &lt;/sequence>
29 * &lt;attribute name="sim" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> 30 * &lt;attribute name="sim" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
30 * &lt;attribute name="xcos" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> 31 * &lt;attribute name="xcos" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
@@ -42,7 +43,8 @@ import javax.xml.bind.annotation.XmlType;
42 "integer", 43 "integer",
43 "simple", 44 "simple",
44 "str2Int", 45 "str2Int",
45 "int2Str" 46 "int2Str",
47 "real"
46}) 48})
47public class Block { 49public class Block {
48 50
@@ -53,6 +55,7 @@ public class Block {
53 protected List<Str2IntParameters> str2Int; 55 protected List<Str2IntParameters> str2Int;
54 @XmlElement(name = "int2str") 56 @XmlElement(name = "int2str")
55 protected List<Int2StrParameters> int2Str; 57 protected List<Int2StrParameters> int2Str;
58 protected List<RealParameters> real;
56 @XmlAttribute(required = true) 59 @XmlAttribute(required = true)
57 protected String sim; 60 protected String sim;
58 @XmlAttribute(required = true) 61 @XmlAttribute(required = true)
@@ -206,6 +209,35 @@ public class Block {
206 } 209 }
207 210
208 /** 211 /**
212 * Gets the value of the real property.
213 *
214 * <p>
215 * This accessor method returns a reference to the live list,
216 * not a snapshot. Therefore any modification you make to the
217 * returned list will be present inside the JAXB object.
218 * This is why there is not a <CODE>set</CODE> method for the real property.
219 *
220 * <p>
221 * For example, to add a new item, do as follows:
222 * <pre>
223 * getReal().add(newItem);
224 * </pre>
225 *
226 *
227 * <p>
228 * Objects of the following type(s) are allowed in the list
229 * {@link RealParameters }
230 *
231 *
232 */
233 public List<RealParameters> getReal() {
234 if (real == null) {
235 real = new ArrayList<RealParameters>();
236 }
237 return this.real;
238 }
239
240 /**
209 * Gets the value of the sim property. 241 * Gets the value of the sim property.
210 * 242 *
211 * @return 243 * @return
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 17869ca..2efdb43 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,43 +34,43 @@ public class ObjectFactory {
34 } 34 }
35 35
36 /** 36 /**
37 * Create an instance of {@link Int2StrValueMap } 37 * Create an instance of {@link StringValueMap }
38 * 38 *
39 */ 39 */
40 public Int2StrValueMap createInt2StrValueMap() { 40 public StringValueMap createStringValueMap() {
41 return new Int2StrValueMap(); 41 return new StringValueMap();
42 } 42 }
43 43
44 /** 44 /**
45 * Create an instance of {@link Str2IntParameters } 45 * Create an instance of {@link Str2IntValueMap }
46 * 46 *
47 */ 47 */
48 public Str2IntParameters createStr2IntParameters() { 48 public Str2IntValueMap createStr2IntValueMap() {
49 return new Str2IntParameters(); 49 return new Str2IntValueMap();
50 } 50 }
51 51
52 /** 52 /**
53 * Create an instance of {@link Int2StrParameters } 53 * Create an instance of {@link IntegerParameters }
54 * 54 *
55 */ 55 */
56 public Int2StrParameters createInt2StrParameters() { 56 public IntegerParameters createIntegerParameters() {
57 return new Int2StrParameters(); 57 return new IntegerParameters();
58 } 58 }
59 59
60 /** 60 /**
61 * Create an instance of {@link GeneralParameters } 61 * Create an instance of {@link Block }
62 * 62 *
63 */ 63 */
64 public GeneralParameters createGeneralParameters() { 64 public Block createBlock() {
65 return new GeneralParameters(); 65 return new Block();
66 } 66 }
67 67
68 /** 68 /**
69 * Create an instance of {@link StringValueMap } 69 * Create an instance of {@link Int2StrParameters }
70 * 70 *
71 */ 71 */
72 public StringValueMap createStringValueMap() { 72 public Int2StrParameters createInt2StrParameters() {
73 return new StringValueMap(); 73 return new Int2StrParameters();
74 } 74 }
75 75
76 /** 76 /**
@@ -82,51 +82,67 @@ public class ObjectFactory {
82 } 82 }
83 83
84 /** 84 /**
85 * Create an instance of {@link SimpleParameter } 85 * Create an instance of {@link RealValueMap }
86 * 86 *
87 */ 87 */
88 public SimpleParameter createSimpleParameter() { 88 public RealValueMap createRealValueMap() {
89 return new SimpleParameter(); 89 return new RealValueMap();
90 } 90 }
91 91
92 /** 92 /**
93 * Create an instance of {@link StringParameters } 93 * Create an instance of {@link RealParameters }
94 * 94 *
95 */ 95 */
96 public StringParameters createStringParameters() { 96 public RealParameters createRealParameters() {
97 return new StringParameters(); 97 return new RealParameters();
98 } 98 }
99 99
100 /** 100 /**
101 * Create an instance of {@link IntegerParameters } 101 * Create an instance of {@link IntegerValueMap }
102 * 102 *
103 */ 103 */
104 public IntegerParameters createIntegerParameters() { 104 public IntegerValueMap createIntegerValueMap() {
105 return new IntegerParameters(); 105 return new IntegerValueMap();
106 } 106 }
107 107
108 /** 108 /**
109 * Create an instance of {@link Str2IntValueMap } 109 * Create an instance of {@link Int2StrValueMap }
110 * 110 *
111 */ 111 */
112 public Str2IntValueMap createStr2IntValueMap() { 112 public Int2StrValueMap createInt2StrValueMap() {
113 return new Str2IntValueMap(); 113 return new Int2StrValueMap();
114 } 114 }
115 115
116 /** 116 /**
117 * Create an instance of {@link Block } 117 * Create an instance of {@link SimpleParameter }
118 * 118 *
119 */ 119 */
120 public Block createBlock() { 120 public SimpleParameter createSimpleParameter() {
121 return new Block(); 121 return new SimpleParameter();
122 } 122 }
123 123
124 /** 124 /**
125 * Create an instance of {@link IntegerValueMap } 125 * Create an instance of {@link StringParameters }
126 * 126 *
127 */ 127 */
128 public IntegerValueMap createIntegerValueMap() { 128 public StringParameters createStringParameters() {
129 return new IntegerValueMap(); 129 return new StringParameters();
130 }
131
132 /**
133 * Create an instance of {@link Str2IntParameters }
134 *
135 */
136 public Str2IntParameters createStr2IntParameters() {
137 return new Str2IntParameters();
138 }
139
140 /**
141 * Create an instance of {@link GeneralParameters }
142 *
143 */
144 public GeneralParameters createGeneralParameters() {
145 return new GeneralParameters();
130 } 146 }
131 147
132 /** 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
new file mode 100644
index 0000000..2074110e
--- /dev/null
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/RealParameters.java
@@ -0,0 +1,151 @@
1
2package org.scilab.modules.xcos.simulink.patterns;
3
4import java.util.ArrayList;
5import java.util.List;
6import javax.xml.bind.annotation.XmlAccessType;
7import javax.xml.bind.annotation.XmlAccessorType;
8import javax.xml.bind.annotation.XmlAttribute;
9import javax.xml.bind.annotation.XmlElement;
10import javax.xml.bind.annotation.XmlType;
11
12
13/**
14 * <p>Java class for RealParameters complex type.
15 *
16 * <p>The following schema fragment specifies the expected content contained within this class.
17 *
18 * <pre>
19 * &lt;complexType name="RealParameters">
20 * &lt;complexContent>
21 * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
22 * &lt;sequence>
23 * &lt;element name="parMap" type="{}RealValueMap" maxOccurs="unbounded"/>
24 * &lt;/sequence>
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" />
27 * &lt;attribute name="description" type="{http://www.w3.org/2001/XMLSchema}string" />
28 * &lt;/restriction>
29 * &lt;/complexContent>
30 * &lt;/complexType>
31 * </pre>
32 *
33 *
34 */
35@XmlAccessorType(XmlAccessType.FIELD)
36@XmlType(name = "RealParameters", propOrder = {
37 "parMap"
38})
39public class RealParameters {
40
41 @XmlElement(required = true)
42 protected List<RealValueMap> parMap;
43 @XmlAttribute
44 protected String sim;
45 @XmlAttribute(required = true)
46 protected String xcos;
47 @XmlAttribute
48 protected String description;
49
50 /**
51 * Gets the value of the parMap property.
52 *
53 * <p>
54 * This accessor method returns a reference to the live list,
55 * not a snapshot. Therefore any modification you make to the
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.
58 *
59 * <p>
60 * For example, to add a new item, do as follows:
61 * <pre>
62 * getParMap().add(newItem);
63 * </pre>
64 *
65 *
66 * <p>
67 * Objects of the following type(s) are allowed in the list
68 * {@link RealValueMap }
69 *
70 *
71 */
72 public List<RealValueMap> getParMap() {
73 if (parMap == null) {
74 parMap = new ArrayList<RealValueMap>();
75 }
76 return this.parMap;
77 }
78
79 /**
80 * Gets the value of the sim property.
81 *
82 * @return
83 * possible object is
84 * {@link String }
85 *
86 */
87 public String getSim() {
88 return sim;
89 }
90
91 /**
92 * Sets the value of the sim property.
93 *
94 * @param value
95 * allowed object is
96 * {@link String }
97 *
98 */
99 public void setSim(String value) {
100 this.sim = value;
101 }
102
103 /**
104 * Gets the value of the xcos property.
105 *
106 * @return
107 * possible object is
108 * {@link String }
109 *
110 */
111 public String getXcos() {
112 return xcos;
113 }
114
115 /**
116 * Sets the value of the xcos property.
117 *
118 * @param value
119 * allowed object is
120 * {@link String }
121 *
122 */
123 public void setXcos(String value) {
124 this.xcos = value;
125 }
126
127 /**
128 * Gets the value of the description property.
129 *
130 * @return
131 * possible object is
132 * {@link String }
133 *
134 */
135 public String getDescription() {
136 return description;
137 }
138
139 /**
140 * Sets the value of the description property.
141 *
142 * @param value
143 * allowed object is
144 * {@link String }
145 *
146 */
147 public void setDescription(String value) {
148 this.description = value;
149 }
150
151}
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
new file mode 100644
index 0000000..f356786
--- /dev/null
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/simulink/patterns/RealValueMap.java
@@ -0,0 +1,86 @@
1
2package org.scilab.modules.xcos.simulink.patterns;
3
4import java.math.BigInteger;
5import javax.xml.bind.annotation.XmlAccessType;
6import javax.xml.bind.annotation.XmlAccessorType;
7import javax.xml.bind.annotation.XmlAttribute;
8import javax.xml.bind.annotation.XmlType;
9
10
11/**
12 * <p>Java class for RealValueMap complex type.
13 *
14 * <p>The following schema fragment specifies the expected content contained within this class.
15 *
16 * <pre>
17 * &lt;complexType name="RealValueMap">
18 * &lt;complexContent>
19 * &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" />
21 * &lt;attribute name="xcosIndex" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
22 * &lt;/restriction>
23 * &lt;/complexContent>
24 * &lt;/complexType>
25 * </pre>
26 *
27 *
28 */
29@XmlAccessorType(XmlAccessType.FIELD)
30@XmlType(name = "RealValueMap")
31public class RealValueMap {
32
33 @XmlAttribute(required = true)
34 protected String simName;
35 @XmlAttribute(required = true)
36 protected BigInteger xcosIndex;
37
38 /**
39 * Gets the value of the simName property.
40 *
41 * @return
42 * possible object is
43 * {@link String }
44 *
45 */
46 public String getSimName() {
47 return simName;
48 }
49
50 /**
51 * Sets the value of the simName property.
52 *
53 * @param value
54 * allowed object is
55 * {@link String }
56 *
57 */
58 public void setSimName(String value) {
59 this.simName = value;
60 }
61
62 /**
63 * Gets the value of the xcosIndex property.
64 *
65 * @return
66 * possible object is
67 * {@link BigInteger }
68 *
69 */
70 public BigInteger getXcosIndex() {
71 return xcosIndex;
72 }
73
74 /**
75 * Sets the value of the xcosIndex property.
76 *
77 * @param value
78 * allowed object is
79 * {@link BigInteger }
80 *
81 */
82 public void setXcosIndex(BigInteger value) {
83 this.xcosIndex = value;
84 }
85
86}