[savara-commits] savara SVN: r569 - in branches/experimental/2.0.x/bundles: org.savara.scenario and 10 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Jan 13 04:49:30 EST 2011


Author: objectiser
Date: 2011-01-13 04:49:29 -0500 (Thu, 13 Jan 2011)
New Revision: 569

Added:
   branches/experimental/2.0.x/bundles/org.savara.scenario/
   branches/experimental/2.0.x/bundles/org.savara.scenario/Copyright.txt
   branches/experimental/2.0.x/bundles/org.savara.scenario/META-INF/
   branches/experimental/2.0.x/bundles/org.savara.scenario/META-INF/MANIFEST.MF
   branches/experimental/2.0.x/bundles/org.savara.scenario/build.properties
   branches/experimental/2.0.x/bundles/org.savara.scenario/pom.xml
   branches/experimental/2.0.x/bundles/org.savara.scenario/src/
   branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/
   branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/
   branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/
   branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/
   branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/
   branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/
   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/bundles/org.savara.scenario/src/main/java/org/savara/scenario/util/
   branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/util/ScenarioModelUtil.java
   branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/resources/
   branches/experimental/2.0.x/bundles/org.savara.scenario/src/test/
   branches/experimental/2.0.x/bundles/org.savara.scenario/src/test/java/
Modified:
   branches/experimental/2.0.x/bundles/pom.xml
Log:
Added scenario model.

