Author: objectiser
Date: 2011-01-30 17:06:48 -0500 (Sun, 30 Jan 2011)
New Revision: 633
Added:
branches/experimental/2.0.x/bundles/org.savara.scenario/src/test/resources/
branches/experimental/2.0.x/bundles/org.savara.scenario/src/test/resources/scenarios/
branches/experimental/2.0.x/bundles/org.savara.scenario/src/test/resources/scenarios/PurchasingGood.scn
Modified:
branches/experimental/2.0.x/bundles/org.savara.protocol/src/main/java/org/savara/protocol/repository/ProtocolRepository.java
branches/experimental/2.0.x/bundles/org.savara.scenario/schema/Scenario.xsd
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Event.java
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Group.java
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Import.java
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Link.java
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/MessageEvent.java
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/ObjectFactory.java
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/ReceiveEvent.java
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Role.java
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Scenario.java
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/SendEvent.java
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/TimeElapsedEvent.java
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/package-info.java
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/commands/DeleteComponentCommand.java
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/commands/DeleteLinkCommand.java
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/editor/SimulateScenarioAction.java
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/figures/ImportFigure.java
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/figures/TimeElapsedEventFigure.java
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/model/ModelSupport.java
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/parts/ScenarioEditPart.java
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/tools/CreateLinksTool.java
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/view/ViewSupport.java
Log:
Updated scenario schema and added a very basic XML example. Need to handle multiple
message parameters - currently the schema only supports a single type and value field.
This will however complicate the editor.
Modified:
branches/experimental/2.0.x/bundles/org.savara.protocol/src/main/java/org/savara/protocol/repository/ProtocolRepository.java
===================================================================
---
branches/experimental/2.0.x/bundles/org.savara.protocol/src/main/java/org/savara/protocol/repository/ProtocolRepository.java 2011-01-30
20:52:55 UTC (rev 632)
+++
branches/experimental/2.0.x/bundles/org.savara.protocol/src/main/java/org/savara/protocol/repository/ProtocolRepository.java 2011-01-30
22:06:48 UTC (rev 633)
@@ -41,7 +41,7 @@
/**
* This method determines which protocols, identified by their protocol ids,
- * would be interested in an endpoint address, whether or not the message is inbound,
+ * would be interested in an endpoint address/type, whether or not the message is
inbound,
* and finally the message details itself.
*
* @param message The message
Modified: branches/experimental/2.0.x/bundles/org.savara.scenario/schema/Scenario.xsd
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.scenario/schema/Scenario.xsd 2011-01-30
20:52:55 UTC (rev 632)
+++ branches/experimental/2.0.x/bundles/org.savara.scenario/schema/Scenario.xsd 2011-01-30
22:06:48 UTC (rev 633)
@@ -2,20 +2,20 @@
<schema
xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.savara.org/scenario"
xmlns:tns="http://www.savara.org/scenario"
elementFormDefault="qualified">
<complexType name="Role">
- <attribute name="ID" type="ID"></attribute>
+ <attribute name="id" type="ID"></attribute>
<attribute name="name" type="string"></attribute>
</complexType>
<complexType name="Scenario">
<sequence>
- <element name="roles" type="tns:Role"
maxOccurs="unbounded"
- minOccurs="1">
+ <element name="role" type="tns:Role"
maxOccurs="unbounded"
+ minOccurs="0">
</element>
- <element name="events" type="tns:Event"
- maxOccurs="unbounded" minOccurs="1">
+ <element name="event" type="tns:Event"
+ maxOccurs="unbounded" minOccurs="0">
</element>
- <element name="links" type="tns:Link"
maxOccurs="unbounded"
- minOccurs="1">
+ <element name="link" type="tns:Link"
maxOccurs="unbounded"
+ minOccurs="0">
</element>
</sequence>
<attribute name="name" type="string"></attribute>
@@ -23,8 +23,8 @@
<attribute name="author" type="string"></attribute>
</complexType>
- <complexType name="Event">
- <attribute name="ID" type="ID"></attribute>
+ <complexType name="Event" abstract="true">
+ <attribute name="id" type="ID"></attribute>
<attribute name="role" type="IDREF"></attribute>
<attribute name="errorExpected"
type="boolean"></attribute>
</complexType>
@@ -34,7 +34,7 @@
<attribute name="target" type="IDREF"></attribute>
</complexType>
- <complexType name="MessageEvent">
+ <complexType name="MessageEvent" abstract="true">
<complexContent>
<extension base="tns:Event">
<attribute name="operationName"
type="string"></attribute>
@@ -61,7 +61,7 @@
<complexContent>
<extension base="tns:Event">
<sequence>
- <element maxOccurs="unbounded" minOccurs="0"
name="events" type="tns:Event"/>
+ <element maxOccurs="unbounded" minOccurs="0"
name="event" type="tns:Event"/>
</sequence>
<attribute name="name" type="string"></attribute>
</extension>
Modified:
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Event.java
===================================================================
---
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Event.java 2011-01-30
20:52:55 UTC (rev 632)
+++
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Event.java 2011-01-30
22:06:48 UTC (rev 633)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vhudson-jaxb-ri-2.2-146
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2011.01.12 at 11:30:41 PM GMT
+// Generated on: 2011.01.30 at 10:01:35 PM GMT
//
@@ -29,7 +29,7 @@
* <complexType name="Event">
* <complexContent>
* <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <attribute name="ID"
type="{http://www.w3.org/2001/XMLSchema}ID" />
+ * <attribute name="id"
type="{http://www.w3.org/2001/XMLSchema}ID" />
* <attribute name="role"
type="{http://www.w3.org/2001/XMLSchema}IDREF" />
* <attribute name="errorExpected"
type="{http://www.w3.org/2001/XMLSchema}boolean" />
* </restriction>
@@ -47,9 +47,9 @@
MessageEvent.class,
Group.class
})
-public class Event {
+public abstract class Event {
- @XmlAttribute(name = "ID")
+ @XmlAttribute(name = "id")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlID
@XmlSchemaType(name = "ID")
@@ -69,7 +69,7 @@
* {@link String }
*
*/
- public String getID() {
+ public String getId() {
return id;
}
@@ -81,7 +81,7 @@
* {@link String }
*
*/
- public void setID(String value) {
+ public void setId(String value) {
this.id = value;
}
Modified:
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Group.java
===================================================================
---
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Group.java 2011-01-30
20:52:55 UTC (rev 632)
+++
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Group.java 2011-01-30
22:06:48 UTC (rev 633)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vhudson-jaxb-ri-2.2-146
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2011.01.12 at 11:30:41 PM GMT
+// Generated on: 2011.01.30 at 10:01:35 PM GMT
//
@@ -26,7 +26,7 @@
* <complexContent>
* <extension
base="{http://www.savara.org/scenario}Event">
* <sequence>
- * <element name="events"
type="{http://www.savara.org/scenario}Event" maxOccurs="unbounded"
minOccurs="0"/>
+ * <element name="event"
type="{http://www.savara.org/scenario}Event" maxOccurs="unbounded"
minOccurs="0"/>
* </sequence>
* <attribute name="name"
type="{http://www.w3.org/2001/XMLSchema}string" />
* </extension>
@@ -38,29 +38,29 @@
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Group", propOrder = {
- "events"
+ "event"
})
public class Group
extends Event
{
- protected List<Event> events;
+ protected List<Event> event;
@XmlAttribute(name = "name")
protected String name;
/**
- * Gets the value of the events property.
+ * Gets the value of the event property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the events
property.
+ * This is why there is not a <CODE>set</CODE> method for the event
property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
- * getEvents().add(newItem);
+ * getEvent().add(newItem);
* </pre>
*
*
@@ -70,11 +70,11 @@
*
*
*/
- public List<Event> getEvents() {
- if (events == null) {
- events = new ArrayList<Event>();
+ public List<Event> getEvent() {
+ if (event == null) {
+ event = new ArrayList<Event>();
}
- return this.events;
+ return this.event;
}
/**
Modified:
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Import.java
===================================================================
---
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Import.java 2011-01-30
20:52:55 UTC (rev 632)
+++
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Import.java 2011-01-30
22:06:48 UTC (rev 633)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vhudson-jaxb-ri-2.2-146
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2011.01.12 at 11:30:41 PM GMT
+// Generated on: 2011.01.30 at 10:01:35 PM GMT
//
Modified:
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Link.java
===================================================================
---
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Link.java 2011-01-30
20:52:55 UTC (rev 632)
+++
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Link.java 2011-01-30
22:06:48 UTC (rev 633)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vhudson-jaxb-ri-2.2-146
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2011.01.12 at 11:30:41 PM GMT
+// Generated on: 2011.01.30 at 10:01:35 PM GMT
//
Modified:
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/MessageEvent.java
===================================================================
---
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/MessageEvent.java 2011-01-30
20:52:55 UTC (rev 632)
+++
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/MessageEvent.java 2011-01-30
22:06:48 UTC (rev 633)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vhudson-jaxb-ri-2.2-146
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2011.01.12 at 11:30:41 PM GMT
+// Generated on: 2011.01.30 at 10:01:35 PM GMT
//
@@ -42,7 +42,7 @@
ReceiveEvent.class,
SendEvent.class
})
-public class MessageEvent
+public abstract class MessageEvent
extends Event
{
Modified:
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/ObjectFactory.java
===================================================================
---
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/ObjectFactory.java 2011-01-30
20:52:55 UTC (rev 632)
+++
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/ObjectFactory.java 2011-01-30
22:06:48 UTC (rev 633)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vhudson-jaxb-ri-2.2-146
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2011.01.12 at 11:30:41 PM GMT
+// Generated on: 2011.01.30 at 10:01:35 PM GMT
//
@@ -41,22 +41,6 @@
}
/**
- * Create an instance of {@link Scenario }
- *
- */
- public Scenario createScenario() {
- return new Scenario();
- }
-
- /**
- * Create an instance of {@link Link }
- *
- */
- public Link createLink() {
- return new Link();
- }
-
- /**
* Create an instance of {@link TimeElapsedEvent }
*
*/
@@ -65,30 +49,22 @@
}
/**
- * Create an instance of {@link Role }
+ * Create an instance of {@link Scenario }
*
*/
- public Role createRole() {
- return new Role();
+ public Scenario createScenario() {
+ return new Scenario();
}
/**
- * Create an instance of {@link Event }
+ * Create an instance of {@link ReceiveEvent }
*
*/
- public Event createEvent() {
- return new Event();
+ public ReceiveEvent createReceiveEvent() {
+ return new ReceiveEvent();
}
/**
- * Create an instance of {@link Group }
- *
- */
- public Group createGroup() {
- return new Group();
- }
-
- /**
* Create an instance of {@link SendEvent }
*
*/
@@ -97,19 +73,19 @@
}
/**
- * Create an instance of {@link ReceiveEvent }
+ * Create an instance of {@link Role }
*
*/
- public ReceiveEvent createReceiveEvent() {
- return new ReceiveEvent();
+ public Role createRole() {
+ return new Role();
}
/**
- * Create an instance of {@link MessageEvent }
+ * Create an instance of {@link Group }
*
*/
- public MessageEvent createMessageEvent() {
- return new MessageEvent();
+ public Group createGroup() {
+ return new Group();
}
/**
@@ -121,6 +97,14 @@
}
/**
+ * Create an instance of {@link Link }
+ *
+ */
+ public Link createLink() {
+ return new Link();
+ }
+
+ /**
* Create an instance of {@link JAXBElement }{@code <}{@link Scenario }{@code
>}}
*
*/
Modified:
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/ReceiveEvent.java
===================================================================
---
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/ReceiveEvent.java 2011-01-30
20:52:55 UTC (rev 632)
+++
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/ReceiveEvent.java 2011-01-30
22:06:48 UTC (rev 633)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vhudson-jaxb-ri-2.2-146
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2011.01.12 at 11:30:41 PM GMT
+// Generated on: 2011.01.30 at 10:01:35 PM GMT
//
Modified:
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Role.java
===================================================================
---
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Role.java 2011-01-30
20:52:55 UTC (rev 632)
+++
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Role.java 2011-01-30
22:06:48 UTC (rev 633)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vhudson-jaxb-ri-2.2-146
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2011.01.12 at 11:30:41 PM GMT
+// Generated on: 2011.01.30 at 10:01:35 PM GMT
//
@@ -27,7 +27,7 @@
* <complexType name="Role">
* <complexContent>
* <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <attribute name="ID"
type="{http://www.w3.org/2001/XMLSchema}ID" />
+ * <attribute name="id"
type="{http://www.w3.org/2001/XMLSchema}ID" />
* <attribute name="name"
type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
@@ -40,7 +40,7 @@
@XmlType(name = "Role")
public class Role {
- @XmlAttribute(name = "ID")
+ @XmlAttribute(name = "id")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlID
@XmlSchemaType(name = "ID")
@@ -56,7 +56,7 @@
* {@link String }
*
*/
- public String getID() {
+ public String getId() {
return id;
}
@@ -68,7 +68,7 @@
* {@link String }
*
*/
- public void setID(String value) {
+ public void setId(String value) {
this.id = value;
}
Modified:
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Scenario.java
===================================================================
---
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Scenario.java 2011-01-30
20:52:55 UTC (rev 632)
+++
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Scenario.java 2011-01-30
22:06:48 UTC (rev 633)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vhudson-jaxb-ri-2.2-146
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2011.01.12 at 11:30:41 PM GMT
+// Generated on: 2011.01.30 at 10:01:35 PM GMT
//
@@ -13,7 +13,6 @@
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
@@ -27,9 +26,9 @@
* <complexContent>
* <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
- * <element name="roles"
type="{http://www.savara.org/scenario}Role"
maxOccurs="unbounded"/>
- * <element name="events"
type="{http://www.savara.org/scenario}Event"
maxOccurs="unbounded"/>
- * <element name="links"
type="{http://www.savara.org/scenario}Link"
maxOccurs="unbounded"/>
+ * <element name="role"
type="{http://www.savara.org/scenario}Role" maxOccurs="unbounded"
minOccurs="0"/>
+ * <element name="event"
type="{http://www.savara.org/scenario}Event" maxOccurs="unbounded"
minOccurs="0"/>
+ * <element name="link"
type="{http://www.savara.org/scenario}Link" maxOccurs="unbounded"
minOccurs="0"/>
* </sequence>
* <attribute name="name"
type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="description"
type="{http://www.w3.org/2001/XMLSchema}string" />
@@ -43,18 +42,15 @@
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Scenario", propOrder = {
- "roles",
- "events",
- "links"
+ "role",
+ "event",
+ "link"
})
public class Scenario {
- @XmlElement(required = true)
- protected List<Role> roles;
- @XmlElement(required = true)
- protected List<Event> events;
- @XmlElement(required = true)
- protected List<Link> links;
+ protected List<Role> role;
+ protected List<Event> event;
+ protected List<Link> link;
@XmlAttribute(name = "name")
protected String name;
@XmlAttribute(name = "description")
@@ -63,18 +59,18 @@
protected String author;
/**
- * Gets the value of the roles property.
+ * Gets the value of the role property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the roles
property.
+ * This is why there is not a <CODE>set</CODE> method for the role
property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
- * getRoles().add(newItem);
+ * getRole().add(newItem);
* </pre>
*
*
@@ -84,26 +80,26 @@
*
*
*/
- public List<Role> getRoles() {
- if (roles == null) {
- roles = new ArrayList<Role>();
+ public List<Role> getRole() {
+ if (role == null) {
+ role = new ArrayList<Role>();
}
- return this.roles;
+ return this.role;
}
/**
- * Gets the value of the events property.
+ * Gets the value of the event property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the events
property.
+ * This is why there is not a <CODE>set</CODE> method for the event
property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
- * getEvents().add(newItem);
+ * getEvent().add(newItem);
* </pre>
*
*
@@ -113,26 +109,26 @@
*
*
*/
- public List<Event> getEvents() {
- if (events == null) {
- events = new ArrayList<Event>();
+ public List<Event> getEvent() {
+ if (event == null) {
+ event = new ArrayList<Event>();
}
- return this.events;
+ return this.event;
}
/**
- * Gets the value of the links property.
+ * Gets the value of the link property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the links
property.
+ * This is why there is not a <CODE>set</CODE> method for the link
property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
- * getLinks().add(newItem);
+ * getLink().add(newItem);
* </pre>
*
*
@@ -142,11 +138,11 @@
*
*
*/
- public List<Link> getLinks() {
- if (links == null) {
- links = new ArrayList<Link>();
+ public List<Link> getLink() {
+ if (link == null) {
+ link = new ArrayList<Link>();
}
- return this.links;
+ return this.link;
}
/**
Modified:
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/SendEvent.java
===================================================================
---
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/SendEvent.java 2011-01-30
20:52:55 UTC (rev 632)
+++
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/SendEvent.java 2011-01-30
22:06:48 UTC (rev 633)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vhudson-jaxb-ri-2.2-146
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2011.01.12 at 11:30:41 PM GMT
+// Generated on: 2011.01.30 at 10:01:35 PM GMT
//
Modified:
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/TimeElapsedEvent.java
===================================================================
---
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/TimeElapsedEvent.java 2011-01-30
20:52:55 UTC (rev 632)
+++
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/TimeElapsedEvent.java 2011-01-30
22:06:48 UTC (rev 633)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vhudson-jaxb-ri-2.2-146
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2011.01.12 at 11:30:41 PM GMT
+// Generated on: 2011.01.30 at 10:01:35 PM GMT
//
Modified:
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/package-info.java
===================================================================
---
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/package-info.java 2011-01-30
20:52:55 UTC (rev 632)
+++
branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/package-info.java 2011-01-30
22:06:48 UTC (rev 633)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vhudson-jaxb-ri-2.2-146
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2011.01.12 at 11:30:41 PM GMT
+// Generated on: 2011.01.30 at 10:01:35 PM GMT
//
@javax.xml.bind.annotation.XmlSchema(namespace =
"http://www.savara.org/scenario", elementFormDefault =
javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
Added:
branches/experimental/2.0.x/bundles/org.savara.scenario/src/test/resources/scenarios/PurchasingGood.scn
===================================================================
---
branches/experimental/2.0.x/bundles/org.savara.scenario/src/test/resources/scenarios/PurchasingGood.scn
(rev 0)
+++
branches/experimental/2.0.x/bundles/org.savara.scenario/src/test/resources/scenarios/PurchasingGood.scn 2011-01-30
22:06:48 UTC (rev 633)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tns:scenario
xmlns:tns="http://www.savara.org/scenario"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.savara.org/scenario Scenario.xsd ">
+ <tns:role id="r1" name="Buyer"/>
+ <tns:role id="r2" name="Seller"/>
+ <tns:event xsi:type="tns:SendEvent" id="e1" role="r1"
operationName="buy"/>
+ <tns:event xsi:type="tns:ReceiveEvent" id="e2"
role="r2" operationName="buy"/>
+ <tns:link source="e1" target="e2"/>
+</tns:scenario>
Modified:
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/commands/DeleteComponentCommand.java
===================================================================
---
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/commands/DeleteComponentCommand.java 2011-01-30
20:52:55 UTC (rev 632)
+++
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/commands/DeleteComponentCommand.java 2011-01-30
22:06:48 UTC (rev 633)
@@ -121,9 +121,9 @@
// Scan list of message links to see if any no longer have
// a message event that is attached to the scenario - and
// then save these in case of an undo
- for (int i=scenario.getLinks().size()-1;
+ for (int i=scenario.getLink().size()-1;
i >= 0; i--) {
- Link link=(Link)scenario.getLinks().get(i);
+ Link link=(Link)scenario.getLink().get(i);
/* TODO: GPB: need scenario
if ((link.getSource() != null &&
Modified:
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/commands/DeleteLinkCommand.java
===================================================================
---
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/commands/DeleteLinkCommand.java 2011-01-30
20:52:55 UTC (rev 632)
+++
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/commands/DeleteLinkCommand.java 2011-01-30
22:06:48 UTC (rev 633)
@@ -45,9 +45,9 @@
* @see org.eclipse.gef.commands.Command#execute()
*/
public void execute() {
- m_index = m_parent.getLinks().indexOf(m_child);
+ m_index = m_parent.getLink().indexOf(m_child);
- m_parent.getLinks().remove(m_child);
+ m_parent.getLink().remove(m_child);
/* TODO: GPB: need source and target links
if (m_sourceParent != null && m_sourceEvent != null &&
@@ -117,7 +117,7 @@
m_child.setTarget(m_targetEvent);
m_child.setSource(m_sourceEvent);
- m_parent.getLinks().add(m_index, m_child);
+ m_parent.getLink().add(m_index, m_child);
m_targetEventIndex = -1;
m_sourceEventIndex = -1;
Modified:
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/editor/SimulateScenarioAction.java
===================================================================
---
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/editor/SimulateScenarioAction.java 2011-01-30
20:52:55 UTC (rev 632)
+++
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/editor/SimulateScenarioAction.java 2011-01-30
22:06:48 UTC (rev 633)
@@ -73,7 +73,7 @@
if (view.getScenario() != null &&
//org.pi4soa.common.util.NamesUtil.isSet(
// view.getScenario().getChoreographyDescriptionURL()) &&
- view.getScenario().getEvents().size() > 0) {
+ view.getScenario().getEvent().size() > 0) {
ret = !view.isSimulationRunning();
}
}
Modified:
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/figures/ImportFigure.java
===================================================================
---
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/figures/ImportFigure.java 2011-01-30
20:52:55 UTC (rev 632)
+++
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/figures/ImportFigure.java 2011-01-30
22:06:48 UTC (rev 633)
@@ -59,7 +59,7 @@
graphics.fillRectangle(r);
if (m_diagram != null) {
- java.util.List list=m_diagram.getScenario().getRoles();
+ java.util.List list=m_diagram.getScenario().getRole();
graphics.setBackgroundColor(getFillColor());
graphics.fillRectangle(r);
Modified:
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/figures/TimeElapsedEventFigure.java
===================================================================
---
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/figures/TimeElapsedEventFigure.java 2011-01-30
20:52:55 UTC (rev 632)
+++
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/figures/TimeElapsedEventFigure.java 2011-01-30
22:06:48 UTC (rev 633)
@@ -58,7 +58,7 @@
graphics.fillRectangle(r);
if (m_diagram != null) {
- java.util.List list=m_diagram.getScenario().getRoles();
+ java.util.List list=m_diagram.getScenario().getRole();
for (int i=0; i < list.size(); i++) {
Role p=(Role)list.get(i);
Modified:
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/model/ModelSupport.java
===================================================================
---
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/model/ModelSupport.java 2011-01-30
20:52:55 UTC (rev 632)
+++
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/model/ModelSupport.java 2011-01-30
22:06:48 UTC (rev 633)
@@ -28,9 +28,9 @@
java.util.List<Event> ret=null;
if (component instanceof Scenario) {
- ret = ((Scenario)component).getEvents();
+ ret = ((Scenario)component).getEvent();
} else if (component instanceof Group) {
- ret = ((Group)component).getEvents();
+ ret = ((Group)component).getEvent();
}
return(ret);
@@ -82,7 +82,7 @@
java.util.List list=null;
if (child instanceof Role && parent instanceof Scenario) {
- list = ((Scenario)parent).getRoles();
+ list = ((Scenario)parent).getRole();
} else {
list = getChildren(parent);
}
Modified:
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/parts/ScenarioEditPart.java
===================================================================
---
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/parts/ScenarioEditPart.java 2011-01-30
20:52:55 UTC (rev 632)
+++
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/parts/ScenarioEditPart.java 2011-01-30
22:06:48 UTC (rev 633)
@@ -111,9 +111,9 @@
java.util.List<Object> ret=new java.util.Vector<Object>();
- ret.addAll(scenario.getRoles());
+ ret.addAll(scenario.getRole());
- ret.addAll(scenario.getEvents());
+ ret.addAll(scenario.getEvent());
return(ret);
}
@@ -141,9 +141,9 @@
protected void refreshMessageLinks() {
// Need to update the text on all links
- for (int i=0; i < getScenario().getLinks().size(); i++) {
+ for (int i=0; i < getScenario().getLink().size(); i++) {
Link link=(Link)
- getScenario().getLinks().get(i);
+ getScenario().getLink().get(i);
Object ep=findEditPartForModel(link);
Modified:
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/tools/CreateLinksTool.java
===================================================================
---
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/tools/CreateLinksTool.java 2011-01-30
20:52:55 UTC (rev 632)
+++
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/tools/CreateLinksTool.java 2011-01-30
22:06:48 UTC (rev 633)
@@ -28,7 +28,7 @@
}
public void run() {
- run(m_scenario.getEvents());
+ run(m_scenario.getEvent());
}
public void run(java.util.List list) {
@@ -57,14 +57,14 @@
link.setSource((MessageEvent)obj);
link.setTarget(recv);
- m_scenario.getLinks().add(link);
+ m_scenario.getLink().add(link);
m_changed = true;
}
}
} else if (obj instanceof Group) {
- scanEvents(((Group)obj).getEvents());
+ scanEvents(((Group)obj).getEvent());
}
}
}
@@ -130,9 +130,9 @@
protected java.util.List getLinks(MessageEvent me) {
java.util.Vector ret=new java.util.Vector();
- for (int i=0; i < m_scenario.getLinks().size(); i++) {
+ for (int i=0; i < m_scenario.getLink().size(); i++) {
Link link=(Link)
- m_scenario.getLinks().get(i);
+ m_scenario.getLink().get(i);
if (link.getSource() == me || link.getTarget() == me) {
ret.add(link);
Modified:
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/view/ViewSupport.java
===================================================================
---
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/view/ViewSupport.java 2011-01-30
20:52:55 UTC (rev 632)
+++
branches/experimental/2.0.x/tools/plugins/org.savara.tools.scenario/src/java/org/savara/tools/scenario/designer/view/ViewSupport.java 2011-01-30
22:06:48 UTC (rev 633)
@@ -233,7 +233,7 @@
if (f_foundSubGroup == false) {
// Need to add width for participants
ret = getSidebarWidth(diagram)+
- (diagram.getScenario().getRoles().size()*
+ (diagram.getScenario().getRole().size()*
ROLE_PADDING_X-
(int)(ROLE_PADDING_X*0.6));
}
@@ -335,7 +335,7 @@
int ret=0;
if (child instanceof Role) {
- int pos=diagram.getScenario().getRoles().indexOf(child);
+ int pos=diagram.getScenario().getRole().indexOf(child);
//int pos=diagram.getParticipantIndex((Participant)child);
if (pos != -1) {
@@ -348,7 +348,7 @@
Event me=(Event)child;
Role participant=getRoleForEvent(
- diagram.getScenario().getRoles(), me);
+ diagram.getScenario().getRole(), me);
if (participant != null) {
ret = getChildXPosition(null, participant, diagram);
@@ -434,7 +434,7 @@
int pos=getNearestParticipantIndex(x, diagram);
Role ret=null;
- java.util.List roles=diagram.getScenario().getRoles();
+ java.util.List roles=diagram.getScenario().getRole();
if (roles.size() > 0) {
if (pos < 0) {