Added: branches/experimental/2.0.x/bundles/org.savara.scenario/Copyright.txt
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.scenario/Copyright.txt	                        (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.scenario/Copyright.txt	2011-01-13 09:49:29 UTC (rev 569)
@@ -0,0 +1,17 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ */

Added: branches/experimental/2.0.x/bundles/org.savara.scenario/META-INF/MANIFEST.MF
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.scenario/META-INF/MANIFEST.MF	                        (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.scenario/META-INF/MANIFEST.MF	2011-01-13 09:49:29 UTC (rev 569)
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: SAVARA Scenario
+Bundle-SymbolicName: org.savara.scenario
+Bundle-Version: 2.0.0.SNAPSHOT
+Bundle-Activator: org.savara.scenario.osgi.Activator
+Bundle-Vendor: www.savara.org
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Import-Package: org.junit,
+ org.osgi.framework
+Require-Bundle: org.scribble.common,
+ org.savara.common
+Export-Package: org.savara.scenario.model

Added: branches/experimental/2.0.x/bundles/org.savara.scenario/build.properties
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.scenario/build.properties	                        (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.scenario/build.properties	2011-01-13 09:49:29 UTC (rev 569)
@@ -0,0 +1,4 @@
+source.. = src/main/java/
+output.. = bin/
+bin.includes = META-INF/,\
+               .

Added: branches/experimental/2.0.x/bundles/org.savara.scenario/pom.xml
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.scenario/pom.xml	                        (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.scenario/pom.xml	2011-01-13 09:49:29 UTC (rev 569)
@@ -0,0 +1,44 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.savara.bundles</groupId>
+	<artifactId>org.savara.scenario</artifactId> 
+	<version>2.0.0-SNAPSHOT</version>
+	<packaging>jar</packaging>
+	<name>Savara::Bundles::Scenario</name>
+
+	<parent>
+		<groupId>org.savara</groupId>
+		<artifactId>bundles</artifactId>
+		<version>2.0.0-SNAPSHOT</version>
+	</parent>
+  
+	<dependencies>
+		<dependency>
+			<groupId>org.scribble.bundles</groupId>
+			<artifactId>org.scribble.common</artifactId>
+			<version>${scribble.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.scribble.bundles</groupId>
+			<artifactId>org.scribble.protocol</artifactId>
+			<version>${scribble.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.savara.bundles</groupId>
+			<artifactId>org.savara.common</artifactId>
+			<version>${savara.version}</version>
+		</dependency>
+	    <dependency>
+	      <groupId>org.apache.felix</groupId>
+	      <artifactId>org.osgi.core</artifactId>
+	      <version>${osgi.version}</version>
+	    </dependency>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+           	<version>${junit.version}</version>
+			<scope>test</scope>
+		</dependency>
+   </dependencies>
+</project>

Added: 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	                        (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Event.java	2011-01-13 09:49:29 UTC (rev 569)
@@ -0,0 +1,136 @@
+//
+// 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/jaxb</a> 
+// 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 
+//
+
+
+package org.savara.scenario.model;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlID;
+import javax.xml.bind.annotation.XmlIDREF;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+
+/**
+ * <p>Java class for Event complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="Event">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;attribute name="ID" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *       &lt;attribute name="role" type="{http://www.w3.org/2001/XMLSchema}IDREF" />
+ *       &lt;attribute name="errorExpected" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "Event")
+ at XmlSeeAlso({
+    Import.class,
+    TimeElapsedEvent.class,
+    MessageEvent.class,
+    Group.class
+})
+public class Event {
+
+    @XmlAttribute(name = "ID")
+    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+    @XmlID
+    @XmlSchemaType(name = "ID")
+    protected String id;
+    @XmlAttribute(name = "role")
+    @XmlIDREF
+    @XmlSchemaType(name = "IDREF")
+    protected Object role;
+    @XmlAttribute(name = "errorExpected")
+    protected Boolean errorExpected;
+
+    /**
+     * Gets the value of the id property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getID() {
+        return id;
+    }
+
+    /**
+     * Sets the value of the id property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setID(String value) {
+        this.id = value;
+    }
+
+    /**
+     * Gets the value of the role property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Object }
+     *     
+     */
+    public Object getRole() {
+        return role;
+    }
+
+    /**
+     * Sets the value of the role property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Object }
+     *     
+     */
+    public void setRole(Object value) {
+        this.role = value;
+    }
+
+    /**
+     * Gets the value of the errorExpected property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *     
+     */
+    public Boolean isErrorExpected() {
+        return errorExpected;
+    }
+
+    /**
+     * Sets the value of the errorExpected property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *     
+     */
+    public void setErrorExpected(Boolean value) {
+        this.errorExpected = value;
+    }
+
+}

Added: 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	                        (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Group.java	2011-01-13 09:49:29 UTC (rev 569)
@@ -0,0 +1,104 @@
+//
+// 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/jaxb</a> 
+// 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 
+//
+
+
+package org.savara.scenario.model;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for Group complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="Group">
+ *   &lt;complexContent>
+ *     &lt;extension base="{http://www.savara.org/scenario}Event">
+ *       &lt;sequence>
+ *         &lt;element name="events" type="{http://www.savara.org/scenario}Event" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/extension>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "Group", propOrder = {
+    "events"
+})
+public class Group
+    extends Event
+{
+
+    protected List<Event> events;
+    @XmlAttribute(name = "name")
+    protected String name;
+
+    /**
+     * Gets the value of the events 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.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getEvents().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Event }
+     * 
+     * 
+     */
+    public List<Event> getEvents() {
+        if (events == null) {
+            events = new ArrayList<Event>();
+        }
+        return this.events;
+    }
+
+    /**
+     * Gets the value of the name property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setName(String value) {
+        this.name = value;
+    }
+
+}

Added: 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	                        (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Import.java	2011-01-13 09:49:29 UTC (rev 569)
@@ -0,0 +1,96 @@
+//
+// 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/jaxb</a> 
+// 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 
+//
+
+
+package org.savara.scenario.model;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for Import complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="Import">
+ *   &lt;complexContent>
+ *     &lt;extension base="{http://www.savara.org/scenario}Event">
+ *       &lt;attribute name="url" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *       &lt;attribute name="group" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/extension>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "Import")
+public class Import
+    extends Event
+{
+
+    @XmlAttribute(name = "url")
+    @XmlSchemaType(name = "anyURI")
+    protected String url;
+    @XmlAttribute(name = "group")
+    protected String group;
+
+    /**
+     * Gets the value of the url property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getUrl() {
+        return url;
+    }
+
+    /**
+     * Sets the value of the url property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setUrl(String value) {
+        this.url = value;
+    }
+
+    /**
+     * Gets the value of the group property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getGroup() {
+        return group;
+    }
+
+    /**
+     * Sets the value of the group property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setGroup(String value) {
+        this.group = value;
+    }
+
+}

Added: 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	                        (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Link.java	2011-01-13 09:49:29 UTC (rev 569)
@@ -0,0 +1,98 @@
+//
+// 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/jaxb</a> 
+// 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 
+//
+
+
+package org.savara.scenario.model;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlIDREF;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for Link complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="Link">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;attribute name="source" type="{http://www.w3.org/2001/XMLSchema}IDREF" />
+ *       &lt;attribute name="target" type="{http://www.w3.org/2001/XMLSchema}IDREF" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "Link")
+public class Link {
+
+    @XmlAttribute(name = "source")
+    @XmlIDREF
+    @XmlSchemaType(name = "IDREF")
+    protected Object source;
+    @XmlAttribute(name = "target")
+    @XmlIDREF
+    @XmlSchemaType(name = "IDREF")
+    protected Object target;
+
+    /**
+     * Gets the value of the source property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Object }
+     *     
+     */
+    public Object getSource() {
+        return source;
+    }
+
+    /**
+     * Sets the value of the source property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Object }
+     *     
+     */
+    public void setSource(Object value) {
+        this.source = value;
+    }
+
+    /**
+     * Gets the value of the target property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Object }
+     *     
+     */
+    public Object getTarget() {
+        return target;
+    }
+
+    /**
+     * Sets the value of the target property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Object }
+     *     
+     */
+    public void setTarget(Object value) {
+        this.target = value;
+    }
+
+}

Added: 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	                        (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/MessageEvent.java	2011-01-13 09:49:29 UTC (rev 569)
@@ -0,0 +1,155 @@
+//
+// 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/jaxb</a> 
+// 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 
+//
+
+
+package org.savara.scenario.model;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for MessageEvent complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="MessageEvent">
+ *   &lt;complexContent>
+ *     &lt;extension base="{http://www.savara.org/scenario}Event">
+ *       &lt;attribute name="operationName" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="faultName" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="value" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     &lt;/extension>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "MessageEvent")
+ at XmlSeeAlso({
+    ReceiveEvent.class,
+    SendEvent.class
+})
+public class MessageEvent
+    extends Event
+{
+
+    @XmlAttribute(name = "operationName")
+    protected String operationName;
+    @XmlAttribute(name = "faultName")
+    protected String faultName;
+    @XmlAttribute(name = "type")
+    protected String type;
+    @XmlAttribute(name = "value")
+    @XmlSchemaType(name = "anyURI")
+    protected String value;
+
+    /**
+     * Gets the value of the operationName property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getOperationName() {
+        return operationName;
+    }
+
+    /**
+     * Sets the value of the operationName property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setOperationName(String value) {
+        this.operationName = value;
+    }
+
+    /**
+     * Gets the value of the faultName property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getFaultName() {
+        return faultName;
+    }
+
+    /**
+     * Sets the value of the faultName property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setFaultName(String value) {
+        this.faultName = value;
+    }
+
+    /**
+     * Gets the value of the type property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * Sets the value of the type property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setType(String value) {
+        this.type = value;
+    }
+
+    /**
+     * Gets the value of the value property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getValue() {
+        return value;
+    }
+
+    /**
+     * Sets the value of the value property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+}

Added: 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	                        (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/ObjectFactory.java	2011-01-13 09:49:29 UTC (rev 569)
@@ -0,0 +1,132 @@
+//
+// 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/jaxb</a> 
+// 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 
+//
+
+
+package org.savara.scenario.model;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each 
+ * Java content interface and Java element interface 
+ * generated in the org.savara.scenario.model package. 
+ * <p>An ObjectFactory allows you to programatically 
+ * construct new instances of the Java representation 
+ * for XML content. The Java representation of XML 
+ * content can consist of schema derived interfaces 
+ * and classes representing the binding of schema 
+ * type definitions, element declarations and model 
+ * groups.  Factory methods for each of these are 
+ * provided in this class.
+ * 
+ */
+ at XmlRegistry
+public class ObjectFactory {
+
+    private final static QName _Scenario_QNAME = new QName("http://www.savara.org/scenario", "scenario");
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.savara.scenario.model
+     * 
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * 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 }
+     * 
+     */
+    public TimeElapsedEvent createTimeElapsedEvent() {
+        return new TimeElapsedEvent();
+    }
+
+    /**
+     * Create an instance of {@link Role }
+     * 
+     */
+    public Role createRole() {
+        return new Role();
+    }
+
+    /**
+     * Create an instance of {@link Event }
+     * 
+     */
+    public Event createEvent() {
+        return new Event();
+    }
+
+    /**
+     * Create an instance of {@link Group }
+     * 
+     */
+    public Group createGroup() {
+        return new Group();
+    }
+
+    /**
+     * Create an instance of {@link SendEvent }
+     * 
+     */
+    public SendEvent createSendEvent() {
+        return new SendEvent();
+    }
+
+    /**
+     * Create an instance of {@link ReceiveEvent }
+     * 
+     */
+    public ReceiveEvent createReceiveEvent() {
+        return new ReceiveEvent();
+    }
+
+    /**
+     * Create an instance of {@link MessageEvent }
+     * 
+     */
+    public MessageEvent createMessageEvent() {
+        return new MessageEvent();
+    }
+
+    /**
+     * Create an instance of {@link Import }
+     * 
+     */
+    public Import createImport() {
+        return new Import();
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link Scenario }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://www.savara.org/scenario", name = "scenario")
+    public JAXBElement<Scenario> createScenario(Scenario value) {
+        return new JAXBElement<Scenario>(_Scenario_QNAME, Scenario.class, null, value);
+    }
+
+}

Added: 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	                        (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/ReceiveEvent.java	2011-01-13 09:49:29 UTC (rev 569)
@@ -0,0 +1,39 @@
+//
+// 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/jaxb</a> 
+// 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 
+//
+
+
+package org.savara.scenario.model;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for ReceiveEvent complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="ReceiveEvent">
+ *   &lt;complexContent>
+ *     &lt;extension base="{http://www.savara.org/scenario}MessageEvent">
+ *     &lt;/extension>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "ReceiveEvent")
+public class ReceiveEvent
+    extends MessageEvent
+{
+
+
+}

Added: 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	                        (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Role.java	2011-01-13 09:49:29 UTC (rev 569)
@@ -0,0 +1,99 @@
+//
+// 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/jaxb</a> 
+// 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 
+//
+
+
+package org.savara.scenario.model;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlID;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+
+/**
+ * <p>Java class for Role complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="Role">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;attribute name="ID" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *       &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "Role")
+public class Role {
+
+    @XmlAttribute(name = "ID")
+    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+    @XmlID
+    @XmlSchemaType(name = "ID")
+    protected String id;
+    @XmlAttribute(name = "name")
+    protected String name;
+
+    /**
+     * Gets the value of the id property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getID() {
+        return id;
+    }
+
+    /**
+     * Sets the value of the id property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setID(String value) {
+        this.id = value;
+    }
+
+    /**
+     * Gets the value of the name property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setName(String value) {
+        this.name = value;
+    }
+
+}

Added: 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	                        (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/Scenario.java	2011-01-13 09:49:29 UTC (rev 569)
@@ -0,0 +1,224 @@
+//
+// 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/jaxb</a> 
+// 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 
+//
+
+
+package org.savara.scenario.model;
+
+import java.util.ArrayList;
+import java.util.List;
+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;
+
+
+/**
+ * <p>Java class for Scenario complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="Scenario">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="roles" type="{http://www.savara.org/scenario}Role" maxOccurs="unbounded"/>
+ *         &lt;element name="events" type="{http://www.savara.org/scenario}Event" maxOccurs="unbounded"/>
+ *         &lt;element name="links" type="{http://www.savara.org/scenario}Link" maxOccurs="unbounded"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="description" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="author" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "Scenario", propOrder = {
+    "roles",
+    "events",
+    "links"
+})
+public class Scenario {
+
+    @XmlElement(required = true)
+    protected List<Role> roles;
+    @XmlElement(required = true)
+    protected List<Event> events;
+    @XmlElement(required = true)
+    protected List<Link> links;
+    @XmlAttribute(name = "name")
+    protected String name;
+    @XmlAttribute(name = "description")
+    protected String description;
+    @XmlAttribute(name = "author")
+    protected String author;
+
+    /**
+     * Gets the value of the roles 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.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getRoles().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Role }
+     * 
+     * 
+     */
+    public List<Role> getRoles() {
+        if (roles == null) {
+            roles = new ArrayList<Role>();
+        }
+        return this.roles;
+    }
+
+    /**
+     * Gets the value of the events 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.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getEvents().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Event }
+     * 
+     * 
+     */
+    public List<Event> getEvents() {
+        if (events == null) {
+            events = new ArrayList<Event>();
+        }
+        return this.events;
+    }
+
+    /**
+     * Gets the value of the links 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.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getLinks().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Link }
+     * 
+     * 
+     */
+    public List<Link> getLinks() {
+        if (links == null) {
+            links = new ArrayList<Link>();
+        }
+        return this.links;
+    }
+
+    /**
+     * Gets the value of the name property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setName(String value) {
+        this.name = value;
+    }
+
+    /**
+     * Gets the value of the description property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets the value of the description property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setDescription(String value) {
+        this.description = value;
+    }
+
+    /**
+     * Gets the value of the author property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getAuthor() {
+        return author;
+    }
+
+    /**
+     * Sets the value of the author property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setAuthor(String value) {
+        this.author = value;
+    }
+
+}

Added: 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	                        (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/SendEvent.java	2011-01-13 09:49:29 UTC (rev 569)
@@ -0,0 +1,39 @@
+//
+// 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/jaxb</a> 
+// 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 
+//
+
+
+package org.savara.scenario.model;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for SendEvent complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="SendEvent">
+ *   &lt;complexContent>
+ *     &lt;extension base="{http://www.savara.org/scenario}MessageEvent">
+ *     &lt;/extension>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "SendEvent")
+public class SendEvent
+    extends MessageEvent
+{
+
+
+}

Added: 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	                        (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/TimeElapsedEvent.java	2011-01-13 09:49:29 UTC (rev 569)
@@ -0,0 +1,67 @@
+//
+// 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/jaxb</a> 
+// 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 
+//
+
+
+package org.savara.scenario.model;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for TimeElapsedEvent complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="TimeElapsedEvent">
+ *   &lt;complexContent>
+ *     &lt;extension base="{http://www.savara.org/scenario}Event">
+ *       &lt;attribute name="duration" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/extension>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "TimeElapsedEvent")
+public class TimeElapsedEvent
+    extends Event
+{
+
+    @XmlAttribute(name = "duration")
+    protected String duration;
+
+    /**
+     * Gets the value of the duration property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getDuration() {
+        return duration;
+    }
+
+    /**
+     * Sets the value of the duration property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setDuration(String value) {
+        this.duration = value;
+    }
+
+}

Added: 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	                        (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/model/package-info.java	2011-01-13 09:49:29 UTC (rev 569)
@@ -0,0 +1,9 @@
+//
+// 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/jaxb</a> 
+// 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 
+//
+
+ at javax.xml.bind.annotation.XmlSchema(namespace = "http://www.savara.org/scenario", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.savara.scenario.model;

Added: branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/util/ScenarioModelUtil.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/util/ScenarioModelUtil.java	                        (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.scenario/src/main/java/org/savara/scenario/util/ScenarioModelUtil.java	2011-01-13 09:49:29 UTC (rev 569)
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2009-10 www.scribble.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.savara.scenario.util;
+
+import java.io.IOException;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.Unmarshaller;
+
+import org.savara.scenario.model.Scenario;
+
+public class ScenarioModelUtil {
+
+	public static Scenario deserialize(java.io.InputStream is) throws IOException {
+		Scenario ret=null;
+		
+		try {
+			JAXBContext context = JAXBContext.newInstance("org.savara.scenario.model",
+					ScenarioModelUtil.class.getClassLoader());
+			Unmarshaller unmarshaller = context.createUnmarshaller();
+			
+			//note: setting schema to null will turn validator off
+			//unmarshaller.setSchema(null);
+			Object xmlObject = unmarshaller.unmarshal(is);
+			
+			if (xmlObject instanceof JAXBElement) {
+				ret = (Scenario)((JAXBElement<?>)xmlObject).getValue();
+			}
+			
+		} catch(Exception e) {
+			throw new IOException("Failed to deserialize scenario", e);
+		}
+		
+		return(ret);
+	}
+	
+	public static void serialize(Scenario scenario, java.io.OutputStream os) throws IOException {
+		
+		try {
+			org.savara.scenario.model.ObjectFactory factory=
+						new org.savara.scenario.model.ObjectFactory();
+			
+			JAXBContext context = JAXBContext.newInstance(Scenario.class);
+			Marshaller marshaller = context.createMarshaller();
+			marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
+
+			marshaller.marshal(factory.createScenario(scenario), os);
+		} catch(Exception e) {
+			throw new IOException("Failed to serialize scenario", e);
+		}
+	}
+}

Modified: branches/experimental/2.0.x/bundles/pom.xml
===================================================================
--- branches/experimental/2.0.x/bundles/pom.xml	2011-01-12 17:15:21 UTC (rev 568)
+++ branches/experimental/2.0.x/bundles/pom.xml	2011-01-13 09:49:29 UTC (rev 569)
@@ -23,6 +23,7 @@
 		<module>org.savara.bpel</module>
 		<module>org.savara.bpel.tests</module>
 		<module>org.savara.contract</module>
+		<module>org.savara.scenario</module>
 		<module>org.savara.common</module>
 		<module>org.savara.pi4soa.cdm</module>
 		<module>org.savara.wsdl</module>



More information about the savara-commits mailing list