Initial contribution (sources of APP4MC)
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.070/.classpath b/plugins/org.eclipse.app4mc.amalthea.converters.070/.classpath
new file mode 100644
index 0000000..eca7bdb
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.070/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.070/.gitignore b/plugins/org.eclipse.app4mc.amalthea.converters.070/.gitignore
new file mode 100644
index 0000000..09e3bc9
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.070/.gitignore
@@ -0,0 +1,2 @@
+/bin/
+/target/
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.070/.project b/plugins/org.eclipse.app4mc.amalthea.converters.070/.project
new file mode 100644
index 0000000..0478d07
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.070/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.app4mc.amalthea.converters.070</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.070/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.app4mc.amalthea.converters.070/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..0c68a61
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.070/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.070/META-INF/MANIFEST.MF b/plugins/org.eclipse.app4mc.amalthea.converters.070/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..4c8a9be
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.070/META-INF/MANIFEST.MF
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: APP4MC Amalthea Converters to 0.7.0
+Bundle-SymbolicName: org.eclipse.app4mc.amalthea.converters.070;singleton:=true
+Bundle-Version: 0.7.0.qualifier
+Bundle-Activator: org.eclipse.app4mc.amalthea.converters070.Activator
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.app4mc.amalthea.converters.common
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-ActivationPolicy: lazy
+Bundle-Vendor: Eclipse.org
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.070/about.html b/plugins/org.eclipse.app4mc.amalthea.converters.070/about.html
new file mode 100644
index 0000000..49696f9
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.070/about.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>September 30, 2013</p>
+<h3>License</h3>
+
+<p>APP4MC provides all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.070/build.properties b/plugins/org.eclipse.app4mc.amalthea.converters.070/build.properties
new file mode 100644
index 0000000..101e8e1
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.070/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html,\
+ epl-v10.html
+src.includes = epl-v10.html,\
+ about.html
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.070/epl-v10.html b/plugins/org.eclipse.app4mc.amalthea.converters.070/epl-v10.html
new file mode 100644
index 0000000..fd39122
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.070/epl-v10.html
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Public License - Version 1.0</title>
+<style type="text/css">
+ body {
+ size: 8.5in 11.0in;
+ margin: 0.25in 0.5in 0.25in 0.5in;
+ tab-interval: 0.5in;
+ }
+ p {
+ margin-left: auto;
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ }
+ p.list {
+ margin-left: 0.5in;
+ margin-top: 0.05em;
+ margin-bottom: 0.05em;
+ }
+ </style>
+
+</head>
+
+<body lang="EN-US">
+
+<h2>Eclipse Public License - v 1.0</h2>
+
+<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
+DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
+AGREEMENT.</p>
+
+<p><b>1. DEFINITIONS</b></p>
+
+<p>"Contribution" means:</p>
+
+<p class="list">a) in the case of the initial Contributor, the initial
+code and documentation distributed under this Agreement, and</p>
+<p class="list">b) in the case of each subsequent Contributor:</p>
+<p class="list">i) changes to the Program, and</p>
+<p class="list">ii) additions to the Program;</p>
+<p class="list">where such changes and/or additions to the Program
+originate from and are distributed by that particular Contributor. A
+Contribution 'originates' from a Contributor if it was added to the
+Program by such Contributor itself or anyone acting on such
+Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii)
+are not derivative works of the Program.</p>
+
+<p>"Contributor" means any person or entity that distributes
+the Program.</p>
+
+<p>"Licensed Patents" mean patent claims licensable by a
+Contributor which are necessarily infringed by the use or sale of its
+Contribution alone or when combined with the Program.</p>
+
+<p>"Program" means the Contributions distributed in accordance
+with this Agreement.</p>
+
+<p>"Recipient" means anyone who receives the Program under
+this Agreement, including all Contributors.</p>
+
+<p><b>2. GRANT OF RIGHTS</b></p>
+
+<p class="list">a) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free copyright license to reproduce, prepare derivative works
+of, publicly display, publicly perform, distribute and sublicense the
+Contribution of such Contributor, if any, and such derivative works, in
+source code and object code form.</p>
+
+<p class="list">b) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free patent license under Licensed Patents to make, use, sell,
+offer to sell, import and otherwise transfer the Contribution of such
+Contributor, if any, in source code and object code form. This patent
+license shall apply to the combination of the Contribution and the
+Program if, at the time the Contribution is added by the Contributor,
+such addition of the Contribution causes such combination to be covered
+by the Licensed Patents. The patent license shall not apply to any other
+combinations which include the Contribution. No hardware per se is
+licensed hereunder.</p>
+
+<p class="list">c) Recipient understands that although each Contributor
+grants the licenses to its Contributions set forth herein, no assurances
+are provided by any Contributor that the Program does not infringe the
+patent or other intellectual property rights of any other entity. Each
+Contributor disclaims any liability to Recipient for claims brought by
+any other entity based on infringement of intellectual property rights
+or otherwise. As a condition to exercising the rights and licenses
+granted hereunder, each Recipient hereby assumes sole responsibility to
+secure any other intellectual property rights needed, if any. For
+example, if a third party patent license is required to allow Recipient
+to distribute the Program, it is Recipient's responsibility to acquire
+that license before distributing the Program.</p>
+
+<p class="list">d) Each Contributor represents that to its knowledge it
+has sufficient copyright rights in its Contribution, if any, to grant
+the copyright license set forth in this Agreement.</p>
+
+<p><b>3. REQUIREMENTS</b></p>
+
+<p>A Contributor may choose to distribute the Program in object code
+form under its own license agreement, provided that:</p>
+
+<p class="list">a) it complies with the terms and conditions of this
+Agreement; and</p>
+
+<p class="list">b) its license agreement:</p>
+
+<p class="list">i) effectively disclaims on behalf of all Contributors
+all warranties and conditions, express and implied, including warranties
+or conditions of title and non-infringement, and implied warranties or
+conditions of merchantability and fitness for a particular purpose;</p>
+
+<p class="list">ii) effectively excludes on behalf of all Contributors
+all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;</p>
+
+<p class="list">iii) states that any provisions which differ from this
+Agreement are offered by that Contributor alone and not by any other
+party; and</p>
+
+<p class="list">iv) states that source code for the Program is available
+from such Contributor, and informs licensees how to obtain it in a
+reasonable manner on or through a medium customarily used for software
+exchange.</p>
+
+<p>When the Program is made available in source code form:</p>
+
+<p class="list">a) it must be made available under this Agreement; and</p>
+
+<p class="list">b) a copy of this Agreement must be included with each
+copy of the Program.</p>
+
+<p>Contributors may not remove or alter any copyright notices contained
+within the Program.</p>
+
+<p>Each Contributor must identify itself as the originator of its
+Contribution, if any, in a manner that reasonably allows subsequent
+Recipients to identify the originator of the Contribution.</p>
+
+<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
+
+<p>Commercial distributors of software may accept certain
+responsibilities with respect to end users, business partners and the
+like. While this license is intended to facilitate the commercial use of
+the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create
+potential liability for other Contributors. Therefore, if a Contributor
+includes the Program in a commercial product offering, such Contributor
+("Commercial Contributor") hereby agrees to defend and
+indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses")
+arising from claims, lawsuits and other legal actions brought by a third
+party against the Indemnified Contributor to the extent caused by the
+acts or omissions of such Commercial Contributor in connection with its
+distribution of the Program in a commercial product offering. The
+obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In
+order to qualify, an Indemnified Contributor must: a) promptly notify
+the Commercial Contributor in writing of such claim, and b) allow the
+Commercial Contributor to control, and cooperate with the Commercial
+Contributor in, the defense and any related settlement negotiations. The
+Indemnified Contributor may participate in any such claim at its own
+expense.</p>
+
+<p>For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any other
+Contributor to pay any damages as a result, the Commercial Contributor
+must pay those damages.</p>
+
+<p><b>5. NO WARRANTY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
+PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
+ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
+OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with its
+exercise of rights under this Agreement , including but not limited to
+the risks and costs of program errors, compliance with applicable laws,
+damage to or loss of data, programs or equipment, and unavailability or
+interruption of operations.</p>
+
+<p><b>6. DISCLAIMER OF LIABILITY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
+NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
+WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
+DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
+HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
+
+<p><b>7. GENERAL</b></p>
+
+<p>If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further action
+by the parties hereto, such provision shall be reformed to the minimum
+extent necessary to make such provision valid and enforceable.</p>
+
+<p>If Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Program itself (excluding combinations of the Program with other
+software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the
+date such litigation is filed.</p>
+
+<p>All Recipient's rights under this Agreement shall terminate if it
+fails to comply with any of the material terms or conditions of this
+Agreement and does not cure such failure in a reasonable period of time
+after becoming aware of such noncompliance. If all Recipient's rights
+under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive.</p>
+
+<p>Everyone is permitted to copy and distribute copies of this
+Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The
+Agreement Steward reserves the right to publish new versions (including
+revisions) of this Agreement from time to time. No one other than the
+Agreement Steward has the right to modify this Agreement. The Eclipse
+Foundation is the initial Agreement Steward. The Eclipse Foundation may
+assign the responsibility to serve as the Agreement Steward to a
+suitable separate entity. Each new version of the Agreement will be
+given a distinguishing version number. The Program (including
+Contributions) may always be distributed subject to the version of the
+Agreement under which it was received. In addition, after a new version
+of the Agreement is published, Contributor may elect to distribute the
+Program (including its Contributions) under the new version. Except as
+expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
+rights or licenses to the intellectual property of any Contributor under
+this Agreement, whether expressly, by implication, estoppel or
+otherwise. All rights in the Program not expressly granted under this
+Agreement are reserved.</p>
+
+<p>This Agreement is governed by the laws of the State of New York and
+the intellectual property laws of the United States of America. No party
+to this Agreement will bring a legal action under this Agreement more
+than one year after the cause of action arose. Each party waives its
+rights to a jury trial in any resulting litigation.</p>
+
+</body>
+
+</html>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.070/plugin.xml b/plugins/org.eclipse.app4mc.amalthea.converters.070/plugin.xml
new file mode 100644
index 0000000..4e0e0b4
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.070/plugin.xml
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.app4mc.amalthea.model.converters">
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters070.impl.CentralConverter"
+ enabled="true"
+ id="converters.070.central"
+ input-model-version="itea.111"
+ name="central"
+ output-model-version="0.7.0">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters070.impl.MappingConverter"
+ enabled="true"
+ id="converters.070.mapping"
+ input-model-version="itea.111"
+ name="org.eclipse.app4mc.amalthea.converters.070.converter1"
+ output-model-version="0.7.0">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters070.impl.OsConverter"
+ enabled="true"
+ id="converters.070.os"
+ input-model-version="itea.111"
+ name="org.eclipse.app4mc.amalthea.converters.070.converter1"
+ output-model-version="0.7.0">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters070.impl.HwConverter"
+ enabled="true"
+ id="converters.070.hw"
+ input-model-version="itea.111"
+ name="org.eclipse.app4mc.amalthea.converters.070.converter1"
+ output-model-version="0.7.0">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters070.impl.CommonConverter"
+ enabled="true"
+ id="converters.070.common"
+ input-model-version="itea.111"
+ name="org.eclipse.app4mc.amalthea.converters.070.converter1"
+ output-model-version="0.7.0">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters070.impl.ComponentsConverter"
+ enabled="true"
+ id="converters.070.components"
+ input-model-version="itea.111"
+ name="org.eclipse.app4mc.amalthea.converters.070.converter1"
+ output-model-version="0.7.0">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters070.impl.SwConverter"
+ enabled="true"
+ id="converters.070.sw"
+ input-model-version="itea.111"
+ name="org.eclipse.app4mc.amalthea.converters.070.converter1"
+ output-model-version="0.7.0">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters070.impl.StimuliConverter"
+ enabled="true"
+ id="converters.070.stimuli"
+ input-model-version="itea.111"
+ name="org.eclipse.app4mc.amalthea.converters.070.converter1"
+ output-model-version="0.7.0">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters070.impl.PropertyContraintsConverter"
+ enabled="true"
+ id="converters.070.propertyconstraints"
+ input-model-version="itea.111"
+ name="org.eclipse.app4mc.amalthea.converters.070.converter1"
+ output-model-version="0.7.0">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters070.impl.EventsConverter"
+ enabled="true"
+ id="converters.070.events"
+ input-model-version="itea.111"
+ name="org.eclipse.app4mc.amalthea.converters.070.converter1"
+ output-model-version="0.7.0">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters070.impl.ConstraintsConverter"
+ enabled="true"
+ id="converters.070.constraints"
+ input-model-version="itea.111"
+ name="org.eclipse.app4mc.amalthea.converters.070.converter1"
+ output-model-version="0.7.0">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters070.impl.ConfigConverter"
+ enabled="true"
+ id="converters.070.config"
+ input-model-version="itea.111"
+ name="org.eclipse.app4mc.amalthea.converters.070.converter1"
+ output-model-version="0.7.0">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters070.impl.ContentConverter"
+ enabled="true"
+ id="converters.070.typeConverter"
+ input-model-version="itea.111"
+ name="org.eclipse.app4mc.amalthea.converters.070.converter1"
+ output-model-version="0.7.0">
+ <dependent-on-converter
+ id="converters.070.central">
+ </dependent-on-converter>
+ <dependent-on-converter
+ id="converters.070.common">
+ </dependent-on-converter>
+ <dependent-on-converter
+ id="converters.070.components">
+ </dependent-on-converter>
+ <dependent-on-converter
+ id="converters.070.config">
+ </dependent-on-converter>
+ <dependent-on-converter
+ id="converters.070.constraints">
+ </dependent-on-converter>
+ <dependent-on-converter
+ id="converters.070.events">
+ </dependent-on-converter>
+ <dependent-on-converter
+ id="converters.070.hw">
+ </dependent-on-converter>
+ <dependent-on-converter
+ id="converters.070.mapping">
+ </dependent-on-converter>
+ <dependent-on-converter
+ id="converters.070.os">
+ </dependent-on-converter>
+ <dependent-on-converter
+ id="converters.070.propertyconstraints">
+ </dependent-on-converter>
+ <dependent-on-converter
+ id="converters.070.stimuli">
+ </dependent-on-converter>
+ <dependent-on-converter
+ id="converters.070.sw">
+ </dependent-on-converter>
+ </converter>
+ </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.070/pom.xml b/plugins/org.eclipse.app4mc.amalthea.converters.070/pom.xml
new file mode 100644
index 0000000..12cd354
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.070/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <relativePath>../../build/org.eclipse.app4mc.build/pom.xml</relativePath>
+ <groupId>org.eclipse.app4mc.build</groupId>
+ <artifactId>parent</artifactId>
+ <version>0.7.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.app4mc.amalthea.converters.070</artifactId>
+ <packaging>eclipse-plugin</packaging>
+
+</project>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/Activator.java b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/Activator.java
new file mode 100644
index 0000000..629fe00
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/Activator.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters070;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator implements BundleActivator {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.app4mc.amalthea.converters.070"; //$NON-NLS-1$
+
+
+ private static BundleContext context;
+
+ static BundleContext getContext() {
+ return context;
+ }
+
+ /**
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(final BundleContext bundleContext) throws Exception {
+ Activator.context = bundleContext;
+ }
+
+ /**
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(final BundleContext bundleContext) throws Exception {
+ Activator.context = null;
+ }
+
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/CentralConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/CentralConverter.java
new file mode 100644
index 0000000..80c25cd
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/CentralConverter.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters070.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters070.utils.HelperUtils_111_070;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class CentralConverter implements IConverter {
+
+ private final HelperUtils_111_070 helper;
+
+ public CentralConverter() {
+ this.helper = HelperUtils_111_070.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ // this.helper.updateRootElement_NameSpaces_to_070(rootElement);
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/CommonConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/CommonConverter.java
new file mode 100644
index 0000000..076e9b4
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/CommonConverter.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters070.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters070.utils.HelperUtils_111_070;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class CommonConverter implements IConverter {
+
+ private final HelperUtils_111_070 helper;
+
+ public CommonConverter() {
+ this.helper = HelperUtils_111_070.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/ComponentsConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/ComponentsConverter.java
new file mode 100644
index 0000000..0ed3c25
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/ComponentsConverter.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters070.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters070.utils.HelperUtils_111_070;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.jdom2.Attribute;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class ComponentsConverter implements IConverter {
+
+ private final HelperUtils_111_070 helper;
+
+ public ComponentsConverter() {
+ this.helper = HelperUtils_111_070.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ update_FInterfacePort(rootElement);
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+ }
+
+ private void update_FInterfacePort(final Element rootElement) {
+ /*--
+ * Migraiton step to App4MC 0.7.0 from itea.1.1.1: interface variable inside FInterfacePort is removed
+ */
+
+ final List<Element> francaInterfacePorts = this.helper.getXpathResult(rootElement,
+ ".//components/ports[(@xsi:type=\"components:FInterfacePort\")]|/components:ComponentsModel/components/ports[(@xsi:type=\"components:FInterfacePort\")]",
+ Element.class, this.helper.getNS_111("components"), this.helper.getGenericNS("xsi"));
+
+
+ for (final Element port : francaInterfacePorts) {
+
+ /*- changing the value of Enum : InterfaceKind */
+
+ final Attribute attribute = port.getAttribute("kind");
+
+ if (attribute != null) {
+ if (attribute.getValue().equals("PROVIDES")) {
+ attribute.setValue("provides");
+ }
+ else if (attribute.getValue().equals("REQUIRES")) {
+ attribute.setValue("requires");
+ }
+ }
+
+ /*- Removing the reference of Franca Interface */
+ final Element francaInterfaceRef = port.getChild("interface");
+
+ if (francaInterfaceRef != null) {
+
+ /*- URI Fragment referring to Franca model element */
+ final String fInterfaceRefString = francaInterfaceRef.getAttributeValue("href");
+
+
+ final Element customPropertyElement = new Element("customProperties");
+
+ customPropertyElement.setAttribute("id", "" + EcoreUtil.generateUUID(),
+ this.helper.getGenericNS("xmi"));
+
+ customPropertyElement.setAttribute("key", "Franca interface");
+
+ final Element value_customPropertyElement = new Element("value");
+
+ value_customPropertyElement.setAttribute("type", "common:StringObject",
+ this.helper.getGenericNS("xsi"));
+
+ value_customPropertyElement.setAttribute("id", "" + EcoreUtil.generateUUID(),
+ this.helper.getGenericNS("xmi"));
+
+ value_customPropertyElement.setAttribute("value", fInterfaceRefString);
+
+ /*- adding value element to the custom property*/
+ customPropertyElement.addContent(value_customPropertyElement);
+
+ /*- adding CustomProperty to the Port element*/
+ port.addContent(customPropertyElement);
+
+ /*-Removing the reference to the Franca element */
+ francaInterfaceRef.detach();
+ }
+ }
+ }
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/ConfigConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/ConfigConverter.java
new file mode 100644
index 0000000..cfe3774
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/ConfigConverter.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters070.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters070.utils.HelperUtils_111_070;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class ConfigConverter implements IConverter {
+
+ private final HelperUtils_111_070 helper;
+
+ public ConfigConverter() {
+ this.helper = HelperUtils_111_070.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ // this.helper.updateRootElement_NameSpaces_to_070(rootElement);
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/ConstraintsConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/ConstraintsConverter.java
new file mode 100644
index 0000000..d77ae54
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/ConstraintsConverter.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters070.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters070.utils.HelperUtils_111_070;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class ConstraintsConverter implements IConverter {
+
+ private final HelperUtils_111_070 helper;
+
+ public ConstraintsConverter() {
+ this.helper = HelperUtils_111_070.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ // this.helper.updateRootElement_NameSpaces_to_070(rootElement);
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/ContentConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/ContentConverter.java
new file mode 100644
index 0000000..554c678
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/ContentConverter.java
@@ -0,0 +1,314 @@
+package org.eclipse.app4mc.amalthea.converters070.impl;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters.common.utils.AbstractHelper;
+import org.eclipse.app4mc.amalthea.converters070.utils.HelperUtils_111_070;
+import org.jdom2.Attribute;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class ContentConverter implements IConverter {
+ private final HelperUtils_111_070 helper;
+ private final Map<String, String> old_new_mappingTypes;
+
+ public ContentConverter() {
+ this.helper = HelperUtils_111_070.getInstance();
+ this.old_new_mappingTypes = new HashMap<String, String>();
+ }
+
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+
+ buildMappingTypesMap();
+
+ updateNameSpaces(root.getRootElement());
+
+ updateTypes(root.getRootElement());
+
+ updateReferences(root.getRootElement());
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+ }
+
+
+ /**
+ * This method should contain the mapping of old and new types
+ */
+ private void buildMappingTypesMap() {
+
+ this.old_new_mappingTypes.put("sw.OSEvent", "OsEvent");
+ this.old_new_mappingTypes.put("sw:OSEvent", "am:OsEvent");
+
+ this.old_new_mappingTypes.put("sw.Periodic", "PeriodicActivation");
+ this.old_new_mappingTypes.put("sw:Periodic", "am:PeriodicActivation");
+
+ this.old_new_mappingTypes.put("hw.MemType", "MemoryType");
+ this.old_new_mappingTypes.put("hw:MemType", "am:MemoryType");
+
+ this.old_new_mappingTypes.put("hw.MemoryType", "MemoryTypeEnum");
+ this.old_new_mappingTypes.put("hw:MemoryTypeEnum", "am:MemoryTypeEnum");
+
+ /*---*/
+ this.old_new_mappingTypes.put("hw.System", "HwSystem");
+ this.old_new_mappingTypes.put("hw:System", "am:HwSystem");
+
+ this.old_new_mappingTypes.put("hw.Component", "HwComponent");
+ this.old_new_mappingTypes.put("hw:Component", "am:HwComponent");
+
+ this.old_new_mappingTypes.put("hw.Port", "HwPort");
+ this.old_new_mappingTypes.put("hw:Port", "am:HwPort");
+
+ this.old_new_mappingTypes.put("hw.AbstractionType", "AbstractionTypeDescription");
+ this.old_new_mappingTypes.put("hw:AbstractionType", "am:AbstractionTypeDescription");
+
+
+ }
+
+ /**
+ * This method is used to update the root element name and the corresponding namespaces
+ */
+ private void updateNameSpaces(final Element rootElement) {
+
+ this.helper.updateRootElement_NameSpaces_to_070(rootElement);
+ }
+
+
+ /**
+ * - This method is used to update xsi:type attributes value, so that Types with new newspace are present
+ *
+ * example:
+ *
+ * Input model file content:
+ *
+ * <calls xsi:type="sw:TaskRunnableCall" runnable="//@swModel/@runnables.1072"/>
+ *
+ * Expect output after conversion:
+ *
+ * <calls xsi:type="am:TaskRunnableCall" runnable="//@swModel/@runnables.1072" />
+ *
+ * xsi:type should be converted from sw:TaskRunnableCall to am:TaskRunnableCall
+ *
+ * Note: This conversion is performed only for the AMALTHEA namespaces (available in 1.1.1).
+ *
+ * ## -- Types from Franca is not converted to have model namespace
+ *
+ * @param rootElement
+ */
+ private void updateTypes(final Element rootElement) {
+
+ final Map<String, List<Attribute>> typeAttributesMap = new HashMap<String, List<Attribute>>();
+
+ final List<Attribute> types = this.helper.getXpathResult(rootElement, ".//@xsi:type", Attribute.class,
+ this.helper.getGenericNS("xsi"));
+
+
+ /*- Group attributes having same value */
+ for (final Attribute typeAttribute : types) {
+ final String typeValue = (typeAttribute.getValue());
+
+ if (!typeAttributesMap.containsKey(typeValue)) {
+ typeAttributesMap.put(typeValue, new ArrayList<Attribute>());
+ }
+ typeAttributesMap.get(typeValue).add(typeAttribute);
+ }
+
+
+ /*- loop through the xsi:type's and update the attributes */
+ for (final String typeValue : typeAttributesMap.keySet()) {
+
+ /*-Example "sw:LabelAccess"-*/
+
+
+ if (typeValue.contains(":")) {
+
+ /* =============check if the mapping is not configured and then execute the below code ============= */
+ if (!this.old_new_mappingTypes.containsKey(typeValue)) {
+
+ final int indexOfColon = typeValue.indexOf(":");
+
+ /*- sw */
+ final String nameSpacePrefix = typeValue.substring(0, indexOfColon);
+
+ /*-check if sw namespace prefix is valid as per 1.1.1*/
+ if (this.helper.enumTypeContainsIn111(nameSpacePrefix)) {
+
+ /*-get the part on the right side of ":" */
+
+ /*-LabelAccess*/
+ final String substring = (typeValue.length() > indexOfColon + 1)
+ ? typeValue.substring(indexOfColon + 1) : "";
+
+ /*-am:LabelAccess*/
+ final String type = "am:" + substring;
+
+ final List<Attribute> attribsList = typeAttributesMap.get(typeValue);
+
+ for (final Attribute attribute : attribsList) {
+ attribute.setValue(type);
+ }
+
+ }
+
+ }
+ else {
+ /* =========Mapping is configured =============== */
+
+ final String updatedValue = this.old_new_mappingTypes.get(typeValue);
+
+ final List<Attribute> attribsList = typeAttributesMap.get(typeValue);
+
+ for (final Attribute attribute : attribsList) {
+ attribute.setValue(updatedValue);
+ }
+
+
+ }
+ }
+ }
+ }
+
+ /**
+ * - This method is used to update the references inside the model and cross document references, so that references
+ * are present as per the new concept introduced in 0.7.0
+ *
+ * example:
+ *
+ * Input model file content:
+ *
+ * <runnableItems xsi:type="sw:LabelAccess" data="ABSMode?type=sw.Label" access="write" isBuffered="inherited"/>
+ *
+ * Expect output after conversion:
+ *
+ * <runnableItems xsi:type="am:LabelAccess" data="ABSMode?type=Label" access="write" isBuffered="inherited" />
+ *
+ * references should be updated without having namespace prefix of the packages for all the Types
+ *
+ * In the above example, data attribute is to be updated from value "ABSMode?type=sw.Label" to "ABSMode?type=Label"
+ *
+ *
+ * @param rootElement
+ */
+ private void updateReferences(final Element rootElement) {
+
+ final Map<String, List<Attribute>> typeAttributesMap = new HashMap<String, List<Attribute>>();
+
+ final List<Attribute> types = this.helper.getXpathResult(rootElement, ".//@*", Attribute.class,
+ this.helper.getGenericNS("xsi"));
+
+
+ /*- Group attributes having same value */
+ for (final Attribute typeAttribute : types) {
+ final String typeValue = (typeAttribute.getValue());
+
+ /*- As per 1.1.1, references will be in the following format : "<element name>?type=<namespace prefix>.<Element Type>"
+ * example: "BrakePedalPosition?type=sw.Label"
+ */
+ if (typeValue.contains("?type=")) {
+
+ if (!typeAttributesMap.containsKey(typeValue)) {
+ typeAttributesMap.put(typeValue, new ArrayList<Attribute>());
+ }
+ typeAttributesMap.get(typeValue).add(typeAttribute);
+
+ }
+
+ }
+
+
+ /*- loop through the attributes containing references in 1.1.1 format */
+
+ for (final String refString : typeAttributesMap.keySet()) {
+
+ /*- It is also possible to have references to multiple elements (delimited with space)
+ * Eample: <eventMask events="OS_Event_1?type=sw.OSEvent OS_Event_2?type=sw.OSEvent"/>
+ *
+ */
+
+ final StringTokenizer tokenizer = new StringTokenizer(refString);
+
+ final StringBuffer convertedReferencesBuffer = new StringBuffer();
+
+ while (tokenizer.hasMoreTokens()) {
+
+ final String typeValue = tokenizer.nextToken();
+
+ /*- Example: "BrakePedalPosition?type=sw.Label" */
+
+ final int indexOfColon = typeValue.indexOf("=");
+
+ /*- BrakePedalPosition?type */
+ final String ref_part_1 = typeValue.substring(0, indexOfColon);
+
+ /*-sw.Label*/
+ final String ref_part_2 = (typeValue.length() > (indexOfColon + 1))
+ ? typeValue.substring(indexOfColon + 1) : "";
+
+
+ String convertedRefString = "";
+
+ if (!this.old_new_mappingTypes.containsKey(ref_part_2)) {
+
+ /*-sw.Label*/
+ if (ref_part_2.contains(".")) {
+
+ final int indexOfDot = ref_part_2.indexOf(".");
+
+ /* sw */
+ // final String nameSpacePrefix = ref_part_2.substring(0, indexOfDot);
+
+ /*-Label*/
+ final String type = (ref_part_2.length() > (indexOfDot + 1))
+ ? ref_part_2.substring(indexOfDot + 1) : "";
+
+ /*- BrakePedalPosition?type=Label */
+ convertedRefString = ref_part_1 + "=" + type;
+
+ }
+
+ }
+ else {
+ /*- BrakePedalPosition?type=Label */
+ convertedRefString = ref_part_1 + "=" + this.old_new_mappingTypes.get(ref_part_2);
+ }
+ convertedReferencesBuffer.append(convertedRefString + " ");
+ }
+
+ final List<Attribute> attribsList = typeAttributesMap.get(refString);
+
+ for (final Attribute attribute : attribsList) {
+ /* updating of convertedRefString */
+ attribute.setValue(convertedReferencesBuffer.toString().trim());
+ }
+
+
+ }
+
+ }
+
+ private HelperUtils_111_070 getHelper(final AbstractHelper helper) {
+ if (!(helper instanceof HelperUtils_111_070)) {
+
+ return HelperUtils_111_070.getInstance();
+ }
+ return (HelperUtils_111_070) helper;
+ }
+
+
+}
+
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/EventsConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/EventsConverter.java
new file mode 100644
index 0000000..de7686e
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/EventsConverter.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters070.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters070.utils.HelperUtils_111_070;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class EventsConverter implements IConverter {
+
+ private final HelperUtils_111_070 helper;
+
+ public EventsConverter() {
+ this.helper = HelperUtils_111_070.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ // this.helper.updateRootElement_NameSpaces_to_070(rootElement);
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/HwConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/HwConverter.java
new file mode 100644
index 0000000..46e37d4
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/HwConverter.java
@@ -0,0 +1,240 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters070.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters070.utils.HelperUtils_111_070;
+import org.jdom2.Attribute;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class HwConverter implements IConverter {
+
+ private final HelperUtils_111_070 helper;
+
+ public HwConverter() {
+ this.helper = HelperUtils_111_070.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ update_ComplexPort_isMaster(rootElement);
+
+ update_ComplexNode_attributes(rootElement);
+
+ update_ComplexNode_features(rootElement);
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+ }
+
+
+ private void update_ComplexNode_attributes(final Element rootElement) {
+
+ /*--
+ * Migraiton step to App4MC 0.7.0 from itea.1.1.1: AbstractType[] attribute references are removed inside ComplexNode
+ *
+ * As a part of migration, CustomProperties should be created for each "attribute" element
+ */
+
+
+ final StringBuffer xpathBuffer = new StringBuffer();
+
+ xpathBuffer.append(
+ ".//hwModel//attribute[(@xsi:type=\"hw:BoolValue\") or (@xsi:type=\"hw:CharValue\") or (@xsi:type=\"hw:DoubleValue\") or (@xsi:type=\"hw:IntValue\") or (@xsi:type=\"hw:LongValue\") or (@xsi:type=\"hw:StrValue\") or (@xsi:type=\"hw:FeatureTypes\") ]");
+ xpathBuffer.append("|");
+ xpathBuffer.append(
+ "/hw:HWModel//attribute[(@xsi:type=\"hw:BoolValue\") or (@xsi:type=\"hw:CharValue\") or (@xsi:type=\"hw:DoubleValue\") or (@xsi:type=\"hw:IntValue\") or (@xsi:type=\"hw:LongValue\") or (@xsi:type=\"hw:StrValue\") or (@xsi:type=\"hw:FeatureTypes\") ]");
+
+
+ final List<Element> elements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(), Element.class,
+ this.helper.getNS_111("hw"), this.helper.getGenericNS("xsi"));
+
+
+ for (final Element element : elements) {
+
+ createCustomProperty_Attrib_Feature(element, "attribute#");
+
+ }
+
+ }
+
+ private void update_ComplexNode_features(final Element rootElement) {
+
+ /*--
+ * Migraiton step to App4MC 0.7.0 from itea.1.1.1: AbstractType[] attribute references are removed inside ComplexNode
+ *
+ * As a part of migration, CustomProperties should be created for each "attribute" element
+ */
+
+
+ final StringBuffer xpathBuffer = new StringBuffer();
+
+ xpathBuffer.append(
+ ".//hwModel//features[(@xsi:type=\"hw:BoolValue\") or (@xsi:type=\"hw:CharValue\") or (@xsi:type=\"hw:DoubleValue\") or (@xsi:type=\"hw:IntValue\") or (@xsi:type=\"hw:LongValue\") or (@xsi:type=\"hw:StrValue\") or (@xsi:type=\"hw:FeatureTypes\") ]");
+ xpathBuffer.append("|");
+ xpathBuffer.append(
+ "/hw:HWModel//features[(@xsi:type=\"hw:BoolValue\") or (@xsi:type=\"hw:CharValue\") or (@xsi:type=\"hw:DoubleValue\") or (@xsi:type=\"hw:IntValue\") or (@xsi:type=\"hw:LongValue\") or (@xsi:type=\"hw:StrValue\") or (@xsi:type=\"hw:FeatureTypes\") ]");
+
+
+ final List<Element> elements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(), Element.class,
+ this.helper.getNS_111("hw"), this.helper.getGenericNS("xsi"));
+
+
+ for (final Element element : elements) {
+
+ createCustomProperty_Attrib_Feature(element, "feature#");
+
+ }
+
+ }
+
+ /**
+ * This method is used to build the CustomProperty content from the supplied attribute/feature AMALTHEA element
+ *
+ * @param element
+ * object of class extending AbstractType (of types BoolValue or CharValue or DoubleValue etc.,)
+ * @param prefix
+ * content to be added as prefix for the key of CustomProperty
+ */
+ private void createCustomProperty_Attrib_Feature(final Element element, final String prefix) {
+
+ final String type = element.getAttributeValue("type", this.helper.getGenericNS("xsi"));
+
+ final String name = element.getAttributeValue("name");
+
+ final String value = element.getAttributeValue("value");
+
+ final Element customPropertyElement = new Element("customProperties");
+
+ customPropertyElement.setAttribute("key", prefix + name);
+
+ final Element valueElement = new Element("value");
+
+ customPropertyElement.addContent(valueElement);
+
+ if (type.equals("hw:BoolValue")) {
+
+ valueElement.setAttribute("type", "am:BooleanObject", this.helper.getGenericNS("xsi"));
+
+ if (value != null) {
+ valueElement.setAttribute("value", value);
+ }
+ }
+ else if (type.equals("hw:CharValue")) {
+
+ valueElement.setAttribute("type", "am:StringObject", this.helper.getGenericNS("xsi"));
+
+ if (value != null) {
+
+ try {
+
+ final int intValue = Integer.parseInt(value);
+
+ final char[] chars = Character.toChars(intValue);
+
+
+ valueElement.setAttribute("value", String.copyValueOf(chars));
+ }
+ catch (final Exception e) {
+ // TODO: log info that there was some issue during the conversion
+ }
+ }
+ }
+ else if (type.equals("hw:DoubleValue")) {
+
+ valueElement.setAttribute("type", "am:DoubleObject", this.helper.getGenericNS("xsi"));
+
+ if (value != null) {
+ valueElement.setAttribute("value", value);
+ }
+
+ }
+ else if (type.equals("hw:IntValue")) {
+
+ valueElement.setAttribute("type", "am:IntegerObject", this.helper.getGenericNS("xsi"));
+
+ if (value != null) {
+ valueElement.setAttribute("value", value);
+ }
+
+
+ }
+ else if (type.equals("hw:LongValue")) {
+
+ valueElement.setAttribute("type", "am:LongObject", this.helper.getGenericNS("xsi"));
+
+ if (value != null) {
+ valueElement.setAttribute("value", value);
+ }
+
+ }
+ else if (type.equals("hw:StrValue")) {
+
+ valueElement.setAttribute("type", "am:StringObject", this.helper.getGenericNS("xsi"));
+
+ if (value != null) {
+ valueElement.setAttribute("value", value);
+ }
+ }
+ else if (type.equals("hw:FeatureTypes")) {
+
+ customPropertyElement.setAttribute("key", prefix + "FeatureTypes#" + name);
+
+ valueElement.setAttribute("type", "am:StringObject", this.helper.getGenericNS("xsi"));
+
+ if (value != null) {
+ valueElement.setAttribute("value", value);
+ }
+
+ }
+
+
+ /*- now adding customproperty to the parent of "attribute" element*/
+
+ element.getParent().addContent(customPropertyElement);
+
+ element.detach();
+ }
+
+
+ private void update_ComplexPort_isMaster(final Element rootElement) {
+
+ /*--
+ * Migraiton step to App4MC 0.7.0 from itea.1.1.1: isMaster variable inside ComplexPort is changed to master
+ */
+
+ final List<Attribute> attributes = this.helper.getXpathResult(rootElement,
+ ".//hwModel//ports[(@xsi:type=\"hw:ComplexPort\")]/@isMaster|/hw:HWModel//ports[(@xsi:type=\"hw:ComplexPort\")]/@isMaster",
+ Attribute.class, this.helper.getNS_111("hw"), this.helper.getGenericNS("xsi"));
+
+
+ for (final Attribute isMasterAttribute : attributes) {
+
+ isMasterAttribute.setName("master");
+ }
+
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/MappingConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/MappingConverter.java
new file mode 100644
index 0000000..b7c859d
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/MappingConverter.java
@@ -0,0 +1,240 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters070.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters070.utils.HelperUtils_111_070;
+import org.jdom2.Attribute;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class MappingConverter implements IConverter {
+
+ private final HelperUtils_111_070 helper;
+
+ public MappingConverter() {
+ this.helper = HelperUtils_111_070.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ update_ProcessAllocation(rootElement);
+
+ update_Mapping_mem(rootElement);
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+ }
+
+ private void update_Mapping_mem(final Element rootElement) {
+
+ final List<Element> mappings = this.helper.getXpathResult(rootElement,
+ ".//mappingModel/mapping|/mapping:MappingModel/mapping", Element.class,
+ this.helper.getNS_111("mapping"), this.helper.getGenericNS("xsi"));
+
+ for (final Element mappingElement : mappings) {
+
+ final Attribute memAttribute = mappingElement.getAttribute("mem");
+
+ if (memAttribute != null) {
+ memAttribute.setName("memory");
+ }
+ else {
+ /*-This is a case of cross document reference */
+
+ final Element memElement = mappingElement.getChild("mem");
+ if (memElement != null) {
+ memElement.setName("memory");
+ }
+ }
+
+
+ }
+
+ }
+
+ private void update_ProcessAllocation(final Element rootElement) {
+
+ /*--
+ * Migraiton step to App4MC 0.7.0 from itea.1.1.1: processAllocation tag contents are splitted into taskAllocation, isrAllocation
+ */
+
+ final List<Element> taskAllocations = this.helper.getXpathResult(rootElement,
+ ".//mappingModel/processAllocation[(@xsi:type=\"mapping:TaskAllocation\")]|/mapping:MappingModel/processAllocation[(@xsi:type=\"mapping:TaskAllocation\")]",
+ Element.class, this.helper.getNS_111("mapping"), this.helper.getGenericNS("xsi"));
+
+
+ for (final Element processAllocationElement : taskAllocations) {
+
+
+ final Element newTaskAllocationElement = new Element("taskAllocation");
+
+ final String process = processAllocationElement.getAttributeValue("process");
+
+ final String scheduler = processAllocationElement.getAttributeValue("scheduler");
+
+ /*-
+ * This content will occur when both Process and Scheduler elemetns are referred from different model files
+ *==============================
+ *Input from 1.1.1:
+ *==============================
+ * <processAllocation xsi:type="mapping:TaskAllocation">
+ * <process xsi:type="sw:Task" href="amlt:/#Task_sw?type=sw.Task"/>
+ * <scheduler xsi:type="os:TaskScheduler" href="amlt:/#scheduler_os?type=os.TaskScheduler"/>
+ * </processAllocation>
+ *
+ *==============================
+ *Expected output from migrator:
+ *==============================
+ *<taskAllocation>
+ * <task href="amlt:/#Task_sw?type=Task"/>
+ * <scheduler href="amlt:/#scheduler_os?type=TaskScheduler"/>
+ * </taskAllocation>
+ */
+
+ if (process != null) {
+
+ newTaskAllocationElement.setAttribute("task", process);
+
+ }
+ else {
+ final Element processElement = processAllocationElement.getChild("process");
+
+ final String href = processElement != null ? processElement.getAttributeValue("href") : null;
+
+ if (href != null) {
+ final Element sub_task_Element = new Element("task");
+ sub_task_Element.setAttribute("href", href);
+ /*- Associating task element to the taskAllocation element */
+ newTaskAllocationElement.addContent(sub_task_Element);
+ }
+
+ }
+
+ if (scheduler != null) {
+ newTaskAllocationElement.setAttribute("scheduler", scheduler);
+ }
+ else {
+ final Element schedulerElement = processAllocationElement.getChild("scheduler");
+
+ final String href = schedulerElement != null ? schedulerElement.getAttributeValue("href") : null;
+
+ if (href != null) {
+ final Element sub_scheduler_Element = new Element("scheduler");
+ sub_scheduler_Element.setAttribute("href", href);
+ /*- Associating task element to the taskAllocation element */
+ newTaskAllocationElement.addContent(sub_scheduler_Element);
+ }
+ }
+
+
+ /*- associating the new element to the parent */
+ final Element parentElement = processAllocationElement.getParentElement();
+
+ parentElement.addContent(newTaskAllocationElement);
+
+ processAllocationElement.detach();
+
+ }
+
+ /* =============== Handling elements of type mapping:ISRAllocation =============== */
+
+ final List<Element> isrAllocations = this.helper.getXpathResult(rootElement,
+ ".//mappingModel/processAllocation[(@xsi:type=\"mapping:ISRAllocation\")]|/mapping:MappingModel/processAllocation[(@xsi:type=\"mapping:ISRAllocation\")]",
+ Element.class, this.helper.getNS_111("mapping"), this.helper.getGenericNS("xsi"));
+
+ for (final Element processAllocationElement : isrAllocations) {
+
+ final Element newISRAllocationElement = new Element("isrAllocation");
+
+ final String process = processAllocationElement.getAttributeValue("process");
+
+ final String scheduler = processAllocationElement.getAttributeValue("scheduler");
+
+ /*-
+ * This content will occur when both Process and Scheduler elemetns are referred from different model files
+ *==============================
+ *Input from 1.1.1:
+ *==============================
+ * <processAllocation xsi:type="mapping:ISRAllocation">
+ * <process xsi:type="sw:ISR" href="amlt:/#ISR_SW?type=sw.ISR"/>
+ * <scheduler xsi:type="os:InterruptController" href="amlt:/#IC_os?type=os.InterruptController"/>
+ * </processAllocation>
+ *
+ *==============================
+ *Expected output from migrator:
+ *==============================
+ *<isrAllocation>
+ * <isr href="amlt:/#ISR_sw?type=ISR"/>
+ * <controller href="amlt:/#IC_os?type=InterruptController"/>
+ * </isrAllocation>
+ */
+ if (process != null) {
+ newISRAllocationElement.setAttribute("isr", process);
+ }
+ else {
+ final Element processElement = processAllocationElement.getChild("process");
+
+ final String href = processElement != null ? processElement.getAttributeValue("href") : null;
+
+ if (href != null) {
+ final Element sub_isr_Element = new Element("isr");
+ sub_isr_Element.setAttribute("href", href);
+ /*- Associating task element to the taskAllocation element */
+ newISRAllocationElement.addContent(sub_isr_Element);
+ }
+
+ }
+
+
+ if (scheduler != null) {
+ newISRAllocationElement.setAttribute("controller", scheduler);
+ }
+ else {
+ final Element schedulerElement = processAllocationElement.getChild("scheduler");
+
+ final String href = schedulerElement != null ? schedulerElement.getAttributeValue("href") : null;
+
+ if (href != null) {
+ final Element sub_controller_Element = new Element("controller");
+ sub_controller_Element.setAttribute("href", href);
+ /*- Associating task element to the taskAllocation element */
+ newISRAllocationElement.addContent(sub_controller_Element);
+ }
+ }
+
+
+ /*- associating the new element to the parent */
+ final Element parentElement = processAllocationElement.getParentElement();
+
+ parentElement.addContent(newISRAllocationElement);
+
+ processAllocationElement.detach();
+ }
+
+
+ }
+
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/OsConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/OsConverter.java
new file mode 100644
index 0000000..7f384e6
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/OsConverter.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters070.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters070.utils.HelperUtils_111_070;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class OsConverter implements IConverter {
+
+ private final HelperUtils_111_070 helper;
+
+ public OsConverter() {
+ this.helper = HelperUtils_111_070.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ // this.helper.updateRootElement_NameSpaces_to_070(rootElement);
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/PropertyContraintsConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/PropertyContraintsConverter.java
new file mode 100644
index 0000000..5196bc5
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/PropertyContraintsConverter.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters070.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters070.utils.HelperUtils_111_070;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class PropertyContraintsConverter implements IConverter {
+
+ private final HelperUtils_111_070 helper;
+
+ public PropertyContraintsConverter() {
+ this.helper = HelperUtils_111_070.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ update_MemTypeDefinitions(rootElement);
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+ }
+
+ private void update_MemTypeDefinitions(final Element rootElement) {
+
+
+ /*--
+ * Migraiton step to App4MC 0.7.0 from itea.1.1.1: memTypeDefinitions inside PropertyConstraintsModel are changed to memoryTypeDefinitions
+ */
+
+ final List<Element> memTypeDefinitions = this.helper.getXpathResult(rootElement,
+ ".//propertyConstraintsModel/memTypeDefinitions|/propertyconstraints:PropertyConstraintsModel/memTypeDefinitions",
+ Element.class, this.helper.getNS_111("propertyconstraints"));
+
+
+ for (final Element element : memTypeDefinitions) {
+
+ element.setName("memoryTypeDefinitions");
+ }
+
+
+ /*-
+ * TODO: NOTE: currently it is not supported to migrate URI-Fragments inside CustomProperties and other
+ * references->
+ * - as it could be a huge performance hit in finding all the references of hw:MemType in various
+ * customproprerties across the models and updating them accordingly
+ *
+ * ## In a case user is having models with URI fragments, it is expected that they manually convert such models to have URI fragments (by using the workflow components provided by the Amalthea team)
+ */
+
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/StimuliConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/StimuliConverter.java
new file mode 100644
index 0000000..8b0142d
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/StimuliConverter.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters070.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters070.utils.HelperUtils_111_070;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class StimuliConverter implements IConverter {
+
+ private final HelperUtils_111_070 helper;
+
+ public StimuliConverter() {
+ this.helper = HelperUtils_111_070.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/SwConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/SwConverter.java
new file mode 100644
index 0000000..3a0d38f
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/impl/SwConverter.java
@@ -0,0 +1,298 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters070.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters070.utils.HelperUtils_111_070;
+import org.jdom2.Attribute;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class SwConverter implements IConverter {
+
+ private final HelperUtils_111_070 helper;
+
+ public SwConverter() {
+ this.helper = HelperUtils_111_070.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+
+ update_ModeSwitchEntry_isDefault(rootElement);
+
+ update_RunnableItem_isBuffered(rootElement);
+
+ update_RunnableItem_accessEnum(rootElement);
+
+ update_RunnableItem_isOrdered(rootElement);
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+ }
+
+
+ private void update_ModeSwitchEntry_isDefault(final Element rootElement) {
+
+
+ /*--
+ * Migraiton step to App4MC 0.7.0 from itea.1.1.1: isDefault variable inside ModeSwitchEntry is changed to default
+ */
+
+ final List<Attribute> isDefaultAttributes = this.helper.getXpathResult(rootElement,
+ ".//swModel//graphEntries[(@xsi:type=\"sw:ModeSwitch\")]/entries/@isDefault|/sw:SWModel//graphEntries[(@xsi:type=\"sw:ModeSwitch\")]/entries/@isDefault",
+ Attribute.class, this.helper.getNS_111("sw"), this.helper.getGenericNS("xsi"));
+
+
+ for (final Attribute isDefaultAttribute : isDefaultAttributes) {
+
+ isDefaultAttribute.setName("default");
+ }
+
+ }
+
+ private void update_RunnableItem_isBuffered(final Element rootElement) {
+
+
+ /*--
+ * Migraiton step to App4MC 0.7.0 from itea.1.1.1:
+ * - isBuffered variable inside Label is changed to buffered
+ * - isBuffered variable inside LabelAccess is changed to buffered
+ * - isBuffered variable inside SenderReceiverCommunication is changed to buffered
+ *
+ * (As LabelAccess, SenderReceiverCommunication are RunnableItem, all the containments of RunnableItem with the corresponding types, are considred for this migration)
+ *
+ * Note: As SenderReceiverCommunication (Abstract class) is further extended by sw:SenderReceiverRead and sw:SenderReceiverWrite. Both these types should be considered
+ */
+
+
+ final StringBuffer xpathBuffer = new StringBuffer();
+
+ xpathBuffer.append(".//swModel/labels/@isBuffered|/sw:SWModel/labels/@isBuffered");
+ xpathBuffer.append("|");
+ xpathBuffer.append(
+ ".//swModel/runnables/runnableItems[(@xsi:type=\"sw:LabelAccess\") or (@xsi:type=\"sw:SenderReceiverRead\") or (@xsi:type=\"sw:SenderReceiverWrite\")]/@isBuffered|/sw:SWModel/runnables/runnableItems[(@xsi:type=\"sw:LabelAccess\") or (@xsi:type=\"sw:SenderReceiverRead\") or (@xsi:type=\"sw:SenderReceiverWrite\")]/@isBuffered");
+ xpathBuffer.append("|");
+ xpathBuffer.append(
+ ".//swModel//runnableItem[(@xsi:type=\"sw:LabelAccess\") or (@xsi:type=\"sw:SenderReceiverRead\") or (@xsi:type=\"sw:SenderReceiverWrite\")]/@isBuffered|/sw:SWModel//runnableItem[(@xsi:type=\"sw:LabelAccess\") or (@xsi:type=\"sw:SenderReceiverRead\") or (@xsi:type=\"sw:SenderReceiverWrite\")]/@isBuffered");
+
+ final List<Attribute> isDefaultAttributes = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
+ Attribute.class, this.helper.getNS_111("sw"), this.helper.getGenericNS("xsi"));
+
+
+ for (final Attribute isDefaultAttribute : isDefaultAttributes) {
+
+ isDefaultAttribute.setName("buffered");
+ }
+
+ }
+
+ private void update_RunnableItem_accessEnum(final Element rootElement) {
+
+
+ /*--
+ * Migraiton step to App4MC 0.7.0 from itea.1.1.1:
+ * - accessEnum variable inside SemaphoreAccess is changed to access
+ * (As SemaphoreAccess is a RunnableItem, all the containments of RunnableItem are considred for this migration)
+ */
+
+
+ final StringBuffer xpathBuffer = new StringBuffer();
+
+ xpathBuffer.append(
+ ".//swModel/runnables/runnableItems[(@xsi:type=\"sw:SemaphoreAccess\")]/@accessEnum|/sw:SWModel/runnables/runnableItems[(@xsi:type=\"sw:SemaphoreAccess\")]/@accessEnum");
+ xpathBuffer.append("|");
+ xpathBuffer.append(
+ ".//swModel//runnableItem[(@xsi:type=\"sw:SemaphoreAccess\")]/@accessEnum|/sw:SWModel//runnableItem[(@xsi:type=\"sw:SemaphoreAccess\")]/@accessEnum");
+
+ final List<Attribute> isDefaultAttributes = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
+ Attribute.class, this.helper.getNS_111("sw"), this.helper.getGenericNS("xsi"));
+
+
+ for (final Attribute isDefaultAttribute : isDefaultAttributes) {
+
+ isDefaultAttribute.setName("access");
+ }
+
+ }
+
+ private void update_RunnableItem_isOrdered(final Element rootElement) {
+
+
+ /*--
+ * Migraiton step to App4MC 0.7.0 from itea.1.1.1:
+ * - isOrdered variable inside Group is changed to ordered
+ * (As Group is a RunnableItem, all the containments of RunnableItem are considred for this migration)
+ */
+
+
+ final StringBuffer xpathBuffer = new StringBuffer();
+
+ xpathBuffer.append(
+ ".//swModel/runnables/runnableItems[(@xsi:type=\"sw:Group\")]/@isOrdered|/sw:SWModel/runnables/runnableItems[(@xsi:type=\"sw:Group\")]/@isOrdered");
+ xpathBuffer.append("|");
+ xpathBuffer.append(
+ ".//swModel//runnableItem[(@xsi:type=\"sw:Group\")]/@isOrdered|/sw:SWModel//runnableItem[(@xsi:type=\"sw:Group\")]/@isOrdered");
+
+ final List<Attribute> isDefaultAttributes = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
+ Attribute.class, this.helper.getNS_111("sw"), this.helper.getGenericNS("xsi"));
+
+
+ for (final Attribute isDefaultAttribute : isDefaultAttributes) {
+
+ isDefaultAttribute.setName("ordered");
+ }
+
+ }
+
+
+ /**
+ * This method is used to handle the conversion for class Periodic (till 1.1.1) which is changed to
+ * PeriodicActivation
+ *
+ * PeriodicActivation can occur inside the following -<br>
+ * - SWModel (as container) <br>
+ * - ProcessPrototype (association) <br>
+ * - Runnable (association)
+ *
+ * @param rootElement
+ */
+ private void updatePeriodic(final Element rootElement) {
+
+
+ /*- <activations xsi:type="sw:Periodic" name="periodic_activation"/> */
+
+ final List<Element> activations = this.helper.getXpathResult(rootElement,
+ ".//swModel/activations[(@xsi:type=\"sw:Periodic\")]|/sw:SWModel/activations[(@xsi:type=\"sw:Periodic\")]",
+ Element.class, this.helper.getNS_111("sw"), this.helper.getGenericNS("xsi"));
+
+ /*- <runnables name="Runnable1" activation="periodic_activation?type=sw.Periodic"/> */
+
+ final List<Element> runnables = this.helper.getXpathResult(rootElement,
+ ".//swModel/runnables|/sw:SWModel/runnables", Element.class, this.helper.getNS_111("sw"),
+ this.helper.getGenericNS("xsi"));
+
+
+ /*- <processPrototypes name="pp1" activation="periodic_activation?type=sw.Periodic"/> */
+
+ final List<Element> processPrototypes = this.helper.getXpathResult(rootElement,
+ ".//swModel/processPrototypes|/sw:SWModel/processPrototypes", Element.class,
+ this.helper.getNS_111("sw"), this.helper.getGenericNS("xsi"));
+
+
+ for (final Element element : runnables) {
+
+ /*- <runnables name="Runnable1" activation="periodic_activation?type=sw.Periodic"/> */
+
+ final Attribute attribute = element.getAttribute("activation");
+
+ if (attribute != null) {
+
+ final String updatedValue = this.helper.updateReferenceWithType(attribute.getValue(),
+ "PeriodicActivation");
+
+ attribute.setValue(updatedValue);
+ }
+ else {
+ updateReferencesInActivation(element);
+ }
+ }
+
+
+ for (final Element element : processPrototypes) {
+
+ /*- <processPrototypes name="pp1" activation="periodic_activation?type=sw.Periodic"/> */
+
+ final Attribute attribute = element.getAttribute("activation");
+
+ if (attribute != null) {
+
+ final String updatedValue = this.helper.updateReferenceWithType(attribute.getValue(),
+ "PeriodicActivation");
+
+ attribute.setValue(updatedValue);
+ }
+ else {
+ updateReferencesInActivation(element);
+
+ }
+ }
+
+
+ for (final Element activation : activations) {
+ /*- <activations xsi:type="sw:Periodic" name="periodic_activation"/> */
+
+ final Attribute attribute = activation.getAttribute("type", this.helper.getGenericNS("xsi"));
+ if (attribute != null) {
+ attribute.setValue("am:PeriodicActivation");
+ }
+
+ }
+
+
+ }
+
+ /**
+ * This method is used to update the references & type of Periodic inside activation node (which occurs when
+ * PeriodicActivation defined in other file is referred inside Runnable/ProcessPrototype)
+ */
+
+ private void updateReferencesInActivation(final Element element) {
+
+ /*-
+ * Example:
+ * <runnables name="r3">
+ * <activation xsi:type="sw:Periodic" href="amlt:/#periodic_activation?type=sw.Periodic"/>
+ * </runnables>
+ */
+
+ final Element activation = element.getChild("activation");
+
+ if (activation != null) {
+
+ /*- update value of xsi:type */
+
+ final Attribute typeAttribute = activation.getAttribute("type", this.helper.getGenericNS("xsi"));
+ if (typeAttribute != null) {
+
+ typeAttribute.setValue("am:PeriodicActivation");
+ }
+
+ /*- update referenceValue of activation Attribute */
+
+ final Attribute hrefAttribute = activation.getAttribute("href");
+
+ if (hrefAttribute != null) {
+
+ final String updatedValue = this.helper.updateReferenceWithType(hrefAttribute.getValue(),
+ "PeriodicActivation");
+
+ hrefAttribute.setValue(updatedValue);
+ }
+
+
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/utils/HelperUtils_111_070.java b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/utils/HelperUtils_111_070.java
new file mode 100644
index 0000000..10d949d
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.070/src/org/eclipse/app4mc/amalthea/converters070/utils/HelperUtils_111_070.java
@@ -0,0 +1,183 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters070.utils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.app4mc.amalthea.converters.common.utils.AbstractHelper;
+import org.eclipse.app4mc.amalthea.converters.common.utils.NameSpace_070;
+import org.jdom2.Attribute;
+import org.jdom2.Element;
+import org.jdom2.Namespace;
+
+public class HelperUtils_111_070 extends AbstractHelper {
+
+ private HelperUtils_111_070() {
+
+ }
+
+ private static HelperUtils_111_070 instance;
+
+ public static HelperUtils_111_070 getInstance() {
+
+ if (instance == null) {
+ instance = new HelperUtils_111_070();
+ }
+
+ return instance;
+ }
+
+ public Element createAmaltheaElement_070() {
+
+ final Element amaltheaElement = new Element("AMALTHEA");
+ amaltheaElement.setNamespace(Namespace.getNamespace("central", NameSpace_070.am.getNSValue()));
+
+ amaltheaElement
+ .addNamespaceDeclaration(Namespace.getNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance"));
+
+ amaltheaElement.addNamespaceDeclaration(Namespace.getNamespace("xmi", "http://www.omg.org/XMI"));
+
+
+ final Attribute attrib = new Attribute("version", "2.0");
+
+ attrib.setNamespace(Namespace.getNamespace("xmi", "http://www.omg.org/XMI"));
+
+ amaltheaElement.setAttribute(attrib);
+
+ return amaltheaElement;
+
+ }
+
+
+ /**
+ * This method is used to update the namespace references to 110
+ *
+ * @param rootElement
+ */
+
+ public void updateRootElement_NameSpaces_to_070(final Element rootElement) {
+
+ final Namespace defaultNamespace = rootElement.getNamespace();
+
+
+ if (isNS_AvailableIn_111(defaultNamespace)) {
+
+ final String rootElementName = rootElement.getName();
+
+ /*- As the root element AMALTHEA name is changed to Amalthea"*/
+
+ if (rootElementName != null && rootElementName.equals("AMALTHEA")) {
+ rootElement.setName("Amalthea");
+ }
+
+
+ // if still 1.1.1 uri is used, then transform all URI's
+
+ rootElement.setNamespace(null);
+
+ rootElement.removeNamespaceDeclaration(defaultNamespace);
+
+ rootElement.setNamespace(getNS_070("am"));
+
+ // updating additional namespaces to the ones from 0.7.0
+
+ final List<Namespace> additionalNamespaces = new ArrayList<Namespace>();
+
+ additionalNamespaces.addAll(rootElement.getAdditionalNamespaces());
+
+ for (int i = 0; i < additionalNamespaces.size(); i++) {
+
+ final Namespace ns = additionalNamespaces.get(i);
+
+ if (isNS_AvailableIn_111(ns)) {
+
+ rootElement.removeNamespaceDeclaration(ns);
+
+ }
+
+ }
+
+ rootElement.addNamespaceDeclaration(getGenericNS("xmi"));
+
+ rootElement.addNamespaceDeclaration(getGenericNS("xsi"));
+
+ }
+ }
+
+ /**
+ * This method is used to update the new Type in: <br>
+ * - references of format 1.1.1 and higher<br>
+ *
+ * @param inputString
+ * @param newTypeWithPrefix
+ * @return
+ */
+ public String updateReferenceWithType(final String inputString,
+ final String newTypeWithPrefix/* , final boolean isReference */) {
+
+ // if (isReference) {
+
+ /*- Example: inputString:
+ *
+ * activation="periodic_activation?type=sw.Periodic"
+ *
+ * newType:
+ *
+ * am:PeriodicActivation
+ * */
+
+ if (inputString != null && inputString.contains("?type=")) {
+
+ /*- periodic_activation?type=.*/
+ final int lastIndexOf = inputString.lastIndexOf("=");
+
+ if (lastIndexOf != -1) {
+ /*- periodic_activation?type=model.PeriodicActivation*/
+ return inputString.substring(0, lastIndexOf + 1) + newTypeWithPrefix;
+ }
+
+ }
+
+ // }
+ // else {
+ // /*- This is scenario of xsi:type value updation */
+ //
+ // /*-
+ // * Example: inputString
+ // *
+ // * xsi:type="sw:Periodic"
+ // *
+ // * newType:
+ // *
+ // * am:PeriodicActivation
+ // */
+ //
+ // /* sw:Periodic */
+ // if (inputString != null && inputString.contains(":")) {
+ //
+ // /* sw: */
+ // final int lastIndexOf = inputString.lastIndexOf(":");
+ //
+ // if (lastIndexOf != -1) {
+ // /*- sw:PeriodicActivation
+ // * */
+ // return inputString.substring(0, lastIndexOf + 1) + newTypeWithPrefix;
+ // }
+ //
+ // }
+ // }
+
+
+ return inputString;
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/.classpath b/plugins/org.eclipse.app4mc.amalthea.converters.110/.classpath
new file mode 100644
index 0000000..eca7bdb
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/.gitignore b/plugins/org.eclipse.app4mc.amalthea.converters.110/.gitignore
new file mode 100644
index 0000000..09e3bc9
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/.gitignore
@@ -0,0 +1,2 @@
+/bin/
+/target/
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/.project b/plugins/org.eclipse.app4mc.amalthea.converters.110/.project
new file mode 100644
index 0000000..a140ac1
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.app4mc.amalthea.converters.110</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.app4mc.amalthea.converters.110/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..0c68a61
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/META-INF/MANIFEST.MF b/plugins/org.eclipse.app4mc.amalthea.converters.110/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..593398f
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: APP4MC Amalthea Converters to Itea-1.1.0
+Bundle-SymbolicName: org.eclipse.app4mc.amalthea.converters.110;singleton:=true
+Bundle-Version: 0.7.0.qualifier
+Bundle-Activator: org.eclipse.app4mc.amalthea.converters110.Activator
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.app4mc.amalthea.converters.common
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.app4mc.amalthea.converters110,
+ org.eclipse.app4mc.amalthea.converters110.impl,
+ org.eclipse.app4mc.amalthea.converters110.utils
+Bundle-Vendor: Eclipse.org
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/about.html b/plugins/org.eclipse.app4mc.amalthea.converters.110/about.html
new file mode 100644
index 0000000..49696f9
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/about.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>September 30, 2013</p>
+<h3>License</h3>
+
+<p>APP4MC provides all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/build.properties b/plugins/org.eclipse.app4mc.amalthea.converters.110/build.properties
new file mode 100644
index 0000000..a98a626
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ epl-v10.html,\
+ about.html
+src.includes = epl-v10.html,\
+ about.html
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/epl-v10.html b/plugins/org.eclipse.app4mc.amalthea.converters.110/epl-v10.html
new file mode 100644
index 0000000..fd39122
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/epl-v10.html
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Public License - Version 1.0</title>
+<style type="text/css">
+ body {
+ size: 8.5in 11.0in;
+ margin: 0.25in 0.5in 0.25in 0.5in;
+ tab-interval: 0.5in;
+ }
+ p {
+ margin-left: auto;
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ }
+ p.list {
+ margin-left: 0.5in;
+ margin-top: 0.05em;
+ margin-bottom: 0.05em;
+ }
+ </style>
+
+</head>
+
+<body lang="EN-US">
+
+<h2>Eclipse Public License - v 1.0</h2>
+
+<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
+DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
+AGREEMENT.</p>
+
+<p><b>1. DEFINITIONS</b></p>
+
+<p>"Contribution" means:</p>
+
+<p class="list">a) in the case of the initial Contributor, the initial
+code and documentation distributed under this Agreement, and</p>
+<p class="list">b) in the case of each subsequent Contributor:</p>
+<p class="list">i) changes to the Program, and</p>
+<p class="list">ii) additions to the Program;</p>
+<p class="list">where such changes and/or additions to the Program
+originate from and are distributed by that particular Contributor. A
+Contribution 'originates' from a Contributor if it was added to the
+Program by such Contributor itself or anyone acting on such
+Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii)
+are not derivative works of the Program.</p>
+
+<p>"Contributor" means any person or entity that distributes
+the Program.</p>
+
+<p>"Licensed Patents" mean patent claims licensable by a
+Contributor which are necessarily infringed by the use or sale of its
+Contribution alone or when combined with the Program.</p>
+
+<p>"Program" means the Contributions distributed in accordance
+with this Agreement.</p>
+
+<p>"Recipient" means anyone who receives the Program under
+this Agreement, including all Contributors.</p>
+
+<p><b>2. GRANT OF RIGHTS</b></p>
+
+<p class="list">a) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free copyright license to reproduce, prepare derivative works
+of, publicly display, publicly perform, distribute and sublicense the
+Contribution of such Contributor, if any, and such derivative works, in
+source code and object code form.</p>
+
+<p class="list">b) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free patent license under Licensed Patents to make, use, sell,
+offer to sell, import and otherwise transfer the Contribution of such
+Contributor, if any, in source code and object code form. This patent
+license shall apply to the combination of the Contribution and the
+Program if, at the time the Contribution is added by the Contributor,
+such addition of the Contribution causes such combination to be covered
+by the Licensed Patents. The patent license shall not apply to any other
+combinations which include the Contribution. No hardware per se is
+licensed hereunder.</p>
+
+<p class="list">c) Recipient understands that although each Contributor
+grants the licenses to its Contributions set forth herein, no assurances
+are provided by any Contributor that the Program does not infringe the
+patent or other intellectual property rights of any other entity. Each
+Contributor disclaims any liability to Recipient for claims brought by
+any other entity based on infringement of intellectual property rights
+or otherwise. As a condition to exercising the rights and licenses
+granted hereunder, each Recipient hereby assumes sole responsibility to
+secure any other intellectual property rights needed, if any. For
+example, if a third party patent license is required to allow Recipient
+to distribute the Program, it is Recipient's responsibility to acquire
+that license before distributing the Program.</p>
+
+<p class="list">d) Each Contributor represents that to its knowledge it
+has sufficient copyright rights in its Contribution, if any, to grant
+the copyright license set forth in this Agreement.</p>
+
+<p><b>3. REQUIREMENTS</b></p>
+
+<p>A Contributor may choose to distribute the Program in object code
+form under its own license agreement, provided that:</p>
+
+<p class="list">a) it complies with the terms and conditions of this
+Agreement; and</p>
+
+<p class="list">b) its license agreement:</p>
+
+<p class="list">i) effectively disclaims on behalf of all Contributors
+all warranties and conditions, express and implied, including warranties
+or conditions of title and non-infringement, and implied warranties or
+conditions of merchantability and fitness for a particular purpose;</p>
+
+<p class="list">ii) effectively excludes on behalf of all Contributors
+all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;</p>
+
+<p class="list">iii) states that any provisions which differ from this
+Agreement are offered by that Contributor alone and not by any other
+party; and</p>
+
+<p class="list">iv) states that source code for the Program is available
+from such Contributor, and informs licensees how to obtain it in a
+reasonable manner on or through a medium customarily used for software
+exchange.</p>
+
+<p>When the Program is made available in source code form:</p>
+
+<p class="list">a) it must be made available under this Agreement; and</p>
+
+<p class="list">b) a copy of this Agreement must be included with each
+copy of the Program.</p>
+
+<p>Contributors may not remove or alter any copyright notices contained
+within the Program.</p>
+
+<p>Each Contributor must identify itself as the originator of its
+Contribution, if any, in a manner that reasonably allows subsequent
+Recipients to identify the originator of the Contribution.</p>
+
+<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
+
+<p>Commercial distributors of software may accept certain
+responsibilities with respect to end users, business partners and the
+like. While this license is intended to facilitate the commercial use of
+the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create
+potential liability for other Contributors. Therefore, if a Contributor
+includes the Program in a commercial product offering, such Contributor
+("Commercial Contributor") hereby agrees to defend and
+indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses")
+arising from claims, lawsuits and other legal actions brought by a third
+party against the Indemnified Contributor to the extent caused by the
+acts or omissions of such Commercial Contributor in connection with its
+distribution of the Program in a commercial product offering. The
+obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In
+order to qualify, an Indemnified Contributor must: a) promptly notify
+the Commercial Contributor in writing of such claim, and b) allow the
+Commercial Contributor to control, and cooperate with the Commercial
+Contributor in, the defense and any related settlement negotiations. The
+Indemnified Contributor may participate in any such claim at its own
+expense.</p>
+
+<p>For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any other
+Contributor to pay any damages as a result, the Commercial Contributor
+must pay those damages.</p>
+
+<p><b>5. NO WARRANTY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
+PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
+ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
+OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with its
+exercise of rights under this Agreement , including but not limited to
+the risks and costs of program errors, compliance with applicable laws,
+damage to or loss of data, programs or equipment, and unavailability or
+interruption of operations.</p>
+
+<p><b>6. DISCLAIMER OF LIABILITY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
+NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
+WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
+DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
+HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
+
+<p><b>7. GENERAL</b></p>
+
+<p>If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further action
+by the parties hereto, such provision shall be reformed to the minimum
+extent necessary to make such provision valid and enforceable.</p>
+
+<p>If Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Program itself (excluding combinations of the Program with other
+software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the
+date such litigation is filed.</p>
+
+<p>All Recipient's rights under this Agreement shall terminate if it
+fails to comply with any of the material terms or conditions of this
+Agreement and does not cure such failure in a reasonable period of time
+after becoming aware of such noncompliance. If all Recipient's rights
+under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive.</p>
+
+<p>Everyone is permitted to copy and distribute copies of this
+Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The
+Agreement Steward reserves the right to publish new versions (including
+revisions) of this Agreement from time to time. No one other than the
+Agreement Steward has the right to modify this Agreement. The Eclipse
+Foundation is the initial Agreement Steward. The Eclipse Foundation may
+assign the responsibility to serve as the Agreement Steward to a
+suitable separate entity. Each new version of the Agreement will be
+given a distinguishing version number. The Program (including
+Contributions) may always be distributed subject to the version of the
+Agreement under which it was received. In addition, after a new version
+of the Agreement is published, Contributor may elect to distribute the
+Program (including its Contributions) under the new version. Except as
+expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
+rights or licenses to the intellectual property of any Contributor under
+this Agreement, whether expressly, by implication, estoppel or
+otherwise. All rights in the Program not expressly granted under this
+Agreement are reserved.</p>
+
+<p>This Agreement is governed by the laws of the State of New York and
+the intellectual property laws of the United States of America. No party
+to this Agreement will bring a legal action under this Agreement more
+than one year after the cause of action arose. Each party waives its
+rights to a jury trial in any resulting litigation.</p>
+
+</body>
+
+</html>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/plugin.xml b/plugins/org.eclipse.app4mc.amalthea.converters.110/plugin.xml
new file mode 100644
index 0000000..629cdac
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/plugin.xml
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.app4mc.amalthea.model.converters">
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters110.impl.CentralConverter"
+ enabled="true"
+ id="converters.110.central"
+ input-model-version="itea.103"
+ name="central"
+ output-model-version="itea.110">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters110.impl.MappingConverter"
+ enabled="true"
+ id="converters.110.mapping"
+ input-model-version="itea.103"
+ name="mapping"
+ output-model-version="itea.110">
+ <dependent-on-converter
+ id="converters.110.os"
+ >
+ </dependent-on-converter>
+ <dependent-on-converter
+ id="converters.110.sw"
+ >
+ </dependent-on-converter>
+ <dependent-on-converter
+ id="converters.110.SchedulerRefsConverter"
+ >
+ </dependent-on-converter>
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters110.impl.OsConverter"
+ enabled="true"
+ id="converters.110.os"
+ input-model-version="itea.103"
+ name="os"
+ output-model-version="itea.110">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters110.impl.HwConverter"
+ enabled="true"
+ id="converters.110.hw"
+ input-model-version="itea.103"
+ name="hw"
+ output-model-version="itea.110">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters110.impl.CommonsConverter"
+ enabled="true"
+ id="converters.110.common"
+ input-model-version="itea.103"
+ name="common"
+ output-model-version="itea.110">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters110.impl.ComponentsConverter"
+ enabled="true"
+ id="converters.110.components"
+ input-model-version="itea.103"
+ name="components"
+ output-model-version="itea.110">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters110.impl.SwConverter"
+ enabled="true"
+ id="converters.110.sw"
+ input-model-version="itea.103"
+ name="sw"
+ output-model-version="itea.110">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters110.impl.StimuliConverter"
+ enabled="true"
+ id="converters.110.stimuli"
+ input-model-version="itea.103"
+ name="stimuli"
+ output-model-version="itea.110">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters110.impl.PropertyConstraintsConverter"
+ enabled="true"
+ id="converters.110.propertyconstraints"
+ input-model-version="itea.103"
+ name="propertyconstraints"
+ output-model-version="itea.110">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters110.impl.EventsConverter"
+ enabled="true"
+ id="converters.110.events"
+ input-model-version="itea.103"
+ name="events"
+ output-model-version="itea.110">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters110.impl.ConstraintsConverter"
+ enabled="true"
+ id="converters.110.constraints"
+ input-model-version="itea.103"
+ name="constraints"
+ output-model-version="itea.110">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters110.impl.ConfigConverter"
+ enabled="true"
+ id="converters.110.config"
+ input-model-version="itea.103"
+ name="config"
+ output-model-version="itea.110">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters110.impl.SchedulerRefsConverter"
+ enabled="true"
+ id="converters.110.SchedulerRefsConverter"
+ input-model-version="itea.103"
+ name="converters.110.SchedulerRefsConverter"
+ output-model-version="itea.110">
+ <dependent-on-converter
+ id="converters.110.os"
+ >
+ </dependent-on-converter>
+ <dependent-on-converter
+ id="converters.110.sw"
+ >
+ </dependent-on-converter>
+ </converter>
+ </extension>
+ <extension
+ point="org.eclipse.app4mc.amalthea.model.converters.cachebuilders">
+ <CacheBuilder
+ ID="org.eclipse.app4mc.amalthea.converters110.CacheBuilder"
+ class="org.eclipse.app4mc.amalthea.converters110.utils.ProcessCacheBuilder"
+ enabled="true"
+ input-model-version="itea.103"
+ name="SchedulerCacheBuilder">
+ </CacheBuilder>
+ <CacheBuilder
+ ID="org.eclipse.app4mc.amalthea.converters110.CacheBuilder"
+ class="org.eclipse.app4mc.amalthea.converters110.utils.SchedulerCacheBuilder"
+ enabled="true"
+ input-model-version="itea.103"
+ name="ProcessCacheBuilder">
+ </CacheBuilder>
+ </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/pom.xml b/plugins/org.eclipse.app4mc.amalthea.converters.110/pom.xml
new file mode 100644
index 0000000..3e8d642
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <relativePath>../../build/org.eclipse.app4mc.build/pom.xml</relativePath>
+ <groupId>org.eclipse.app4mc.build</groupId>
+ <artifactId>parent</artifactId>
+ <version>0.7.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.app4mc.amalthea.converters.110</artifactId>
+ <packaging>eclipse-plugin</packaging>
+
+</project>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/Activator.java b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/Activator.java
new file mode 100644
index 0000000..553c25c
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/Activator.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters110;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+ private static BundleContext context;
+
+ static BundleContext getContext() {
+ return context;
+ }
+
+ /**
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(final BundleContext bundleContext) throws Exception {
+ Activator.context = bundleContext;
+ }
+
+ /**
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(final BundleContext bundleContext) throws Exception {
+ Activator.context = null;
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/CentralConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/CentralConverter.java
new file mode 100644
index 0000000..520c987
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/CentralConverter.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters110.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters110.utils.HelperUtils_103_110;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class CentralConverter implements IConverter {
+
+ private final HelperUtils_103_110 helper;
+
+ public CentralConverter() {
+ this.helper = HelperUtils_103_110.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ this.helper.updateNameSpaces_to_110(rootElement);
+
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_110("common"));
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_110("hw"));
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_110("os"));
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_110("stimuli"));
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_110("sw"));
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_110("propertyconstraints"));
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_110("mapping"));
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_110("events"));
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_110("constraints"));
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_110("config"));
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_110("components"));
+
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+
+
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/CommonsConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/CommonsConverter.java
new file mode 100644
index 0000000..e4a55b4
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/CommonsConverter.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters110.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters110.utils.HelperUtils_103_110;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class CommonsConverter implements IConverter {
+
+ private final HelperUtils_103_110 helper;
+
+ public CommonsConverter() {
+ this.helper = HelperUtils_103_110.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ this.helper.updateNameSpaces_to_110(rootElement);
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/ComponentsConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/ComponentsConverter.java
new file mode 100644
index 0000000..6a838e5
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/ComponentsConverter.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters110.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters110.utils.HelperUtils_103_110;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class ComponentsConverter implements IConverter {
+
+ private final HelperUtils_103_110 helper;
+
+ public ComponentsConverter() {
+ this.helper = HelperUtils_103_110.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ this.helper.updateNameSpaces_to_110(rootElement);
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/ConfigConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/ConfigConverter.java
new file mode 100644
index 0000000..9809416
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/ConfigConverter.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters110.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters110.utils.HelperUtils_103_110;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class ConfigConverter implements IConverter {
+
+ private final HelperUtils_103_110 helper;
+
+ public ConfigConverter() {
+
+ this.helper = HelperUtils_103_110.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ this.helper.updateNameSpaces_to_110(rootElement);
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/ConstraintsConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/ConstraintsConverter.java
new file mode 100644
index 0000000..2196deb
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/ConstraintsConverter.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters110.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters110.utils.HelperUtils_103_110;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class ConstraintsConverter implements IConverter {
+
+ private final HelperUtils_103_110 helper;
+
+ public ConstraintsConverter() {
+
+ this.helper = HelperUtils_103_110.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ this.helper.updateNameSpaces_to_110(rootElement);
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/EventsConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/EventsConverter.java
new file mode 100644
index 0000000..225d2cc
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/EventsConverter.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters110.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters110.utils.HelperUtils_103_110;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class EventsConverter implements IConverter {
+
+ private final HelperUtils_103_110 helper;
+
+ public EventsConverter() {
+
+ this.helper = HelperUtils_103_110.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ this.helper.updateNameSpaces_to_110(rootElement);
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/HwConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/HwConverter.java
new file mode 100644
index 0000000..bed5de0
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/HwConverter.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters110.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters110.utils.HelperUtils_103_110;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+
+public class HwConverter implements IConverter {
+
+ private final HelperUtils_103_110 helper;
+
+ public HwConverter() {
+
+ this.helper = HelperUtils_103_110.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ this.helper.updateNameSpaces_to_110(rootElement);
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+
+
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/MappingConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/MappingConverter.java
new file mode 100644
index 0000000..1951aa7
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/MappingConverter.java
@@ -0,0 +1,868 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters110.impl;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters.common.utils.HrefElement;
+import org.eclipse.app4mc.amalthea.converters.common.utils.Tags;
+import org.eclipse.app4mc.amalthea.converters110.utils.HelperUtils_103_110;
+import org.eclipse.app4mc.amalthea.converters110.utils.ProcessCacheBuilder;
+import org.eclipse.app4mc.amalthea.converters110.utils.ProcessCacheEnum;
+import org.eclipse.app4mc.amalthea.converters110.utils.SchedulerCacheBuilder;
+import org.eclipse.app4mc.amalthea.converters110.utils.SchedulerCacheEnum;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.jdom2.Attribute;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+import com.google.common.collect.BiMap;
+
+
+/**
+ *
+ * Note: There is a dependency of MappingConverter with OS and SW converter's.
+ *
+ * OS -> Schedulers
+ *
+ * SW -> Process, Task, ISR, InterruptController
+ *
+ * If MappingConverter is to be called after OS & SW converters -> then it expects the data from these models in the
+ * format of 1.1.0
+ *
+ * But the mapping model data should be still of 1.0.3 format
+ *
+ * @author MEZ2RNG
+ *
+ */
+
+public class MappingConverter implements IConverter {
+
+ private final HelperUtils_103_110 helper;
+
+ private String workingDirectoryLocation;
+
+ private List<ICache> caches;
+
+ private final Map<Element, Element> os_defaultInterruptControllerMap = new HashMap<Element, Element>();
+
+ public MappingConverter() {
+
+ this.helper = HelperUtils_103_110.getInstance();
+ }
+
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ this.caches = caches;
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+
+ this.workingDirectoryLocation = targetFile.getParentFile().getCanonicalPath();
+
+ /*- updating namespaces */
+
+ final Element rootElement = root.getRootElement();
+
+ this.helper.updateNameSpaces_to_110(rootElement);
+
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_110("os"), this.helper.getNS_110("sw"));
+
+
+ updateProcessAllocations(targetFile, rootElement, fileName_documentsMap);
+
+ updateRunnableAllocations(targetFile, rootElement, fileName_documentsMap);
+
+ fileName_documentsMap.put(getFile(fileName_documentsMap, targetFile.getName()), root);
+
+ }
+
+ /**
+ * This method is used to
+ *
+ * @param targetFile
+ *
+ * @param rootElement
+ * @param fileName_documentsMap
+ */
+
+ private void updateRunnableAllocations(final File targetFile, final Element rootElement,
+ final Map<File, Document> fileName_documentsMap) {
+
+ /*-
+ * ===================
+ * Input data (1.0.3) :
+ * ===================
+ * <executableAllocation xsi:type="mapping:RunnableAllocation" xmi:id="_hjmNUJK2EeWQC6k3Y09j_A">
+ * <scheduler href="default.amxmi-os#_RUx1UJK2EeWQC6k3Y09j_A"/>
+ * <entity href="sw.amxmi#_XLRHkJK2EeWQC6k3Y09j_A"/>
+ * </executableAllocation>
+ *
+ * =================================
+ * Exptected output data (1.1.0) :
+ * ================================
+ *
+ * <runnableAllocation xsi:type="mapping:RunnableAllocation" xmi:id="_hjmNUJK2EeWQC6k3Y09j_A">
+ * <scheduler href="default.amxmi-os#_RUx1UJK2EeWQC6k3Y09j_A" xsi:type="os:TaskScheduler" />
+ * <entity href="sw.amxmi#_XLRHkJK2EeWQC6k3Y09j_A" />
+ * </runnableAllocation>
+ *
+ * Below are the requirements :
+ *
+ * 1. Change the tag name from executableAllocation to runnableAllocation
+ * 2. For scheduler tag, add the attribute xsi:type with the appropriate value.
+ * - As in 1.0.3, only TaskScheduler was available -> in the converted files generate type as "os:TaskScheduler"
+ */
+
+
+ final List<Element> xpathResult = this.helper.getXpathResult(rootElement,
+ ".//executableAllocation[@xsi:type=\"mapping:RunnableAllocation\"]", Element.class,
+ this.helper.getGenericNS("xsi"), this.helper.getNS_110("mapping"));
+
+ for (final Element element : xpathResult) {
+ element.setName(Tags.runnableAllocation.getValue());
+
+ final Element refScheduler = element.getChild("scheduler");
+
+ if (refScheduler != null) {
+
+ final Attribute typeAttribute = refScheduler.getAttribute("type", this.helper.getGenericNS("xsi"));
+ if (typeAttribute == null) {
+ refScheduler.setAttribute("type", "os:TaskScheduler", this.helper.getGenericNS("xsi"));
+ }
+ }
+ }
+ }
+
+ private void updateProcessAllocations(final File targetFile, final Element rootElement,
+ final Map<File, Document> fileName_documentsMap) throws Exception {
+
+ /*-
+ * ===================
+ * Input data (1.0.3) :
+ * ===================
+ * Case 1:
+ *
+ * <executableAllocation xsi:type="mapping:ProcessAllocation" xmi:id="_G9HlYJHvEeWQC6k3Y09j_A" scheduler="_AX_EcJHvEeWQC6k3Y09j_A" process="_-aEmQJHuEeWQC6k3Y09j_A"/>
+ *
+ * Case 2:
+ *
+ * <executableAllocation xsi:type="mapping:ProcessAllocation" xmi:id="_j5cDUJK2EeWQC6k3Y09j_A">
+ * <scheduler href="os.amxmi#_T_4JoJK2EeWQC6k3Y09j_A"/>
+ * <process xsi:type="sw:Task" href="sw.amxmi#_YOuvsJK2EeWQC6k3Y09j_A"/>
+ * </executableAllocation>
+ *
+ * Case 3:
+ *
+ * <executableAllocation xsi:type="mapping:ProcessAllocation" xmi:id="_MGprAJHvEeWQC6k3Y09j_A" process="_-aEmQJHuEeWQC6k3Y09j_A">
+ * <scheduler href="../OS/OS.amxmi#_3QZckJHoEeWQC6k3Y09j_A"/>
+ * </executableAllocation>
+ *
+ * =================================
+ * Exptected output data (1.1.0) :
+ * ================================
+ * For case 2:
+ *
+ * <processAllocation xsi:type="mapping:TaskAllocation" xmi:id="_j5cDUJK2EeWQC6k3Y09j_A">
+ * <scheduler href="os.amxmi#_T_4JoJK2EeWQC6k3Y09j_A" xsi:type="os:TaskScheduler" />
+ * <process xsi:type="sw:Task" href="sw.amxmi#_YOuvsJK2EeWQC6k3Y09j_A" />
+ * </processAllocation>
+ *
+ * Below are the requirements :
+ *
+ * 1. Change the tag name from executableAllocation to processAllocation
+ * 2. processAllocation tag, attribute xsi:type should be updated either to "mapping:TaskAllocation" or "mapping:ISRAllocation"
+ * - This is dependent on if the referred Process object is of type Task or ISR
+ * 3. If ISR is the corresponding Process element, and if TaskScheduler is referred, then it should be changed to InterruptController
+ * - For this, default InterruptController object should be created in the same location where Scheduler object was referred from
+ * - ID of the InterruptController object should be associated to the corresponding, scheduler tag
+ * 4. For scheduler tag, add the attribute xsi:type with the appropriate value os:TaskScheduler" or os:InterruptController"
+ * - Based on the type of scheduler
+ *
+ */
+
+ final List<Element> processAllocationElements = this.helper.getXpathResult(rootElement,
+ ".//executableAllocation[@xsi:type=\"mapping:ProcessAllocation\"]", Element.class,
+ this.helper.getGenericNS("xsi"), this.helper.getNS_110("mapping"));
+
+ processAllocationMigrationLoop: for (final Element processAllocationElement : processAllocationElements) {
+
+ /*- changing the Element name from executableAllocation (1.0.3) to processAllocation (1.1.0) **/
+
+ processAllocationElement.setName(Tags.processAllocation.getValue());
+
+ final Attribute schedulerIDAttrribute = processAllocationElement.getAttribute(Tags.scheduler.getValue());
+
+ final Attribute processIDAttribute = processAllocationElement.getAttribute(Tags.process.getValue());
+
+ final Element refSchedulerElement = processAllocationElement.getChild(Tags.scheduler.getValue());
+
+ final Element refProcessElement = processAllocationElement.getChild(Tags.process.getValue());
+
+ HrefElement schedulerHRef = null;
+
+ HrefElement processHRef = null;
+
+ String schedulerID = null;
+
+ String processID = null;
+
+ String schedulerRefFile = null;
+
+ String processRefFile = null;
+
+
+ if (schedulerIDAttrribute == null && refSchedulerElement != null) {
+
+ /*- model elements from other files can be referred . Fetching the scheduler href attribute*/
+
+ final Attribute attribute = refSchedulerElement.getAttribute("href");
+
+ schedulerHRef = this.helper.getHrefElement(attribute.getValue());
+
+ schedulerRefFile = schedulerHRef.getFileName();
+
+ schedulerID = schedulerHRef.getXmiID();
+
+ }
+ else if (schedulerIDAttrribute != null) {
+ schedulerID = schedulerIDAttrribute.getValue();
+ }
+
+
+ if (processIDAttribute == null && refProcessElement != null) {
+ /*- model elements from other files can be referred here. Fetching the process href attribute*/
+
+ final Attribute attribute = refProcessElement.getAttribute("href");
+
+ processHRef = this.helper.getHrefElement(attribute.getValue());
+
+ processRefFile = processHRef.getFileName();
+
+ processID = processHRef.getXmiID();
+
+ }
+ else if (processIDAttribute != null) {
+ processID = processIDAttribute.getValue();
+ }
+
+ /*- Processing migration only if Scheduler ID and Process ID are not null */
+
+ if (schedulerID != null && processID != null) {
+
+ /*- Fetching Scheduler objects having specific ID */
+ final List<Element> schedulers = getScheduler(targetFile, schedulerID, schedulerRefFile, schedulerHRef,
+ rootElement, fileName_documentsMap);
+
+ /*- Fetching Process objects having specific ID */
+ final List<Element> processs = getProcess(targetFile, processID, processRefFile, processHRef,
+ rootElement, fileName_documentsMap);
+
+ /*- Processing migration only if Scheduler object and Process object are found */
+
+ if (schedulers.size() == 0 || processs.size() == 0) {
+ // TODO: log an error and skip this element
+
+ if (schedulers.size() == 0) {
+ System.err.println("Unable to find the Scheduler having ID : " + schedulerID);
+ }
+ if (processs.size() == 0) {
+ System.err.println("Unable to find the Process having ID : " + processID);
+ }
+
+ continue processAllocationMigrationLoop;
+ }
+
+ /*- definition of Process and Scheduler objects */
+
+ final Element processElement = processs.get(0);
+
+ final Element schedulerElement = schedulers.get(0);
+
+ boolean isInterruptControllerAssigned = false;
+
+ final String processElementName = processElement.getName();
+
+ /*- If process element tag name is : isrs, then it is a ISR*/
+
+ if (processElementName.equals(Tags.isrs.getValue())) {
+
+ final Attribute attribute = processAllocationElement.getAttribute("type",
+ this.helper.getGenericNS("xsi"));
+ attribute.setValue("mapping:ISRAllocation");
+
+ /*-
+ * In 1.1.0, if the Process is of ISR type, then Scheduler should be of type only
+ * InterruptController.
+ *
+ * In 1.0.3, there is no type InterruptController --> only Scheduler of type TaskScheduler was
+ * available.
+ *
+ * Below are the possible solutions to handle this scenario:
+ *
+ * Create a new InterruptController (Scheduler) having PriorityBased algorithm and associate it to the ISRAllocation.
+ *
+ */
+
+ isInterruptControllerAssigned = true;
+
+ final Element interrupControllerElement = createDefaultInterruptController(schedulerElement);
+
+ /*- setting irruptsControllerElement ID to executableAllocationElement*/
+
+ if (schedulerIDAttrribute != null) {
+ schedulerIDAttrribute.setValue(
+ interrupControllerElement.getAttributeValue("id", this.helper.getGenericNS("xmi")));
+ }
+ else if (refSchedulerElement != null && schedulerHRef != null) {
+
+
+ /*
+ * refSchedulerElement.setAttribute("type", "os:InterruptController",
+ * this.helper.getGenericNS("xsi"));
+ */
+
+ refSchedulerElement.getAttribute("href").setValue(schedulerHRef.getFileName() + "#"
+ + interrupControllerElement.getAttributeValue("id", this.helper.getGenericNS("xmi")));
+ }
+
+
+ }
+ else if (processElementName.equals(Tags.tasks.getValue())) {
+ final Attribute processAllocationTypeAttribute = processAllocationElement.getAttribute("type",
+ this.helper.getGenericNS("xsi"));
+ processAllocationTypeAttribute.setValue("mapping:TaskAllocation");
+
+ /*
+ * if (refSchedulerElement != null) {
+ *
+ * refSchedulerElement.setAttribute("type", "os:TaskScheduler", this.helper.getGenericNS("xsi"));
+ *
+ * }
+ */
+
+ }
+
+
+ /*- As from 1.1.0, Scheduler is Abstract and there exsits os:InterruptController and os:TaskScheduler as concrete class's. Type should be set for the Schduler tag*/
+
+ if ((refSchedulerElement != null)) {
+
+ if (schedulerElement.getName().equals("taskSchedulers")) {
+
+ if (isInterruptControllerAssigned) {
+ refSchedulerElement.setAttribute("type", "os:InterruptController",
+ this.helper.getGenericNS("xsi"));
+ }
+ else {
+ refSchedulerElement.setAttribute("type", "os:TaskScheduler",
+ this.helper.getGenericNS("xsi"));
+ }
+ }
+ else if (schedulerElement.getName().equals("interruptControllers")) {
+ refSchedulerElement.setAttribute("type", "os:InterruptController",
+ this.helper.getGenericNS("xsi"));
+ }
+
+ }
+
+
+ }
+ else if (schedulerID == null && processID != null) {
+
+ /*- Fetching Process objects having specific ID */
+ final List<Element> processs = getProcess(targetFile, processID, processRefFile, processHRef,
+ rootElement, fileName_documentsMap);
+
+ /*- Processing migration only if Scheduler object and Process object are found */
+
+ if (processs.size() == 0) {
+
+ System.err.println("Unable to find the Process having ID : " + processID);
+
+ continue processAllocationMigrationLoop;
+ }
+
+ /*- definition of Process and Scheduler objects */
+
+ final Element processElement = processs.get(0);
+
+
+ final String processElementName = processElement.getName();
+
+ /*- If process element tag name is : isrs, then it is a ISR*/
+
+ if (processElementName.equals(Tags.isrs.getValue())) {
+
+ final Attribute attribute = processAllocationElement.getAttribute("type",
+ this.helper.getGenericNS("xsi"));
+ attribute.setValue("mapping:ISRAllocation");
+
+ }
+ else if (processElementName.equals(Tags.tasks.getValue())) {
+ final Attribute processAllocationTypeAttribute = processAllocationElement.getAttribute("type",
+ this.helper.getGenericNS("xsi"));
+ processAllocationTypeAttribute.setValue("mapping:TaskAllocation");
+
+ }
+
+ }
+ else if (schedulerID != null && processID == null) {
+ {
+
+ /*- Fetching Scheduler objects having specific ID */
+ final List<Element> schedulers = getScheduler(targetFile, schedulerID, schedulerRefFile,
+ schedulerHRef, rootElement, fileName_documentsMap);
+
+
+ if (schedulers.size() == 0) {
+ // TODO: log an error and skip this element
+
+ if (schedulers.size() == 0) {
+ System.err.println("Unable to find the Scheduler having ID : " + schedulerID);
+ }
+
+ continue processAllocationMigrationLoop;
+ }
+
+ /*- definition of Process and Scheduler objects */
+
+ final Element schedulerElement = schedulers.get(0);
+
+ /*-
+ * As Process object is not defined, transforming executableAllocation as processAllocation of type mapping:TaskAllocation
+ */
+ final Attribute processAllocationTypeAttribute = processAllocationElement.getAttribute("type",
+ this.helper.getGenericNS("xsi"));
+ processAllocationTypeAttribute.setValue("mapping:TaskAllocation");
+
+
+ /*- As from 1.1.0, Scheduler is Abstract and there exsits os:InterruptController and os:TaskScheduler as concrete class's. Type should be set for the Schduler tag*/
+
+ if (refSchedulerElement != null) {
+ if (schedulerElement.getName().equals("taskSchedulers")) {
+ refSchedulerElement.setAttribute("type", "os:TaskScheduler",
+ this.helper.getGenericNS("xsi"));
+ }
+ else if (schedulerElement.getName().equals("interruptControllers")) {
+ refSchedulerElement.setAttribute("type", "os:InterruptController",
+ this.helper.getGenericNS("xsi"));
+ }
+
+ }
+
+
+ }
+ }
+ else {
+ // TODO: log error
+ System.err.println("unable to find both : Scheduler and Process attributes for element : "
+ + processAllocationElement.toString());
+ }
+
+
+ }
+ }
+
+ private int interruptControllerCount = 1;
+
+ /**
+ * This method is used to create default interrupt controller
+ *
+ * @return
+ */
+ private Element createDefaultInterruptController(final Element schedulerElement) {
+
+ final Element schedulersParent = schedulerElement.getParentElement();
+
+ // first check if DefaultInterruptController is already created -> if so then return the same
+ if (this.os_defaultInterruptControllerMap.containsKey(schedulersParent)) {
+ return this.os_defaultInterruptControllerMap.get(schedulersParent);
+ }
+
+ final Element interrupControllerElement = new Element("interruptControllers");
+
+ final String interruptControllerID = EcoreUtil.generateUUID();
+
+ interrupControllerElement.setAttribute("id", interruptControllerID, this.helper.getGenericNS("xmi"));
+
+ /*- name of the InterruptController */
+ interrupControllerElement.setAttribute("name",
+ "interruptController" + this.interruptControllerCount++ + "_migration_generated");
+
+ final Element schedulingAlgorithmElement = new Element("schedulingAlgorithm");
+
+ schedulingAlgorithmElement.setAttribute("type", "os:PriorityBased", this.helper.getGenericNS("xsi"));
+
+ final String schedulingAlgorithmID = EcoreUtil.generateUUID();
+
+ schedulingAlgorithmElement.setAttribute("id", schedulingAlgorithmID, this.helper.getGenericNS("xmi"));
+
+
+ interrupControllerElement.addContent(schedulingAlgorithmElement);
+
+
+ /*-associating the newly created InterruptController element to the parent of supplied schedulerElement (i.e. OperatingSystem) */
+
+ schedulersParent.addContent(schedulersParent.indexOf(schedulerElement), interrupControllerElement);
+
+
+ /*- Adding the OS element & interruptController element to the map*/
+ this.os_defaultInterruptControllerMap.put(schedulersParent, interrupControllerElement);
+
+ return interrupControllerElement;
+ }
+
+
+ /**
+ * - Querying data from OS model.
+ *
+ * NOte: it is expected that this model is already converted to 1.1.0
+ *
+ * @param targetFile
+ *
+ * @param schedulerID
+ * @param schedulerHRef
+ * @param rootElement
+ * @return
+ * @throws Exception
+ */
+ @SuppressWarnings("unchecked")
+ private List<Element> getScheduler(final File targetFile, String schedulerID, final String refFileName,
+ final HrefElement schedulerHRef, final Element rootElement, final Map<File, Document> fileName_documentsMap)
+ throws Exception {
+
+ List<Element> schedulerElements = new ArrayList<Element>();
+
+
+ /*- check if schedulerID is of URIFragment type */
+
+ if (schedulerID.contains("/")) {
+
+ if (schedulerHRef != null) {
+ schedulerID = schedulerHRef.getFileName() + "#" + schedulerHRef.getXmiID();
+ }
+
+ /*- Note: As OS converter would have changed the structure of the OSModel contents, old cache keys are no longer valid.
+ *
+ * To establish the link between old & new URIFragments, use the BiMap available in cache (SchedulerCacheEnum.URI_FRAGMENT_NEW_OLD)
+ *
+ * BiMap holds the key as new URIFragments and value as old URIFragments
+
+ **/
+
+ cacheLoop: for (final ICache cache : getFilteredCaches(this.caches, SchedulerCacheBuilder.class)) {
+
+ final Map<String, Object> map = cache.getCacheMap().get(targetFile);
+
+ if (map != null) {
+
+ final BiMap<String, String> urifragment_new_old_map = (BiMap<String, String>) map
+ .get(SchedulerCacheEnum.URI_FRAGMENT_NEW_OLD.name());
+
+ if (urifragment_new_old_map != null) {
+ /*- getting old scheduler URIFragment -> as the entire cache structure is built based on it */
+
+ schedulerID = urifragment_new_old_map.get(schedulerID);
+ }
+
+
+ Map<String, Element> uriFragment_SchedulerMap = null;
+
+ if (schedulerID.contains("#")) {
+ uriFragment_SchedulerMap = (Map<String, Element>) map
+ .get(SchedulerCacheEnum.HREF_URIFRAGMENT_SCHEDULER_ELEMENT.name());
+
+ }
+ else {
+
+ uriFragment_SchedulerMap = (Map<String, Element>) map
+ .get(SchedulerCacheEnum.URIFRAGMENT_SCHEDULER_ELEMENT.name());
+
+ }
+
+
+ if (uriFragment_SchedulerMap != null) {
+
+ final Element element = uriFragment_SchedulerMap.get(schedulerID);
+
+ if (element != null) {
+
+ schedulerElements.add(element);
+
+ break cacheLoop;
+
+ }
+ }
+
+
+ }
+ }
+
+
+ return schedulerElements;
+
+ }
+
+ /*- Case where ID doesn't hold URIFragment */
+
+ if (refFileName != null) {
+
+ final String referencedFilePath = this.workingDirectoryLocation + File.separator + refFileName;
+
+ final File referenceFile = new File(referencedFilePath).getCanonicalFile();
+
+ final Document document = fileName_documentsMap.get(referenceFile);
+
+ schedulerElements = getSchedulerObject(schedulerID, referenceFile, document);
+
+ }
+ else {
+ schedulerElements = getSchedulerObject(schedulerID, targetFile, rootElement.getDocument());
+
+ }
+ return schedulerElements;
+ }
+
+
+ /**
+ * This method is used to get Process object which contains specific ID
+ *
+ * @param targetFile
+ *
+ * @param processID
+ * @param refFileName
+ * @param processHRef
+ * @param rootElement
+ * @param fileName_documentsMap
+ * @return
+ * @throws Exception
+ */
+ @SuppressWarnings("unchecked")
+ private List<Element> getProcess(final File targetFile, String processID, final String refFileName,
+ final HrefElement processHRef, final Element rootElement, final Map<File, Document> fileName_documentsMap)
+ throws Exception {
+
+ List<Element> processElements = new ArrayList<Element>();
+
+
+ /*- check if schedulerID is of URIFragment type */
+
+ if (processID.contains("/")) {
+
+ if (processHRef != null) {
+ processID = processHRef.getFileName() + "#" + processHRef.getXmiID();
+ }
+
+ cacheLoop: for (final ICache cache : this.caches) {
+
+ final Map<String, Object> map = cache.getCacheMap().get(targetFile);
+
+ if (map != null) {
+
+ Map<String, Element> uriFragment_ProcessMap = null;
+
+ if (processID.contains("#")) {
+ uriFragment_ProcessMap = (Map<String, Element>) map
+ .get(ProcessCacheEnum.HREF_URIFRAGMENT_PROCESS_ELEMENT.name());
+
+ }
+ else {
+
+ uriFragment_ProcessMap = (Map<String, Element>) map
+ .get(ProcessCacheEnum.URIFRAGMENT_PROCESS_ELEMENT.name());
+
+ }
+
+
+ if (uriFragment_ProcessMap != null) {
+
+ final Element element = uriFragment_ProcessMap.get(processID);
+
+ if (element != null) {
+
+ processElements.add(element);
+
+ break cacheLoop;
+
+ }
+ }
+
+
+ }
+ }
+
+
+ return processElements;
+
+ }
+
+
+ /*- ID can be of following format : "Amalthea_ArExampleEngine-os.amxmi#_DaOKkpHoEeWQC6k3Y09j_A" */
+ if (refFileName != null) {
+ final String referencedFilePath = new File(this.workingDirectoryLocation + File.separator + refFileName)
+ .getCanonicalPath();
+
+ final File referenceFile = new File(referencedFilePath);
+ final Document document = fileName_documentsMap.get(referenceFile);
+
+ processElements = getProcessObject(processID, referenceFile, document);
+
+ }
+ else {
+ processElements = getProcessObject(processID, targetFile, rootElement.getDocument());
+ }
+ return processElements;
+ }
+
+
+ /**
+ * Utility method used to get Process object which contains specific ID
+ *
+ * @param processID
+ * @param document
+ * @return
+ */
+ @SuppressWarnings("unchecked")
+ private List<Element> getProcessObject(final String processID, final File targetFile, final Document document) {
+
+ loop: for (final ICache iCache : getFilteredCaches(this.caches, ProcessCacheBuilder.class)) {
+
+
+ final Map<String, Object> map = iCache.getCacheMap().get(targetFile);
+
+ if (map == null) {
+ System.err.println("Target file can't be found : " + targetFile.getName());
+ continue loop;
+ }
+ final Map<String, Element> uuid_process_map = (Map<String, Element>) map
+ .get(ProcessCacheEnum.UUID_PROCESS_ELEMENT.name());
+
+ if (uuid_process_map != null) {
+ final Element element = uuid_process_map.get(processID);
+
+ if (element != null) {
+ final List<Element> elements = new ArrayList<Element>();
+ elements.add(element);
+ return elements;
+ }
+ }
+
+
+ }
+
+
+ List<Element> processElements;
+ /*- get Task elements -*/
+ processElements = this.helper.getXpathResult(document, ".//swModel/tasks[@xmi:id=\"" + processID + "\" ] ",
+ Element.class, this.helper.getGenericNS("xmi"), this.helper.getNS_110("sw"));
+
+ if (processElements.size() == 0) {
+ processElements = this.helper.getXpathResult(document,
+ ".//sw:SWModel/tasks[@xmi:id=\"" + processID + "\" ] ", Element.class,
+ this.helper.getGenericNS("xmi"), this.helper.getNS_110("sw"));
+ }
+
+ /*- get ISR's -*/
+
+ if (processElements.size() == 0) {
+ processElements = this.helper.getXpathResult(document, ".//swModel/isrs[@xmi:id=\"" + processID + "\" ] ",
+ Element.class, this.helper.getGenericNS("xmi"), this.helper.getNS_110("sw"));
+ }
+
+ if (processElements.size() == 0) {
+ processElements = this.helper.getXpathResult(document,
+ ".//sw:SWModel/isrs[@xmi:id=\"" + processID + "\" ] ", Element.class,
+ this.helper.getGenericNS("xmi"), this.helper.getNS_110("sw"));
+ }
+ return processElements;
+ }
+
+ /**
+ * Utility method used to get Scheduler object which contains specific ID
+ *
+ * @param schedulerID
+ * @param targetFile
+ * @param document
+ * @return
+ */
+ @SuppressWarnings("unchecked")
+ private List<Element> getSchedulerObject(final String schedulerID, final File targetFile, final Document document) {
+
+
+ loop: for (final ICache iCache : this.caches) {
+
+ if (iCache instanceof SchedulerCacheBuilder) {
+ final Map<String, Object> map = iCache.getCacheMap().get(targetFile);
+
+ if (map == null) {
+ System.err.println("Target file can't be found : " + targetFile.getName());
+ continue loop;
+ }
+ final Map<String, Element> uuid_scheduler_map = (Map<String, Element>) map
+ .get(SchedulerCacheEnum.UUID_SCHEDULER_ELEMENT.name());
+
+ if (uuid_scheduler_map != null) {
+ final Element element = uuid_scheduler_map.get(schedulerID);
+
+ if (element != null) {
+ final List<Element> elements = new ArrayList<Element>();
+ elements.add(element);
+ return elements;
+ }
+ }
+
+
+ }
+
+
+ }
+
+ /*- below code is executed when cache is not available */
+
+ List<Element> schedulerElements;
+
+ /*- applying xpath on document object */
+ schedulerElements = this.helper.getXpathResult(document,
+ ".//osModel/operatingSystems/taskSchedulers[@xmi:id=\"" + schedulerID + "\"]", Element.class,
+ this.helper.getGenericNS("xmi"));
+
+ if (schedulerElements.size() == 0) {
+ schedulerElements = this.helper.getXpathResult(document,
+ ".//os:OSModel/operatingSystems/taskSchedulers[@xmi:id=\"" + schedulerID + "\"]", Element.class,
+ this.helper.getGenericNS("xmi"), this.helper.getNS_110("os"));
+ }
+ return schedulerElements;
+ }
+
+
+ public List<ICache> getCaches() {
+ return this.caches;
+ }
+
+ public void setCaches(final List<ICache> caches) {
+ this.caches = caches;
+ }
+
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/OsConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/OsConverter.java
new file mode 100644
index 0000000..68ae333
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/OsConverter.java
@@ -0,0 +1,129 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters110.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters.common.utils.Tags;
+import org.eclipse.app4mc.amalthea.converters110.utils.HelperUtils_103_110;
+import org.jdom2.Attribute;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+
+public class OsConverter implements IConverter {
+
+ private final HelperUtils_103_110 helper;
+
+ public OsConverter() {
+ this.helper = HelperUtils_103_110.getInstance();
+ }
+
+ public OsConverter(final HelperUtils_103_110 helper) {
+ this.helper = helper;
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ // final String elementName = rootElement.getQualifiedName();
+
+ this.helper.updateNameSpaces_to_110(rootElement);
+
+
+ createOperatingSystem(root);
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+
+
+ }
+
+ /**
+ * This method is used to create element operatingSystems and associate the scheduler objects present inside
+ * .//os:OSModel/scheduler ( per 1.0.3) as taskSchedulers (per 1.1.0)
+ *
+ * @param root
+ */
+ private void createOperatingSystem(final Document root) {
+
+ List<Element> schedulers = this.helper.getXpathResult(root, ".//os:OSModel/scheduler", Element.class,
+ this.helper.getNS_110("os"));
+
+ if (schedulers.size() == 0) {
+ schedulers = this.helper.getXpathResult(root, ".//osModel/scheduler", Element.class,
+ this.helper.getNS_110("os"));
+ }
+
+ if (schedulers != null && schedulers.size() > 0) {
+
+ final Element parentElement = schedulers.get(0).getParentElement();
+
+ /*- Fetching location of element, so that new element can be added at the same location*/
+
+ final int indexOfFirstScheduler = parentElement.indexOf(schedulers.get(0));
+
+ final Element operatingSystem = new Element(Tags.operatingSystems.getValue());
+
+ final Attribute osNameAttrib = new Attribute("name", "OperatingSystem");
+
+ operatingSystem.setAttribute(osNameAttrib);
+
+ /*-Adding Scheduler objects (from 1.0.3) as TaskScheduler's inside OperatingSystem*/
+
+ parentElement.addContent(indexOfFirstScheduler, operatingSystem);
+
+
+ for (final Element scheduler : schedulers) {
+
+ scheduler.detach();
+
+ scheduler.setName("taskSchedulers");
+
+ operatingSystem.addContent(scheduler);
+
+ updateAttribute_DeadlineMonotonic(scheduler);
+ }
+ }
+ }
+
+ /**
+ * This method is used to update the value of schedulingAlgorithm tags containing attribute as :
+ * os:DeadlineMonotinic to os:DeadlineMonotonic
+ *
+ * @param schedulerElement
+ * Element of Scheduler.
+ */
+ private void updateAttribute_DeadlineMonotonic(final Element schedulerElement) {
+
+ final List<Attribute> osTypeList = this.helper.getXpathResult(schedulerElement,
+ "./schedulingAlgorithm/@xsi:type[.=\"os:DeadlineMonotinic\"]", Attribute.class,
+ this.helper.getGenericNS("xsi"));
+
+ for (final Attribute attribute : osTypeList) {
+
+ attribute.setValue("os:DeadlineMonotonic");
+ }
+
+
+ }
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/PropertyConstraintsConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/PropertyConstraintsConverter.java
new file mode 100644
index 0000000..229b06c
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/PropertyConstraintsConverter.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters110.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters110.utils.HelperUtils_103_110;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class PropertyConstraintsConverter implements IConverter {
+
+ private final HelperUtils_103_110 helper;
+
+ public PropertyConstraintsConverter() {
+
+ this.helper = HelperUtils_103_110.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ this.helper.updateNameSpaces_to_110(rootElement);
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/SchedulerRefsConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/SchedulerRefsConverter.java
new file mode 100644
index 0000000..e9cb883
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/SchedulerRefsConverter.java
@@ -0,0 +1,187 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters110.impl;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters.common.utils.ModelVersion;
+import org.eclipse.app4mc.amalthea.converters110.utils.HelperUtils_103_110;
+import org.eclipse.app4mc.amalthea.converters110.utils.SchedulerCacheBuilder;
+import org.eclipse.app4mc.amalthea.converters110.utils.SchedulerCacheEnum;
+import org.jdom2.Attribute;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+import com.google.common.collect.Table;
+
+public class SchedulerRefsConverter implements IConverter {
+
+ private final HelperUtils_103_110 helper;
+
+ public SchedulerRefsConverter() {
+ this.helper = HelperUtils_103_110.getInstance();
+ }
+
+ public SchedulerRefsConverter(final HelperUtils_103_110 helper) {
+ this.helper = helper;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ for (final ICache cache : this.getFilteredCaches(caches, SchedulerCacheBuilder.class)) {
+
+
+ loop: for (final File file : fileName_documentsMap.keySet()) {
+
+
+ final Map<String, Object> cacheMap = cache.getCacheMap().get(file);
+
+ if (cacheMap == null) {
+ continue loop;
+ }
+
+ final Map<String, Element> uriFragment_scheduler_map = (Map<String, Element>) cacheMap
+ .get(SchedulerCacheEnum.URIFRAGMENT_SCHEDULER_ELEMENT.name());
+
+
+ final Map<String, List<Attribute>> uriFragment_attribs_map = (Map<String, List<Attribute>>) cacheMap
+ .get(SchedulerCacheEnum.URIFRAGMENT_SCHEDULER_REFS_ATRIBUTES.name());
+
+ if (uriFragment_attribs_map == null || uriFragment_scheduler_map == null) {
+ continue loop;
+ }
+
+
+ for (final String uriFragment : uriFragment_scheduler_map.keySet()) {
+
+ final Element element = uriFragment_scheduler_map.get(uriFragment);
+
+ // urifragments should be updated, as for certain elements parent is changed
+
+ final String updated_uriFragment = this.helper.getURIFragment(element, ModelVersion._110);
+
+ System.out.println(uriFragment + " : : " + element + " : : " + updated_uriFragment);
+
+ final List<Attribute> list = uriFragment_attribs_map.get(uriFragment);
+
+ for (final Attribute attribute : list) {
+
+ attribute.setValue(updated_uriFragment);
+ }
+
+ }
+
+
+ /*- ============ updating hrefs ============*/
+
+ final Map<String, Element> href_uriFragment_scheduler_map = (Map<String, Element>) cacheMap
+ .get(SchedulerCacheEnum.HREF_URIFRAGMENT_SCHEDULER_ELEMENT.name());
+
+ final Map<File, Table<String, String, List<Attribute>>> href_urifragment_attributesMap = (Map<File, Table<String, String, List<Attribute>>>) cacheMap
+ .get(SchedulerCacheEnum.HREF_URIFRAGMENT_SCHEDULER_REFS_ATRIBUTES.name());
+
+
+ for (final String href_uriFragment : href_uriFragment_scheduler_map.keySet()) {
+
+ final Element schedulerElement = href_uriFragment_scheduler_map.get(href_uriFragment);
+
+ final String updated_uriFragment = this.helper.getURIFragment(schedulerElement, ModelVersion._110);
+
+ final List<Attribute> attributes = getAttributes(href_urifragment_attributesMap, href_uriFragment);
+
+ for (final Attribute attribute : attributes) {
+
+ final String[] split = href_uriFragment.split("#");
+
+ /*- Setting updated URI fragment */
+
+ attribute.setValue(split[0] + "#" + updated_uriFragment);
+
+ /*- As Schduler has become an abstract class, it is important to also add the type to the parent element of href attribute */
+
+ final Element schedulerRef = attribute.getParent();
+
+ final Attribute schedulerType = schedulerRef.getAttribute("type",
+ this.helper.getGenericNS("xmi"));
+
+ if (schedulerType == null) {
+
+ if (schedulerElement.getName().equals("taskSchedulers")) {
+ schedulerRef.setAttribute("type", "os:TaskScheduler", this.helper.getGenericNS("xmi"));
+
+ }
+ else if (schedulerElement.getName().equals("interruptControllers")) {
+ schedulerRef.setAttribute("type", "os:InterruptController",
+ this.helper.getGenericNS("xmi"));
+ }
+ }
+
+
+ }
+
+ }
+
+
+ }
+
+
+ }
+
+ /*- once the references are created newly, update the cache to establish mapping between old URIFragments and the new ones */
+
+ for (final ICache cache : caches) {
+ if (cache instanceof SchedulerCacheBuilder) {
+ ((SchedulerCacheBuilder) cache).updateURIFragments_in_Cache(fileName_documentsMap);
+ }
+ }
+ }
+
+ private List<Attribute> getAttributes(
+ final Map<File, Table<String, String, List<Attribute>>> href_urifragment_attributesMap,
+ final String uriFragment) {
+ for (final File referenceFile : href_urifragment_attributesMap.keySet()) {
+
+ final Table<String, String, List<Attribute>> table = href_urifragment_attributesMap.get(referenceFile);
+
+ if (table != null) {
+ final Map<String, List<Attribute>> map = table.row(uriFragment);
+
+ if (map != null) {
+
+ if (map.size() > 0) {
+
+ final Set<String> keySet = map.keySet();
+
+ for (final String string : keySet) {
+
+ final List<Attribute> list = map.get(string);
+
+ return list;
+
+ }
+ }
+ }
+
+ }
+ }
+ return new ArrayList<Attribute>();
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/StimuliConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/StimuliConverter.java
new file mode 100644
index 0000000..43c0b36
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/StimuliConverter.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters110.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters110.utils.HelperUtils_103_110;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class StimuliConverter implements IConverter {
+
+ private final HelperUtils_103_110 helper;
+
+ public StimuliConverter() {
+
+ this.helper = HelperUtils_103_110.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ this.helper.updateNameSpaces_to_110(rootElement);
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/SwConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/SwConverter.java
new file mode 100644
index 0000000..5e32108
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/impl/SwConverter.java
@@ -0,0 +1,162 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters110.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters110.utils.HelperUtils_103_110;
+import org.jdom2.Attribute;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class SwConverter implements IConverter {
+
+ private final HelperUtils_103_110 helper;
+
+ public SwConverter() {
+ this.helper = HelperUtils_103_110.getInstance();
+
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ this.helper.updateNameSpaces_to_110(rootElement);
+
+ /*-
+ * For migration of model from 1.0.3 to 1.1.0, one Class is to be considred :
+ *
+ * - LabelAccessStatistic
+ *
+ */
+
+ updateLabelAccessStatistic(rootElement);
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+
+
+ }
+
+ private void updateLabelAccessStatistic(final Element rootElement) {
+
+ /*- get all LabelAccess elements .
+ *
+ * Note: sw:LabelAccess (RunnableItem) is referred inside several elements either as runnableItems or runnableItem
+ *
+ * Due to this reason, two different Xpath's are applied
+ *
+ * */
+
+ List<Element> labelAccessElements = this.helper.getXpathResult(rootElement,
+ ".//runnableItems[@xsi:type=\"sw:LabelAccess\"]", Element.class, this.helper.getNS_110("sw"),
+ this.helper.getGenericNS("xsi"));
+
+ updateLabelAccessElements(labelAccessElements);
+
+
+ labelAccessElements = this.helper.getXpathResult(rootElement, ".//runnableItem[@xsi:type=\"sw:LabelAccess\"]",
+ Element.class, this.helper.getNS_110("sw"), this.helper.getGenericNS("xsi"));
+
+ updateLabelAccessElements(labelAccessElements);
+
+ }
+
+ private void updateLabelAccessElements(final List<Element> labelAccessElements) {
+ for (final Element labelAccessElement : labelAccessElements) {
+
+
+
+ final Attribute labelAccessEnumAttribute = labelAccessElement.getAttribute("access");
+
+ /*- As per 1.0.3, default value of LabelAccessEnum is "read". In case user doesn't specify value
+ * explicitly, then "access" attribute will not be available in the model file.
+ *
+ * Case 1: when LabelAccessEnum is explicitly set by the user
+ *
+ * <runnableItems xsi:type="sw:LabelAccess" xmi:id="_Z7ArEJNVEeWQC6k3Y09j_A" access="write">
+ *
+ * Case 2: when LabelAccessEnum is not set by the user
+ *
+ * <runnableItems xsi:type="sw:LabelAccess" xmi:id="_K853kJNWEeWQC6k3Y09j_A" data="_9SS-MJNUEeWQC6k3Y09j_A">
+ */
+
+ String labelAccessTypeValue = "read";
+
+ if (labelAccessEnumAttribute != null) {
+ labelAccessTypeValue = labelAccessEnumAttribute.getValue();
+ }
+
+ final Element labelAccessStatisticElement = labelAccessElement.getChild("statistic");
+
+ if (labelAccessStatisticElement != null) {
+
+ /*-As per 1.1.0, LabelAccessStatisitc should have a field "value" instead of read & write.
+ *
+ * Contents of value should be based on LabelAccessEnum value.
+ *
+ * During the migration, following steps are considred:
+ *
+ * 1.If LabelAccessEnum value is default / read:
+ * - read tag inside statistic tag, is renamed to value
+ * - write tag inside statistic tag is removed
+ *
+ * 2.If LabelAccessEnum value is write:
+ * - read tag inside statistic tag, is removed
+ * - write tag inside statistic tag is renamed to value
+ *
+ *
+ * */
+
+ final Element readElement = labelAccessStatisticElement.getChild("read");
+ final Element writeElement = labelAccessStatisticElement.getChild("write");
+ final Element cacheMissesElement = labelAccessStatisticElement.getChild("readCacheMisses");
+
+
+ if (labelAccessTypeValue.equals("read") && (readElement != null)) {
+ /*- removing write element */
+ if (writeElement != null) {
+ writeElement.detach();
+ }
+ readElement.setName("value");
+
+ }
+ else if (labelAccessTypeValue.equals("write") && (writeElement != null)) {
+ /*- removing read element */
+ if (readElement != null) {
+
+ readElement.detach();
+ }
+ writeElement.setName("value");
+ }
+
+ /*- readCacheMisses (1.0.3) is renamed to cacheMisses (1.1.0) */
+ if (cacheMissesElement != null) {
+ cacheMissesElement.setName("cacheMisses");
+ }
+
+ }
+
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/utils/HelperUtils_103_110.java b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/utils/HelperUtils_103_110.java
new file mode 100644
index 0000000..cf78904
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/utils/HelperUtils_103_110.java
@@ -0,0 +1,128 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters110.utils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.app4mc.amalthea.converters.common.utils.AbstractHelper;
+import org.eclipse.app4mc.amalthea.converters.common.utils.NameSpace_110;
+import org.jdom2.Attribute;
+import org.jdom2.Element;
+import org.jdom2.Namespace;
+
+public class HelperUtils_103_110 extends AbstractHelper {
+
+ private HelperUtils_103_110() {
+
+ }
+
+ private static HelperUtils_103_110 instance;
+
+ public static HelperUtils_103_110 getInstance() {
+
+ if (instance == null) {
+ instance = new HelperUtils_103_110();
+ }
+
+ return instance;
+ }
+
+ public Element createAmaltheaElement_110() {
+
+ final Element amaltheaElement = new Element("AMALTHEA");
+ amaltheaElement.setNamespace(Namespace.getNamespace("central", NameSpace_110.central.getNSValue()));
+
+ amaltheaElement.addNamespaceDeclaration(Namespace.getNamespace("common", NameSpace_110.common.getNSValue()));
+ amaltheaElement
+ .addNamespaceDeclaration(Namespace.getNamespace("components", NameSpace_110.components.getNSValue()));
+ amaltheaElement.addNamespaceDeclaration(Namespace.getNamespace("config", NameSpace_110.config.getNSValue()));
+ amaltheaElement
+ .addNamespaceDeclaration(Namespace.getNamespace("constraints", NameSpace_110.constraints.getNSValue()));
+ amaltheaElement.addNamespaceDeclaration(Namespace.getNamespace("events", NameSpace_110.events.getNSValue()));
+ amaltheaElement.addNamespaceDeclaration(Namespace.getNamespace("hw", NameSpace_110.hw.getNSValue()));
+ amaltheaElement.addNamespaceDeclaration(Namespace.getNamespace("mapping", NameSpace_110.mapping.getNSValue()));
+ amaltheaElement.addNamespaceDeclaration(Namespace.getNamespace("os", NameSpace_110.os.getNSValue()));
+ amaltheaElement.addNamespaceDeclaration(
+ Namespace.getNamespace("propertyconstraints", NameSpace_110.propertyconstraints.getNSValue()));
+ amaltheaElement.addNamespaceDeclaration(Namespace.getNamespace("stimuli", NameSpace_110.stimuli.getNSValue()));
+ amaltheaElement.addNamespaceDeclaration(Namespace.getNamespace("sw", NameSpace_110.sw.getNSValue()));
+
+ amaltheaElement
+ .addNamespaceDeclaration(Namespace.getNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance"));
+
+ amaltheaElement.addNamespaceDeclaration(Namespace.getNamespace("xmi", "http://www.omg.org/XMI"));
+
+
+ final Attribute attrib = new Attribute("version", "2.0");
+
+ attrib.setNamespace(Namespace.getNamespace("xmi", "http://www.omg.org/XMI"));
+
+ amaltheaElement.setAttribute(attrib);
+
+ return amaltheaElement;
+
+ }
+
+
+ /**
+ * This method is used to update the namespace references to 110
+ *
+ * @param rootElement
+ */
+
+ public void updateNameSpaces_to_110(final Element rootElement) {
+
+ final Namespace defaultNamespace = rootElement.getNamespace();
+
+
+ if (isNS_AvailableIn_103(defaultNamespace)) {
+
+ // if still 1.0.3 uri is used, then transform all URI's
+
+ rootElement.setNamespace(null);
+
+ rootElement.removeNamespaceDeclaration(defaultNamespace);
+
+ rootElement.setNamespace(getNS_110(defaultNamespace.getPrefix()));
+
+ // updating additional namespaces to the ones from 110
+
+ final List<Namespace> additionalNamespaces = new ArrayList<Namespace>();
+
+ additionalNamespaces.addAll(rootElement.getAdditionalNamespaces());
+
+ for (int i = 0; i < additionalNamespaces.size(); i++) {
+
+ final Namespace ns = additionalNamespaces.get(i);
+
+ if (isNS_AvailableIn_103(ns)) {
+
+ rootElement.removeNamespaceDeclaration(ns);
+
+ final Namespace ns_110 = getNS_110(ns.getPrefix());
+
+ rootElement.addNamespaceDeclaration(ns_110);
+
+ }
+
+
+ }
+
+ rootElement.addNamespaceDeclaration(getGenericNS("xmi"));
+
+ rootElement.addNamespaceDeclaration(getGenericNS("xsi"));
+
+ }
+ }
+
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/utils/ProcessCacheBuilder.java b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/utils/ProcessCacheBuilder.java
new file mode 100644
index 0000000..66c1394
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/utils/ProcessCacheBuilder.java
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters110.utils;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.utils.AbstractAttributeRefCacheBuilder;
+import org.jdom2.Attribute;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class ProcessCacheBuilder extends AbstractAttributeRefCacheBuilder {
+
+
+ public ProcessCacheBuilder() {
+
+ this.helper = HelperUtils_103_110.getInstance();
+ }
+
+
+ @Override
+ public void buildCache(final Map<File, Document> fileName_documentsMap) {
+
+
+ for (final File targetFile : fileName_documentsMap.keySet()) {
+
+ /*- *********** Cache initialization *********** */
+
+ getCacheMap().put(targetFile, new HashMap<String, Object>());
+
+ final Document rootDocument = fileName_documentsMap.get(targetFile);
+
+ /*- Key is a UUID and value is Element */
+
+ populate_All_UUID_Elements(targetFile, rootDocument,
+ ".//swModel/tasks|.//swModel/isrs|sw:SWModel/tasks|sw:SWModel/isrs",
+ ProcessCacheEnum.UUID_PROCESS_ELEMENT.name(), this.helper.getNS_103("sw"));
+
+
+ /*- Key is a legacy URI fragment and value is List of Attribute's having the same reference */
+
+ final Map<String, List<Attribute>> uriFragment_schedulerRefAttribsMap = getAllProcessAttributes_containing_URIFragments(rootDocument);
+
+ getCacheMap().get(targetFile).put(ProcessCacheEnum.URIFRAGMENT_PROCESS_REFS_ATRIBUTES.name(),
+ uriFragment_schedulerRefAttribsMap);
+
+ /*- Key is a legacy URI fragment and value is List of Elements which belong to this URIFragment */
+
+ final Map<String, Element> uriFragment_SchedulerMap = getAllProcessElements_referred_by_URIFragments(
+ targetFile, rootDocument);
+
+
+ getCacheMap().get(targetFile).put(ProcessCacheEnum.URIFRAGMENT_PROCESS_ELEMENT.name(),
+ uriFragment_SchedulerMap);
+
+
+ /*- ---------Handling HREF elements ---------*/
+
+
+ populateAllHREFProcessAttributes_having_legacy_URI_refs(targetFile, rootDocument);
+
+
+ populate_AllElements_referred_by_hrefURIFragments(targetFile, rootDocument, fileName_documentsMap);
+
+
+ }
+
+
+ }
+
+ private void populate_AllElements_referred_by_hrefURIFragments(final File targetFile, final Document rootDocument,
+ final Map<File, Document> fileName_documentsMap) {
+ populate_AllElements_referred_by_hrefURIFragments(targetFile, rootDocument, fileName_documentsMap,
+ ProcessCacheEnum.HREF_URIFRAGMENT_PROCESS_REFS_ATRIBUTES.name(),
+ ProcessCacheEnum.HREF_URIFRAGMENT_PROCESS_ELEMENT.name());
+ }
+
+
+ private void populateAllHREFProcessAttributes_having_legacy_URI_refs(final File targetFile,
+ final Document rootDocument) {
+ populateAllHREF_ElementAttributes_having_legacy_URI_refs(targetFile, rootDocument,
+ ".//process/@href[contains(., \"/\")]", ProcessCacheEnum.HREF_URIFRAGMENT_PROCESS_REFS_ATRIBUTES.name());
+
+ }
+
+
+ /**
+ * This method is used to grab all the Attributes referring to legacy format of URI fragments and group them
+ * accordingly based on key as URIFragment
+ *
+ * @param rootDocument
+ * @return
+ */
+ private Map<String, List<Attribute>> getAllProcessAttributes_containing_URIFragments(final Document rootDocument) {
+
+ return getAllAttributes_containing_URIFragments(rootDocument, ".//@process[contains(., \"/\")]");
+
+
+ }
+
+ /**
+ * This method is used to grab all Elements referred by legacy URI fragments and build a Map containing key as
+ * URIFragment and value as corresponding Element
+ *
+ * @param targetFile
+ * @param rootDocument
+ * @return
+ */
+ private Map<String, Element> getAllProcessElements_referred_by_URIFragments(final File targetFile,
+ final Document rootDocument) {
+ return getAllElements_referred_by_URIFragments(targetFile, rootDocument,
+ ProcessCacheEnum.URIFRAGMENT_PROCESS_REFS_ATRIBUTES.name());
+ }
+
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/utils/ProcessCacheEnum.java b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/utils/ProcessCacheEnum.java
new file mode 100644
index 0000000..627d771
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/utils/ProcessCacheEnum.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters110.utils;
+
+public enum ProcessCacheEnum {
+
+ /*- Cache is stored in following format : Map<String, Element> */
+ UUID_PROCESS_ELEMENT,
+
+ /*- Cache is stored in following format : Map<String, List<Attribute>> */
+ URIFRAGMENT_PROCESS_REFS_ATRIBUTES,
+
+ /*- Cache is stored in following format : Map<String, Element> */
+ URIFRAGMENT_PROCESS_ELEMENT,
+
+ /*- Cache is stored in following format : Map<File, Table<String,String, List<Attribute>>> */
+ HREF_URIFRAGMENT_PROCESS_REFS_ATRIBUTES,
+
+ /*- Cache is stored in following format : Map<String, Element>
+ * ======
+ * ||Note:||
+ * ======
+ * key is a global URI fragment
+ * Value is a Process object
+ * */
+ HREF_URIFRAGMENT_PROCESS_ELEMENT;
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/utils/SchedulerCacheBuilder.java b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/utils/SchedulerCacheBuilder.java
new file mode 100644
index 0000000..1f08e81
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/utils/SchedulerCacheBuilder.java
@@ -0,0 +1,195 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters110.utils;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.utils.AbstractAttributeRefCacheBuilder;
+import org.eclipse.app4mc.amalthea.converters.common.utils.ModelVersion;
+import org.jdom2.Attribute;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+import com.google.common.collect.BiMap;
+import com.google.common.collect.HashBiMap;
+
+public class SchedulerCacheBuilder extends AbstractAttributeRefCacheBuilder {
+
+
+ public SchedulerCacheBuilder() {
+
+ this.helper = HelperUtils_103_110.getInstance();
+ }
+
+
+ @Override
+ public void buildCache(final Map<File, Document> fileName_documentsMap) {
+
+
+ for (final File targetFile : fileName_documentsMap.keySet()) {
+
+ /*- Cache initialized */
+
+ getCacheMap().put(targetFile, new HashMap<String, Object>());
+
+ final Document rootDocument = fileName_documentsMap.get(targetFile);
+
+ /*- Key is a UUID and value is Element */
+
+ populate_All_UUID_Elements(targetFile, rootDocument, ".//osModel/scheduler | .//os:OSModel/scheduler",
+ SchedulerCacheEnum.UUID_SCHEDULER_ELEMENT.name(), this.helper.getNS_103("os"));
+
+ /*- Key is a legacy URI fragment and value is List of Attribute's having the same reference */
+
+ final Map<String, List<Attribute>> uriFragment_schedulerRefAttribsMap = getAllSchedulerAttributes_containing_URIFragments(rootDocument);
+
+ getCacheMap().get(targetFile).put(SchedulerCacheEnum.URIFRAGMENT_SCHEDULER_REFS_ATRIBUTES.name(),
+ uriFragment_schedulerRefAttribsMap);
+
+ /*- Key is a legacy URI fragment and value is List of Elements which belong to this URIFragment */
+
+ final Map<String, Element> uriFragment_SchedulerMap = getAllSchedulerElements_referred_by_URIFragments(
+ targetFile, rootDocument);
+
+
+ getCacheMap().get(targetFile).put(SchedulerCacheEnum.URIFRAGMENT_SCHEDULER_ELEMENT.name(),
+ uriFragment_SchedulerMap);
+
+
+ /*- ---------Handling HREF elements ---------*/
+
+
+ populateAllHREFSchedulerAttributes_having_legacy_URI_refs(targetFile, rootDocument);
+
+
+ populate_AllElements_referred_by_hrefURIFragments(targetFile, rootDocument, fileName_documentsMap);
+
+
+ }
+
+
+ }
+
+
+ @SuppressWarnings("unchecked")
+ public void updateURIFragments_in_Cache(final Map<File, Document> fileName_documentsMap) {
+
+ /*- based on the current implementation, Cache is updated after SchedulerRefs are updated */
+
+
+ for (final File targetFile : fileName_documentsMap.keySet()) {
+
+ final Map<String, Object> cache_file_specific_Map = getCacheMap().get(targetFile);
+
+ BiMap<String, String> biMap_urifragments_new_old = (BiMap<String, String>) cache_file_specific_Map
+ .get(SchedulerCacheEnum.URI_FRAGMENT_NEW_OLD.name());
+
+ if (biMap_urifragments_new_old == null) {
+
+ biMap_urifragments_new_old = HashBiMap.create();
+
+ cache_file_specific_Map.put(SchedulerCacheEnum.URI_FRAGMENT_NEW_OLD.name(), biMap_urifragments_new_old);
+
+ }
+
+ /*- As the user has requested to update the cache for URI fragments, clear the existing cache */
+
+ biMap_urifragments_new_old.clear();
+
+
+ final Map<String, Element> urifragment_element_map = (Map<String, Element>) cache_file_specific_Map
+ .get(SchedulerCacheEnum.URIFRAGMENT_SCHEDULER_ELEMENT.name());
+
+ for (final String old_uriFragment : urifragment_element_map.keySet()) {
+
+ final Element element = urifragment_element_map.get(old_uriFragment);
+
+ final String updated_uriFragment = this.helper.getURIFragment(element, ModelVersion._110);
+
+
+ biMap_urifragments_new_old.put(updated_uriFragment, old_uriFragment);
+
+ }
+
+
+ final Map<String, Element> hrefurifragment_element_map = (Map<String, Element>) cache_file_specific_Map
+ .get(SchedulerCacheEnum.HREF_URIFRAGMENT_SCHEDULER_ELEMENT.name());
+
+ for (final String old_href_uriFragment : hrefurifragment_element_map.keySet()) {
+
+ final Element element = hrefurifragment_element_map.get(old_href_uriFragment);
+
+ final String updated_uriFragment_part2 = this.helper.getURIFragment(element, ModelVersion._110);
+
+ final String[] split = old_href_uriFragment.split("#");
+
+ biMap_urifragments_new_old.put(split[0] + "#" + updated_uriFragment_part2, old_href_uriFragment);
+
+ }
+
+
+ }
+
+ }
+
+ private void populate_AllElements_referred_by_hrefURIFragments(final File targetFile, final Document rootDocument,
+ final Map<File, Document> fileName_documentsMap) {
+ populate_AllElements_referred_by_hrefURIFragments(targetFile, rootDocument, fileName_documentsMap,
+ SchedulerCacheEnum.HREF_URIFRAGMENT_SCHEDULER_REFS_ATRIBUTES.name(),
+ SchedulerCacheEnum.HREF_URIFRAGMENT_SCHEDULER_ELEMENT.name());
+
+ }
+
+ private void populateAllHREFSchedulerAttributes_having_legacy_URI_refs(final File targetFile,
+ final Document rootDocument) {
+
+ populateAllHREF_ElementAttributes_having_legacy_URI_refs(targetFile, rootDocument,
+ ".//scheduler/@href[contains(., \"/\")]",
+ SchedulerCacheEnum.HREF_URIFRAGMENT_SCHEDULER_REFS_ATRIBUTES.name());
+
+ }
+
+
+ /**
+ * This method is used to grab all the Attributes referring to legacy format of URI fragments and group them
+ * accordingly based on key as URIFragment
+ *
+ * @param rootDocument
+ * @return
+ */
+ private Map<String, List<Attribute>> getAllSchedulerAttributes_containing_URIFragments(final Document rootDocument) {
+
+ return getAllAttributes_containing_URIFragments(rootDocument, ".//@scheduler[contains(., \"/\")]");
+
+
+ }
+
+ /**
+ * This method is used to grab all Elements referred by legacy URI fragments and build a Map containing key as
+ * URIFragment and value as corresponding Element
+ *
+ * @param targetFile
+ * @param rootDocument
+ * @return
+ */
+ private Map<String, Element> getAllSchedulerElements_referred_by_URIFragments(final File targetFile,
+ final Document rootDocument) {
+
+
+ return getAllElements_referred_by_URIFragments(targetFile, rootDocument,
+ SchedulerCacheEnum.URIFRAGMENT_SCHEDULER_REFS_ATRIBUTES.name());
+ }
+
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/utils/SchedulerCacheEnum.java b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/utils/SchedulerCacheEnum.java
new file mode 100644
index 0000000..901028d
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/utils/SchedulerCacheEnum.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters110.utils;
+
+public enum SchedulerCacheEnum {
+
+ /*- Cache is stored in following format : Map<String, Element> */
+ UUID_SCHEDULER_ELEMENT,
+
+ /*- Cache is stored in following format : Map<String, List<Attribute>> */
+ URIFRAGMENT_SCHEDULER_REFS_ATRIBUTES,
+
+ /*- Cache is stored in following format : Map<String, Element> */
+ URIFRAGMENT_SCHEDULER_ELEMENT,
+
+ /*- Cache is stored in following format : Map<File, Table<String,String, List<Attribute>>> */
+ HREF_URIFRAGMENT_SCHEDULER_REFS_ATRIBUTES,
+
+ /*- Cache is stored in following format : Map<String, Element>
+ * ======
+ * ||Note:||
+ * ======
+ * key is a global URI fragment
+ * Value is a Scheduler object
+ * */
+ HREF_URIFRAGMENT_SCHEDULER_ELEMENT,
+
+ /*- Cache is stored in following format :BiMap<String, String> */
+ URI_FRAGMENT_NEW_OLD;
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/utils/SchemaUtils.java b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/utils/SchemaUtils.java
new file mode 100644
index 0000000..39306a2
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.110/src/org/eclipse/app4mc/amalthea/converters110/utils/SchemaUtils.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters110.utils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class SchemaUtils {
+
+ private static final List<String> multipleOccurances = new ArrayList<String>();
+
+ static {
+ multipleOccurances.add("taskSchedulers");
+ multipleOccurances.add("operatingSystems");
+ }
+
+ public static boolean isMultiOccuranceElement(final String elementName) {
+
+ return multipleOccurances.contains(elementName);
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.111/.classpath b/plugins/org.eclipse.app4mc.amalthea.converters.111/.classpath
new file mode 100644
index 0000000..eca7bdb
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.111/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.111/.gitignore b/plugins/org.eclipse.app4mc.amalthea.converters.111/.gitignore
new file mode 100644
index 0000000..09e3bc9
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.111/.gitignore
@@ -0,0 +1,2 @@
+/bin/
+/target/
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.111/.project b/plugins/org.eclipse.app4mc.amalthea.converters.111/.project
new file mode 100644
index 0000000..6034d7a
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.111/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.app4mc.amalthea.converters.111</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.111/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.app4mc.amalthea.converters.111/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..0c68a61
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.111/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.111/META-INF/MANIFEST.MF b/plugins/org.eclipse.app4mc.amalthea.converters.111/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..0a1c277
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.111/META-INF/MANIFEST.MF
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: APP4MC Amalthea Converters to Itea-1.1.1
+Bundle-SymbolicName: org.eclipse.app4mc.amalthea.converters.111;singleton:=true
+Bundle-Version: 0.7.0.qualifier
+Bundle-Activator: org.eclipse.app4mc.amalthea.converters111.Activator
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.app4mc.amalthea.converters.common
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.app4mc.amalthea.converters111.utils
+Bundle-Vendor: Eclipse.org
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.111/about.html b/plugins/org.eclipse.app4mc.amalthea.converters.111/about.html
new file mode 100644
index 0000000..49696f9
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.111/about.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>September 30, 2013</p>
+<h3>License</h3>
+
+<p>APP4MC provides all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.111/build.properties b/plugins/org.eclipse.app4mc.amalthea.converters.111/build.properties
new file mode 100644
index 0000000..2e3bc05
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.111/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html,\
+ epl-v10.html
+src.includes = about.html,\
+ epl-v10.html
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.111/epl-v10.html b/plugins/org.eclipse.app4mc.amalthea.converters.111/epl-v10.html
new file mode 100644
index 0000000..fd39122
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.111/epl-v10.html
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Public License - Version 1.0</title>
+<style type="text/css">
+ body {
+ size: 8.5in 11.0in;
+ margin: 0.25in 0.5in 0.25in 0.5in;
+ tab-interval: 0.5in;
+ }
+ p {
+ margin-left: auto;
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ }
+ p.list {
+ margin-left: 0.5in;
+ margin-top: 0.05em;
+ margin-bottom: 0.05em;
+ }
+ </style>
+
+</head>
+
+<body lang="EN-US">
+
+<h2>Eclipse Public License - v 1.0</h2>
+
+<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
+DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
+AGREEMENT.</p>
+
+<p><b>1. DEFINITIONS</b></p>
+
+<p>"Contribution" means:</p>
+
+<p class="list">a) in the case of the initial Contributor, the initial
+code and documentation distributed under this Agreement, and</p>
+<p class="list">b) in the case of each subsequent Contributor:</p>
+<p class="list">i) changes to the Program, and</p>
+<p class="list">ii) additions to the Program;</p>
+<p class="list">where such changes and/or additions to the Program
+originate from and are distributed by that particular Contributor. A
+Contribution 'originates' from a Contributor if it was added to the
+Program by such Contributor itself or anyone acting on such
+Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii)
+are not derivative works of the Program.</p>
+
+<p>"Contributor" means any person or entity that distributes
+the Program.</p>
+
+<p>"Licensed Patents" mean patent claims licensable by a
+Contributor which are necessarily infringed by the use or sale of its
+Contribution alone or when combined with the Program.</p>
+
+<p>"Program" means the Contributions distributed in accordance
+with this Agreement.</p>
+
+<p>"Recipient" means anyone who receives the Program under
+this Agreement, including all Contributors.</p>
+
+<p><b>2. GRANT OF RIGHTS</b></p>
+
+<p class="list">a) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free copyright license to reproduce, prepare derivative works
+of, publicly display, publicly perform, distribute and sublicense the
+Contribution of such Contributor, if any, and such derivative works, in
+source code and object code form.</p>
+
+<p class="list">b) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free patent license under Licensed Patents to make, use, sell,
+offer to sell, import and otherwise transfer the Contribution of such
+Contributor, if any, in source code and object code form. This patent
+license shall apply to the combination of the Contribution and the
+Program if, at the time the Contribution is added by the Contributor,
+such addition of the Contribution causes such combination to be covered
+by the Licensed Patents. The patent license shall not apply to any other
+combinations which include the Contribution. No hardware per se is
+licensed hereunder.</p>
+
+<p class="list">c) Recipient understands that although each Contributor
+grants the licenses to its Contributions set forth herein, no assurances
+are provided by any Contributor that the Program does not infringe the
+patent or other intellectual property rights of any other entity. Each
+Contributor disclaims any liability to Recipient for claims brought by
+any other entity based on infringement of intellectual property rights
+or otherwise. As a condition to exercising the rights and licenses
+granted hereunder, each Recipient hereby assumes sole responsibility to
+secure any other intellectual property rights needed, if any. For
+example, if a third party patent license is required to allow Recipient
+to distribute the Program, it is Recipient's responsibility to acquire
+that license before distributing the Program.</p>
+
+<p class="list">d) Each Contributor represents that to its knowledge it
+has sufficient copyright rights in its Contribution, if any, to grant
+the copyright license set forth in this Agreement.</p>
+
+<p><b>3. REQUIREMENTS</b></p>
+
+<p>A Contributor may choose to distribute the Program in object code
+form under its own license agreement, provided that:</p>
+
+<p class="list">a) it complies with the terms and conditions of this
+Agreement; and</p>
+
+<p class="list">b) its license agreement:</p>
+
+<p class="list">i) effectively disclaims on behalf of all Contributors
+all warranties and conditions, express and implied, including warranties
+or conditions of title and non-infringement, and implied warranties or
+conditions of merchantability and fitness for a particular purpose;</p>
+
+<p class="list">ii) effectively excludes on behalf of all Contributors
+all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;</p>
+
+<p class="list">iii) states that any provisions which differ from this
+Agreement are offered by that Contributor alone and not by any other
+party; and</p>
+
+<p class="list">iv) states that source code for the Program is available
+from such Contributor, and informs licensees how to obtain it in a
+reasonable manner on or through a medium customarily used for software
+exchange.</p>
+
+<p>When the Program is made available in source code form:</p>
+
+<p class="list">a) it must be made available under this Agreement; and</p>
+
+<p class="list">b) a copy of this Agreement must be included with each
+copy of the Program.</p>
+
+<p>Contributors may not remove or alter any copyright notices contained
+within the Program.</p>
+
+<p>Each Contributor must identify itself as the originator of its
+Contribution, if any, in a manner that reasonably allows subsequent
+Recipients to identify the originator of the Contribution.</p>
+
+<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
+
+<p>Commercial distributors of software may accept certain
+responsibilities with respect to end users, business partners and the
+like. While this license is intended to facilitate the commercial use of
+the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create
+potential liability for other Contributors. Therefore, if a Contributor
+includes the Program in a commercial product offering, such Contributor
+("Commercial Contributor") hereby agrees to defend and
+indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses")
+arising from claims, lawsuits and other legal actions brought by a third
+party against the Indemnified Contributor to the extent caused by the
+acts or omissions of such Commercial Contributor in connection with its
+distribution of the Program in a commercial product offering. The
+obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In
+order to qualify, an Indemnified Contributor must: a) promptly notify
+the Commercial Contributor in writing of such claim, and b) allow the
+Commercial Contributor to control, and cooperate with the Commercial
+Contributor in, the defense and any related settlement negotiations. The
+Indemnified Contributor may participate in any such claim at its own
+expense.</p>
+
+<p>For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any other
+Contributor to pay any damages as a result, the Commercial Contributor
+must pay those damages.</p>
+
+<p><b>5. NO WARRANTY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
+PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
+ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
+OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with its
+exercise of rights under this Agreement , including but not limited to
+the risks and costs of program errors, compliance with applicable laws,
+damage to or loss of data, programs or equipment, and unavailability or
+interruption of operations.</p>
+
+<p><b>6. DISCLAIMER OF LIABILITY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
+NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
+WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
+DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
+HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
+
+<p><b>7. GENERAL</b></p>
+
+<p>If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further action
+by the parties hereto, such provision shall be reformed to the minimum
+extent necessary to make such provision valid and enforceable.</p>
+
+<p>If Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Program itself (excluding combinations of the Program with other
+software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the
+date such litigation is filed.</p>
+
+<p>All Recipient's rights under this Agreement shall terminate if it
+fails to comply with any of the material terms or conditions of this
+Agreement and does not cure such failure in a reasonable period of time
+after becoming aware of such noncompliance. If all Recipient's rights
+under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive.</p>
+
+<p>Everyone is permitted to copy and distribute copies of this
+Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The
+Agreement Steward reserves the right to publish new versions (including
+revisions) of this Agreement from time to time. No one other than the
+Agreement Steward has the right to modify this Agreement. The Eclipse
+Foundation is the initial Agreement Steward. The Eclipse Foundation may
+assign the responsibility to serve as the Agreement Steward to a
+suitable separate entity. Each new version of the Agreement will be
+given a distinguishing version number. The Program (including
+Contributions) may always be distributed subject to the version of the
+Agreement under which it was received. In addition, after a new version
+of the Agreement is published, Contributor may elect to distribute the
+Program (including its Contributions) under the new version. Except as
+expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
+rights or licenses to the intellectual property of any Contributor under
+this Agreement, whether expressly, by implication, estoppel or
+otherwise. All rights in the Program not expressly granted under this
+Agreement are reserved.</p>
+
+<p>This Agreement is governed by the laws of the State of New York and
+the intellectual property laws of the United States of America. No party
+to this Agreement will bring a legal action under this Agreement more
+than one year after the cause of action arose. Each party waives its
+rights to a jury trial in any resulting litigation.</p>
+
+</body>
+
+</html>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.111/plugin.xml b/plugins/org.eclipse.app4mc.amalthea.converters.111/plugin.xml
new file mode 100644
index 0000000..bf44f2c
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.111/plugin.xml
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.app4mc.amalthea.model.converters">
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters111.impl.CentralConverter"
+ enabled="true"
+ id="converters.111.central"
+ input-model-version="itea.110"
+ name="central"
+ output-model-version="itea.111">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters111.impl.MappingConverter"
+ enabled="true"
+ id="converters.111.mapping"
+ input-model-version="itea.110"
+ name="org.eclipse.app4mc.amalthea.converters111.mapping"
+ output-model-version="itea.111">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters111.impl.OSConverter"
+ enabled="true"
+ id="converters.111.os"
+ input-model-version="itea.110"
+ name="org.eclipse.app4mc.amalthea.converters111.os"
+ output-model-version="itea.111">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters111.impl.HwConverter"
+ enabled="true"
+ id="converters.111.hw"
+ input-model-version="itea.110"
+ name="org.eclipse.app4mc.amalthea.converters111.hw"
+ output-model-version="itea.111">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters111.impl.CommonConverter"
+ enabled="true"
+ id="converters.111.common"
+ input-model-version="itea.110"
+ name="org.eclipse.app4mc.amalthea.converters111.common"
+ output-model-version="itea.111">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters111.impl.ComponentConverter"
+ enabled="true"
+ id="converters.111.component"
+ input-model-version="itea.110"
+ name="org.eclipse.app4mc.amalthea.converters111.component"
+ output-model-version="itea.111">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters111.impl.ComponentModelRefsConverter"
+ enabled="true"
+ id="converters.111.componentModelElementsRef"
+ input-model-version="itea.103"
+ name="org.eclipse.app4mc.amalthea.converters111.componentModelElementsRef"
+ output-model-version="itea.110">
+ <dependent-on-converter
+ id="converters.111.component">
+ </dependent-on-converter>
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters111.impl.PropertyConstraintsConverter"
+ enabled="true"
+ id="converters.111.propertyconstraints"
+ input-model-version="itea.110"
+ name="org.eclipse.app4mc.amalthea.converters111.PropertyConstraints"
+ output-model-version="itea.111">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters111.impl.EventsConverter"
+ enabled="true"
+ id="converters.111.events"
+ input-model-version="itea.110"
+ name="org.eclipse.app4mc.amalthea.converters111.Events"
+ output-model-version="itea.111">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters111.impl.ConstraintsConverter"
+ enabled="true"
+ id="converters.111.constraints"
+ input-model-version="itea.110"
+ name="org.eclipse.app4mc.amalthea.converters111.Constraints"
+ output-model-version="itea.111">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters111.impl.ConfigConverter"
+ enabled="true"
+ id="converters.111.config"
+ input-model-version="itea.110"
+ name="org.eclipse.app4mc.amalthea.converters111.Config"
+ output-model-version="itea.111">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters111.impl.StimuliConverter"
+ enabled="true"
+ id="converters.111.stimuli"
+ input-model-version="itea.110"
+ name="org.eclipse.app4mc.amalthea.converters111.Stimuli"
+ output-model-version="itea.111">
+ </converter>
+ <converter
+ converter-class="org.eclipse.app4mc.amalthea.converters111.impl.SwConverter"
+ enabled="true"
+ id="converters.111.sw"
+ input-model-version="itea.110"
+ name="org.eclipse.app4mc.amalthea.converters111.sw"
+ output-model-version="itea.111">
+ <dependent-on-converter
+ id="converters.111.stimuli">
+ </dependent-on-converter>
+ </converter>
+ </extension>
+ <extension
+ point="org.eclipse.app4mc.amalthea.model.converters.cachebuilders">
+ <CacheBuilder
+ ID="org.eclipse.app4mc.amalthea.converters111.CacheBuilder1"
+ class="org.eclipse.app4mc.amalthea.converters111.utils.ComponentModelRefsCacheBuilder"
+ enabled="true"
+ input-model-version="itea.110"
+ name="ComponentModelRefsCacheBuilder">
+ </CacheBuilder>
+ <CacheBuilder
+ ID="org.eclipse.app4mc.amalthea.converters111.CacheBuilder2"
+ class="org.eclipse.app4mc.amalthea.converters111.utils.LabelValueProviderRefsCacheBuilder"
+ enabled="true"
+ input-model-version="itea.110"
+ name="LabelValueProverRefsCacheBuilder">
+ </CacheBuilder>
+ <CacheBuilder
+ ID="org.eclipse.app4mc.amalthea.converters.111.ModeLabelsCacheBuilder"
+ class="org.eclipse.app4mc.amalthea.converters111.utils.ModeLabelsCacheBuilder"
+ enabled="true"
+ input-model-version="itea.110"
+ name="ModeLabelsCacheBuilder">
+ </CacheBuilder>
+ </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.111/pom.xml b/plugins/org.eclipse.app4mc.amalthea.converters.111/pom.xml
new file mode 100644
index 0000000..590adef
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.111/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <relativePath>../../build/org.eclipse.app4mc.build/pom.xml</relativePath>
+ <groupId>org.eclipse.app4mc.build</groupId>
+ <artifactId>parent</artifactId>
+ <version>0.7.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.app4mc.amalthea.converters.111</artifactId>
+ <packaging>eclipse-plugin</packaging>
+
+</project>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/Activator.java b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/Activator.java
new file mode 100644
index 0000000..c09f2f5
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/Activator.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters111;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+ private static BundleContext context;
+
+ static BundleContext getContext() {
+ return context;
+ }
+
+ /**
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(final BundleContext bundleContext) throws Exception {
+ Activator.context = bundleContext;
+ }
+
+ /**
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(final BundleContext bundleContext) throws Exception {
+ Activator.context = null;
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/CentralConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/CentralConverter.java
new file mode 100644
index 0000000..7abd936
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/CentralConverter.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters111.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters111.utils.HelperUtils_110_111;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class CentralConverter implements IConverter {
+
+ private final HelperUtils_110_111 helper;
+
+ public CentralConverter() {
+ this.helper = HelperUtils_110_111.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ this.helper.updateNameSpaces_to_111(rootElement);
+
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_111("common"));
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_111("hw"));
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_111("os"));
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_111("stimuli"));
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_111("sw"));
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_111("propertyconstraints"));
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_111("mapping"));
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_111("events"));
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_111("constraints"));
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_111("config"));
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_111("components"));
+
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+
+
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/CommonConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/CommonConverter.java
new file mode 100644
index 0000000..929b6f7
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/CommonConverter.java
@@ -0,0 +1,237 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters111.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters111.utils.HelperUtils_110_111;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class CommonConverter implements IConverter {
+
+ private final HelperUtils_110_111 helper;
+
+ public CommonConverter() {
+ this.helper = HelperUtils_110_111.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ this.helper.updateNameSpaces_to_111(rootElement);
+
+ updateEnum_TimeUnit(rootElement);
+
+ update_Tag(rootElement);
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+
+
+ }
+
+
+ private void update_Tag(final Element rootElement) {
+
+ /*
+ * tagName attribute (as per 1.1.0) inside Tag is changed to "name" in 1.1.1
+ *
+ * As a part of model migration all the definitions of the Tag object should be updated with the new attribute
+ * "name"
+ */
+ final List<Element> tags = this.helper.getXpathResult(rootElement,
+ ".//componentsModel/tags[not(@type)]|/components:ComponentsModel/tags|.//swModel/tags| /sw:SWModel/tags",
+ Element.class, this.helper.getNS_111("components"), this.helper.getNS_111("sw"));
+
+
+ for (final Element tag : tags) {
+
+ final String attributeValue = tag.getAttributeValue("tagName");
+
+ tag.removeAttribute("tagName");
+
+ if (attributeValue != null) {
+ tag.setAttribute("name", attributeValue);
+ }
+ }
+ }
+
+ private void updateEnum_TimeUnit(final Element rootElement) {
+
+
+ /*- TimeUnit enum is contained inside Time, SignedTime with variable unit
+ *
+ * Time is contained inside various Class's with variable reference names as :
+ * tolerance,minimum,maximum,upper,lower,jitter,minimumTime,maximumTime,delay,offset,recurrence,activation,lowerTimeBorder,upperTimeBorder,period,time,deadline, min, max, offset, deadline
+ *
+ * =========================================
+ *|| SignedTime can be contained inside: ||
+ * =========================================
+ * 1.abstract class Stimulus - with variable name as stimulusDeviation
+ *
+ * Abstract class Stimulus objects are referred inside StimuliModel using "stimuli" array variable
+ *
+ * stimulusDeviation can have following variables which can contain SignedTime :
+ * lowerBound
+ * upperBound
+ * distribution -> as a complex node which can further contain SignedTime references inside.
+ *
+ * 2.ClockTriangleFunction - with variable name as shift
+ *
+ * 3.ClockSinusFunction - with variable name as shift
+ * =========================================
+ *|| Time can be contained inside: ||
+ * =========================================
+ * SchedulingHWUnit->delay
+ * SynchronisationConstraint -> tolerance stimuli:Periodic->offset
+ * ReactionConstraint ->minimum stimuli:Periodic->recurrence
+ * ReactionConstraint ->maximum sw:Periodic -> min
+ * DelayConstraint->upper sw:Periodic -> max
+ * DelayConstraint->lower sw:Periodic -> offset
+ * AgeConstraint->maximum sw:Periodic -> deadline
+ * AgeConstraint->minimum SingleActivation -> min
+ * RepetitionConstraint->lower SingleActivation -> max
+ * RepetitionConstraint->upper Single -> activation
+ * RepetitionConstraint->jitter ArrivalCurveEntry ->lowerTimeBorder
+ * DataAgeTime->minimumTime ArrivalCurveEntry ->upperTimeBorder
+ * DataAgeTime->maximumTime ClockTriangleFunction -> period
+ * AbstractProcess -> deadline (removeed in 1.1.1) ClockSinusFunction -> period
+ * Runnable -> deadline ClockMultiplierListEntry -> time
+
+ */
+
+
+ /*--
+ * * Migraiton step to 111 from 110: Grep the references of "features" and "hw:FeatureTypes" tag which do not contain "value" attribute
+ * */
+
+ final StringBuffer timeXpathBuffer = new StringBuffer();
+
+ timeXpathBuffer.append(
+ ".//timingConstraints[(@xsi:type=\"constraints:SynchronisationConstraint\")]/tolerance[not(@unit)]");
+ timeXpathBuffer.append("|");
+ timeXpathBuffer
+ .append(".//timingConstraints[(@xsi:type=\"constraints:ReactionConstraint\")]/minimum[not(@unit)]");
+ timeXpathBuffer.append("|");
+ timeXpathBuffer
+ .append(".//timingConstraints[(@xsi:type=\"constraints:ReactionConstraint\")]/maximum[not(@unit)]");
+ timeXpathBuffer.append("|");
+ timeXpathBuffer.append(".//timingConstraints[(@xsi:type=\"constraints:DelayConstraint\")]/upper[not(@unit)]");
+ timeXpathBuffer.append("|");
+ timeXpathBuffer.append(".//timingConstraints[(@xsi:type=\"constraints:DelayConstraint\")]/lower[not(@unit)]");
+ timeXpathBuffer.append("|");
+ timeXpathBuffer.append(".//timingConstraints[(@xsi:type=\"constraints:AgeConstraint\")]/maximum[not(@unit)]");
+ timeXpathBuffer.append("|");
+ timeXpathBuffer.append(".//timingConstraints[(@xsi:type=\"constraints:AgeConstraint\")]/minimum[not(@unit)]");
+ timeXpathBuffer.append("|");
+ timeXpathBuffer
+ .append(".//timingConstraints[(@xsi:type=\"constraints:RepetitionConstraint\")]/lower[not(@unit)]");
+ timeXpathBuffer.append("|");
+ timeXpathBuffer
+ .append(".//timingConstraints[(@xsi:type=\"constraints:RepetitionConstraint\")]/upper[not(@unit)]");
+ timeXpathBuffer.append("|");
+ timeXpathBuffer
+ .append(".//timingConstraints[(@xsi:type=\"constraints:RepetitionConstraint\")]/jitter[not(@unit)]");
+ timeXpathBuffer.append("|");
+ timeXpathBuffer.append(
+ ".//dataAgeConstraints/dataAge[(@xsi:type=\"constraints:DataAgeTime\")]/minimumTime[not(@unit)]");
+ timeXpathBuffer.append("|");
+ timeXpathBuffer.append(
+ ".//dataAgeConstraints/dataAge[(@xsi:type=\"constraints:DataAgeTime\")]/maximumTime[not(@unit)]");
+ timeXpathBuffer.append("|");
+ timeXpathBuffer.append(".//schedulingUnit[(@xsi:type=\"os:SchedulingHWUnit\")]/delay[not(@unit)]");
+ timeXpathBuffer.append("|");
+ timeXpathBuffer.append(".//stimuli[(@xsi:type=\"stimuli:Periodic\")]/offset[not(@unit)]");
+ timeXpathBuffer.append("|");
+ timeXpathBuffer.append(".//stimuli[(@xsi:type=\"stimuli:Periodic\")]/recurrence[not(@unit)]");
+ timeXpathBuffer.append("|");
+ timeXpathBuffer.append(".//activations[(@xsi:type=\"sw:Periodic\")]/min[not(@unit)]");
+ timeXpathBuffer.append("|");
+ timeXpathBuffer.append(".//activations[(@xsi:type=\"sw:Periodic\")]/max[not(@unit)]");
+ timeXpathBuffer.append("|");
+ timeXpathBuffer.append(".//activations[(@xsi:type=\"sw:Periodic\")]/deadline[not(@unit)]");
+ timeXpathBuffer.append("|");
+ timeXpathBuffer.append(".//activations[(@xsi:type=\"sw:Periodic\")]/offset[not(@unit)]");
+ timeXpathBuffer.append("|");
+ timeXpathBuffer.append(".//activations[(@xsi:type=\"sw:SingleActivation\")]/min[not(@unit)]");
+ timeXpathBuffer.append("|");
+ timeXpathBuffer.append(".//activations[(@xsi:type=\"sw:SingleActivation\")]/max[not(@unit)]");
+ timeXpathBuffer.append("|");
+ timeXpathBuffer.append(".//stimuli[(@xsi:type=\"stimuli:Single\")]/activation[not(@unit)]");
+ timeXpathBuffer.append("|");
+ timeXpathBuffer.append(
+ ".//stimuli[(@xsi:type=\"stimuli:ArrivalCurve\")]/arrivalCurveEntries/lowerTimeBorder[not(@unit)]");
+ timeXpathBuffer.append("|");
+ timeXpathBuffer.append(
+ ".//stimuli[(@xsi:type=\"stimuli:ArrivalCurve\")]/arrivalCurveEntries/upperTimeBorder[not(@unit)]");
+ timeXpathBuffer.append("|");
+ timeXpathBuffer.append(".//clocks[(@xsi:type=\"stimuli:ClockTriangleFunction\")]/period[not(@unit)]");
+ timeXpathBuffer.append("|");
+ timeXpathBuffer.append(".//clocks[(@xsi:type=\"stimuli:ClockSinusFunction\")]/period[not(@unit)]");
+ timeXpathBuffer.append("|");
+ timeXpathBuffer.append(".//clocks[(@xsi:type=\"stimuli:ClockMultiplierList\")]/entries/time[not(@unit)]");
+ timeXpathBuffer.append("|");
+ timeXpathBuffer.append(".//runnables/deadline[not(@unit)]|/sw:Runnable/deadline[not(@unit)]");
+ timeXpathBuffer.append("|");
+ timeXpathBuffer.append(".//schedulingUnit[(@xsi:type=\"sw:SchedulingSWUnit\")]/runnable/deadline[not(@unit)]");
+
+ final List<Element> matchingTimeElements = this.helper.getXpathResult(rootElement, timeXpathBuffer.toString(),
+ Element.class, this.helper.getNS_111("common"), this.helper.getNS_111("stimuli"),
+ this.helper.getNS_111("os"), this.helper.getNS_111("hw"), this.helper.getNS_111("sw"),
+ this.helper.getGenericNS("xsi"));
+
+ for (final Element element : matchingTimeElements) {
+
+ element.setAttribute("unit", "ps");
+ }
+
+ final StringBuffer signedTimeXpathBuffer = new StringBuffer();
+ signedTimeXpathBuffer
+ .append(".//stimuli/stimulusDeviation/lowerBound[(@xsi:type=\"common:SignedTime\") and not(@unit)]");
+ signedTimeXpathBuffer.append("|");
+ signedTimeXpathBuffer
+ .append(".//stimuli/stimulusDeviation/upperBound[(@xsi:type=\"common:SignedTime\") and not(@unit)]");
+ signedTimeXpathBuffer.append("|");
+ signedTimeXpathBuffer.append(
+ ".//stimuli/stimulusDeviation/distribution/*[(@xsi:type=\"common:SignedTime\") and not(@unit)]");
+ signedTimeXpathBuffer.append("|");
+
+ signedTimeXpathBuffer.append(".//clocks[(@xsi:type=\"stimuli:ClockTriangleFunction\")]/shift[not(@unit)]");
+ signedTimeXpathBuffer.append("|");
+ signedTimeXpathBuffer.append(".//clocks[(@xsi:type=\"stimuli:ClockSinusFunction\")]/shift[not(@unit)]");
+
+
+ final List<Element> matchingSignedTimeElements = this.helper.getXpathResult(rootElement,
+ signedTimeXpathBuffer.toString(), Element.class, this.helper.getNS_111("common"),
+ this.helper.getNS_111("stimuli"), this.helper.getGenericNS("xsi"));
+
+
+ for (final Element element : matchingSignedTimeElements) {
+
+ element.setAttribute("unit", "ps");
+ }
+
+ }
+
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/ComponentConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/ComponentConverter.java
new file mode 100644
index 0000000..ae27785
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/ComponentConverter.java
@@ -0,0 +1,168 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters111.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters111.utils.HelperUtils_110_111;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class ComponentConverter implements IConverter {
+
+ private final HelperUtils_110_111 helper;
+
+ public ComponentConverter() {
+ this.helper = HelperUtils_110_111.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ this.helper.updateNameSpaces_to_111(rootElement);
+
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_111("components"));
+
+ updateEnum_InterfaceKind(rootElement);
+
+ update_ComponentModel(rootElement);
+
+ update_ISystem(rootElement);
+
+ /*- once the references are created newly, update the cache to establish mapping between old URIFragments and the new ones */
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+
+
+ }
+
+ private void update_ISystem(final Element rootElement) {
+
+ /*-
+ *
+ * Change:
+ * In 1.1.0: ISystem consisted of "ISystemElement[] elements" variable.
+ *
+ * But in 1.1.1, ISystem interface is having below variable arrays
+ *
+ * contains ComponentInstance[] componentInstances
+ * contains Connector[] connectors
+ */
+
+ final List<Element> componentInstances = this.helper.getXpathResult(rootElement,
+ ".//elements[(@xsi:type=\"components:ComponentInstance\")]", Element.class,
+ this.helper.getNS_111("components"), this.helper.getGenericNS("xsi"));
+
+ for (final Element element : componentInstances) {
+
+ element.setName("componentInstances");
+
+ element.removeAttribute("type", this.helper.getGenericNS("xsi"));
+ }
+
+
+ final List<Element> connectors = this.helper.getXpathResult(rootElement,
+ ".//elements[(@xsi:type=\"components:Connector\")]", Element.class,
+ this.helper.getNS_111("components"), this.helper.getGenericNS("xsi"));
+
+ for (final Element element : connectors) {
+
+ element.setName("connectors");
+
+ element.removeAttribute("type", this.helper.getGenericNS("xsi"));
+ }
+
+
+ }
+
+ private void update_ComponentModel(final Element rootElement) {
+
+ /*-
+ *
+ * Change:
+ * In 1.1.0: ComponentModel consisted of IComponentsModelElement[] elements variable.
+ *
+ * But in 1.1.1, IComponentsModelElement interface is removed and the corresponding elements are specified directly as variable arrays
+ *
+ * contains Component[] components
+ * contains System[] systems
+ */
+
+ final List<Element> components = this.helper.getXpathResult(rootElement,
+ ".//elements[(@xsi:type=\"components:Component\")]", Element.class,
+ this.helper.getNS_111("components"), this.helper.getGenericNS("xsi"));
+
+ for (final Element element : components) {
+
+ element.setName("components");
+
+ element.removeAttribute("type", this.helper.getGenericNS("xsi"));
+ }
+
+
+ final List<Element> composites = this.helper.getXpathResult(rootElement,
+ ".//elements[(@xsi:type=\"components:Composite\")]", Element.class,
+ this.helper.getNS_111("components"), this.helper.getGenericNS("xsi"));
+
+ for (final Element element : composites) {
+
+ element.setName("components");
+
+ }
+
+
+ final List<Element> systems = this.helper.getXpathResult(rootElement,
+ ".//elements[(@xsi:type=\"components:System\")]", Element.class, this.helper.getNS_111("components"),
+ this.helper.getGenericNS("xsi"));
+
+ for (final Element element : systems) {
+
+ element.setName("systems");
+
+ element.removeAttribute("type", this.helper.getGenericNS("xsi"));
+ }
+
+ }
+
+ private void updateEnum_InterfaceKind(final Element rootElement) {
+
+ /*- InterfaceKind enum is contained inside FInterfacePort. FInterfacePort is contained inside Component,Composite class, using variable name as ports*/
+
+ /*--
+ * Migraiton step to 111 from 110: Grep the references of "ports" of xsi:type components:FInterfacePort -> which do not have "kind" attribute
+ */
+
+ final List<Element> ports = this.helper.getXpathResult(rootElement,
+ ".//ports[(@xsi:type=\"components:FInterfacePort\") and not(@kind)]", Element.class,
+ this.helper.getNS_111("components"), this.helper.getGenericNS("xsi"));
+
+
+ for (final Element port : ports) {
+
+ port.setAttribute("kind", "PROVIDES");
+ }
+
+ }
+
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/ComponentModelRefsConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/ComponentModelRefsConverter.java
new file mode 100644
index 0000000..57c5a22
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/ComponentModelRefsConverter.java
@@ -0,0 +1,167 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters111.impl;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters.common.utils.ModelVersion;
+import org.eclipse.app4mc.amalthea.converters111.utils.CacheEnum;
+import org.eclipse.app4mc.amalthea.converters111.utils.ComponentModelRefsCacheBuilder;
+import org.eclipse.app4mc.amalthea.converters111.utils.HelperUtils_110_111;
+import org.jdom2.Attribute;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+import com.google.common.collect.Table;
+
+public class ComponentModelRefsConverter implements IConverter {
+
+ private final HelperUtils_110_111 helper;
+
+ public ComponentModelRefsConverter() {
+ this.helper = HelperUtils_110_111.getInstance();
+ }
+
+ public ComponentModelRefsConverter(final HelperUtils_110_111 helper) {
+ this.helper = helper;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ for (final ICache cache : getFilteredCaches(caches, ComponentModelRefsCacheBuilder.class)) {
+
+
+ loop: for (final File file : fileName_documentsMap.keySet()) {
+
+
+ final Map<String, Object> cacheMap = cache.getCacheMap().get(file);
+
+ if (cacheMap == null) {
+ continue loop;
+ }
+
+ final Map<String, Element> uriFragment_component_map = (Map<String, Element>) cacheMap
+ .get(CacheEnum.URIFRAGMENT_ELEMENT.name());
+
+
+ final Map<String, List<Attribute>> uriFragment_component_attribs_map = (Map<String, List<Attribute>>) cacheMap
+ .get(CacheEnum.URIFRAGMENT_ELEMENT_REFS_ATRIBUTES.name());
+
+ if (uriFragment_component_attribs_map == null || uriFragment_component_map == null) {
+ continue loop;
+ }
+
+
+ for (final String uriFragment : uriFragment_component_map.keySet()) {
+
+ final Element element = uriFragment_component_map.get(uriFragment);
+
+ // urifragments should be updated, as for certain elements parent is changed
+
+ final String updated_uriFragment = this.helper.getURIFragment(element, ModelVersion._111);
+
+ System.out.println(uriFragment + " : : " + element + " : : " + updated_uriFragment);
+
+ final List<Attribute> list = uriFragment_component_attribs_map.get(uriFragment);
+
+ for (final Attribute attribute : list) {
+
+ attribute.setValue(updated_uriFragment);
+ }
+
+ }
+
+
+ /*- ============ updating hrefs ============*/
+
+ final Map<String, Element> href_uriFragment_component_map = (Map<String, Element>) cacheMap
+ .get(CacheEnum.HREF_URIFRAGMENT_ELEMENT.name());
+
+ final Map<File, Table<String, String, List<Attribute>>> href_urifragment_attributesMap = (Map<File, Table<String, String, List<Attribute>>>) cacheMap
+ .get(CacheEnum.HREF_URIFRAGMENT_ELEMENT_REFS_ATRIBUTES.name());
+
+
+ for (final String href_uriFragment : href_uriFragment_component_map.keySet()) {
+
+ final Element componentElement = href_uriFragment_component_map.get(href_uriFragment);
+
+ final String updated_uriFragment = this.helper.getURIFragment(componentElement, ModelVersion._111);
+
+ final List<Attribute> attributes = getAttributes(href_urifragment_attributesMap, href_uriFragment);
+
+ for (final Attribute attribute : attributes) {
+
+ final String[] split = href_uriFragment.split("#");
+
+ /*- Setting updated URI fragment */
+
+ attribute.setValue(split[0] + "#" + updated_uriFragment);
+
+ }
+
+ }
+
+
+ }
+
+
+ }
+
+ /*- once the references are created newly, update the cache to establish mapping between old URIFragments and the new ones */
+
+ for (final ICache cache : caches) {
+ if (cache instanceof ComponentModelRefsCacheBuilder) {
+ ((ComponentModelRefsCacheBuilder) cache).updateURIFragments_in_Cache(fileName_documentsMap);
+ }
+ }
+ }
+
+ private List<Attribute> getAttributes(
+ final Map<File, Table<String, String, List<Attribute>>> href_urifragment_attributesMap,
+ final String uriFragment) {
+ for (final File referenceFile : href_urifragment_attributesMap.keySet()) {
+
+ final Table<String, String, List<Attribute>> table = href_urifragment_attributesMap.get(referenceFile);
+
+ if (table != null) {
+ final Map<String, List<Attribute>> map = table.row(uriFragment);
+
+ if (map != null) {
+
+ if (map.size() > 0) {
+
+ final Set<String> keySet = map.keySet();
+
+ for (final String string : keySet) {
+
+ final List<Attribute> list = map.get(string);
+
+ return list;
+
+ }
+ }
+ }
+
+ }
+ }
+ return new ArrayList<Attribute>();
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/ConfigConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/ConfigConverter.java
new file mode 100644
index 0000000..a9c391d
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/ConfigConverter.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters111.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters111.utils.HelperUtils_110_111;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class ConfigConverter implements IConverter {
+
+ private final HelperUtils_110_111 helper;
+
+ public ConfigConverter() {
+ this.helper = HelperUtils_110_111.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ this.helper.updateNameSpaces_to_111(rootElement);
+
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_111("config"));
+
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+
+
+ }
+
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/ConstraintsConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/ConstraintsConverter.java
new file mode 100644
index 0000000..ec8da90
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/ConstraintsConverter.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters111.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters111.utils.HelperUtils_110_111;
+import org.jdom2.Attribute;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class ConstraintsConverter implements IConverter {
+
+ private final HelperUtils_110_111 helper;
+
+ public ConstraintsConverter() {
+ this.helper = HelperUtils_110_111.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ this.helper.updateNameSpaces_to_111(rootElement);
+
+ update_DataAgeCycle(rootElement);
+
+ updateEnum_RunnableOrderType(rootElement);
+
+ updateEnum_RunnableGroupingType(rootElement);
+
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+
+
+ }
+
+
+ private void update_DataAgeCycle(final Element rootElement) {
+
+
+ final StringBuffer xpathBuffer = new StringBuffer();
+
+ xpathBuffer.append("(.//dataAge/@maximumCyle)");
+
+
+ final List<Attribute> constraints = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
+ Attribute.class, this.helper.getNS_111("propertyconstraints"), this.helper.getGenericNS("xsi"));
+
+
+ for (final Attribute attribute : constraints) {
+
+ attribute.setName("maximumCycle");
+ }
+
+ }
+
+ private void updateEnum_RunnableOrderType(final Element rootElement) {
+
+
+ final StringBuffer xpathBuffer = new StringBuffer();
+
+ xpathBuffer.append("(.//constraintsModel/runnableSequencingConstraints[not(@orderType)])");
+
+ xpathBuffer.append("|");
+
+ xpathBuffer.append("(./constraints:ConstraintsModel/runnableSequencingConstraints[not(@orderType)])");
+
+
+ final List<Element> constraints = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
+ Element.class, this.helper.getNS_111("constraints"), this.helper.getGenericNS("xsi"));
+
+
+ for (final Element constraint : constraints) {
+
+ constraint.setAttribute("orderType", "successor");
+ }
+
+ }
+
+
+ private void updateEnum_RunnableGroupingType(final Element rootElement) {
+
+
+ final StringBuffer xpathBuffer = new StringBuffer();
+
+ xpathBuffer.append("(.//constraintsModel/runnableSequencingConstraints/runnableGroups[not(@groupingType)])");
+
+ xpathBuffer.append("|");
+
+ xpathBuffer
+ .append("(./constraints:ConstraintsModel/runnableSequencingConstraints/runnableGroups[not(@groupingType)])");
+
+
+ final List<Element> constraints = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
+ Element.class, this.helper.getNS_111("constraints"), this.helper.getGenericNS("xsi"));
+
+
+ for (final Element constraint : constraints) {
+
+ constraint.setAttribute("groupingType", "allOfThem");
+ }
+
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/EventsConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/EventsConverter.java
new file mode 100644
index 0000000..3955bce
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/EventsConverter.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters111.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters111.utils.HelperUtils_110_111;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class EventsConverter implements IConverter {
+
+ private final HelperUtils_110_111 helper;
+
+ public EventsConverter() {
+ this.helper = HelperUtils_110_111.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ this.helper.updateNameSpaces_to_111(rootElement);
+
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_111("events"));
+
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+
+
+ }
+
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/HwConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/HwConverter.java
new file mode 100644
index 0000000..cf30863
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/HwConverter.java
@@ -0,0 +1,230 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters111.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters111.utils.HelperUtils_110_111;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class HwConverter implements IConverter {
+
+ private final HelperUtils_110_111 helper;
+
+ public HwConverter() {
+ this.helper = HelperUtils_110_111.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ this.helper.updateNameSpaces_to_111(rootElement);
+
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_111("os"));
+
+ updateEnum_QType(rootElement);
+
+ updateEnum_MemoryType(rootElement);
+
+ updateEnum_BusType(rootElement);
+
+ updateEnum_RWType(rootElement);
+
+ updateEnum_SchedType(rootElement);
+
+ updateEnum_PinType(rootElement);
+
+ updateEnum_FeatureType(rootElement);
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+
+
+ }
+
+ private void updateEnum_QType(final Element rootElement) {
+
+ /*- QType enum is contained inside Quartz. Quartz is contained inside ComplexNode class, using variable name as quartzes*/
+
+ /*--
+ * Migraiton step to 111 from 110: Grep the references of "quartzes" and "hw:Quartz" tag which do not contain "type" attribute
+ */
+
+ final List<Element> quartzElements = this.helper.getXpathResult(rootElement,
+ ".//quartzes[not(@type)]|/hw:Quartz[not(@type)]", Element.class, this.helper.getNS_111("hw"));
+
+
+ for (final Element quartzElement : quartzElements) {
+
+ quartzElement.setAttribute("type", "DYNAMIC");
+ }
+
+ }
+
+ private void updateEnum_MemoryType(final Element rootElement) {
+
+ /*- MemoryType enum is contained inside MemType. MemType is contained inside "HWModel class using variable memoryTypes "and inside "PropertyConstraintsModel class using variable name as memTypeDefinitions" */
+
+ /*--
+ * Migraiton step to 111 from 110: Grep the references of "memoryTypes" , "memTypeDefinitions" and "hw:MemType" tag which do not contain "type" attribute
+ */
+
+ final List<Element> quartzElements = this.helper.getXpathResult(rootElement,
+ ".//memoryTypes[not(@type)]|.//memTypeDefinitions[not(@type)]|/hw:MemType[not(@type)]", Element.class,
+ this.helper.getNS_111("hw"));
+
+
+ for (final Element quartzElement : quartzElements) {
+
+ quartzElement.setAttribute("type", "RAM");
+ }
+
+ }
+
+ private void updateEnum_BusType(final Element rootElement) {
+
+ /*- BusType enum is contained inside Bus. Bus is contained inside "HWModel class using variable networkTypes " */
+
+ /*--
+ * Migraiton step to 111 from 110: Grep the references of "memoryTypes" , "memTypeDefinitions" and "hw:Bus" tag which do not contain "busType" attribute
+ */
+
+ final List<Element> quartzElements = this.helper.getXpathResult(rootElement,
+ ".//networkTypes[(@xsi:type=\"hw:Bus\") and not(@busType)]|/hw:Bus[not(@busType)]", Element.class,
+ this.helper.getNS_111("hw"), this.helper.getGenericNS("xsi"));
+
+
+ for (final Element quartzElement : quartzElements) {
+
+ quartzElement.setAttribute("busType", "CAN");
+ }
+
+ }
+
+ private void updateEnum_RWType(final Element rootElement) {
+
+ /*- RWType enum is contained inside ComplexPort, ComplexPin
+ *
+ * ComplexPort is extending Port
+ * ComplexPin is extending Pin
+ *
+ *
+ *
+ * Pin is contained inside "Port class using variable pins "
+ *
+ * Port is contained inside "ComplexNode class using varibale ports"
+ *
+ * */
+
+ /*--
+ * Migraiton step to 111 from 110: Grep the references of "ports" , "pins" , "hw:ComplexPort" and "hw:ComplexPin" tag which do not contain "direction" attribute
+ */
+
+ final List<Element> quartzElements = this.helper
+ .getXpathResult(
+ rootElement,
+ ".//ports[(@xsi:type=\"hw:ComplexPort\") and not(@direction)]|.//pins[(@xsi:type=\"hw:ComplexPin\") and not(@direction)]|/hw:ComplexPort[not(@direction)]|/hw:ComplexPin[not(@direction)]",
+ Element.class, this.helper.getNS_111("hw"), this.helper.getGenericNS("xsi"));
+
+
+ for (final Element quartzElement : quartzElements) {
+
+ quartzElement.setAttribute("direction", "R");
+ }
+
+ }
+
+ private void updateEnum_SchedType(final Element rootElement) {
+
+ /*- SchedType enum is contained inside NetworkType with variable schedPolicy
+ *
+ *
+ * NetworkType is contained inside "HWModel class using variable networkTypes "
+ *
+ *
+ * */
+
+ /*--
+ * Migraiton step to 111 from 110: Grep the references of "networkTypes" and "hw:NetworkType" tag which do not contain "schedPolicy" attribute
+ */
+
+ final List<Element> quartzElements = this.helper.getXpathResult(rootElement,
+ ".//networkTypes[not(@schedPolicy)]|/hw:NetworkType[not(@schedPolicy)]", Element.class,
+ this.helper.getNS_111("hw"));
+
+
+ for (final Element quartzElement : quartzElements) {
+
+ quartzElement.setAttribute("schedPolicy", "RROBIN");
+ }
+
+ }
+
+ private void updateEnum_PinType(final Element rootElement) {
+
+ /*- PinType enum is contained inside ComplexPin with variable type
+ *
+ * ComplexPin is contained inside "Port class using variable pins "
+ */
+
+ /*--
+ * Migraiton step to 111 from 110: Grep the references of "pins" and "hw:ComplexPin" tag which do not contain "type" attribute
+ */
+
+ final List<Element> quartzElements = this.helper.getXpathResult(rootElement,
+ ".//pins[(@xsi:type=\"hw:ComplexPin\") and not(@type)]|/hw:ComplexPin[not(@type)]", Element.class,
+ this.helper.getNS_111("hw"), this.helper.getGenericNS("xsi"));
+
+
+ for (final Element quartzElement : quartzElements) {
+
+ quartzElement.setAttribute("type", "ANALOG");
+ }
+
+ }
+
+ private void updateEnum_FeatureType(final Element rootElement) {
+
+ /*- FeatureType enum is contained inside FeatureTypes with variable value
+ *
+ * FeatureTypes is contained inside "ComplexNode class using variable features "
+ */
+
+ /*--
+ * Migraiton step to 111 from 110: Grep the references of "features" and "hw:FeatureTypes" tag which do not contain "value" attribute
+ */
+
+ final List<Element> quartzElements = this.helper.getXpathResult(rootElement,
+ ".//features[(@xsi:type=\"hw:FeatureTypes\") and not(@value)]|/hw:FeatureTypes[not(@value)]",
+ Element.class, this.helper.getNS_111("hw"), this.helper.getGenericNS("xsi"));
+
+
+ for (final Element quartzElement : quartzElements) {
+
+ quartzElement.setAttribute("value", "floatingPointUnit");
+ }
+
+ }
+
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/MappingConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/MappingConverter.java
new file mode 100644
index 0000000..72cbbd5
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/MappingConverter.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters111.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters111.utils.HelperUtils_110_111;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class MappingConverter implements IConverter {
+
+ private final HelperUtils_110_111 helper;
+
+ public MappingConverter() {
+ this.helper = HelperUtils_110_111.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ this.helper.updateNameSpaces_to_111(rootElement);
+
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_111("os"), this.helper.getNS_111("sw"));
+
+ updateEnum_MemoryAddressMappingType(rootElement);
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+
+
+ }
+
+ private void updateEnum_MemoryAddressMappingType(final Element rootElement) {
+
+ /*--
+ * MemoryAddressMappingType enum is referred inside MappingModel i.e. as per the schema, it can occur in either
+ * mapping:MappingModel or mappingModel tags
+ *
+ */
+
+ // Migraiton step to 111 from 110: Grep the mappingModel elements which do not have addressMappingType attribute
+ // and set the attribute and its value as : none (as it was the default value as per meta model in 110)
+
+ final List<Element> mappingModels = this.helper.getXpathResult(rootElement,
+ ".//mappingModel[not(@addressMappingType)]|/mapping:MappingModel[not(@addressMappingType)]",
+ Element.class, this.helper.getNS_111("mapping"));
+
+
+ for (final Element mappingModel : mappingModels) {
+
+ mappingModel.setAttribute("addressMappingType", "none");
+ }
+
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/OSConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/OSConverter.java
new file mode 100644
index 0000000..76b08fe
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/OSConverter.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters111.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters111.utils.HelperUtils_110_111;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class OSConverter implements IConverter {
+
+ private final HelperUtils_110_111 helper;
+
+ public OSConverter() {
+ this.helper = HelperUtils_110_111.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ this.helper.updateNameSpaces_to_111(rootElement);
+
+
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+
+
+ }
+
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/PropertyConstraintsConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/PropertyConstraintsConverter.java
new file mode 100644
index 0000000..af00ed9
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/PropertyConstraintsConverter.java
@@ -0,0 +1,183 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters111.impl;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters111.utils.HelperUtils_110_111;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class PropertyConstraintsConverter implements IConverter {
+
+ private final HelperUtils_110_111 helper;
+
+ public PropertyConstraintsConverter() {
+ this.helper = HelperUtils_110_111.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ this.helper.updateNameSpaces_to_111(rootElement);
+
+ updateEnum_ComparatorType(rootElement);
+
+ updateEnum_ConjunctionType(rootElement);
+
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+
+
+ }
+
+ /*-
+ *
+ *Below is the structure of 1.1.0 and 1.1.1 for PropertyConstraintsModel
+ *
+ *
+ * AllocationConstraint
+ * - HwCoreConstraint
+ *
+ * HwCoreConstraint (Abstract class)
+ * - HwCoreProperty
+ * - ComparatorType comparator
+ *
+ * - HwCoreConjunction
+ * - ConjunctionType conjunction
+ * - contains resolving HwCoreConstraint firstConstraint
+ * - contains resolving HwCoreConstraint secondConstraint
+ *
+ *
+ *
+ * =====================================
+ * MappingConstraint
+ * - HwMemoryConstraint
+ *
+ *
+ * HwMemoryConstraint
+ * - HwMemoryProperty
+ * - ComparatorType comparator
+ * - HwMemoryConjunction
+ * - ConjunctionType conjunction
+ * - contains resolving HwCoreConstraint firstConstraint
+ * - contains resolving HwCoreConstraint secondConstraint
+ *
+ */
+
+ private void updateEnum_ComparatorType(final Element rootElement) {
+
+
+ final StringBuffer xpathBuffer = new StringBuffer();
+
+ xpathBuffer
+ .append("(.//allocationConstraints/hwConstraint[(@xsi:type=\"propertyconstraints:HwCoreProperty\") and not(@comparator)])");
+
+ xpathBuffer.append("|");
+
+ xpathBuffer
+ .append("(.//allocationConstraints/hwConstraint[(@xsi:type=\"propertyconstraints:HwCoreConjunction\")]//firstConstraint[(@xsi:type=\"propertyconstraints:HwCoreProperty\") and not(@comparator)])");
+
+
+ xpathBuffer.append("|");
+
+ xpathBuffer
+ .append("(.//allocationConstraints/hwConstraint[(@xsi:type=\"propertyconstraints:HwCoreConjunction\")]//secondConstraint[(@xsi:type=\"propertyconstraints:HwCoreProperty\") and not(@comparator)])");
+
+ xpathBuffer.append("|");
+
+ xpathBuffer
+ .append("(.//mappingConstraints/hwConstraint[(@xsi:type=\"propertyconstraints:HwMemoryProperty\") and not(@comparator)])");
+
+ xpathBuffer.append("|");
+
+ xpathBuffer
+ .append("(.//mappingConstraints/hwConstraint[(@xsi:type=\"propertyconstraints:HwMemoryConjunction\")]//firstConstraint[(@xsi:type=\"propertyconstraints:HwMemoryProperty\") and not(@comparator)])");
+
+
+ xpathBuffer.append("|");
+
+ xpathBuffer
+ .append("(.//mappingConstraints/hwConstraint[(@xsi:type=\"propertyconstraints:HwMemoryConjunction\")]//secondConstraint[(@xsi:type=\"propertyconstraints:HwMemoryProperty\") and not(@comparator)])");
+
+
+ final List<Element> constraints = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
+ Element.class, this.helper.getNS_111("propertyconstraints"), this.helper.getGenericNS("xsi"));
+
+
+ for (final Element constraint : constraints) {
+
+ constraint.setAttribute("comparator", "equal");
+ }
+
+ }
+
+ private void updateEnum_ConjunctionType(final Element rootElement) {
+
+
+ final StringBuffer xpathBuffer = new StringBuffer();
+
+ xpathBuffer
+ .append(".//allocationConstraints/hwConstraint[(@xsi:type=\"propertyconstraints:HwCoreConjunction\") and not(@conjunction)]");
+
+ xpathBuffer.append("|");
+
+ xpathBuffer
+ .append(".//allocationConstraints/hwConstraint[(@xsi:type=\"propertyconstraints:HwCoreConjunction\")]// firstConstraint[(@xsi:type=\"propertyconstraints:HwCoreConjunction\") and not(@conjunction)]");
+
+
+ xpathBuffer.append("|");
+
+ xpathBuffer
+ .append(".//allocationConstraints/hwConstraint[(@xsi:type=\"propertyconstraints:HwCoreConjunction\")]// secondConstraint[(@xsi:type=\"propertyconstraints:HwCoreConjunction\") and not(@conjunction)] ");
+
+ xpathBuffer.append("|");
+
+ xpathBuffer
+ .append(".//mappingConstraints/hwConstraint[(@xsi:type=\"propertyconstraints:HwMemoryConjunction\") and not(@conjunction)]");
+
+ xpathBuffer.append("|");
+
+ xpathBuffer
+ .append(".//mappingConstraints/hwConstraint[(@xsi:type=\"propertyconstraints:HwMemoryConjunction\")]// firstConstraint[(@xsi:type=\"propertyconstraints:HwMemoryConjunction\") and not(@conjunction)] ");
+
+
+ xpathBuffer.append("|");
+
+ xpathBuffer
+ .append(".//mappingConstraints/hwConstraint[(@xsi:type=\"propertyconstraints:HwMemoryConjunction\")]// secondConstraint[(@xsi:type=\"propertyconstraints:HwMemoryConjunction\") and not(@conjunction)] ");
+
+
+ final List<Element> constraints = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
+ Element.class, this.helper.getNS_111("propertyconstraints"), this.helper.getGenericNS("xsi"));
+
+
+ for (final Element constraint : constraints) {
+
+ constraint.setAttribute("conjunction", "and");
+ }
+
+ }
+
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/StimuliConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/StimuliConverter.java
new file mode 100644
index 0000000..6a12917
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/StimuliConverter.java
@@ -0,0 +1,639 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters111.impl;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters111.utils.CacheEnum;
+import org.eclipse.app4mc.amalthea.converters111.utils.HelperUtils_110_111;
+import org.eclipse.app4mc.amalthea.converters111.utils.LabelValueProviderRefsCacheBuilder;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.jdom2.Attribute;
+import org.jdom2.Document;
+import org.jdom2.Element;
+import org.jdom2.Parent;
+
+public class StimuliConverter implements IConverter {
+
+ private final HelperUtils_110_111 helper;
+
+ private List<ICache> caches;
+
+ private String workingDirectoryLocation;
+
+ private File targetFile;
+
+
+ public StimuliConverter() {
+ this.helper = HelperUtils_110_111.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ this.caches = caches;
+
+ this.targetFile=targetFile;
+
+ this.workingDirectoryLocation = targetFile.getParentFile().getCanonicalPath();
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ this.helper.updateNameSpaces_to_111(rootElement);
+
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_111("stimuli"));
+
+ // updateEnum_InterfaceKind(rootElement);
+
+ update_VariableRefs_inside_Stimulus(rootElement);
+
+ update_ModeLiteral_References(rootElement);
+
+ update_ModeLabel_References(rootElement);
+
+ /*- once the references are created newly, update the cache to establish mapping between old URIFragments and the new ones */
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+
+
+ }
+
+ /**
+ * This method is responsible to create ModeLabel objects and assign them to the corresponding references inside
+ * stimuli model
+ *
+ * @param rootElement
+ * @throws Exception
+ */
+ private void update_ModeLabel_References(final Element rootElement) throws Exception {
+
+ final StringBuffer xpathBuffer = new StringBuffer();
+
+ /*-
+ * **************************************
+ *Fetching all valueProvider elements
+ * **************************************
+ */
+ xpathBuffer.append("(.//entries/@valueProvider)");
+
+ /*- This map contains key as ModeLabel name and value as ModeLabel id */
+ final Map<String, String> localModeLabelsMap = new HashMap<String, String>();
+
+
+ final List<Attribute> valueLabelProvidersRefs = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
+ Attribute.class, this.helper.getNS_111("stimuli"), this.helper.getGenericNS("xsi"));
+
+ for (final Attribute attribute : valueLabelProvidersRefs) {
+
+ final String value = attribute.getValue();
+
+ String modeLabelID = "";
+
+ if (!localModeLabelsMap.containsKey(value)) {
+
+ if (value.contains("//")) {
+ final Element label = getLabel(value, true);
+ // TODO: log warning when label is null
+
+ if (label == null) {
+ continue;
+ }
+ modeLabelID = createModeLabel(label);
+ localModeLabelsMap.put(value, modeLabelID);
+ }
+ else {
+ final Element label = getLabel(value, false);
+ // TODO: log warning
+ if (label == null) {
+ continue;
+ }
+ modeLabelID = createModeLabel(label);
+ localModeLabelsMap.put(value, modeLabelID);
+ }
+ }
+ else {
+ modeLabelID = localModeLabelsMap.get(value);
+ }
+
+ if (modeLabelID != null && modeLabelID.length() > 0) {
+
+ /*-
+ * **************************************
+ * Linking ModeLabel as valueProvider
+ * **************************************
+ */
+ attribute.setValue(modeLabelID);
+
+ // // TODO: add documentation for removing attribute value as it is not possible to convert value to
+ // // ModeLiteral
+ // attribute.getParent().removeAttribute("value");
+ }
+
+
+ }
+
+ /*-
+ ** **************************************
+ * Fetching data from HREF
+ * **************************************
+ *
+ */
+
+ final StringBuffer xpathHREFBuffer = new StringBuffer();
+ xpathHREFBuffer.append("(.//entries/valueProvider/@href)");
+
+
+ final List<Attribute> hRefs = this.helper.getXpathResult(rootElement, xpathHREFBuffer.toString(),
+ Attribute.class, this.helper.getNS_111("stimuli"), this.helper.getGenericNS("xsi"));
+
+ for (final Attribute attribute : hRefs) {
+
+ final String value = attribute.getValue();
+
+ String modeLabelID = "";
+
+ if (!localModeLabelsMap.containsKey(value)) {
+
+ final Element label = getLabelFromHRef(value);
+
+ if (label == null) {
+ continue;
+ }
+
+ modeLabelID = value.split("#")[0] + "#" + createModeLabel(label);
+
+ localModeLabelsMap.put(value, modeLabelID);
+ }
+ else {
+ modeLabelID = localModeLabelsMap.get(value);
+ }
+
+ if (modeLabelID != null && modeLabelID.length() > 0) {
+
+ /*-
+ * **************************************
+ * Linking ModeLabel as valueProvider
+ * **************************************
+ */
+ attribute.setValue(modeLabelID);
+
+ // TODO: add documentation for removing attribute value as it is not possible to convert value to
+ // ModeLiteral
+ final Element parent = attribute.getParent();
+
+ parent.removeAttribute("type", this.helper.getGenericNS("xsi"));
+
+ parent.setAttribute("type", "sw:ModeLabel", this.helper.getGenericNS("xsi"));
+
+ // /*- As the attribute "value" is at the entry (ModeValueListEntry) level*/
+ // parent.getParentElement().removeAttribute("value");
+ }
+
+ }
+
+ }
+
+
+ private void update_VariableRefs_inside_Stimulus(final Element rootElement) {
+
+ /*-
+ *
+ * Change:
+ * In 1.1.0:
+ *
+ * abstract class Stimulus
+ {
+ String name
+ contains resolving Deviation<SignedTime> stimulusDeviation
+ contains resolving LabelValueList setLabelsList
+ contains resolving LabelValueList enablingLabelsList
+ contains resolving LabelValueList disablingLabelsList
+ }
+ *
+
+ *
+ * But in 1.1.1,
+ *
+ * abstract class Stimulus extends ReferableBaseObject
+ {
+ contains resolving Deviation<SignedTime> stimulusDeviation
+ contains resolving ModeValueList setModeValueList
+ contains resolving ModeValueList enablingModeValueList
+ contains resolving ModeValueList disablingModeValueList
+ }
+
+ *Following variable references are changed to :
+ *
+ *setLabelsList ->setModeValueList
+ *enablingLabelsList->enablingModeValueList
+ *disablingLabelsList->disablingModeValueList
+ */
+
+
+ final StringBuffer enablingLabelsList_xpathBuffer = new StringBuffer();
+
+ /*- Xpath Buffer to store "disablingLabelsList" */
+
+ final StringBuffer disablingLabelsList_xpathBuffer = new StringBuffer();
+
+
+ disablingLabelsList_xpathBuffer.append("(.//stimuli[(@xsi:type=\"stimuli:Periodic\")]/disablingLabelsList)");
+ disablingLabelsList_xpathBuffer.append("|");
+ disablingLabelsList_xpathBuffer
+ .append("(.//stimuli[(@xsi:type=\"stimuli:ArrivalCurve\")]/disablingLabelsList)");
+ disablingLabelsList_xpathBuffer.append("|");
+ disablingLabelsList_xpathBuffer
+ .append("(.//stimuli[(@xsi:type=\"stimuli:CustomStimulus\")]/disablingLabelsList)");
+ disablingLabelsList_xpathBuffer.append("|");
+ disablingLabelsList_xpathBuffer
+ .append("(.//stimuli[(@xsi:type=\"stimuli:InterProcess\")]/disablingLabelsList)");
+ disablingLabelsList_xpathBuffer.append("|");
+ disablingLabelsList_xpathBuffer
+ .append("(.//stimuli[(@xsi:type=\"stimuli:PeriodicEvent\")]/disablingLabelsList)");
+ disablingLabelsList_xpathBuffer.append("|");
+ disablingLabelsList_xpathBuffer.append("(.//stimuli[(@xsi:type=\"stimuli:Single\")]/disablingLabelsList)");
+ disablingLabelsList_xpathBuffer.append("|");
+
+ disablingLabelsList_xpathBuffer.append("(.//stimuli[(@xsi:type=\"stimuli:Sporadic\")]/disablingLabelsList)");
+
+
+ /*- Xpath Buffer to store "enablingLabelsList" */
+
+ enablingLabelsList_xpathBuffer.append("(.//stimuli[(@xsi:type=\"stimuli:Periodic\")]/enablingLabelsList)");
+ enablingLabelsList_xpathBuffer.append("|");
+
+ enablingLabelsList_xpathBuffer.append("(.//stimuli[(@xsi:type=\"stimuli:ArrivalCurve\")]/enablingLabelsList)");
+ enablingLabelsList_xpathBuffer.append("|");
+
+ enablingLabelsList_xpathBuffer
+ .append("(.//stimuli[(@xsi:type=\"stimuli:CustomStimulus\")]/enablingLabelsList)");
+ enablingLabelsList_xpathBuffer.append("|");
+
+ enablingLabelsList_xpathBuffer.append("(.//stimuli[(@xsi:type=\"stimuli:InterProcess\")]/enablingLabelsList)");
+ enablingLabelsList_xpathBuffer.append("|");
+
+ enablingLabelsList_xpathBuffer.append("(.//stimuli[(@xsi:type=\"stimuli:PeriodicEvent\")]/enablingLabelsList)");
+ enablingLabelsList_xpathBuffer.append("|");
+
+ enablingLabelsList_xpathBuffer.append("(.//stimuli[(@xsi:type=\"stimuli:Single\")]/enablingLabelsList)");
+ enablingLabelsList_xpathBuffer.append("|");
+
+ enablingLabelsList_xpathBuffer.append("(.//stimuli[(@xsi:type=\"stimuli:Sporadic\")]/enablingLabelsList)");
+
+
+ /*- Xpath Buffer to store "setLabelsList" */
+
+ final StringBuffer setLabelsList_xpathBuffer = new StringBuffer();
+
+ setLabelsList_xpathBuffer.append("(.//stimuli[(@xsi:type=\"stimuli:Periodic\")]/setLabelsList)");
+ setLabelsList_xpathBuffer.append("|");
+
+ setLabelsList_xpathBuffer.append("(.//stimuli[(@xsi:type=\"stimuli:ArrivalCurve\")]/setLabelsList)");
+ setLabelsList_xpathBuffer.append("|");
+
+
+ setLabelsList_xpathBuffer.append("(.//stimuli[(@xsi:type=\"stimuli:CustomStimulus\")]/setLabelsList)");
+ setLabelsList_xpathBuffer.append("|");
+
+
+ setLabelsList_xpathBuffer.append("(.//stimuli[(@xsi:type=\"stimuli:InterProcess\")]/setLabelsList)");
+ setLabelsList_xpathBuffer.append("|");
+
+
+ setLabelsList_xpathBuffer.append("(.//stimuli[(@xsi:type=\"stimuli:PeriodicEvent\")]/setLabelsList)");
+ setLabelsList_xpathBuffer.append("|");
+
+
+ setLabelsList_xpathBuffer.append("(.//stimuli[(@xsi:type=\"stimuli:Single\")]/setLabelsList)");
+ setLabelsList_xpathBuffer.append("|");
+
+
+ setLabelsList_xpathBuffer.append("(.//stimuli[(@xsi:type=\"stimuli:Sporadic\")]/setLabelsList)");
+
+
+ final List<Element> setLabelsList = this.helper.getXpathResult(rootElement,
+ setLabelsList_xpathBuffer.toString(), Element.class, this.helper.getNS_111("stimuli"),
+ this.helper.getGenericNS("xsi"));
+
+ for (final Element element : setLabelsList) {
+
+ element.setName("setModeValueList");
+
+ }
+
+ final List<Element> enablingLabelsList = this.helper.getXpathResult(rootElement,
+ enablingLabelsList_xpathBuffer.toString(), Element.class, this.helper.getNS_111("stimuli"),
+ this.helper.getGenericNS("xsi"));
+
+ for (final Element element : enablingLabelsList) {
+
+ element.setName("enablingModeValueList");
+
+ }
+
+
+ final List<Element> disablingLabelsList = this.helper.getXpathResult(rootElement,
+ disablingLabelsList_xpathBuffer.toString(), Element.class, this.helper.getNS_111("stimuli"),
+ this.helper.getGenericNS("xsi"));
+
+ for (final Element element : disablingLabelsList) {
+
+ element.setName("disablingModeValueList");
+
+ }
+
+
+ }
+
+ private Element getLabel(final String labelReference, final boolean iURIFragment) {
+
+ for (final ICache iCache : this.caches) {
+
+ if (iCache instanceof LabelValueProviderRefsCacheBuilder) {
+
+ final Set<File> fileSet = iCache.getCacheMap().keySet();
+
+ for (final File file : fileSet) {
+
+
+
+ final Map<String, Object> cacheMap = iCache.getCacheMap().get(file);
+
+ /*-
+ * Following elements should be collected:
+ *
+ * 1.Collect all label references (using xmi)
+ * a.simple
+ * b.href
+ * 2.Collect all label references (using URL fragments)
+ * a.simple
+ * b.href
+ */
+
+ final Object URIFRAGMENT_ELEMENT_Map = cacheMap.get(CacheEnum.URIFRAGMENT_ELEMENT.name());
+
+ // final Object object2 = cacheMap.get(CacheEnum.HREF_URIFRAGMENT_ELEMENT.name());
+
+ final Object UUID_ELEMENT_Map = cacheMap.get(CacheEnum.UUID_ELEMENT.name());
+
+
+ if (iURIFragment) {
+
+ @SuppressWarnings("unchecked")
+ final Element element = ((Map<String, Element>) URIFRAGMENT_ELEMENT_Map).get(labelReference);
+
+ if (element != null && this.targetFile==file) {
+ return element;
+ }
+ continue;
+ }
+ @SuppressWarnings("unchecked")
+ final Element element = ((Map<String, Element>) UUID_ELEMENT_Map).get(labelReference);
+ if (element != null) {
+ return element;
+ }
+ continue;
+
+
+ }
+
+
+ }
+ }
+ return null;
+ }
+
+ private Element getLabelFromHRef(final String labelReference_with_fileName) throws Exception {
+
+ boolean iURIFragment = false;
+
+ final String[] split = labelReference_with_fileName.split("#");
+
+ if (split.length != 2) {
+ return null;
+ }
+ final String refFileName = split[0];
+
+ final String labelReference = split[1];
+
+ if (labelReference.contains("//")) {
+ iURIFragment = true;
+ }
+
+ if (iURIFragment) {
+
+ for (final ICache iCache : this.caches) {
+
+ if (iCache instanceof LabelValueProviderRefsCacheBuilder) {
+
+ final Set<File> fileSet = iCache.getCacheMap().keySet();
+
+ for (final File file : fileSet) {
+
+ final Map<String, Object> cacheMap = iCache.getCacheMap().get(file);
+
+ final Object HREF_URIFRAGMENT_ELEMENT_Map = cacheMap
+ .get(CacheEnum.HREF_URIFRAGMENT_ELEMENT.name());
+
+ @SuppressWarnings("unchecked")
+ final Element element = ((Map<String, Element>) HREF_URIFRAGMENT_ELEMENT_Map)
+ .get(labelReference_with_fileName);
+
+ if (element != null) {
+ return element;
+ }
+ continue;
+
+ }
+
+ }
+
+ }
+
+ }
+ else {
+
+ final String referencedFilePath = this.workingDirectoryLocation + File.separator + refFileName;
+
+ final File referenceFile = new File(referencedFilePath).getCanonicalFile();
+
+
+ @SuppressWarnings("unchecked")
+ final List<LabelValueProviderRefsCacheBuilder> filteredCaches = getFilteredCaches(this.caches,
+ LabelValueProviderRefsCacheBuilder.class);
+
+ for (final LabelValueProviderRefsCacheBuilder labelValueProviderRefsCacheBuilder : filteredCaches) {
+
+ if (iURIFragment == false) {
+ final Map<String, Object> cacheMap = labelValueProviderRefsCacheBuilder.getCacheMap()
+ .get(referenceFile);
+
+ if (cacheMap != null) {
+ final Object UUID_ELEMENT_Map = cacheMap.get(CacheEnum.UUID_ELEMENT.name());
+
+ @SuppressWarnings("unchecked")
+ final Element element = ((Map<String, Element>) UUID_ELEMENT_Map).get(labelReference);
+
+ if (element != null) {
+ return element;
+ }
+ continue;
+ }
+
+ }
+ }
+ }
+
+ return null;
+ }
+
+ private String createModeLabel(final Element labelElement) {
+
+ final Parent parent = labelElement.getParent();
+
+ final Element element = new Element("modeLabels");
+
+ element.setAttribute("name", labelElement.getAttributeValue("name"));
+
+ final String uuid = EcoreUtil.generateUUID();
+
+ element.setAttribute("id", uuid, this.helper.getGenericNS("xmi"));
+
+ parent.addContent(element);
+
+ return uuid;
+ }
+
+
+ private int modeCount = 1;
+
+ /**
+ * This method is used to create Mode, ModeLiteral objects and associate them to the corresponding ModeSwitch<br>
+ * <br>
+ *
+ * Below are the steps performed by this method:<br>
+ * From all the ModeValueList->ModeValueListEntry object values -> ModeLiteral objects are created and associated to
+ * the Mode object (generated as a part of migration)<br>
+ *
+ * Created ModeLiteral's are associated to the entry objects (inside LabelSwitch -> which will be converted to
+ * ModeSwitch as a part of migration)
+ *
+ * @param rootElement
+ */
+ private void update_ModeLiteral_References(final Element rootElement) {
+
+
+ final Map<String, Element> element_LiteralMap = new HashMap<String, Element>();
+
+ final String xpathString = ".//swModel|/sw:SWModel";
+
+ final List<Element> swModels = this.helper.getXpathResult(rootElement, xpathString, Element.class,
+ this.helper.getNS_111("sw"), this.helper.getGenericNS("xsi"));
+
+
+ if (swModels.size() == 0) {
+ System.err.println("sw-model not present, so can't associate individual ModeLiteral values");
+ return;
+ }
+
+
+ final String xpathString_entries = ".//stimuliModel/stimuli//entries|/stimuli:StimuliModel/stimuli//entries";
+
+ final List<Element> entryElements = this.helper.getXpathResult(rootElement, xpathString_entries, Element.class,
+ this.helper.getNS_111("stimuli"), this.helper.getGenericNS("xsi"));
+
+
+ // As there are various sw:ModeSwitch entries, corresponding modeliteral elements part of modes should be
+ // associated to them accordingly
+ Element mode_migElement = null;
+
+ if (entryElements.size() > 0) {
+
+ mode_migElement = new Element("modes");
+
+ // TODO: finalize the name of this element
+ mode_migElement.setAttribute("name", "mode_stimuli_" + this.modeCount++ + "_migration_generated");
+
+ mode_migElement.setAttribute("id", EcoreUtil.generateUUID(), this.helper.getGenericNS("xmi"));
+
+ swModels.get(0).addContent(mode_migElement);
+
+ for (final Element entryElement : entryElements) {
+
+ Attribute modeSwitchEntry_value_attribute = entryElement.getAttribute("value");
+
+ if (modeSwitchEntry_value_attribute == null) {
+ /*- This is the case where default value "0" is set for the "LabelSwitchEntry" and due to this reason attribute "value" will not be generated in the xmi */
+ modeSwitchEntry_value_attribute = new Attribute("value", "0");
+
+ entryElement.setAttribute(modeSwitchEntry_value_attribute);
+ }
+
+
+ final String value = modeSwitchEntry_value_attribute.getValue();
+
+
+ final boolean literalElementExists = element_LiteralMap.containsKey(value);
+
+ if (literalElementExists) {
+ /*- As the MapLiteral element is created as a part of the migration from 1.1.0 to 1.1.1, attribute xmi:id is added by default. And due to this below code is considering it*/
+ final Element literalElement = element_LiteralMap.get(value);
+
+ final String literal_uuid = literalElement.getAttributeValue("id", this.helper.getGenericNS("xmi"));
+
+ modeSwitchEntry_value_attribute.setValue(literal_uuid);
+
+ continue;
+ }
+
+ // else case
+
+ /*-
+ * Below the representation of ModeLiteral
+ * <modes name="MV">
+ * <literals name="20"/>
+ * </modes>
+ */
+
+ final Element literals = new Element("literals");
+
+ literals.setAttribute("name", value);
+
+ final String literalID = EcoreUtil.generateUUID();
+
+ literals.setAttribute("id", literalID, this.helper.getGenericNS("xmi"));
+
+ mode_migElement.addContent(literals);
+
+ modeSwitchEntry_value_attribute.setValue(literalID);
+
+ element_LiteralMap.put(value, literals);
+
+
+ }
+ }
+
+
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/SwConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/SwConverter.java
new file mode 100644
index 0000000..e39807c
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/impl/SwConverter.java
@@ -0,0 +1,1006 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters111.impl;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
+import org.eclipse.app4mc.amalthea.converters111.utils.CacheEnum;
+import org.eclipse.app4mc.amalthea.converters111.utils.HelperUtils_110_111;
+import org.eclipse.app4mc.amalthea.converters111.utils.LabelValueProviderRefsCacheBuilder;
+import org.eclipse.app4mc.amalthea.converters111.utils.ModeLabelsCacheBuilder;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.jdom2.Attribute;
+import org.jdom2.Document;
+import org.jdom2.Element;
+import org.jdom2.Parent;
+
+public class SwConverter implements IConverter {
+
+ private final HelperUtils_110_111 helper;
+
+ private List<ICache> caches;
+
+ private String workingDirectoryLocation;
+
+ boolean isModeLabelCacheUpdated;
+
+ File targetFile;
+
+ public SwConverter() {
+ this.helper = HelperUtils_110_111.getInstance();
+ }
+
+ @Override
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
+ final List<ICache> caches) throws Exception {
+
+ this.targetFile = targetFile;
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ this.caches = caches;
+
+ final Element rootElement = root.getRootElement();
+
+ this.helper.updateNameSpaces_to_111(rootElement);
+
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_111("sw"));
+
+ this.workingDirectoryLocation = targetFile.getParentFile().getCanonicalPath();
+
+ updateModeLabel_cache(fileName_documentsMap);
+
+ updateEnum_WaitEventType(rootElement);
+
+ updateEnum_WaitingBehaviour(rootElement);
+
+ updateEnum_AccessPrecedenceType(rootElement);
+
+ updateEnum_OrderType(rootElement);
+
+ updateEnum_LabelAccessEnum(rootElement);
+
+ updateEnum_SemaphoreAccessEnum(rootElement);
+
+ updateEnum_Preemption(rootElement);
+
+ update_SchedulingSWUnit_namespace(rootElement);
+
+ update_ModeLabel_References(rootElement);
+
+
+ update_ModeLiteral_References(rootElement);
+
+ remove_deadline_attribute(rootElement);
+
+ remove_initialValue_Attribute(rootElement);
+
+ fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+
+
+ }
+
+ /**
+ * As there is a dependency between Stimuli and SW converter w.r.t. creation of ModeLabel elements. It is beneficial
+ * to upate the ModeLabel cache, so that no duplicate ModeLabel elements are created
+ *
+ * @param fileName_documentsMap
+ */
+ private void updateModeLabel_cache(final Map<File, Document> fileName_documentsMap) {
+
+ if (!this.isModeLabelCacheUpdated) {
+
+ for (final ICache iCache : this.caches) {
+
+ if (iCache instanceof ModeLabelsCacheBuilder) {
+
+ ((ModeLabelsCacheBuilder) iCache).buildCache(fileName_documentsMap);
+
+ this.isModeLabelCacheUpdated = true;
+
+ }
+
+ }
+ }
+
+ }
+
+ /**
+ * This method is used to get a ModeLabel object from a specified model file
+ *
+ * @param targetFile
+ * @param modeLabelName
+ * @return
+ */
+ private Element getModeLabel(final File targetFile, final String modeLabelName) {
+
+ for (final ICache iCache : this.caches) {
+
+ if (iCache instanceof ModeLabelsCacheBuilder) {
+
+
+ final Map<String, Object> cacheMap = iCache.getCacheMap().get(targetFile);
+
+ if (cacheMap != null) {
+
+ final Object NAME_ELEMENT_Map = cacheMap.get(CacheEnum.ELEMENT_NAME.name());
+
+ if (NAME_ELEMENT_Map != null) {
+
+ @SuppressWarnings("unchecked")
+ final Element element = ((Map<String, Element>) NAME_ELEMENT_Map).get(modeLabelName);
+
+ if (element != null) {
+ return element;
+ }
+ }
+ }
+ continue;
+ }
+ }
+
+ return null;
+
+ }
+
+ private void remove_initialValue_Attribute(final Element rootElement) {
+
+ final StringBuffer xpathBuffer = new StringBuffer();
+
+ xpathBuffer.append(".//labels[@initialValue]");
+
+
+ final List<Element> initialValue_Attribs = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
+ Element.class, this.helper.getGenericNS("xsi"));
+
+ for (final Element label : initialValue_Attribs) {
+ label.removeAttribute("initialValue");
+ }
+ }
+
+
+ private void remove_deadline_attribute(final Element rootElement) {
+
+ final StringBuffer xpathBuffer = new StringBuffer();
+
+ xpathBuffer.append(".//isrs[./deadline]");
+ xpathBuffer.append("|");
+ xpathBuffer.append(".//tasks[./deadline]");
+ xpathBuffer.append("|");
+ xpathBuffer.append(".//processPrototypes[./deadline]");
+
+ final List<Element> absProcessElements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
+ Element.class, this.helper.getNS_111("sw"), this.helper.getGenericNS("xsi"));
+
+ if (absProcessElements.size() == 0) {
+
+ return;
+ }
+
+ /*-
+ * Here DeadLine is removed from AbstractProcess element and it should be associated to ProcessRequirement (link AbstractProcess element) -> TimeRequirementLimit -> SignedTime
+ */
+ // TODO: search for constraintsModel
+
+ Element constraintsModelElement = rootElement.getChild("constraintsModel");
+
+ if (constraintsModelElement == null) {
+
+
+ final String name = rootElement.getName();
+
+ // /central:AMALTHEA
+
+ if (name.equals("AMALTHEA")) {
+
+ constraintsModelElement = new Element("constraintsModel");
+
+ rootElement.addContent(constraintsModelElement);
+
+ this.helper.addAdditionalNameSpace(rootElement, this.helper.getNS_111("constraints"));
+ }
+ else {
+
+ System.err.println(
+ "constraints model not present, so can't associate deadline to AbstractProcess elements");
+ return;
+ }
+ }
+
+
+ /*-
+ *
+ * updating process elements
+ *
+ */
+
+ for (final Element absProcessElement : absProcessElements) {
+
+ final Attribute nameAttribute = absProcessElement.getAttribute("name");
+
+ final Element deadLineElement = absProcessElement.getChild("deadline");
+
+ if (deadLineElement == null) {
+ continue;
+ }
+
+
+ String deadline_unit = deadLineElement.getAttributeValue("unit");
+
+ if (deadline_unit == null) {
+ deadline_unit = "ps";
+ }
+
+ String deadline_value = deadLineElement.getAttributeValue("value");
+
+ if (deadline_value == null) {
+ deadline_value = "0";
+ }
+
+ String absProcess_xmiID = absProcessElement.getAttributeValue("id", this.helper.getGenericNS("xmi"));
+
+
+ final Element processRequirementElment = new Element("requirements");
+
+ processRequirementElment.setAttribute("type", "constraints:ProcessRequirement",
+ this.helper.getGenericNS("xsi"));
+
+ if (nameAttribute != null) {
+ processRequirementElment.setAttribute("name", nameAttribute.getValue());
+ }
+
+ processRequirementElment.setAttribute("severity", "Cosmetic");
+
+
+ // id of AbstractProcess
+
+ if (absProcess_xmiID == null) {
+ absProcess_xmiID = EcoreUtil.generateUUID();
+
+ absProcessElement.setAttribute("id", absProcess_xmiID, this.helper.getGenericNS("xmi"));
+ }
+
+ processRequirementElment.setAttribute("process", absProcess_xmiID);
+
+
+ final Element limitElement = new Element("limit");
+
+ limitElement.setAttribute("type", "constraints:TimeRequirementLimit", this.helper.getGenericNS("xsi"));
+
+ limitElement.setAttribute("limitType", "UpperLimit");
+
+ limitElement.setAttribute("metric", "ResponseTime");
+
+
+ final Element limitValueElement = new Element("limitValue");
+
+ limitValueElement.setAttribute("value", deadline_value);
+
+ limitValueElement.setAttribute("unit", deadline_unit);
+
+ // adding limitvalue to parent (i.e. limit)
+ limitElement.addContent(limitValueElement);
+
+ // adding limitElement to parent (i.e. processRequirementElment)
+ processRequirementElment.addContent(limitElement);
+
+
+ // adding processRequirementElment to parent (i.e. ConstraintsModel)
+ constraintsModelElement.addContent(processRequirementElment);
+
+
+ // removing deadline from abstract process
+ absProcessElement.removeContent(deadLineElement);
+ }
+
+
+ }
+
+ private int modeCount;
+
+ /**
+ * This method is used to create Mode, ModeLiteral objects and associate them to the corresponding ModeSwitch<br>
+ * <br>
+ *
+ * Below are the steps performed by this method:<br>
+ * From all the LabelSwitch->entry object values -> ModeLiteral objects are created and associated to the Mode
+ * object (generated as a part of migration)<br>
+ *
+ * Created ModeLiteral's are associated to the entry objects (inside LabelSwitch -> which will be converted to
+ * ModeSwitch as a part of migration)
+ *
+ * @param rootElement
+ */
+ private void update_ModeLiteral_References(final Element rootElement) {
+
+
+ final Map<String, Element> element_LiteralMap = new HashMap<String, Element>();
+
+ final String xpathString = ".//swModel|/sw:SWModel";
+
+ final List<Element> swModels = this.helper.getXpathResult(rootElement, xpathString, Element.class,
+ this.helper.getNS_111("sw"), this.helper.getGenericNS("xsi"));
+
+
+ if (swModels.size() == 0) {
+ System.err.println("sw-model not present, so can't associate individual ModeLiteral values");
+ return;
+ }
+
+
+ final String xpathString_entries = ".//graphEntries[(@xsi:type=\"sw:ModeSwitch\")]/entries";
+
+ final List<Element> entryElements = this.helper.getXpathResult(rootElement, xpathString_entries, Element.class,
+ this.helper.getNS_111("sw"), this.helper.getGenericNS("xsi"));
+
+
+ // As there are various sw:ModeSwitch entries, corresponding modeliteral elements part of modes should be
+ // associated to them accordingly
+ Element mode_migElement = null;
+
+ if (entryElements.size() > 0) {
+
+ mode_migElement = new Element("modes");
+
+ // TODO: finalize the name of this element
+ mode_migElement.setAttribute("name", "mode_sw_" + this.modeCount++ + "_migration_generated");
+
+ mode_migElement.setAttribute("id", EcoreUtil.generateUUID(), this.helper.getGenericNS("xmi"));
+
+ swModels.get(0).addContent(mode_migElement);
+
+ for (final Element entryElement : entryElements) {
+
+ Attribute modeSwitchEntry_value_attribute = entryElement.getAttribute("value");
+
+ if (modeSwitchEntry_value_attribute == null) {
+ /*- This is the case where default value "0" is set for the "LabelSwitchEntry" and due to this reason attribute "value" will not be generated in the xmi */
+ modeSwitchEntry_value_attribute = new Attribute("value", "0");
+
+ entryElement.setAttribute(modeSwitchEntry_value_attribute);
+ }
+
+
+ final String value = modeSwitchEntry_value_attribute.getValue();
+
+
+ final boolean literalElementExists = element_LiteralMap.containsKey(value);
+
+ if (literalElementExists) {
+ /*- As the MapLiteral element is created as a part of the migration from 1.1.0 to 1.1.1, attribute xmi:id is added by default. And due to this below code is considering it*/
+ final Element literalElement = element_LiteralMap.get(value);
+
+ final String literal_uuid = literalElement.getAttributeValue("id", this.helper.getGenericNS("xmi"));
+
+ modeSwitchEntry_value_attribute.setValue(literal_uuid);
+
+ continue;
+ }
+
+ // else case
+
+ /*-
+ * Below the representation of ModeLiteral
+ * <modes name="MV">
+ * <literals name="20"/>
+ * </modes>
+ */
+
+ final Element literals = new Element("literals");
+
+ literals.setAttribute("name", value);
+
+ final String literalID = EcoreUtil.generateUUID();
+
+ literals.setAttribute("id", literalID, this.helper.getGenericNS("xmi"));
+
+ mode_migElement.addContent(literals);
+
+ modeSwitchEntry_value_attribute.setValue(literalID);
+
+ element_LiteralMap.put(value, literals);
+
+
+ }
+ }
+
+
+ }
+
+ /**
+ * As SchedulingSWUnit is moved from SW model to OS model. Only xsi:type is to be updated with sw:SchedulingSWUnit
+ * -> at all the places where schedulingunit with type : sw:SchedulingSWUnit was contained
+ *
+ * @param rootElement
+ */
+
+ private void update_SchedulingSWUnit_namespace(final Element rootElement) {
+
+ final String xpathString = ".//schedulingUnit[(@xsi:type=\"sw:SchedulingSWUnit\")]";
+
+ final List<Element> schedulingUnits = this.helper.getXpathResult(rootElement, xpathString, Element.class,
+ this.helper.getNS_111("sw"), this.helper.getGenericNS("xsi"));
+
+
+ for (final Element schedulingUnit : schedulingUnits) {
+
+ final Attribute attribute = schedulingUnit.getAttribute("type", this.helper.getGenericNS("xsi"));
+ attribute.setValue("os:SchedulingSWUnit");
+ }
+
+ }
+
+ private void updateEnum_WaitEventType(final Element rootElement) {
+
+
+ /*--
+ * Migraiton step to 111 from 110: Grep the references of "calls" having type as : CallSequenceItem and which do not contain "maskType" attribute
+ */
+
+ final String xpathString = ".//calls[(@xsi:type=\"sw:WaitEvent\") and not(@maskType) ]";
+
+ final List<Element> waitEvents = this.helper.getXpathResult(rootElement, xpathString, Element.class,
+ this.helper.getNS_111("sw"), this.helper.getGenericNS("xsi"));
+
+
+ for (final Element waitEvent : waitEvents) {
+
+ waitEvent.setAttribute("maskType", "AND");
+ }
+
+ }
+
+ /*-
+ *
+ * In this case, literal of the enum have changed
+ *
+ * From 1.1.0:
+ *
+ * enum WaitingBehaviour{
+ * unspecified = 0
+ * active = 1
+ * passive = 2
+ * }
+ *
+ * From 1.1.1:
+ *
+ * enum WaitingBehaviour
+ *{
+ * _undefined_ as "<waiting>"
+ * active
+ * passive
+ *}
+ *
+ */
+ private void updateEnum_WaitingBehaviour(final Element rootElement) {
+
+
+ /*--
+ * Migraiton step to 111 from 110: Grep the references of "calls" having type as : CallSequenceItem and which do not contain "maskType" attribute
+ *
+ * 1. do not explicity add the default value e.g: in 1.1.0 default was "unspecified", in 1.1.1 default is "_undefined_"
+ * 2. in case if the value is set as "unspecified", then remove the attribute "waitingBehaviour" -> as this literal is removed in 1.1.1. In this case default literal _unspecified_ will be considered by default
+ */
+
+ final StringBuffer xpathBuffer = new StringBuffer();
+
+ xpathBuffer.append(".//calls[(@xsi:type=\"sw:WaitEvent\") and (@waitingBehaviour=\"unspecified\") ]");
+
+ xpathBuffer.append("|");
+
+
+ xpathBuffer.append(
+ ".//runnableItems[(@xsi:type=\"sw:SynchronousServerCall\") and (@waitingBehaviour=\"unspecified\") ]");
+
+
+ xpathBuffer.append("|");
+
+
+ xpathBuffer.append(
+ ".//runnableItem[(@xsi:type=\"sw:SynchronousServerCall\") and (@waitingBehaviour=\"unspecified\") ]");
+
+
+ final List<Element> elements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(), Element.class,
+ this.helper.getNS_111("sw"), this.helper.getGenericNS("xsi"));
+
+
+ for (final Element waitEvent : elements) {
+
+ waitEvent.removeAttribute("waitingBehaviour");
+ }
+
+ }
+
+
+ private void updateEnum_AccessPrecedenceType(final Element rootElement) {
+ /*--
+ * Migraiton step to 111 from 110: Grep the references of "accessPrecedenceSpec" which do not contain "orderType" attribute (note: here this attribute corresponds to AccessPrecedenceSpec enum)
+ */
+
+ final String xpathString = ".//accessPrecedenceSpec[not(@orderType) ]";
+
+ final List<Element> accessPrecedenceSpecs = this.helper.getXpathResult(rootElement, xpathString, Element.class,
+ this.helper.getNS_111("sw"), this.helper.getGenericNS("xsi"));
+
+
+ for (final Element accessPrecedenceSpec : accessPrecedenceSpecs) {
+
+ accessPrecedenceSpec.setAttribute("orderType", "ignoreWR");
+ }
+
+ }
+
+
+ private void updateEnum_OrderType(final Element rootElement) {
+ /*--
+ * Migraiton step to 111 from 110: Grep the references of "orderPrecedenceSpec" which do not contain "orderType" attribute (note: here this attribute corresponds to OrderType enum)
+ */
+
+ final String xpathString = ".//orderPrecedenceSpec[not(@orderType) ]";
+
+ final List<Element> accessPrecedenceSpecs = this.helper.getXpathResult(rootElement, xpathString, Element.class,
+ this.helper.getNS_111("sw"), this.helper.getGenericNS("xsi"));
+
+
+ for (final Element accessPrecedenceSpec : accessPrecedenceSpecs) {
+
+ accessPrecedenceSpec.setAttribute("orderType", "order");
+ }
+
+ }
+
+
+ private void updateEnum_LabelAccessEnum(final Element rootElement) {
+ /*--
+ * Migraiton step to 111 from 110: Grep the references of "accessPrecedenceSpec" which do not contain "orderType" attribute (note: here this attribute corresponds to AccessPrecedenceSpec enum)
+ */
+
+ final StringBuffer xpathBuffer = new StringBuffer();
+
+ xpathBuffer.append(".//runnableItems[(@xsi:type=\"sw:LabelAccess\" and not(@access))]");
+ xpathBuffer.append("|");
+ xpathBuffer.append(".//runnableItem[(@xsi:type=\"sw:LabelAccess\" and not(@access))]");
+
+
+ final List<Element> labelAccesss = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
+ Element.class, this.helper.getNS_111("sw"), this.helper.getGenericNS("xsi"));
+
+
+ for (final Element labelAccess : labelAccesss) {
+
+ labelAccess.setAttribute("access", "read");
+ }
+
+ }
+
+
+ private void updateEnum_SemaphoreAccessEnum(final Element rootElement) {
+ /*--
+ * Migraiton step to 111 from 110: Grep the references of "accessPrecedenceSpec" which do not contain "orderType" attribute (note: here this attribute corresponds to AccessPrecedenceSpec enum)
+ */
+
+ final StringBuffer xpathBuffer = new StringBuffer();
+
+ xpathBuffer.append(".//runnableItems[(@xsi:type=\"sw:SemaphoreAccess\" and not(@accessEnum))]");
+ xpathBuffer.append("|");
+ xpathBuffer.append(".//runnableItem[(@xsi:type=\"sw:SemaphoreAccess\" and not(@accessEnum))]");
+
+
+ final List<Element> semaphoreAccesss = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
+ Element.class, this.helper.getNS_111("sw"), this.helper.getGenericNS("xsi"));
+
+
+ for (final Element semaphoreAccess : semaphoreAccesss) {
+
+ semaphoreAccess.setAttribute("accessEnum", "request");
+ }
+
+ }
+
+ private void updateEnum_Preemption(final Element rootElement) {
+ /*--
+ * Migraiton step to 111 from 110: Grep the references of "accessPrecedenceSpec" which do not contain "orderType" attribute (note: here this attribute corresponds to AccessPrecedenceSpec enum)
+ */
+
+ final StringBuffer xpathBuffer = new StringBuffer();
+
+ xpathBuffer.append("./sw:SWModel/tasks[not(@preemption)]");
+ xpathBuffer.append("|");
+ xpathBuffer.append(".//swModel/tasks[not(@preemption)]");
+ xpathBuffer.append("|");
+ xpathBuffer.append(".//processPrototypes[not(@preemption)]");
+
+ final List<Element> elements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(), Element.class,
+ this.helper.getNS_111("sw"), this.helper.getGenericNS("xsi"));
+
+
+ for (final Element element : elements) {
+
+ element.setAttribute("preemption", "cooperative");
+ }
+
+ }
+
+
+ /**
+ * This method is responsible for following: <br>
+ * - to create ModeLabel objects and assign them to the corresponding references inside sw model<br>
+ * - to convert ModeSwitch objects as LabelSwitch objects<br>
+ * <br>
+ * Note: Only for the Label objects which are referred inside LabelSwitch -> corresponding ModeLabel objects are
+ * created
+ *
+ * @param rootElement
+ * @throws Exception
+ */
+ private void update_ModeLabel_References(final Element rootElement) throws Exception {
+
+ final StringBuffer xpathBuffer = new StringBuffer();
+
+ /*-
+ * **************************************
+ *Fetching all valueProvider elements
+ * **************************************
+ */
+ xpathBuffer.append("(.//graphEntries[(@xsi:type=\"sw:LabelSwitch\")]/@label)");
+
+ final Map<String, String> localMap = new HashMap<String, String>();
+
+ final List<Attribute> valueLabelProvidersRefs = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
+ Attribute.class, this.helper.getNS_111("sw"), this.helper.getGenericNS("xsi"));
+
+ for (final Attribute attribute : valueLabelProvidersRefs) {
+
+ final String value = attribute.getValue();
+
+ String modeLabelID = "";
+
+ if (!localMap.containsKey(value)) {
+
+ if (value.contains("//")) {
+ final Element label = getLabel(value, true);
+ // TODO: log warning when label is null
+
+ if (label == null) {
+ continue;
+ }
+ modeLabelID = createModeLabel(label, this.targetFile);
+ localMap.put(value, modeLabelID);
+ }
+ else {
+ final Element label = getLabel(value, false);
+ // TODO: log warning
+ if (label == null) {
+ continue;
+ }
+ modeLabelID = createModeLabel(label, this.targetFile);
+ localMap.put(value, modeLabelID);
+ }
+ }
+ else {
+ modeLabelID = localMap.get(value);
+ }
+
+ if (modeLabelID != null && modeLabelID.length() > 0) {
+
+ /*-
+ * **************************************
+ * Linking ModeLabel as valueProvider
+ * **************************************
+ */
+ attribute.setValue(modeLabelID);
+
+ /*-TODO: LabelSwitch -> variable " Label label" is changed to "refers ModeValueProvider valueProvider"*/
+ attribute.setName("valueProvider");
+
+ /*- parent here is graphEntries object -> it should of type sw:ModeSwitch*/
+ final Element parent = attribute.getParent();
+
+ parent.removeAttribute("type", this.helper.getGenericNS("xsi"));
+
+ parent.setAttribute("type", "sw:ModeSwitch", this.helper.getGenericNS("xsi"));
+
+
+ }
+
+
+ }
+
+ /*-
+ ** **************************************
+ * Fetching data from HREF
+ * **************************************
+ *
+ */
+
+ final StringBuffer xpathHREFBuffer = new StringBuffer();
+ xpathHREFBuffer.append("(.//graphEntries[(@xsi:type=\"sw:LabelSwitch\")]/label/@href)");
+
+
+ final List<Attribute> hRefs = this.helper.getXpathResult(rootElement, xpathHREFBuffer.toString(),
+ Attribute.class, this.helper.getNS_111("sw"), this.helper.getGenericNS("xsi"));
+
+ for (final Attribute attribute : hRefs) {
+
+ final String value = attribute.getValue();
+
+ final File referredFile = getReferredFile(value);
+
+ String modeLabelID = "";
+
+ if (!localMap.containsKey(value)) {
+
+ final Element label = getLabelFromHRef(value);
+
+ if (label == null) {
+ continue;
+ }
+
+ modeLabelID = value.split("#")[0] + "#" + createModeLabel(label, referredFile);
+
+ localMap.put(value, modeLabelID);
+ }
+ else {
+ modeLabelID = localMap.get(value);
+ }
+
+ if (modeLabelID != null && modeLabelID.length() > 0) {
+
+ /*-
+ * **************************************
+ * Linking ModeLabel as valueProvider
+ * **************************************
+ */
+ attribute.setValue(modeLabelID);
+
+ /*- parent here is valueProvider object -> it should of type sw:ModeLabel*/
+
+ final Element parent = attribute.getParent();
+
+ parent.removeAttribute("type", this.helper.getGenericNS("xsi"));
+
+ parent.setAttribute("type", "sw:ModeLabel", this.helper.getGenericNS("xsi"));
+
+ /*-TODO: LabelSwitch -> variable "refers Label label" is changed to "refers ModeValueProvider valueProvider"*/
+ parent.setName("valueProvider");
+
+
+ /*- parent here is graphEntries object -> it should of type sw:ModeSwitch*/
+ final Element graphEntries = parent.getParentElement();
+
+ graphEntries.removeAttribute("type", this.helper.getGenericNS("xsi"));
+
+ graphEntries.setAttribute("type", "sw:ModeSwitch", this.helper.getGenericNS("xsi"));
+
+ }
+
+ }
+
+ }
+
+ /**
+ * This method is used to fetch the canonical file path referred in the given string.
+ *
+ * @param value
+ * String in the following format <relative path of model file>#<element name>
+ * @return file Canonical file object
+ * @throws IOException
+ */
+
+ private File getReferredFile(final String value) throws IOException {
+
+
+ final String[] split = value.split("#");
+
+ if (split.length != 2) {
+ return null;
+ }
+ final String refFileName = split[0];
+
+
+ final String referencedFilePath = this.workingDirectoryLocation + File.separator + refFileName;
+
+ final File referenceFile = new File(referencedFilePath).getCanonicalFile();
+
+ return referenceFile;
+
+ }
+
+ private Element getLabelFromHRef(final String labelReference_with_fileName) throws Exception {
+
+ boolean iURIFragment = false;
+
+ final String[] split = labelReference_with_fileName.split("#");
+
+ if (split.length != 2) {
+ return null;
+ }
+ final String refFileName = split[0];
+
+ final String labelReference = split[1];
+
+ if (labelReference.contains("//")) {
+ iURIFragment = true;
+ }
+
+ if (iURIFragment) {
+
+ for (final ICache iCache : this.caches) {
+
+ if (iCache instanceof LabelValueProviderRefsCacheBuilder) {
+
+ final Set<File> fileSet = iCache.getCacheMap().keySet();
+
+ for (final File file : fileSet) {
+
+ final Map<String, Object> cacheMap = iCache.getCacheMap().get(file);
+
+ final Object HREF_URIFRAGMENT_ELEMENT_Map = cacheMap
+ .get(CacheEnum.HREF_URIFRAGMENT_ELEMENT.name());
+
+ @SuppressWarnings("unchecked")
+ final Element element = ((Map<String, Element>) HREF_URIFRAGMENT_ELEMENT_Map)
+ .get(labelReference_with_fileName);
+
+ if (element != null) {
+ return element;
+ }
+ continue;
+
+ }
+
+ }
+
+ }
+
+ }
+ else {
+
+ final String referencedFilePath = this.workingDirectoryLocation + File.separator + refFileName;
+
+ final File referenceFile = new File(referencedFilePath).getCanonicalFile();
+
+
+ @SuppressWarnings("unchecked")
+ final List<LabelValueProviderRefsCacheBuilder> filteredCaches = getFilteredCaches(this.caches,
+ LabelValueProviderRefsCacheBuilder.class);
+
+ for (final LabelValueProviderRefsCacheBuilder labelValueProviderRefsCacheBuilder : filteredCaches) {
+
+ if (iURIFragment == false) {
+ final Map<String, Object> cacheMap = labelValueProviderRefsCacheBuilder.getCacheMap()
+ .get(referenceFile);
+
+ if (cacheMap != null) {
+ final Object UUID_ELEMENT_Map = cacheMap.get(CacheEnum.UUID_ELEMENT.name());
+
+ @SuppressWarnings("unchecked")
+ final Element element = ((Map<String, Element>) UUID_ELEMENT_Map).get(labelReference);
+
+ if (element != null) {
+ return element;
+ }
+ continue;
+ }
+
+ }
+ }
+ }
+
+ return null;
+ }
+
+ private Element getLabel(final String labelReference, final boolean iURIFragment) {
+
+ for (final ICache iCache : this.caches) {
+
+ if (iCache instanceof LabelValueProviderRefsCacheBuilder) {
+
+ final Set<File> fileSet = iCache.getCacheMap().keySet();
+
+ for (final File file : fileSet) {
+
+ final Map<String, Object> cacheMap = iCache.getCacheMap().get(file);
+
+ /*-
+ * Following elements should be collected:
+ *
+ * 1.Collect all label references (using xmi)
+ * a.simple
+ * b.href
+ * 2.Collect all label references (using URL fragments)
+ * a.simple
+ * b.href
+ */
+
+ final Object URIFRAGMENT_ELEMENT_Map = cacheMap.get(CacheEnum.URIFRAGMENT_ELEMENT.name());
+
+ // final Object object2 = cacheMap.get(CacheEnum.HREF_URIFRAGMENT_ELEMENT.name());
+
+ final Object UUID_ELEMENT_Map = cacheMap.get(CacheEnum.UUID_ELEMENT.name());
+
+
+ if (iURIFragment) {
+
+ @SuppressWarnings("unchecked")
+ final Element element = ((Map<String, Element>) URIFRAGMENT_ELEMENT_Map).get(labelReference);
+
+ if (element != null) {
+ return element;
+ }
+ continue;
+ }
+ @SuppressWarnings("unchecked")
+ final Element element = ((Map<String, Element>) UUID_ELEMENT_Map).get(labelReference);
+ if (element != null) {
+ return element;
+ }
+ continue;
+
+
+ }
+
+
+ }
+ }
+ return null;
+ }
+
+ /**
+ * This method is used to create ModeLabel object for each Label object. Once the ModeLabel object is created, it is
+ * associated to the SW Model
+ */
+ private String createModeLabel(final Element labelElement, final File file) {
+
+ final String labelName = labelElement.getAttributeValue("name");
+
+ // step1: check if the ModeLabel object is exiting
+
+ final Element modeLabel = getModeLabel(file, labelName);
+
+ if (modeLabel == null) {
+
+ /*- Parent of the Label element is SWModel */
+ final Parent parent = labelElement.getParent();
+
+ final Element element = new Element("modeLabels");
+
+ element.setAttribute("name", labelElement.getAttributeValue("name"));
+
+ final String uuid = EcoreUtil.generateUUID();
+
+ element.setAttribute("id", uuid, this.helper.getGenericNS("xmi"));
+
+ /*- adding ModeLabel element to the SWModel */
+ parent.addContent(element);
+
+ return uuid;
+
+
+ }
+
+ /*- This is the case where ModeLabel object with the supplied name is already existing */
+ return modeLabel.getAttributeValue("id", this.helper.getGenericNS("xmi"));
+
+
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/utils/CacheEnum.java b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/utils/CacheEnum.java
new file mode 100644
index 0000000..39e1adb
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/utils/CacheEnum.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters111.utils;
+
+public enum CacheEnum {
+
+
+ /*- Cache is stored in following format : Map<String, Element> */
+ UUID_ELEMENT,
+
+ /*- Cache is stored in following format : Map<String, List<Attribute>> */
+ URIFRAGMENT_ELEMENT_REFS_ATRIBUTES,
+
+ /*- Cache is stored in following format : Map<String, Element> */
+ URIFRAGMENT_ELEMENT,
+
+ /*- Cache is stored in following format : Map<File, Table<String,String, List<Attribute>>> */
+ HREF_URIFRAGMENT_ELEMENT_REFS_ATRIBUTES,
+
+ /*- Cache is stored in following format : Map<String, Element>
+ * ======
+ * ||Note:||
+ * ======
+ * key is a global URI fragment
+ * Value is a PORT object
+ * */
+ HREF_URIFRAGMENT_ELEMENT,
+
+ /*- Cache is stored in following format :BiMap<String, String> */
+ ELEMENT_URI_FRAGMENT_NEW_OLD,
+
+ /*- Cache is stored in following format : Map<String, Element> */
+ ELEMENT_NAME;
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/utils/ComponentModelRefsCacheBuilder.java b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/utils/ComponentModelRefsCacheBuilder.java
new file mode 100644
index 0000000..20fe170
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/utils/ComponentModelRefsCacheBuilder.java
@@ -0,0 +1,235 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters111.utils;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.utils.AbstractAttributeRefCacheBuilder;
+import org.eclipse.app4mc.amalthea.converters.common.utils.ModelVersion;
+import org.jdom2.Attribute;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+import com.google.common.collect.BiMap;
+import com.google.common.collect.HashBiMap;
+
+public class ComponentModelRefsCacheBuilder extends AbstractAttributeRefCacheBuilder {
+
+
+ public ComponentModelRefsCacheBuilder() {
+
+ this.helper = HelperUtils_110_111.getInstance();
+ }
+
+
+ @Override
+ public void buildCache(final Map<File, Document> fileName_documentsMap) {
+
+
+ for (final File targetFile : fileName_documentsMap.keySet()) {
+
+ /*- Cache initialized */
+
+ getCacheMap().put(targetFile, new HashMap<String, Object>());
+
+ final Document rootDocument = fileName_documentsMap.get(targetFile);
+
+ /*- Key is a UUID and value is Element */
+
+ // populate_All_UUID_Elements(targetFile, rootDocument, ".//elements[(@xsi:type=\"components:Component\")]",
+ // PortCacheEnum.UUID_COMPONENT_ELEMENT.name(), this.helper.getNS_110("components"));
+
+ /*- Key is a legacy URI fragment and value is List of Attribute's having the same reference */
+
+ final Map<String, List<Attribute>> uriFragment_portRefAttribsMap = getAllElementRefAttributes_containing_URIFragments(rootDocument);
+
+ getCacheMap().get(targetFile).put(CacheEnum.URIFRAGMENT_ELEMENT_REFS_ATRIBUTES.name(),
+ uriFragment_portRefAttribsMap);
+
+ /*- Key is a legacy URI fragment and value is List of Elements which belong to this URIFragment */
+
+ final Map<String, Element> uriFragment_PortMap = getAllElements_referred_by_URIFragments(targetFile,
+ rootDocument);
+
+
+ getCacheMap().get(targetFile)
+ .put(CacheEnum.URIFRAGMENT_ELEMENT.name(), uriFragment_PortMap);
+
+
+ /*- ---------Handling HREF elements ---------*/
+
+
+ populateAllHREFAttributes_having_legacy_URI_refs(targetFile, rootDocument);
+
+
+ populate_AllElements_referred_by_hrefURIFragments(targetFile, rootDocument, fileName_documentsMap);
+
+
+ }
+
+
+ }
+
+
+ @SuppressWarnings("unchecked")
+ public void updateURIFragments_in_Cache(final Map<File, Document> fileName_documentsMap) {
+
+ /*- based on the current implementation, Cache is updated after SchedulerRefs are updated */
+
+
+ for (final File targetFile : fileName_documentsMap.keySet()) {
+
+ final Map<String, Object> cache_file_specific_Map = getCacheMap().get(targetFile);
+
+ BiMap<String, String> biMap_urifragments_new_old = (BiMap<String, String>) cache_file_specific_Map
+ .get(CacheEnum.ELEMENT_URI_FRAGMENT_NEW_OLD.name());
+
+ if (biMap_urifragments_new_old == null) {
+
+ biMap_urifragments_new_old = HashBiMap.create();
+
+ cache_file_specific_Map.put(CacheEnum.ELEMENT_URI_FRAGMENT_NEW_OLD.name(),
+ biMap_urifragments_new_old);
+
+ }
+
+ /*- As the user has requested to update the cache for URI fragments, clear the existing cache */
+
+ biMap_urifragments_new_old.clear();
+
+
+ final Map<String, Element> urifragment_element_map = (Map<String, Element>) cache_file_specific_Map
+ .get(CacheEnum.URIFRAGMENT_ELEMENT.name());
+
+ for (final String old_uriFragment : urifragment_element_map.keySet()) {
+
+ final Element element = urifragment_element_map.get(old_uriFragment);
+
+ final String updated_uriFragment = this.helper.getURIFragment(element, ModelVersion._111);
+
+
+ biMap_urifragments_new_old.put(updated_uriFragment, old_uriFragment);
+
+ }
+
+
+ final Map<String, Element> hrefurifragment_element_map = (Map<String, Element>) cache_file_specific_Map
+ .get(CacheEnum.HREF_URIFRAGMENT_ELEMENT.name());
+
+ for (final String old_href_uriFragment : hrefurifragment_element_map.keySet()) {
+
+ final Element element = hrefurifragment_element_map.get(old_href_uriFragment);
+
+ final String updated_uriFragment_part2 = this.helper.getURIFragment(element, ModelVersion._111);
+
+ final String[] split = old_href_uriFragment.split("#");
+
+ biMap_urifragments_new_old.put(split[0] + "#" + updated_uriFragment_part2, old_href_uriFragment);
+
+ }
+
+
+ }
+
+ }
+
+ private void populate_AllElements_referred_by_hrefURIFragments(final File targetFile, final Document rootDocument,
+ final Map<File, Document> fileName_documentsMap) {
+ populate_AllElements_referred_by_hrefURIFragments(targetFile, rootDocument, fileName_documentsMap,
+ CacheEnum.HREF_URIFRAGMENT_ELEMENT_REFS_ATRIBUTES.name(),
+ CacheEnum.HREF_URIFRAGMENT_ELEMENT.name());
+
+ }
+
+ private void populateAllHREFAttributes_having_legacy_URI_refs(final File targetFile, final Document rootDocument) {
+
+ final StringBuffer xpathBuffer = new StringBuffer();
+
+ xpathBuffer
+ .append("(.//elements[(@xsi:type=\"components:Connector\")]/sourcePort/port/@href[contains(., \"/\")])");
+ xpathBuffer.append("|");
+ xpathBuffer
+ .append("(.//elements[(@xsi:type=\"components:Connector\")]/targetPort/port/@href[contains(., \"/\")])");
+ xpathBuffer.append("|");
+ xpathBuffer
+ .append("(.//elements[(@xsi:type=\"components:Connector\")]/sourcePort/instance/@href[contains(., \"/\")])");
+ xpathBuffer.append("|");
+ xpathBuffer
+ .append("(.//elements[(@xsi:type=\"components:Connector\")]/targetPort/instance/@href[contains(., \"/\")])");
+
+ xpathBuffer.append("|");
+ xpathBuffer
+ .append("(.//elements[(@xsi:type=\"components:ComponentInstance\")]/type/@href[contains(., \"/\")])");
+
+
+ populateAllHREF_ElementAttributes_having_legacy_URI_refs(targetFile, rootDocument, xpathBuffer.toString(),
+ CacheEnum.HREF_URIFRAGMENT_ELEMENT_REFS_ATRIBUTES.name(),
+ this.helper.getNS_110("components"), this.helper.getGenericNS("xsi"));
+
+ }
+
+
+ /**
+ * This method is used to grab all the Attributes referring to legacy format of URI fragments and group them
+ * accordingly based on key as URIFragment
+ *
+ * @param rootDocument
+ * @return
+ */
+ private Map<String, List<Attribute>> getAllElementRefAttributes_containing_URIFragments(final Document rootDocument) {
+
+ final StringBuffer xpathBuffer = new StringBuffer();
+
+ xpathBuffer.append("(.//elements[(@xsi:type=\"components:Connector\")]/sourcePort/@port[contains(., \"/\")])");
+ xpathBuffer.append("|");
+
+ xpathBuffer.append("(.//elements[(@xsi:type=\"components:Connector\")]/targetPort/@port[contains(., \"/\")])");
+ xpathBuffer.append("|");
+
+ xpathBuffer
+ .append("(.//elements[(@xsi:type=\"components:Connector\")]/sourcePort/@instance[contains(., \"/\")])");
+ xpathBuffer.append("|");
+
+ xpathBuffer
+ .append("(.//elements[(@xsi:type=\"components:Connector\")]/targetPort/@instance[contains(., \"/\")])");
+
+ xpathBuffer.append("|");
+
+ xpathBuffer.append("(.//elements[(@xsi:type=\"components:ComponentInstance\")]/@type[contains(., \"/\")])");
+
+
+ return getAllAttributes_containing_URIFragments(rootDocument, xpathBuffer.toString(),
+ this.helper.getNS_110("components"), this.helper.getGenericNS("xsi"));
+
+
+ }
+
+ /**
+ * This method is used to grab all Elements referred by legacy URI fragments and build a Map containing key as
+ * URIFragment and value as corresponding Element
+ *
+ * @param targetFile
+ * @param rootDocument
+ * @return
+ */
+ private Map<String, Element> getAllElements_referred_by_URIFragments(final File targetFile,
+ final Document rootDocument) {
+
+
+ return getAllElements_referred_by_URIFragments(targetFile, rootDocument,
+ CacheEnum.URIFRAGMENT_ELEMENT_REFS_ATRIBUTES.name());
+ }
+
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/utils/HelperUtils_110_111.java b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/utils/HelperUtils_110_111.java
new file mode 100644
index 0000000..41198ea
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/utils/HelperUtils_110_111.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters111.utils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.app4mc.amalthea.converters.common.utils.AbstractHelper;
+import org.jdom2.Element;
+import org.jdom2.Namespace;
+
+public class HelperUtils_110_111 extends AbstractHelper {
+
+ private HelperUtils_110_111() {
+
+ }
+
+ private static HelperUtils_110_111 instance;
+
+ public static HelperUtils_110_111 getInstance() {
+
+ if (instance == null) {
+ instance = new HelperUtils_110_111();
+ }
+
+ return instance;
+ }
+
+
+ /**
+ * This method is used to update the namespace references to 110
+ *
+ * @param rootElement
+ */
+
+ public void updateNameSpaces_to_111(final Element rootElement) {
+
+ final Namespace defaultNamespace = rootElement.getNamespace();
+
+
+ if (isNS_AvailableIn_110(defaultNamespace)) {
+
+ // if still 1.0.3 uri is used, then transform all URI's
+
+ rootElement.setNamespace(null);
+
+ rootElement.removeNamespaceDeclaration(defaultNamespace);
+
+ rootElement.setNamespace(getNS_111(defaultNamespace.getPrefix()));
+
+ // updating additional namespaces to the ones from 110
+
+ final List<Namespace> additionalNamespaces = new ArrayList<Namespace>();
+
+ additionalNamespaces.addAll(rootElement.getAdditionalNamespaces());
+
+ for (int i = 0; i < additionalNamespaces.size(); i++) {
+
+ final Namespace ns = additionalNamespaces.get(i);
+
+ if (isNS_AvailableIn_110(ns)) {
+
+ rootElement.removeNamespaceDeclaration(ns);
+
+ final Namespace ns_111 = getNS_111(ns.getPrefix());
+
+ rootElement.addNamespaceDeclaration(ns_111);
+
+ }
+
+
+ }
+
+ rootElement.addNamespaceDeclaration(getGenericNS("xmi"));
+
+ rootElement.addNamespaceDeclaration(getGenericNS("xsi"));
+
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/utils/LabelValueProviderRefsCacheBuilder.java b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/utils/LabelValueProviderRefsCacheBuilder.java
new file mode 100644
index 0000000..36044c5
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/utils/LabelValueProviderRefsCacheBuilder.java
@@ -0,0 +1,214 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters111.utils;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.utils.AbstractAttributeRefCacheBuilder;
+import org.eclipse.app4mc.amalthea.converters.common.utils.ModelVersion;
+import org.jdom2.Attribute;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+import com.google.common.collect.BiMap;
+import com.google.common.collect.HashBiMap;
+
+public class LabelValueProviderRefsCacheBuilder extends AbstractAttributeRefCacheBuilder {
+
+
+ public LabelValueProviderRefsCacheBuilder() {
+
+ this.helper = HelperUtils_110_111.getInstance();
+ }
+
+
+ @Override
+ public void buildCache(final Map<File, Document> fileName_documentsMap) {
+
+
+ for (final File targetFile : fileName_documentsMap.keySet()) {
+
+ /*- Cache initialized */
+
+ getCacheMap().put(targetFile, new HashMap<String, Object>());
+
+ final Document rootDocument = fileName_documentsMap.get(targetFile);
+
+ /*- Key is a UUID and value is Element */
+
+ populate_All_UUID_Elements(targetFile, rootDocument, ".//swModel/labels|/sw:SWModel/labels",
+ CacheEnum.UUID_ELEMENT.name(), this.helper.getNS_110("sw"));
+
+ /*- Key is a legacy URI fragment and value is List of Attribute's having the same reference */
+
+ final Map<String, List<Attribute>> uriFragment_elementRefAttribsMap = getAllElementRefAttributes_containing_URIFragments(rootDocument);
+
+ getCacheMap().get(targetFile).put(CacheEnum.URIFRAGMENT_ELEMENT_REFS_ATRIBUTES.name(),
+ uriFragment_elementRefAttribsMap);
+
+ /*- Key is a legacy URI fragment and value is List of Elements which belong to this URIFragment */
+
+ final Map<String, Element> uriFragment_ElementMap = getAllElements_referred_by_URIFragments(targetFile,
+ rootDocument);
+
+
+ getCacheMap().get(targetFile).put(CacheEnum.URIFRAGMENT_ELEMENT.name(), uriFragment_ElementMap);
+
+
+ /*- ---------Handling HREF elements ---------*/
+
+
+ populateAllHREFAttributes_having_legacy_URI_refs(targetFile, rootDocument);
+
+
+ populate_AllElements_referred_by_hrefURIFragments(targetFile, rootDocument, fileName_documentsMap);
+
+
+ }
+
+
+ }
+
+
+ @SuppressWarnings("unchecked")
+ public void updateURIFragments_in_Cache(final Map<File, Document> fileName_documentsMap) {
+
+ /*- based on the current implementation, Cache is updated after SchedulerRefs are updated */
+
+
+ for (final File targetFile : fileName_documentsMap.keySet()) {
+
+ final Map<String, Object> cache_file_specific_Map = getCacheMap().get(targetFile);
+
+ BiMap<String, String> biMap_urifragments_new_old = (BiMap<String, String>) cache_file_specific_Map
+ .get(CacheEnum.ELEMENT_URI_FRAGMENT_NEW_OLD.name());
+
+ if (biMap_urifragments_new_old == null) {
+
+ biMap_urifragments_new_old = HashBiMap.create();
+
+ cache_file_specific_Map.put(CacheEnum.ELEMENT_URI_FRAGMENT_NEW_OLD.name(), biMap_urifragments_new_old);
+
+ }
+
+ /*- As the user has requested to update the cache for URI fragments, clear the existing cache */
+
+ biMap_urifragments_new_old.clear();
+
+
+ final Map<String, Element> urifragment_element_map = (Map<String, Element>) cache_file_specific_Map
+ .get(CacheEnum.URIFRAGMENT_ELEMENT.name());
+
+ for (final String old_uriFragment : urifragment_element_map.keySet()) {
+
+ final Element element = urifragment_element_map.get(old_uriFragment);
+
+ final String updated_uriFragment = this.helper.getURIFragment(element, ModelVersion._111);
+
+
+ biMap_urifragments_new_old.put(updated_uriFragment, old_uriFragment);
+
+ }
+
+
+ final Map<String, Element> hrefurifragment_element_map = (Map<String, Element>) cache_file_specific_Map
+ .get(CacheEnum.HREF_URIFRAGMENT_ELEMENT.name());
+
+ for (final String old_href_uriFragment : hrefurifragment_element_map.keySet()) {
+
+ final Element element = hrefurifragment_element_map.get(old_href_uriFragment);
+
+ final String updated_uriFragment_part2 = this.helper.getURIFragment(element, ModelVersion._111);
+
+ final String[] split = old_href_uriFragment.split("#");
+
+ biMap_urifragments_new_old.put(split[0] + "#" + updated_uriFragment_part2, old_href_uriFragment);
+
+ }
+
+
+ }
+
+ }
+
+ private void populate_AllElements_referred_by_hrefURIFragments(final File targetFile, final Document rootDocument,
+ final Map<File, Document> fileName_documentsMap) {
+ populate_AllElements_referred_by_hrefURIFragments(targetFile, rootDocument, fileName_documentsMap,
+ CacheEnum.HREF_URIFRAGMENT_ELEMENT_REFS_ATRIBUTES.name(), CacheEnum.HREF_URIFRAGMENT_ELEMENT.name());
+
+ }
+
+ private void populateAllHREFAttributes_having_legacy_URI_refs(final File targetFile, final Document rootDocument) {
+
+ final StringBuffer xpathBuffer = new StringBuffer();
+
+ // for stimuli model
+ xpathBuffer.append("(.//entries/valueProvider[(@xsi:type=\"sw:Label\")]/@href[contains(., \"/\")])");
+
+ xpathBuffer.append("|");
+
+ // for sw model
+ xpathBuffer.append("(.//graphEntries[(@xsi:type=\"sw:LabelSwitch\")]/label/@href[contains(., \"/\")])");
+
+
+ populateAllHREF_ElementAttributes_having_legacy_URI_refs(targetFile, rootDocument, xpathBuffer.toString(),
+ CacheEnum.HREF_URIFRAGMENT_ELEMENT_REFS_ATRIBUTES.name(), this.helper.getNS_110("sw"),
+ this.helper.getNS_110("stimuli"), this.helper.getGenericNS("xsi"));
+
+ }
+
+
+ /**
+ * This method is used to grab all the Attributes referring to legacy format of URI fragments and group them
+ * accordingly based on key as URIFragment
+ *
+ * @param rootDocument
+ * @return
+ */
+ private Map<String, List<Attribute>> getAllElementRefAttributes_containing_URIFragments(final Document rootDocument) {
+
+ final StringBuffer xpathBuffer = new StringBuffer();
+
+ // for stimuli model
+ xpathBuffer.append("(.//entries/@valueProvider[contains(., \"/\")])");
+
+ xpathBuffer.append("|");
+
+ // for sw model
+ xpathBuffer.append("(.//graphEntries[(@xsi:type=\"sw:LabelSwitch\")]/@label[contains(., \"/\")])");
+
+ return getAllAttributes_containing_URIFragments(rootDocument, xpathBuffer.toString(),
+ this.helper.getNS_110("sw"), this.helper.getNS_110("stimuli"), this.helper.getGenericNS("xsi"));
+
+
+ }
+
+ /**
+ * This method is used to grab all Elements referred by legacy URI fragments and build a Map containing key as
+ * URIFragment and value as corresponding Element
+ *
+ * @param targetFile
+ * @param rootDocument
+ * @return
+ */
+ private Map<String, Element> getAllElements_referred_by_URIFragments(final File targetFile,
+ final Document rootDocument) {
+
+
+ return getAllElements_referred_by_URIFragments(targetFile, rootDocument,
+ CacheEnum.URIFRAGMENT_ELEMENT_REFS_ATRIBUTES.name());
+ }
+
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/utils/ModeLabelsCacheBuilder.java b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/utils/ModeLabelsCacheBuilder.java
new file mode 100644
index 0000000..de3c3a4
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.111/src/org/eclipse/app4mc/amalthea/converters111/utils/ModeLabelsCacheBuilder.java
@@ -0,0 +1,63 @@
+package org.eclipse.app4mc.amalthea.converters111.utils;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.utils.AbstractAttributeRefCacheBuilder;
+import org.jdom2.Document;
+
+public class ModeLabelsCacheBuilder extends AbstractAttributeRefCacheBuilder {
+
+ Map<File, Document> fileName_documentsMap;
+
+ public ModeLabelsCacheBuilder() {
+
+ this.helper = HelperUtils_110_111.getInstance();
+ }
+
+ @Override
+ public void buildCache(final Map<File, Document> fileName_documentsMap) {
+
+ this.fileName_documentsMap = fileName_documentsMap;
+
+ for (final File targetFile : fileName_documentsMap.keySet()) {
+
+ /*- Cache initialized */
+
+ getCacheMap().put(targetFile, new HashMap<String, Object>());
+
+ final Document rootDocument = fileName_documentsMap.get(targetFile);
+
+ /*- Key is a UUID and value is Element */
+
+ populate_All_UUID_Elements(targetFile, rootDocument, ".//swModel/modeLabels|/sw:SWModel/modeLabels",
+ CacheEnum.UUID_ELEMENT.name(), this.helper.getNS_110("sw"));
+
+ populate_All_Elements_With_Name(targetFile, rootDocument, ".//swModel/modeLabels|/sw:SWModel/modeLabels",
+ CacheEnum.ELEMENT_NAME.name(), this.helper.getNS_110("sw"));
+
+ }
+
+
+ }
+
+ /**
+ * This method is used to update the ModeLabel cache for a specific file
+ *
+ * @param targetFile
+ */
+ public void updateCache(final File targetFile) {
+
+ final Document rootDocument = this.fileName_documentsMap.get(targetFile);
+
+ /*- Key is a UUID and value is Element */
+
+ populate_All_UUID_Elements(targetFile, rootDocument, ".//swModel/modeLabels|/sw:SWModel/modeLabels",
+ CacheEnum.UUID_ELEMENT.name(), this.helper.getNS_110("sw"));
+
+ populate_All_Elements_With_Name(targetFile, rootDocument, ".//swModel/modeLabels|/sw:SWModel/modeLabels",
+ CacheEnum.ELEMENT_NAME.name(), this.helper.getNS_110("sw"));
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.common/.classpath b/plugins/org.eclipse.app4mc.amalthea.converters.common/.classpath
new file mode 100644
index 0000000..eca7bdb
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.common/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.common/.gitignore b/plugins/org.eclipse.app4mc.amalthea.converters.common/.gitignore
new file mode 100644
index 0000000..09e3bc9
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.common/.gitignore
@@ -0,0 +1,2 @@
+/bin/
+/target/
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.common/.project b/plugins/org.eclipse.app4mc.amalthea.converters.common/.project
new file mode 100644
index 0000000..cef19e6
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.common/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.app4mc.amalthea.converters.common</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.common/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.app4mc.amalthea.converters.common/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..0c68a61
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.common/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.common/META-INF/MANIFEST.MF b/plugins/org.eclipse.app4mc.amalthea.converters.common/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..6e30407
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.common/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: APP4MC Amalthea Converters Common
+Bundle-SymbolicName: org.eclipse.app4mc.amalthea.converters.common;singleton:=true
+Bundle-Version: 0.7.0.qualifier
+Bundle-Activator: org.eclipse.app4mc.amalthea.converters.common.Activator
+Require-Bundle: org.eclipse.core.runtime,
+ org.jdom2;visibility:=reexport,
+ com.google.guava;bundle-version="12.0.0";visibility:=reexport,
+ org.eclipse.emf.ecore;bundle-version="2.11.2";visibility:=reexport
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.app4mc.amalthea.converters.common,
+ org.eclipse.app4mc.amalthea.converters.common.base,
+ org.eclipse.app4mc.amalthea.converters.common.postprocessor,
+ org.eclipse.app4mc.amalthea.converters.common.preprocessor,
+ org.eclipse.app4mc.amalthea.converters.common.utils,
+ org.eclipse.app4mc.amalthea.converters.common.xpath.utils
+Bundle-Vendor: Eclipse.org
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.common/about.html b/plugins/org.eclipse.app4mc.amalthea.converters.common/about.html
new file mode 100644
index 0000000..49696f9
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.common/about.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>September 30, 2013</p>
+<h3>License</h3>
+
+<p>APP4MC provides all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.common/build.properties b/plugins/org.eclipse.app4mc.amalthea.converters.common/build.properties
new file mode 100644
index 0000000..b54ddfa
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.common/build.properties
@@ -0,0 +1,10 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ schema/,\
+ about.html,\
+ epl-v10.html
+src.includes = epl-v10.html,\
+ about.html
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.common/epl-v10.html b/plugins/org.eclipse.app4mc.amalthea.converters.common/epl-v10.html
new file mode 100644
index 0000000..fd39122
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.common/epl-v10.html
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Public License - Version 1.0</title>
+<style type="text/css">
+ body {
+ size: 8.5in 11.0in;
+ margin: 0.25in 0.5in 0.25in 0.5in;
+ tab-interval: 0.5in;
+ }
+ p {
+ margin-left: auto;
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ }
+ p.list {
+ margin-left: 0.5in;
+ margin-top: 0.05em;
+ margin-bottom: 0.05em;
+ }
+ </style>
+
+</head>
+
+<body lang="EN-US">
+
+<h2>Eclipse Public License - v 1.0</h2>
+
+<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
+DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
+AGREEMENT.</p>
+
+<p><b>1. DEFINITIONS</b></p>
+
+<p>"Contribution" means:</p>
+
+<p class="list">a) in the case of the initial Contributor, the initial
+code and documentation distributed under this Agreement, and</p>
+<p class="list">b) in the case of each subsequent Contributor:</p>
+<p class="list">i) changes to the Program, and</p>
+<p class="list">ii) additions to the Program;</p>
+<p class="list">where such changes and/or additions to the Program
+originate from and are distributed by that particular Contributor. A
+Contribution 'originates' from a Contributor if it was added to the
+Program by such Contributor itself or anyone acting on such
+Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii)
+are not derivative works of the Program.</p>
+
+<p>"Contributor" means any person or entity that distributes
+the Program.</p>
+
+<p>"Licensed Patents" mean patent claims licensable by a
+Contributor which are necessarily infringed by the use or sale of its
+Contribution alone or when combined with the Program.</p>
+
+<p>"Program" means the Contributions distributed in accordance
+with this Agreement.</p>
+
+<p>"Recipient" means anyone who receives the Program under
+this Agreement, including all Contributors.</p>
+
+<p><b>2. GRANT OF RIGHTS</b></p>
+
+<p class="list">a) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free copyright license to reproduce, prepare derivative works
+of, publicly display, publicly perform, distribute and sublicense the
+Contribution of such Contributor, if any, and such derivative works, in
+source code and object code form.</p>
+
+<p class="list">b) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free patent license under Licensed Patents to make, use, sell,
+offer to sell, import and otherwise transfer the Contribution of such
+Contributor, if any, in source code and object code form. This patent
+license shall apply to the combination of the Contribution and the
+Program if, at the time the Contribution is added by the Contributor,
+such addition of the Contribution causes such combination to be covered
+by the Licensed Patents. The patent license shall not apply to any other
+combinations which include the Contribution. No hardware per se is
+licensed hereunder.</p>
+
+<p class="list">c) Recipient understands that although each Contributor
+grants the licenses to its Contributions set forth herein, no assurances
+are provided by any Contributor that the Program does not infringe the
+patent or other intellectual property rights of any other entity. Each
+Contributor disclaims any liability to Recipient for claims brought by
+any other entity based on infringement of intellectual property rights
+or otherwise. As a condition to exercising the rights and licenses
+granted hereunder, each Recipient hereby assumes sole responsibility to
+secure any other intellectual property rights needed, if any. For
+example, if a third party patent license is required to allow Recipient
+to distribute the Program, it is Recipient's responsibility to acquire
+that license before distributing the Program.</p>
+
+<p class="list">d) Each Contributor represents that to its knowledge it
+has sufficient copyright rights in its Contribution, if any, to grant
+the copyright license set forth in this Agreement.</p>
+
+<p><b>3. REQUIREMENTS</b></p>
+
+<p>A Contributor may choose to distribute the Program in object code
+form under its own license agreement, provided that:</p>
+
+<p class="list">a) it complies with the terms and conditions of this
+Agreement; and</p>
+
+<p class="list">b) its license agreement:</p>
+
+<p class="list">i) effectively disclaims on behalf of all Contributors
+all warranties and conditions, express and implied, including warranties
+or conditions of title and non-infringement, and implied warranties or
+conditions of merchantability and fitness for a particular purpose;</p>
+
+<p class="list">ii) effectively excludes on behalf of all Contributors
+all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;</p>
+
+<p class="list">iii) states that any provisions which differ from this
+Agreement are offered by that Contributor alone and not by any other
+party; and</p>
+
+<p class="list">iv) states that source code for the Program is available
+from such Contributor, and informs licensees how to obtain it in a
+reasonable manner on or through a medium customarily used for software
+exchange.</p>
+
+<p>When the Program is made available in source code form:</p>
+
+<p class="list">a) it must be made available under this Agreement; and</p>
+
+<p class="list">b) a copy of this Agreement must be included with each
+copy of the Program.</p>
+
+<p>Contributors may not remove or alter any copyright notices contained
+within the Program.</p>
+
+<p>Each Contributor must identify itself as the originator of its
+Contribution, if any, in a manner that reasonably allows subsequent
+Recipients to identify the originator of the Contribution.</p>
+
+<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
+
+<p>Commercial distributors of software may accept certain
+responsibilities with respect to end users, business partners and the
+like. While this license is intended to facilitate the commercial use of
+the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create
+potential liability for other Contributors. Therefore, if a Contributor
+includes the Program in a commercial product offering, such Contributor
+("Commercial Contributor") hereby agrees to defend and
+indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses")
+arising from claims, lawsuits and other legal actions brought by a third
+party against the Indemnified Contributor to the extent caused by the
+acts or omissions of such Commercial Contributor in connection with its
+distribution of the Program in a commercial product offering. The
+obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In
+order to qualify, an Indemnified Contributor must: a) promptly notify
+the Commercial Contributor in writing of such claim, and b) allow the
+Commercial Contributor to control, and cooperate with the Commercial
+Contributor in, the defense and any related settlement negotiations. The
+Indemnified Contributor may participate in any such claim at its own
+expense.</p>
+
+<p>For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any other
+Contributor to pay any damages as a result, the Commercial Contributor
+must pay those damages.</p>
+
+<p><b>5. NO WARRANTY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
+PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
+ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
+OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with its
+exercise of rights under this Agreement , including but not limited to
+the risks and costs of program errors, compliance with applicable laws,
+damage to or loss of data, programs or equipment, and unavailability or
+interruption of operations.</p>
+
+<p><b>6. DISCLAIMER OF LIABILITY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
+NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
+WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
+DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
+HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
+
+<p><b>7. GENERAL</b></p>
+
+<p>If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further action
+by the parties hereto, such provision shall be reformed to the minimum
+extent necessary to make such provision valid and enforceable.</p>
+
+<p>If Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Program itself (excluding combinations of the Program with other
+software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the
+date such litigation is filed.</p>
+
+<p>All Recipient's rights under this Agreement shall terminate if it
+fails to comply with any of the material terms or conditions of this
+Agreement and does not cure such failure in a reasonable period of time
+after becoming aware of such noncompliance. If all Recipient's rights
+under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive.</p>
+
+<p>Everyone is permitted to copy and distribute copies of this
+Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The
+Agreement Steward reserves the right to publish new versions (including
+revisions) of this Agreement from time to time. No one other than the
+Agreement Steward has the right to modify this Agreement. The Eclipse
+Foundation is the initial Agreement Steward. The Eclipse Foundation may
+assign the responsibility to serve as the Agreement Steward to a
+suitable separate entity. Each new version of the Agreement will be
+given a distinguishing version number. The Program (including
+Contributions) may always be distributed subject to the version of the
+Agreement under which it was received. In addition, after a new version
+of the Agreement is published, Contributor may elect to distribute the
+Program (including its Contributions) under the new version. Except as
+expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
+rights or licenses to the intellectual property of any Contributor under
+this Agreement, whether expressly, by implication, estoppel or
+otherwise. All rights in the Program not expressly granted under this
+Agreement are reserved.</p>
+
+<p>This Agreement is governed by the laws of the State of New York and
+the intellectual property laws of the United States of America. No party
+to this Agreement will bring a legal action under this Agreement more
+than one year after the cause of action arose. Each party waives its
+rights to a jury trial in any resulting litigation.</p>
+
+</body>
+
+</html>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.common/plugin.xml b/plugins/org.eclipse.app4mc.amalthea.converters.common/plugin.xml
new file mode 100644
index 0000000..d2c7022
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.common/plugin.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension-point id="org.eclipse.app4mc.amalthea.model.converters" name="model.converters" schema="schema/org.eclipse.app4mc.amalthea.converters.exsd"/>
+ <extension-point id="org.eclipse.app4mc.amalthea.model.converters.cachebuilders" name="model.converters.cache" schema="schema/org.eclipse.app4mc.amalthea.model.converters.cachebuilders.exsd"/>
+ <extension-point id="org.eclipse.app4mc.amalthea.model.converters.formatter" name="model.converters.formatter" schema="schema/org.eclipse.app4mc.amalthea.model.converters.formatter.exsd"/>
+ <extension-point id="org.eclipse.app4mc.amalthea.model.converters.preprocessor" name="model.converters.preprocessor" schema="schema/org.eclipse.app4mc.amalthea.model.converters.preprocessor.exsd"/>
+ <extension-point id="org.eclipse.app4mc.amalthea.model.converters.postprocessor" name="model.converters.postprocessor" schema="schema/org.eclipse.app4mc.amalthea.model.converters.postprocessor.exsd"/>
+ <extension
+ point="org.eclipse.app4mc.amalthea.model.converters.preprocessor">
+ <converters.preprocessor
+ class="org.eclipse.app4mc.amalthea.converters.common.preprocessor.CustomPropsPreProcessor"
+ id="org.eclipse.app4mc.amalthea.converters.common.customrproperty.referenceobj.removal">
+ <input-model-version
+ version="itea.103">
+ </input-model-version>
+ <input-model-version
+ version="itea.110">
+ </input-model-version>
+ </converters.preprocessor>
+ </extension>
+ <extension
+ point="org.eclipse.app4mc.amalthea.model.converters.postprocessor">
+ <converters.postprocessor
+ class="org.eclipse.app4mc.amalthea.converters.common.postprocessor.CustomPropsPostProcessor"
+ id="org.eclipse.app4mc.amalthea.converters.common.customprops.update"
+ >
+ <input-model-version
+ version="itea.103">
+ </input-model-version>
+ <input-model-version
+ version="itea.110">
+ </input-model-version>
+ <output-model-version
+ version="itea.111">
+ </output-model-version>
+ <output-model-version
+ version="0.7.0">
+ </output-model-version>
+ </converters.postprocessor>
+ <converters.postprocessor
+ class="org.eclipse.app4mc.amalthea.converters.common.postprocessor.FileNameUpdationProcessor"
+ id="org.eclipse.app4mc.amalthea.converters.common.update.filenames"
+ >
+ <input-model-version
+ version="itea.103">
+ </input-model-version>
+ <input-model-version
+ version="itea.110">
+ </input-model-version>
+ <output-model-version
+ version="itea.111">
+ </output-model-version>
+ <output-model-version
+ version="0.7.0">
+ </output-model-version>
+ </converters.postprocessor>
+ </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.common/pom.xml b/plugins/org.eclipse.app4mc.amalthea.converters.common/pom.xml
new file mode 100644
index 0000000..4d38abd
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.common/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <relativePath>../../build/org.eclipse.app4mc.build/pom.xml</relativePath>
+ <groupId>org.eclipse.app4mc.build</groupId>
+ <artifactId>parent</artifactId>
+ <version>0.7.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.app4mc.amalthea.converters.common</artifactId>
+ <packaging>eclipse-plugin</packaging>
+
+</project>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.common/resources/tags_Elements_ReferableBaseObject.txt b/plugins/org.eclipse.app4mc.amalthea.converters.common/resources/tags_Elements_ReferableBaseObject.txt
new file mode 100644
index 0000000..b897bbc
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.common/resources/tags_Elements_ReferableBaseObject.txt
@@ -0,0 +1,878 @@
+abstractElement,sw:AbstractElementMemoryInformation,,,,
+abstractElement,sw:AbstractElementMemoryInformation,tags,common:Tag,,
+accessPaths,hw:AccessPath,source,hw:ComplexNode,,
+accessPaths,hw:AccessPath,source,hw:ComplexNode,components,hw:Component,
+accessPaths,hw:AccessPath,source,hw:ComplexNode,memories,hw:Memory,
+accessPaths,hw:AccessPath,source,hw:ComplexNode,networks,hw:Network,
+accessPaths,hw:AccessPath,source,hw:ComplexNode,quartzes,hw:Quartz,
+accessPaths,hw:AccessPath,target,hw:ComplexNode,,
+accessPaths,hw:AccessPath,target,hw:ComplexNode,components,hw:Component,
+accessPaths,hw:AccessPath,target,hw:ComplexNode,memories,hw:Memory,
+accessPaths,hw:AccessPath,target,hw:ComplexNode,networks,hw:Network,
+accessPaths,hw:AccessPath,target,hw:ComplexNode,quartzes,hw:Quartz,
+accessPrecedenceSpec,sw:AccessPrecedenceSpec,label,sw:Label,,
+accessPrecedenceSpec,sw:AccessPrecedenceSpec,label,sw:Label,tags,common:Tag,
+accessPrecedenceSpec,sw:AccessPrecedenceSpec,origin,sw:Runnable,,
+accessPrecedenceSpec,sw:AccessPrecedenceSpec,origin,sw:Runnable,activation,sw:Activation,
+accessPrecedenceSpec,sw:AccessPrecedenceSpec,origin,sw:Runnable,tags,common:Tag,
+accessPrecedenceSpec,sw:AccessPrecedenceSpec,target,sw:Runnable,,
+accessPrecedenceSpec,sw:AccessPrecedenceSpec,target,sw:Runnable,activation,sw:Activation,
+accessPrecedenceSpec,sw:AccessPrecedenceSpec,target,sw:Runnable,tags,common:Tag,
+activation,sw:Activation,,,,
+activations,sw:Activation,,,,
+affinityConstraints,constraints:AffinityConstraint,,,,
+chainedPrototypes,sw:ChainedProcessPrototype,prototype,sw:ProcessPrototype,,
+chainedPrototypes,sw:ChainedProcessPrototype,prototype,sw:ProcessPrototype,activation,sw:Activation,
+chainedPrototypes,sw:ChainedProcessPrototype,prototype,sw:ProcessPrototype,firstRunnable,sw:Runnable,
+chainedPrototypes,sw:ChainedProcessPrototype,prototype,sw:ProcessPrototype,lastRunnable,sw:Runnable,
+clock,stimuli:Clock,,,,
+clocks,stimuli:Clock,,,,
+component,components:Component,,,,
+component,components:Component,labels,sw:Label,,
+component,components:Component,labels,sw:Label,tags,common:Tag,
+component,components:Component,osEvents,sw:OSEvent,,
+component,components:Component,osEvents,sw:OSEvent,tags,common:Tag,
+component,components:Component,ports,components:IPort,tags,common:Tag,
+component,components:Component,runnables,sw:Runnable,,
+component,components:Component,runnables,sw:Runnable,activation,sw:Activation,
+component,components:Component,runnables,sw:Runnable,tags,common:Tag,
+component,components:Component,semaphores,os:Semaphore,,
+component,components:Component,tags,common:Tag,,
+component,components:Component,tasks,sw:AbstractProcess,,
+component,components:Component,tasks,sw:AbstractProcess,tags,common:Tag,
+componentInstances,components:ComponentInstance,,,,
+componentInstances,components:ComponentInstance,tags,common:Tag,,
+componentInstances,components:ComponentInstance,type,components:Component,,
+componentInstances,components:ComponentInstance,type,components:Component,labels,sw:Label,
+componentInstances,components:ComponentInstance,type,components:Component,osEvents,sw:OSEvent,
+componentInstances,components:ComponentInstance,type,components:Component,runnables,sw:Runnable,
+componentInstances,components:ComponentInstance,type,components:Component,semaphores,os:Semaphore,
+componentInstances,components:ComponentInstance,type,components:Component,tags,common:Tag,
+componentInstances,components:ComponentInstance,type,components:Component,tasks,sw:AbstractProcess,
+components,components:Component,,,,
+components,components:Component,labels,sw:Label,,
+components,components:Component,labels,sw:Label,tags,common:Tag,
+components,components:Component,osEvents,sw:OSEvent,,
+components,components:Component,osEvents,sw:OSEvent,tags,common:Tag,
+components,components:Component,ports,components:IPort,tags,common:Tag,
+components,components:Component,runnables,sw:Runnable,,
+components,components:Component,runnables,sw:Runnable,activation,sw:Activation,
+components,components:Component,runnables,sw:Runnable,tags,common:Tag,
+components,components:Component,semaphores,os:Semaphore,,
+components,components:Component,tags,common:Tag,,
+components,components:Component,tasks,sw:AbstractProcess,,
+components,components:Component,tasks,sw:AbstractProcess,tags,common:Tag,
+components,hw:Component,,,,
+components,hw:Component,components,hw:Component,,
+components,hw:Component,components,hw:Component,components,hw:Component,
+components,hw:Component,components,hw:Component,memories,hw:Memory,
+components,hw:Component,components,hw:Component,nestedComponents,hw:Component,
+components,hw:Component,components,hw:Component,networks,hw:Network,
+components,hw:Component,components,hw:Component,quartzes,hw:Quartz,
+components,hw:Component,memories,hw:Memory,,
+components,hw:Component,memories,hw:Memory,components,hw:Component,
+components,hw:Component,memories,hw:Memory,memories,hw:Memory,
+components,hw:Component,memories,hw:Memory,networks,hw:Network,
+components,hw:Component,memories,hw:Memory,quartzes,hw:Quartz,
+components,hw:Component,nestedComponents,hw:Component,,
+components,hw:Component,nestedComponents,hw:Component,components,hw:Component,
+components,hw:Component,nestedComponents,hw:Component,memories,hw:Memory,
+components,hw:Component,nestedComponents,hw:Component,nestedComponents,hw:Component,
+components,hw:Component,nestedComponents,hw:Component,networks,hw:Network,
+components,hw:Component,nestedComponents,hw:Component,quartzes,hw:Quartz,
+components,hw:Component,networks,hw:Network,,
+components,hw:Component,networks,hw:Network,components,hw:Component,
+components,hw:Component,networks,hw:Network,memories,hw:Memory,
+components,hw:Component,networks,hw:Network,networks,hw:Network,
+components,hw:Component,networks,hw:Network,quartzes,hw:Quartz,
+components,hw:Component,prescaler,hw:Prescaler,quartz,hw:Quartz,
+components,hw:Component,quartzes,hw:Quartz,,
+components,hw:Component,quartzes,hw:Quartz,components,hw:Component,
+components,hw:Component,quartzes,hw:Quartz,memories,hw:Memory,
+components,hw:Component,quartzes,hw:Quartz,networks,hw:Network,
+components,hw:Component,quartzes,hw:Quartz,quartzes,hw:Quartz,
+componentsModel,components:ComponentsModel,components,components:Component,,
+componentsModel,components:ComponentsModel,components,components:Component,labels,sw:Label,
+componentsModel,components:ComponentsModel,components,components:Component,osEvents,sw:OSEvent,
+componentsModel,components:ComponentsModel,components,components:Component,runnables,sw:Runnable,
+componentsModel,components:ComponentsModel,components,components:Component,semaphores,os:Semaphore,
+componentsModel,components:ComponentsModel,components,components:Component,tags,common:Tag,
+componentsModel,components:ComponentsModel,components,components:Component,tasks,sw:AbstractProcess,
+componentsModel,components:ComponentsModel,systems,components:System,,
+componentsModel,components:ComponentsModel,systems,components:System,componentInstances,components:ComponentInstance,
+componentsModel,components:ComponentsModel,systems,components:System,tags,common:Tag,
+componentsModel,components:ComponentsModel,tags,common:Tag,,
+connectors,components:Connector,sourcePort,components:QualifiedPort,instance,components:ComponentInstance,
+connectors,components:Connector,tags,common:Tag,,
+connectors,components:Connector,targetPort,components:QualifiedPort,instance,components:ComponentInstance,
+constraintsModel,constraints:ConstraintsModel,affinityConstraints,constraints:AffinityConstraint,,
+constraintsModel,constraints:ConstraintsModel,dataAgeConstraints,constraints:DataAgeConstraint,,
+constraintsModel,constraints:ConstraintsModel,dataAgeConstraints,constraints:DataAgeConstraint,label,sw:Label,
+constraintsModel,constraints:ConstraintsModel,dataAgeConstraints,constraints:DataAgeConstraint,runnable,sw:Runnable,
+constraintsModel,constraints:ConstraintsModel,dataCoherencyGroups,constraints:DataCoherencyGroup,,
+constraintsModel,constraints:ConstraintsModel,dataCoherencyGroups,constraints:DataCoherencyGroup,labels,sw:Label,
+constraintsModel,constraints:ConstraintsModel,eventChains,constraints:EventChain,,
+constraintsModel,constraints:ConstraintsModel,eventChains,constraints:EventChain,response,events:Event,
+constraintsModel,constraints:ConstraintsModel,eventChains,constraints:EventChain,stimulus,events:Event,
+constraintsModel,constraints:ConstraintsModel,runnableSequencingConstraints,constraints:RunnableSequencingConstraint,,
+constraintsModel,constraints:ConstraintsModel,timingConstraints,constraints:TimingConstraint,,
+core,hw:Core,,,,
+core,hw:Core,components,hw:Component,,
+core,hw:Core,components,hw:Component,components,hw:Component,
+core,hw:Core,components,hw:Component,memories,hw:Memory,
+core,hw:Core,components,hw:Component,nestedComponents,hw:Component,
+core,hw:Core,components,hw:Component,networks,hw:Network,
+core,hw:Core,components,hw:Component,quartzes,hw:Quartz,
+core,hw:Core,memories,hw:Memory,,
+core,hw:Core,memories,hw:Memory,components,hw:Component,
+core,hw:Core,memories,hw:Memory,memories,hw:Memory,
+core,hw:Core,memories,hw:Memory,networks,hw:Network,
+core,hw:Core,memories,hw:Memory,quartzes,hw:Quartz,
+core,hw:Core,networks,hw:Network,,
+core,hw:Core,networks,hw:Network,components,hw:Component,
+core,hw:Core,networks,hw:Network,memories,hw:Memory,
+core,hw:Core,networks,hw:Network,networks,hw:Network,
+core,hw:Core,networks,hw:Network,quartzes,hw:Quartz,
+core,hw:Core,prescaler,hw:Prescaler,quartz,hw:Quartz,
+core,hw:Core,quartzes,hw:Quartz,,
+core,hw:Core,quartzes,hw:Quartz,components,hw:Component,
+core,hw:Core,quartzes,hw:Quartz,memories,hw:Memory,
+core,hw:Core,quartzes,hw:Quartz,networks,hw:Network,
+core,hw:Core,quartzes,hw:Quartz,quartzes,hw:Quartz,
+coreAllocation,mapping:CoreAllocation,core,hw:Core,,
+coreAllocation,mapping:CoreAllocation,core,hw:Core,components,hw:Component,
+coreAllocation,mapping:CoreAllocation,core,hw:Core,memories,hw:Memory,
+coreAllocation,mapping:CoreAllocation,core,hw:Core,networks,hw:Network,
+coreAllocation,mapping:CoreAllocation,core,hw:Core,quartzes,hw:Quartz,
+coreAllocation,mapping:CoreAllocation,scheduler,os:Scheduler,,
+cores,hw:Core,,,,
+cores,hw:Core,components,hw:Component,,
+cores,hw:Core,components,hw:Component,components,hw:Component,
+cores,hw:Core,components,hw:Component,memories,hw:Memory,
+cores,hw:Core,components,hw:Component,nestedComponents,hw:Component,
+cores,hw:Core,components,hw:Component,networks,hw:Network,
+cores,hw:Core,components,hw:Component,quartzes,hw:Quartz,
+cores,hw:Core,memories,hw:Memory,,
+cores,hw:Core,memories,hw:Memory,components,hw:Component,
+cores,hw:Core,memories,hw:Memory,memories,hw:Memory,
+cores,hw:Core,memories,hw:Memory,networks,hw:Network,
+cores,hw:Core,memories,hw:Memory,quartzes,hw:Quartz,
+cores,hw:Core,networks,hw:Network,,
+cores,hw:Core,networks,hw:Network,components,hw:Component,
+cores,hw:Core,networks,hw:Network,memories,hw:Memory,
+cores,hw:Core,networks,hw:Network,networks,hw:Network,
+cores,hw:Core,networks,hw:Network,quartzes,hw:Quartz,
+cores,hw:Core,prescaler,hw:Prescaler,quartz,hw:Quartz,
+cores,hw:Core,quartzes,hw:Quartz,,
+cores,hw:Core,quartzes,hw:Quartz,components,hw:Component,
+cores,hw:Core,quartzes,hw:Quartz,memories,hw:Memory,
+cores,hw:Core,quartzes,hw:Quartz,networks,hw:Network,
+cores,hw:Core,quartzes,hw:Quartz,quartzes,hw:Quartz,
+customEntities,sw:CustomEntity,,,,
+customEntities,sw:CustomEntity,tags,common:Tag,,
+data,sw:Label,,,,
+data,sw:Label,tags,common:Tag,,
+data,sw:ModeLabel,,,,
+data,sw:ModeLabel,initialValue,common:ModeLiteral,,
+data,sw:ModeLabel,mode,common:Mode,,
+data,sw:ModeLabel,mode,common:Mode,literals,common:ModeLiteral,
+data,sw:ModeLabel,tags,common:Tag,,
+dataAgeConstraints,constraints:DataAgeConstraint,,,,
+dataAgeConstraints,constraints:DataAgeConstraint,label,sw:Label,,
+dataAgeConstraints,constraints:DataAgeConstraint,label,sw:Label,tags,common:Tag,
+dataAgeConstraints,constraints:DataAgeConstraint,runnable,sw:Runnable,,
+dataAgeConstraints,constraints:DataAgeConstraint,runnable,sw:Runnable,activation,sw:Activation,
+dataAgeConstraints,constraints:DataAgeConstraint,runnable,sw:Runnable,tags,common:Tag,
+dataCoherencyGroups,constraints:DataCoherencyGroup,,,,
+dataCoherencyGroups,constraints:DataCoherencyGroup,labels,sw:Label,,
+dataCoherencyGroups,constraints:DataCoherencyGroup,labels,sw:Label,tags,common:Tag,
+disablingModeValueList,stimuli:ModeValueList,entries,stimuli:ModeValueListEntry,value,common:ModeLiteral,
+ecus,hw:ECU,,,,
+ecus,hw:ECU,components,hw:Component,,
+ecus,hw:ECU,components,hw:Component,components,hw:Component,
+ecus,hw:ECU,components,hw:Component,memories,hw:Memory,
+ecus,hw:ECU,components,hw:Component,nestedComponents,hw:Component,
+ecus,hw:ECU,components,hw:Component,networks,hw:Network,
+ecus,hw:ECU,components,hw:Component,quartzes,hw:Quartz,
+ecus,hw:ECU,memories,hw:Memory,,
+ecus,hw:ECU,memories,hw:Memory,components,hw:Component,
+ecus,hw:ECU,memories,hw:Memory,memories,hw:Memory,
+ecus,hw:ECU,memories,hw:Memory,networks,hw:Network,
+ecus,hw:ECU,memories,hw:Memory,quartzes,hw:Quartz,
+ecus,hw:ECU,microcontrollers,hw:Microcontroller,,
+ecus,hw:ECU,microcontrollers,hw:Microcontroller,components,hw:Component,
+ecus,hw:ECU,microcontrollers,hw:Microcontroller,cores,hw:Core,
+ecus,hw:ECU,microcontrollers,hw:Microcontroller,memories,hw:Memory,
+ecus,hw:ECU,microcontrollers,hw:Microcontroller,networks,hw:Network,
+ecus,hw:ECU,microcontrollers,hw:Microcontroller,quartzes,hw:Quartz,
+ecus,hw:ECU,networks,hw:Network,,
+ecus,hw:ECU,networks,hw:Network,components,hw:Component,
+ecus,hw:ECU,networks,hw:Network,memories,hw:Memory,
+ecus,hw:ECU,networks,hw:Network,networks,hw:Network,
+ecus,hw:ECU,networks,hw:Network,quartzes,hw:Quartz,
+ecus,hw:ECU,prescaler,hw:Prescaler,quartz,hw:Quartz,
+ecus,hw:ECU,quartzes,hw:Quartz,,
+ecus,hw:ECU,quartzes,hw:Quartz,components,hw:Component,
+ecus,hw:ECU,quartzes,hw:Quartz,memories,hw:Memory,
+ecus,hw:ECU,quartzes,hw:Quartz,networks,hw:Network,
+ecus,hw:ECU,quartzes,hw:Quartz,quartzes,hw:Quartz,
+enablingModeValueList,stimuli:ModeValueList,entries,stimuli:ModeValueListEntry,value,common:ModeLiteral,
+entity,os:Semaphore,,,,
+entity,stimuli:Stimulus,,,,
+entity,sw:Label,,,,
+entity,sw:Label,tags,common:Tag,,
+entity,sw:Process,,,,
+entity,sw:Process,stimuli,stimuli:Stimulus,,
+entity,sw:Process,tags,common:Tag,,
+entity,sw:ProcessChain,,,,
+entity,sw:ProcessChain,processes,sw:Process,,
+entity,sw:ProcessChain,processes,sw:Process,stimuli,stimuli:Stimulus,
+entity,sw:ProcessChain,processes,sw:Process,tags,common:Tag,
+entity,sw:Runnable,,,,
+entity,sw:Runnable,activation,sw:Activation,,
+entity,sw:Runnable,tags,common:Tag,,
+entries,constraints:ProcessRunnableGroupEntry,processScope,sw:AbstractProcess,,
+entries,constraints:ProcessRunnableGroupEntry,processScope,sw:AbstractProcess,tags,common:Tag,
+entries,constraints:ProcessRunnableGroupEntry,runnable,sw:Runnable,,
+entries,constraints:ProcessRunnableGroupEntry,runnable,sw:Runnable,activation,sw:Activation,
+entries,constraints:ProcessRunnableGroupEntry,runnable,sw:Runnable,tags,common:Tag,
+entries,stimuli:ModeValueListEntry,value,common:ModeLiteral,,
+entries,stimuli:ModeValueListEntry,valueProvider,common:ModeValueProvider,initialValue,common:ModeLiteral,
+entries,stimuli:ModeValueListEntry,valueProvider,common:ModeValueProvider,mode,common:Mode,
+entries,sw:ModeSwitchEntry,value,common:ModeLiteral,,
+event,events:EntityEvent,,,,
+eventChain,constraints:EventChain,,,,
+eventChain,constraints:EventChain,response,events:Event,,
+eventChain,constraints:EventChain,stimulus,events:Event,,
+eventChains,constraints:EventChain,,,,
+eventChains,constraints:EventChain,response,events:Event,,
+eventChains,constraints:EventChain,stimulus,events:Event,,
+eventMask,sw:EventMask,events,sw:OSEvent,,
+eventMask,sw:EventMask,events,sw:OSEvent,tags,common:Tag,
+eventModel,events:EventModel,events,events:Event,,
+events,events:EntityEvent,,,,
+events,events:Event,,,,
+events,sw:OSEvent,,,,
+events,sw:OSEvent,tags,common:Tag,,
+firstRunnable,sw:Runnable,,,,
+firstRunnable,sw:Runnable,activation,sw:Activation,,
+firstRunnable,sw:Runnable,tags,common:Tag,,
+groups,constraints:SchedulerEntityGroup,schedulers,os:Scheduler,,
+hardwareContext,hw:ComplexNode,,,,
+hardwareContext,hw:ComplexNode,components,hw:Component,,
+hardwareContext,hw:ComplexNode,components,hw:Component,components,hw:Component,
+hardwareContext,hw:ComplexNode,components,hw:Component,memories,hw:Memory,
+hardwareContext,hw:ComplexNode,components,hw:Component,nestedComponents,hw:Component,
+hardwareContext,hw:ComplexNode,components,hw:Component,networks,hw:Network,
+hardwareContext,hw:ComplexNode,components,hw:Component,quartzes,hw:Quartz,
+hardwareContext,hw:ComplexNode,memories,hw:Memory,,
+hardwareContext,hw:ComplexNode,memories,hw:Memory,components,hw:Component,
+hardwareContext,hw:ComplexNode,memories,hw:Memory,memories,hw:Memory,
+hardwareContext,hw:ComplexNode,memories,hw:Memory,networks,hw:Network,
+hardwareContext,hw:ComplexNode,memories,hw:Memory,quartzes,hw:Quartz,
+hardwareContext,hw:ComplexNode,networks,hw:Network,,
+hardwareContext,hw:ComplexNode,networks,hw:Network,components,hw:Component,
+hardwareContext,hw:ComplexNode,networks,hw:Network,memories,hw:Memory,
+hardwareContext,hw:ComplexNode,networks,hw:Network,networks,hw:Network,
+hardwareContext,hw:ComplexNode,networks,hw:Network,quartzes,hw:Quartz,
+hardwareContext,hw:ComplexNode,prescaler,hw:Prescaler,quartz,hw:Quartz,
+hardwareContext,hw:ComplexNode,quartzes,hw:Quartz,,
+hardwareContext,hw:ComplexNode,quartzes,hw:Quartz,components,hw:Component,
+hardwareContext,hw:ComplexNode,quartzes,hw:Quartz,memories,hw:Memory,
+hardwareContext,hw:ComplexNode,quartzes,hw:Quartz,networks,hw:Network,
+hardwareContext,hw:ComplexNode,quartzes,hw:Quartz,quartzes,hw:Quartz,
+hwModel,hw:HWModel,accessPaths,hw:AccessPath,source,hw:ComplexNode,
+hwModel,hw:HWModel,accessPaths,hw:AccessPath,target,hw:ComplexNode,
+hwModel,hw:HWModel,system,hw:System,,
+hwModel,hw:HWModel,system,hw:System,components,hw:Component,
+hwModel,hw:HWModel,system,hw:System,ecus,hw:ECU,
+hwModel,hw:HWModel,system,hw:System,memories,hw:Memory,
+hwModel,hw:HWModel,system,hw:System,networks,hw:Network,
+hwModel,hw:HWModel,system,hw:System,quartzes,hw:Quartz,
+initialValue,common:ModeLiteral,,,,
+instance,components:ComponentInstance,,,,
+instance,components:ComponentInstance,tags,common:Tag,,
+instance,components:ComponentInstance,type,components:Component,,
+instance,components:ComponentInstance,type,components:Component,labels,sw:Label,
+instance,components:ComponentInstance,type,components:Component,osEvents,sw:OSEvent,
+instance,components:ComponentInstance,type,components:Component,runnables,sw:Runnable,
+instance,components:ComponentInstance,type,components:Component,semaphores,os:Semaphore,
+instance,components:ComponentInstance,type,components:Component,tags,common:Tag,
+instance,components:ComponentInstance,type,components:Component,tasks,sw:AbstractProcess,
+interruptController,os:InterruptController,,,,
+interruptControllers,os:InterruptController,,,,
+isrs,sw:ISR,,,,
+isrs,sw:ISR,stimuli,stimuli:Stimulus,,
+label,sw:Label,,,,
+label,sw:Label,tags,common:Tag,,
+labels,sw:Label,,,,
+labels,sw:Label,tags,common:Tag,,
+lastRunnable,sw:Runnable,,,,
+lastRunnable,sw:Runnable,activation,sw:Activation,,
+lastRunnable,sw:Runnable,tags,common:Tag,,
+literals,common:ModeLiteral,,,,
+mapping,mapping:Mapping,mem,hw:Memory,,
+mapping,mapping:Mapping,mem,hw:Memory,components,hw:Component,
+mapping,mapping:Mapping,mem,hw:Memory,memories,hw:Memory,
+mapping,mapping:Mapping,mem,hw:Memory,networks,hw:Network,
+mapping,mapping:Mapping,mem,hw:Memory,quartzes,hw:Quartz,
+mappingModel,mapping:MappingModel,coreAllocation,mapping:CoreAllocation,core,hw:Core,
+mappingModel,mapping:MappingModel,coreAllocation,mapping:CoreAllocation,scheduler,os:Scheduler,
+mappingModel,mapping:MappingModel,mapping,mapping:Mapping,mem,hw:Memory,
+mappingModel,mapping:MappingModel,processAllocation,mapping:ProcessAllocation,process,sw:Process,
+mappingModel,mapping:MappingModel,processAllocation,mapping:ProcessAllocation,scheduler,os:Scheduler,
+mappingModel,mapping:MappingModel,runnableAllocation,mapping:RunnableAllocation,entity,sw:Runnable,
+mappingModel,mapping:MappingModel,runnableAllocation,mapping:RunnableAllocation,scheduler,os:Scheduler,
+mem,hw:Memory,,,,
+mem,hw:Memory,components,hw:Component,,
+mem,hw:Memory,components,hw:Component,components,hw:Component,
+mem,hw:Memory,components,hw:Component,memories,hw:Memory,
+mem,hw:Memory,components,hw:Component,nestedComponents,hw:Component,
+mem,hw:Memory,components,hw:Component,networks,hw:Network,
+mem,hw:Memory,components,hw:Component,quartzes,hw:Quartz,
+mem,hw:Memory,memories,hw:Memory,,
+mem,hw:Memory,memories,hw:Memory,components,hw:Component,
+mem,hw:Memory,memories,hw:Memory,memories,hw:Memory,
+mem,hw:Memory,memories,hw:Memory,networks,hw:Network,
+mem,hw:Memory,memories,hw:Memory,quartzes,hw:Quartz,
+mem,hw:Memory,networks,hw:Network,,
+mem,hw:Memory,networks,hw:Network,components,hw:Component,
+mem,hw:Memory,networks,hw:Network,memories,hw:Memory,
+mem,hw:Memory,networks,hw:Network,networks,hw:Network,
+mem,hw:Memory,networks,hw:Network,quartzes,hw:Quartz,
+mem,hw:Memory,prescaler,hw:Prescaler,quartz,hw:Quartz,
+mem,hw:Memory,quartzes,hw:Quartz,,
+mem,hw:Memory,quartzes,hw:Quartz,components,hw:Component,
+mem,hw:Memory,quartzes,hw:Quartz,memories,hw:Memory,
+mem,hw:Memory,quartzes,hw:Quartz,networks,hw:Network,
+mem,hw:Memory,quartzes,hw:Quartz,quartzes,hw:Quartz,
+memories,hw:Memory,,,,
+memories,hw:Memory,components,hw:Component,,
+memories,hw:Memory,components,hw:Component,components,hw:Component,
+memories,hw:Memory,components,hw:Component,memories,hw:Memory,
+memories,hw:Memory,components,hw:Component,nestedComponents,hw:Component,
+memories,hw:Memory,components,hw:Component,networks,hw:Network,
+memories,hw:Memory,components,hw:Component,quartzes,hw:Quartz,
+memories,hw:Memory,memories,hw:Memory,,
+memories,hw:Memory,memories,hw:Memory,components,hw:Component,
+memories,hw:Memory,memories,hw:Memory,memories,hw:Memory,
+memories,hw:Memory,memories,hw:Memory,networks,hw:Network,
+memories,hw:Memory,memories,hw:Memory,quartzes,hw:Quartz,
+memories,hw:Memory,networks,hw:Network,,
+memories,hw:Memory,networks,hw:Network,components,hw:Component,
+memories,hw:Memory,networks,hw:Network,memories,hw:Memory,
+memories,hw:Memory,networks,hw:Network,networks,hw:Network,
+memories,hw:Memory,networks,hw:Network,quartzes,hw:Quartz,
+memories,hw:Memory,prescaler,hw:Prescaler,quartz,hw:Quartz,
+memories,hw:Memory,quartzes,hw:Quartz,,
+memories,hw:Memory,quartzes,hw:Quartz,components,hw:Component,
+memories,hw:Memory,quartzes,hw:Quartz,memories,hw:Memory,
+memories,hw:Memory,quartzes,hw:Quartz,networks,hw:Network,
+memories,hw:Memory,quartzes,hw:Quartz,quartzes,hw:Quartz,
+memory,hw:Memory,,,,
+memory,hw:Memory,components,hw:Component,,
+memory,hw:Memory,components,hw:Component,components,hw:Component,
+memory,hw:Memory,components,hw:Component,memories,hw:Memory,
+memory,hw:Memory,components,hw:Component,nestedComponents,hw:Component,
+memory,hw:Memory,components,hw:Component,networks,hw:Network,
+memory,hw:Memory,components,hw:Component,quartzes,hw:Quartz,
+memory,hw:Memory,memories,hw:Memory,,
+memory,hw:Memory,memories,hw:Memory,components,hw:Component,
+memory,hw:Memory,memories,hw:Memory,memories,hw:Memory,
+memory,hw:Memory,memories,hw:Memory,networks,hw:Network,
+memory,hw:Memory,memories,hw:Memory,quartzes,hw:Quartz,
+memory,hw:Memory,networks,hw:Network,,
+memory,hw:Memory,networks,hw:Network,components,hw:Component,
+memory,hw:Memory,networks,hw:Network,memories,hw:Memory,
+memory,hw:Memory,networks,hw:Network,networks,hw:Network,
+memory,hw:Memory,networks,hw:Network,quartzes,hw:Quartz,
+memory,hw:Memory,prescaler,hw:Prescaler,quartz,hw:Quartz,
+memory,hw:Memory,quartzes,hw:Quartz,,
+memory,hw:Memory,quartzes,hw:Quartz,components,hw:Component,
+memory,hw:Memory,quartzes,hw:Quartz,memories,hw:Memory,
+memory,hw:Memory,quartzes,hw:Quartz,networks,hw:Network,
+memory,hw:Memory,quartzes,hw:Quartz,quartzes,hw:Quartz,
+microcontrollers,hw:Microcontroller,,,,
+microcontrollers,hw:Microcontroller,components,hw:Component,,
+microcontrollers,hw:Microcontroller,components,hw:Component,components,hw:Component,
+microcontrollers,hw:Microcontroller,components,hw:Component,memories,hw:Memory,
+microcontrollers,hw:Microcontroller,components,hw:Component,nestedComponents,hw:Component,
+microcontrollers,hw:Microcontroller,components,hw:Component,networks,hw:Network,
+microcontrollers,hw:Microcontroller,components,hw:Component,quartzes,hw:Quartz,
+microcontrollers,hw:Microcontroller,cores,hw:Core,,
+microcontrollers,hw:Microcontroller,cores,hw:Core,components,hw:Component,
+microcontrollers,hw:Microcontroller,cores,hw:Core,memories,hw:Memory,
+microcontrollers,hw:Microcontroller,cores,hw:Core,networks,hw:Network,
+microcontrollers,hw:Microcontroller,cores,hw:Core,quartzes,hw:Quartz,
+microcontrollers,hw:Microcontroller,memories,hw:Memory,,
+microcontrollers,hw:Microcontroller,memories,hw:Memory,components,hw:Component,
+microcontrollers,hw:Microcontroller,memories,hw:Memory,memories,hw:Memory,
+microcontrollers,hw:Microcontroller,memories,hw:Memory,networks,hw:Network,
+microcontrollers,hw:Microcontroller,memories,hw:Memory,quartzes,hw:Quartz,
+microcontrollers,hw:Microcontroller,networks,hw:Network,,
+microcontrollers,hw:Microcontroller,networks,hw:Network,components,hw:Component,
+microcontrollers,hw:Microcontroller,networks,hw:Network,memories,hw:Memory,
+microcontrollers,hw:Microcontroller,networks,hw:Network,networks,hw:Network,
+microcontrollers,hw:Microcontroller,networks,hw:Network,quartzes,hw:Quartz,
+microcontrollers,hw:Microcontroller,prescaler,hw:Prescaler,quartz,hw:Quartz,
+microcontrollers,hw:Microcontroller,quartzes,hw:Quartz,,
+microcontrollers,hw:Microcontroller,quartzes,hw:Quartz,components,hw:Component,
+microcontrollers,hw:Microcontroller,quartzes,hw:Quartz,memories,hw:Memory,
+microcontrollers,hw:Microcontroller,quartzes,hw:Quartz,networks,hw:Network,
+microcontrollers,hw:Microcontroller,quartzes,hw:Quartz,quartzes,hw:Quartz,
+mode,common:Mode,,,,
+mode,common:Mode,literals,common:ModeLiteral,,
+modeLabels,sw:ModeLabel,,,,
+modeLabels,sw:ModeLabel,initialValue,common:ModeLiteral,,
+modeLabels,sw:ModeLabel,mode,common:Mode,,
+modeLabels,sw:ModeLabel,mode,common:Mode,literals,common:ModeLiteral,
+modeLabels,sw:ModeLabel,tags,common:Tag,,
+modeValue,common:ModeLiteral,,,,
+modes,common:Mode,,,,
+modes,common:Mode,literals,common:ModeLiteral,,
+nestedComponents,hw:Component,,,,
+nestedComponents,hw:Component,components,hw:Component,,
+nestedComponents,hw:Component,components,hw:Component,components,hw:Component,
+nestedComponents,hw:Component,components,hw:Component,memories,hw:Memory,
+nestedComponents,hw:Component,components,hw:Component,nestedComponents,hw:Component,
+nestedComponents,hw:Component,components,hw:Component,networks,hw:Network,
+nestedComponents,hw:Component,components,hw:Component,quartzes,hw:Quartz,
+nestedComponents,hw:Component,memories,hw:Memory,,
+nestedComponents,hw:Component,memories,hw:Memory,components,hw:Component,
+nestedComponents,hw:Component,memories,hw:Memory,memories,hw:Memory,
+nestedComponents,hw:Component,memories,hw:Memory,networks,hw:Network,
+nestedComponents,hw:Component,memories,hw:Memory,quartzes,hw:Quartz,
+nestedComponents,hw:Component,nestedComponents,hw:Component,,
+nestedComponents,hw:Component,nestedComponents,hw:Component,components,hw:Component,
+nestedComponents,hw:Component,nestedComponents,hw:Component,memories,hw:Memory,
+nestedComponents,hw:Component,nestedComponents,hw:Component,nestedComponents,hw:Component,
+nestedComponents,hw:Component,nestedComponents,hw:Component,networks,hw:Network,
+nestedComponents,hw:Component,nestedComponents,hw:Component,quartzes,hw:Quartz,
+nestedComponents,hw:Component,networks,hw:Network,,
+nestedComponents,hw:Component,networks,hw:Network,components,hw:Component,
+nestedComponents,hw:Component,networks,hw:Network,memories,hw:Memory,
+nestedComponents,hw:Component,networks,hw:Network,networks,hw:Network,
+nestedComponents,hw:Component,networks,hw:Network,quartzes,hw:Quartz,
+nestedComponents,hw:Component,prescaler,hw:Prescaler,quartz,hw:Quartz,
+nestedComponents,hw:Component,quartzes,hw:Quartz,,
+nestedComponents,hw:Component,quartzes,hw:Quartz,components,hw:Component,
+nestedComponents,hw:Component,quartzes,hw:Quartz,memories,hw:Memory,
+nestedComponents,hw:Component,quartzes,hw:Quartz,networks,hw:Network,
+nestedComponents,hw:Component,quartzes,hw:Quartz,quartzes,hw:Quartz,
+network,hw:Network,,,,
+network,hw:Network,components,hw:Component,,
+network,hw:Network,components,hw:Component,components,hw:Component,
+network,hw:Network,components,hw:Component,memories,hw:Memory,
+network,hw:Network,components,hw:Component,nestedComponents,hw:Component,
+network,hw:Network,components,hw:Component,networks,hw:Network,
+network,hw:Network,components,hw:Component,quartzes,hw:Quartz,
+network,hw:Network,memories,hw:Memory,,
+network,hw:Network,memories,hw:Memory,components,hw:Component,
+network,hw:Network,memories,hw:Memory,memories,hw:Memory,
+network,hw:Network,memories,hw:Memory,networks,hw:Network,
+network,hw:Network,memories,hw:Memory,quartzes,hw:Quartz,
+network,hw:Network,networks,hw:Network,,
+network,hw:Network,networks,hw:Network,components,hw:Component,
+network,hw:Network,networks,hw:Network,memories,hw:Memory,
+network,hw:Network,networks,hw:Network,networks,hw:Network,
+network,hw:Network,networks,hw:Network,quartzes,hw:Quartz,
+network,hw:Network,prescaler,hw:Prescaler,quartz,hw:Quartz,
+network,hw:Network,quartzes,hw:Quartz,,
+network,hw:Network,quartzes,hw:Quartz,components,hw:Component,
+network,hw:Network,quartzes,hw:Quartz,memories,hw:Memory,
+network,hw:Network,quartzes,hw:Quartz,networks,hw:Network,
+network,hw:Network,quartzes,hw:Quartz,quartzes,hw:Quartz,
+networks,hw:Network,,,,
+networks,hw:Network,components,hw:Component,,
+networks,hw:Network,components,hw:Component,components,hw:Component,
+networks,hw:Network,components,hw:Component,memories,hw:Memory,
+networks,hw:Network,components,hw:Component,nestedComponents,hw:Component,
+networks,hw:Network,components,hw:Component,networks,hw:Network,
+networks,hw:Network,components,hw:Component,quartzes,hw:Quartz,
+networks,hw:Network,memories,hw:Memory,,
+networks,hw:Network,memories,hw:Memory,components,hw:Component,
+networks,hw:Network,memories,hw:Memory,memories,hw:Memory,
+networks,hw:Network,memories,hw:Memory,networks,hw:Network,
+networks,hw:Network,memories,hw:Memory,quartzes,hw:Quartz,
+networks,hw:Network,networks,hw:Network,,
+networks,hw:Network,networks,hw:Network,components,hw:Component,
+networks,hw:Network,networks,hw:Network,memories,hw:Memory,
+networks,hw:Network,networks,hw:Network,networks,hw:Network,
+networks,hw:Network,networks,hw:Network,quartzes,hw:Quartz,
+networks,hw:Network,prescaler,hw:Prescaler,quartz,hw:Quartz,
+networks,hw:Network,quartzes,hw:Quartz,,
+networks,hw:Network,quartzes,hw:Quartz,components,hw:Component,
+networks,hw:Network,quartzes,hw:Quartz,memories,hw:Memory,
+networks,hw:Network,quartzes,hw:Quartz,networks,hw:Network,
+networks,hw:Network,quartzes,hw:Quartz,quartzes,hw:Quartz,
+notifiedRunnables,sw:Runnable,,,,
+notifiedRunnables,sw:Runnable,activation,sw:Activation,,
+notifiedRunnables,sw:Runnable,tags,common:Tag,,
+operatingSystems,os:OperatingSystem,interruptControllers,os:InterruptController,,
+operatingSystems,os:OperatingSystem,taskSchedulers,os:TaskScheduler,,
+orderPrecedenceSpec,sw:OrderPrecedenceSpec,origin,sw:Runnable,,
+orderPrecedenceSpec,sw:OrderPrecedenceSpec,origin,sw:Runnable,activation,sw:Activation,
+orderPrecedenceSpec,sw:OrderPrecedenceSpec,origin,sw:Runnable,tags,common:Tag,
+orderPrecedenceSpec,sw:OrderPrecedenceSpec,target,sw:Runnable,,
+orderPrecedenceSpec,sw:OrderPrecedenceSpec,target,sw:Runnable,activation,sw:Activation,
+orderPrecedenceSpec,sw:OrderPrecedenceSpec,target,sw:Runnable,tags,common:Tag,
+origin,sw:Runnable,,,,
+origin,sw:Runnable,activation,sw:Activation,,
+origin,sw:Runnable,tags,common:Tag,,
+osEvents,sw:OSEvent,,,,
+osEvents,sw:OSEvent,tags,common:Tag,,
+osModel,os:OSModel,operatingSystems,os:OperatingSystem,interruptControllers,os:InterruptController,
+osModel,os:OSModel,operatingSystems,os:OperatingSystem,taskSchedulers,os:TaskScheduler,
+osModel,os:OSModel,semaphores,os:Semaphore,,
+port,components:IPort,tags,common:Tag,,
+port,hw:ComplexPort,network,hw:Network,,
+port,hw:ComplexPort,network,hw:Network,components,hw:Component,
+port,hw:ComplexPort,network,hw:Network,memories,hw:Memory,
+port,hw:ComplexPort,network,hw:Network,networks,hw:Network,
+port,hw:ComplexPort,network,hw:Network,quartzes,hw:Quartz,
+ports,components:IPort,tags,common:Tag,,
+prescaler,hw:Prescaler,quartz,hw:Quartz,,
+prescaler,hw:Prescaler,quartz,hw:Quartz,components,hw:Component,
+prescaler,hw:Prescaler,quartz,hw:Quartz,memories,hw:Memory,
+prescaler,hw:Prescaler,quartz,hw:Quartz,networks,hw:Network,
+prescaler,hw:Prescaler,quartz,hw:Quartz,quartzes,hw:Quartz,
+process,sw:AbstractProcess,,,,
+process,sw:AbstractProcess,tags,common:Tag,,
+process,sw:Process,,,,
+process,sw:Process,stimuli,stimuli:Stimulus,,
+process,sw:Process,tags,common:Tag,,
+processAllocation,mapping:ProcessAllocation,process,sw:Process,,
+processAllocation,mapping:ProcessAllocation,process,sw:Process,stimuli,stimuli:Stimulus,
+processAllocation,mapping:ProcessAllocation,process,sw:Process,tags,common:Tag,
+processAllocation,mapping:ProcessAllocation,scheduler,os:Scheduler,,
+processChain,sw:ProcessChain,,,,
+processChain,sw:ProcessChain,processes,sw:Process,,
+processChain,sw:ProcessChain,processes,sw:Process,stimuli,stimuli:Stimulus,
+processChain,sw:ProcessChain,processes,sw:Process,tags,common:Tag,
+processChains,sw:ProcessChain,,,,
+processChains,sw:ProcessChain,processes,sw:Process,,
+processChains,sw:ProcessChain,processes,sw:Process,stimuli,stimuli:Stimulus,
+processChains,sw:ProcessChain,processes,sw:Process,tags,common:Tag,
+processPrototype,sw:ProcessPrototype,,,,
+processPrototype,sw:ProcessPrototype,accessPrecedenceSpec,sw:AccessPrecedenceSpec,label,sw:Label,
+processPrototype,sw:ProcessPrototype,accessPrecedenceSpec,sw:AccessPrecedenceSpec,origin,sw:Runnable,
+processPrototype,sw:ProcessPrototype,accessPrecedenceSpec,sw:AccessPrecedenceSpec,target,sw:Runnable,
+processPrototype,sw:ProcessPrototype,activation,sw:Activation,,
+processPrototype,sw:ProcessPrototype,chainedPrototypes,sw:ChainedProcessPrototype,prototype,sw:ProcessPrototype,
+processPrototype,sw:ProcessPrototype,firstRunnable,sw:Runnable,,
+processPrototype,sw:ProcessPrototype,firstRunnable,sw:Runnable,activation,sw:Activation,
+processPrototype,sw:ProcessPrototype,firstRunnable,sw:Runnable,tags,common:Tag,
+processPrototype,sw:ProcessPrototype,lastRunnable,sw:Runnable,,
+processPrototype,sw:ProcessPrototype,lastRunnable,sw:Runnable,activation,sw:Activation,
+processPrototype,sw:ProcessPrototype,lastRunnable,sw:Runnable,tags,common:Tag,
+processPrototype,sw:ProcessPrototype,orderPrecedenceSpec,sw:OrderPrecedenceSpec,origin,sw:Runnable,
+processPrototype,sw:ProcessPrototype,orderPrecedenceSpec,sw:OrderPrecedenceSpec,target,sw:Runnable,
+processPrototype,sw:ProcessPrototype,runnableCalls,sw:TaskRunnableCall,runnable,sw:Runnable,
+processPrototypes,sw:ProcessPrototype,,,,
+processPrototypes,sw:ProcessPrototype,accessPrecedenceSpec,sw:AccessPrecedenceSpec,label,sw:Label,
+processPrototypes,sw:ProcessPrototype,accessPrecedenceSpec,sw:AccessPrecedenceSpec,origin,sw:Runnable,
+processPrototypes,sw:ProcessPrototype,accessPrecedenceSpec,sw:AccessPrecedenceSpec,target,sw:Runnable,
+processPrototypes,sw:ProcessPrototype,activation,sw:Activation,,
+processPrototypes,sw:ProcessPrototype,chainedPrototypes,sw:ChainedProcessPrototype,prototype,sw:ProcessPrototype,
+processPrototypes,sw:ProcessPrototype,firstRunnable,sw:Runnable,,
+processPrototypes,sw:ProcessPrototype,firstRunnable,sw:Runnable,activation,sw:Activation,
+processPrototypes,sw:ProcessPrototype,firstRunnable,sw:Runnable,tags,common:Tag,
+processPrototypes,sw:ProcessPrototype,lastRunnable,sw:Runnable,,
+processPrototypes,sw:ProcessPrototype,lastRunnable,sw:Runnable,activation,sw:Activation,
+processPrototypes,sw:ProcessPrototype,lastRunnable,sw:Runnable,tags,common:Tag,
+processPrototypes,sw:ProcessPrototype,orderPrecedenceSpec,sw:OrderPrecedenceSpec,origin,sw:Runnable,
+processPrototypes,sw:ProcessPrototype,orderPrecedenceSpec,sw:OrderPrecedenceSpec,target,sw:Runnable,
+processPrototypes,sw:ProcessPrototype,runnableCalls,sw:TaskRunnableCall,runnable,sw:Runnable,
+processScope,sw:AbstractProcess,,,,
+processScope,sw:AbstractProcess,tags,common:Tag,,
+processes,sw:Process,,,,
+processes,sw:Process,stimuli,stimuli:Stimulus,,
+processes,sw:Process,tags,common:Tag,,
+prototype,sw:ProcessPrototype,,,,
+prototype,sw:ProcessPrototype,accessPrecedenceSpec,sw:AccessPrecedenceSpec,label,sw:Label,
+prototype,sw:ProcessPrototype,accessPrecedenceSpec,sw:AccessPrecedenceSpec,origin,sw:Runnable,
+prototype,sw:ProcessPrototype,accessPrecedenceSpec,sw:AccessPrecedenceSpec,target,sw:Runnable,
+prototype,sw:ProcessPrototype,activation,sw:Activation,,
+prototype,sw:ProcessPrototype,chainedPrototypes,sw:ChainedProcessPrototype,prototype,sw:ProcessPrototype,
+prototype,sw:ProcessPrototype,firstRunnable,sw:Runnable,,
+prototype,sw:ProcessPrototype,firstRunnable,sw:Runnable,activation,sw:Activation,
+prototype,sw:ProcessPrototype,firstRunnable,sw:Runnable,tags,common:Tag,
+prototype,sw:ProcessPrototype,lastRunnable,sw:Runnable,,
+prototype,sw:ProcessPrototype,lastRunnable,sw:Runnable,activation,sw:Activation,
+prototype,sw:ProcessPrototype,lastRunnable,sw:Runnable,tags,common:Tag,
+prototype,sw:ProcessPrototype,orderPrecedenceSpec,sw:OrderPrecedenceSpec,origin,sw:Runnable,
+prototype,sw:ProcessPrototype,orderPrecedenceSpec,sw:OrderPrecedenceSpec,target,sw:Runnable,
+prototype,sw:ProcessPrototype,runnableCalls,sw:TaskRunnableCall,runnable,sw:Runnable,
+quartz,hw:Quartz,,,,
+quartz,hw:Quartz,components,hw:Component,,
+quartz,hw:Quartz,components,hw:Component,components,hw:Component,
+quartz,hw:Quartz,components,hw:Component,memories,hw:Memory,
+quartz,hw:Quartz,components,hw:Component,nestedComponents,hw:Component,
+quartz,hw:Quartz,components,hw:Component,networks,hw:Network,
+quartz,hw:Quartz,components,hw:Component,quartzes,hw:Quartz,
+quartz,hw:Quartz,memories,hw:Memory,,
+quartz,hw:Quartz,memories,hw:Memory,components,hw:Component,
+quartz,hw:Quartz,memories,hw:Memory,memories,hw:Memory,
+quartz,hw:Quartz,memories,hw:Memory,networks,hw:Network,
+quartz,hw:Quartz,memories,hw:Memory,quartzes,hw:Quartz,
+quartz,hw:Quartz,networks,hw:Network,,
+quartz,hw:Quartz,networks,hw:Network,components,hw:Component,
+quartz,hw:Quartz,networks,hw:Network,memories,hw:Memory,
+quartz,hw:Quartz,networks,hw:Network,networks,hw:Network,
+quartz,hw:Quartz,networks,hw:Network,quartzes,hw:Quartz,
+quartz,hw:Quartz,prescaler,hw:Prescaler,quartz,hw:Quartz,
+quartz,hw:Quartz,quartzes,hw:Quartz,,
+quartz,hw:Quartz,quartzes,hw:Quartz,components,hw:Component,
+quartz,hw:Quartz,quartzes,hw:Quartz,memories,hw:Memory,
+quartz,hw:Quartz,quartzes,hw:Quartz,networks,hw:Network,
+quartz,hw:Quartz,quartzes,hw:Quartz,quartzes,hw:Quartz,
+quartzes,hw:Quartz,,,,
+quartzes,hw:Quartz,components,hw:Component,,
+quartzes,hw:Quartz,components,hw:Component,components,hw:Component,
+quartzes,hw:Quartz,components,hw:Component,memories,hw:Memory,
+quartzes,hw:Quartz,components,hw:Component,nestedComponents,hw:Component,
+quartzes,hw:Quartz,components,hw:Component,networks,hw:Network,
+quartzes,hw:Quartz,components,hw:Component,quartzes,hw:Quartz,
+quartzes,hw:Quartz,memories,hw:Memory,,
+quartzes,hw:Quartz,memories,hw:Memory,components,hw:Component,
+quartzes,hw:Quartz,memories,hw:Memory,memories,hw:Memory,
+quartzes,hw:Quartz,memories,hw:Memory,networks,hw:Network,
+quartzes,hw:Quartz,memories,hw:Memory,quartzes,hw:Quartz,
+quartzes,hw:Quartz,networks,hw:Network,,
+quartzes,hw:Quartz,networks,hw:Network,components,hw:Component,
+quartzes,hw:Quartz,networks,hw:Network,memories,hw:Memory,
+quartzes,hw:Quartz,networks,hw:Network,networks,hw:Network,
+quartzes,hw:Quartz,networks,hw:Network,quartzes,hw:Quartz,
+quartzes,hw:Quartz,prescaler,hw:Prescaler,quartz,hw:Quartz,
+quartzes,hw:Quartz,quartzes,hw:Quartz,,
+quartzes,hw:Quartz,quartzes,hw:Quartz,components,hw:Component,
+quartzes,hw:Quartz,quartzes,hw:Quartz,memories,hw:Memory,
+quartzes,hw:Quartz,quartzes,hw:Quartz,networks,hw:Network,
+quartzes,hw:Quartz,quartzes,hw:Quartz,quartzes,hw:Quartz,
+ref,hw:HwAccessPath,source,hw:ComplexNode,,
+ref,hw:HwAccessPath,source,hw:ComplexNode,components,hw:Component,
+ref,hw:HwAccessPath,source,hw:ComplexNode,memories,hw:Memory,
+ref,hw:HwAccessPath,source,hw:ComplexNode,networks,hw:Network,
+ref,hw:HwAccessPath,source,hw:ComplexNode,quartzes,hw:Quartz,
+ref,hw:HwAccessPath,target,hw:ComplexNode,,
+ref,hw:HwAccessPath,target,hw:ComplexNode,components,hw:Component,
+ref,hw:HwAccessPath,target,hw:ComplexNode,memories,hw:Memory,
+ref,hw:HwAccessPath,target,hw:ComplexNode,networks,hw:Network,
+ref,hw:HwAccessPath,target,hw:ComplexNode,quartzes,hw:Quartz,
+ref,hw:LatencyAccessPath,source,hw:ComplexNode,,
+ref,hw:LatencyAccessPath,source,hw:ComplexNode,components,hw:Component,
+ref,hw:LatencyAccessPath,source,hw:ComplexNode,memories,hw:Memory,
+ref,hw:LatencyAccessPath,source,hw:ComplexNode,networks,hw:Network,
+ref,hw:LatencyAccessPath,source,hw:ComplexNode,quartzes,hw:Quartz,
+ref,hw:LatencyAccessPath,target,hw:ComplexNode,,
+ref,hw:LatencyAccessPath,target,hw:ComplexNode,components,hw:Component,
+ref,hw:LatencyAccessPath,target,hw:ComplexNode,memories,hw:Memory,
+ref,hw:LatencyAccessPath,target,hw:ComplexNode,networks,hw:Network,
+ref,hw:LatencyAccessPath,target,hw:ComplexNode,quartzes,hw:Quartz,
+resourceOwner,os:Scheduler,,,,
+response,events:Event,,,,
+resultRunnable,sw:Runnable,,,,
+resultRunnable,sw:Runnable,activation,sw:Activation,,
+resultRunnable,sw:Runnable,tags,common:Tag,,
+runEntities,sw:Runnable,,,,
+runEntities,sw:Runnable,activation,sw:Activation,,
+runEntities,sw:Runnable,tags,common:Tag,,
+runnable,sw:Runnable,,,,
+runnable,sw:Runnable,activation,sw:Activation,,
+runnable,sw:Runnable,tags,common:Tag,,
+runnableAllocation,mapping:RunnableAllocation,entity,sw:Runnable,,
+runnableAllocation,mapping:RunnableAllocation,entity,sw:Runnable,activation,sw:Activation,
+runnableAllocation,mapping:RunnableAllocation,entity,sw:Runnable,tags,common:Tag,
+runnableAllocation,mapping:RunnableAllocation,scheduler,os:Scheduler,,
+runnableCalls,sw:TaskRunnableCall,runnable,sw:Runnable,,
+runnableCalls,sw:TaskRunnableCall,runnable,sw:Runnable,activation,sw:Activation,
+runnableCalls,sw:TaskRunnableCall,runnable,sw:Runnable,tags,common:Tag,
+runnableGroups,constraints:ProcessRunnableGroup,entries,constraints:ProcessRunnableGroupEntry,processScope,sw:AbstractProcess,
+runnableGroups,constraints:ProcessRunnableGroup,entries,constraints:ProcessRunnableGroupEntry,runnable,sw:Runnable,
+runnableSequencingConstraints,constraints:RunnableSequencingConstraint,,,,
+runnables,sw:Runnable,,,,
+runnables,sw:Runnable,activation,sw:Activation,,
+runnables,sw:Runnable,tags,common:Tag,,
+scheduler,os:Scheduler,,,,
+schedulers,constraints:SchedulerEntityGroup,schedulers,os:Scheduler,,
+schedulers,os:Scheduler,,,,
+scope,constraints:EventChain,,,,
+scope,constraints:EventChain,response,events:Event,,
+scope,constraints:EventChain,stimulus,events:Event,,
+section,sw:Section,,,,
+section,sw:Section,labels,sw:Label,,
+section,sw:Section,labels,sw:Label,tags,common:Tag,
+section,sw:Section,runEntities,sw:Runnable,,
+section,sw:Section,runEntities,sw:Runnable,activation,sw:Activation,
+section,sw:Section,runEntities,sw:Runnable,tags,common:Tag,
+sections,sw:Section,,,,
+sections,sw:Section,labels,sw:Label,,
+sections,sw:Section,labels,sw:Label,tags,common:Tag,
+sections,sw:Section,runEntities,sw:Runnable,,
+sections,sw:Section,runEntities,sw:Runnable,activation,sw:Activation,
+sections,sw:Section,runEntities,sw:Runnable,tags,common:Tag,
+semaphore,os:Semaphore,,,,
+semaphores,os:Semaphore,,,,
+serverRunnable,sw:Runnable,,,,
+serverRunnable,sw:Runnable,activation,sw:Activation,,
+serverRunnable,sw:Runnable,tags,common:Tag,,
+setModeValueList,stimuli:ModeValueList,entries,stimuli:ModeValueListEntry,value,common:ModeLiteral,
+source,events:EntityEvent,,,,
+source,hw:ComplexNode,,,,
+source,hw:ComplexNode,components,hw:Component,,
+source,hw:ComplexNode,components,hw:Component,components,hw:Component,
+source,hw:ComplexNode,components,hw:Component,memories,hw:Memory,
+source,hw:ComplexNode,components,hw:Component,nestedComponents,hw:Component,
+source,hw:ComplexNode,components,hw:Component,networks,hw:Network,
+source,hw:ComplexNode,components,hw:Component,quartzes,hw:Quartz,
+source,hw:ComplexNode,memories,hw:Memory,,
+source,hw:ComplexNode,memories,hw:Memory,components,hw:Component,
+source,hw:ComplexNode,memories,hw:Memory,memories,hw:Memory,
+source,hw:ComplexNode,memories,hw:Memory,networks,hw:Network,
+source,hw:ComplexNode,memories,hw:Memory,quartzes,hw:Quartz,
+source,hw:ComplexNode,networks,hw:Network,,
+source,hw:ComplexNode,networks,hw:Network,components,hw:Component,
+source,hw:ComplexNode,networks,hw:Network,memories,hw:Memory,
+source,hw:ComplexNode,networks,hw:Network,networks,hw:Network,
+source,hw:ComplexNode,networks,hw:Network,quartzes,hw:Quartz,
+source,hw:ComplexNode,prescaler,hw:Prescaler,quartz,hw:Quartz,
+source,hw:ComplexNode,quartzes,hw:Quartz,,
+source,hw:ComplexNode,quartzes,hw:Quartz,components,hw:Component,
+source,hw:ComplexNode,quartzes,hw:Quartz,memories,hw:Memory,
+source,hw:ComplexNode,quartzes,hw:Quartz,networks,hw:Network,
+source,hw:ComplexNode,quartzes,hw:Quartz,quartzes,hw:Quartz,
+sourcePort,components:QualifiedPort,instance,components:ComponentInstance,,
+sourcePort,components:QualifiedPort,instance,components:ComponentInstance,tags,common:Tag,
+sourcePort,components:QualifiedPort,instance,components:ComponentInstance,type,components:Component,
+sourcePort,components:QualifiedPort,port,components:IPort,tags,common:Tag,
+stimuli,stimuli:Stimulus,,,,
+stimuliModel,stimuli:StimuliModel,clocks,stimuli:Clock,,
+stimuliModel,stimuli:StimuliModel,stimuli,stimuli:Stimulus,,
+stimulus,events:Event,,,,
+stimulus,stimuli:Stimulus,,,,
+swModel,sw:SWModel,activations,sw:Activation,,
+swModel,sw:SWModel,customEntities,sw:CustomEntity,,
+swModel,sw:SWModel,customEntities,sw:CustomEntity,tags,common:Tag,
+swModel,sw:SWModel,events,sw:OSEvent,,
+swModel,sw:SWModel,events,sw:OSEvent,tags,common:Tag,
+swModel,sw:SWModel,isrs,sw:ISR,,
+swModel,sw:SWModel,isrs,sw:ISR,stimuli,stimuli:Stimulus,
+swModel,sw:SWModel,labels,sw:Label,,
+swModel,sw:SWModel,labels,sw:Label,tags,common:Tag,
+swModel,sw:SWModel,modeLabels,sw:ModeLabel,,
+swModel,sw:SWModel,modeLabels,sw:ModeLabel,initialValue,common:ModeLiteral,
+swModel,sw:SWModel,modeLabels,sw:ModeLabel,mode,common:Mode,
+swModel,sw:SWModel,modeLabels,sw:ModeLabel,tags,common:Tag,
+swModel,sw:SWModel,modes,common:Mode,,
+swModel,sw:SWModel,modes,common:Mode,literals,common:ModeLiteral,
+swModel,sw:SWModel,processChains,sw:ProcessChain,,
+swModel,sw:SWModel,processChains,sw:ProcessChain,processes,sw:Process,
+swModel,sw:SWModel,processPrototypes,sw:ProcessPrototype,,
+swModel,sw:SWModel,processPrototypes,sw:ProcessPrototype,activation,sw:Activation,
+swModel,sw:SWModel,processPrototypes,sw:ProcessPrototype,firstRunnable,sw:Runnable,
+swModel,sw:SWModel,processPrototypes,sw:ProcessPrototype,lastRunnable,sw:Runnable,
+swModel,sw:SWModel,runnables,sw:Runnable,,
+swModel,sw:SWModel,runnables,sw:Runnable,activation,sw:Activation,
+swModel,sw:SWModel,runnables,sw:Runnable,tags,common:Tag,
+swModel,sw:SWModel,sections,sw:Section,,
+swModel,sw:SWModel,sections,sw:Section,labels,sw:Label,
+swModel,sw:SWModel,sections,sw:Section,runEntities,sw:Runnable,
+swModel,sw:SWModel,tags,common:Tag,,
+swModel,sw:SWModel,tasks,sw:Task,,
+swModel,sw:SWModel,tasks,sw:Task,stimuli,stimuli:Stimulus,
+swModel,sw:SWModel,tasks,sw:Task,tags,common:Tag,
+swModel,sw:SWModel,typeDefinitions,sw:TypeDefinition,,
+system,hw:System,,,,
+system,hw:System,components,hw:Component,,
+system,hw:System,components,hw:Component,components,hw:Component,
+system,hw:System,components,hw:Component,memories,hw:Memory,
+system,hw:System,components,hw:Component,nestedComponents,hw:Component,
+system,hw:System,components,hw:Component,networks,hw:Network,
+system,hw:System,components,hw:Component,quartzes,hw:Quartz,
+system,hw:System,ecus,hw:ECU,,
+system,hw:System,ecus,hw:ECU,components,hw:Component,
+system,hw:System,ecus,hw:ECU,memories,hw:Memory,
+system,hw:System,ecus,hw:ECU,microcontrollers,hw:Microcontroller,
+system,hw:System,ecus,hw:ECU,networks,hw:Network,
+system,hw:System,ecus,hw:ECU,quartzes,hw:Quartz,
+system,hw:System,memories,hw:Memory,,
+system,hw:System,memories,hw:Memory,components,hw:Component,
+system,hw:System,memories,hw:Memory,memories,hw:Memory,
+system,hw:System,memories,hw:Memory,networks,hw:Network,
+system,hw:System,memories,hw:Memory,quartzes,hw:Quartz,
+system,hw:System,networks,hw:Network,,
+system,hw:System,networks,hw:Network,components,hw:Component,
+system,hw:System,networks,hw:Network,memories,hw:Memory,
+system,hw:System,networks,hw:Network,networks,hw:Network,
+system,hw:System,networks,hw:Network,quartzes,hw:Quartz,
+system,hw:System,prescaler,hw:Prescaler,quartz,hw:Quartz,
+system,hw:System,quartzes,hw:Quartz,,
+system,hw:System,quartzes,hw:Quartz,components,hw:Component,
+system,hw:System,quartzes,hw:Quartz,memories,hw:Memory,
+system,hw:System,quartzes,hw:Quartz,networks,hw:Network,
+system,hw:System,quartzes,hw:Quartz,quartzes,hw:Quartz,
+systems,components:System,,,,
+systems,components:System,componentInstances,components:ComponentInstance,,
+systems,components:System,componentInstances,components:ComponentInstance,tags,common:Tag,
+systems,components:System,componentInstances,components:ComponentInstance,type,components:Component,
+systems,components:System,connectors,components:Connector,tags,common:Tag,
+systems,components:System,tags,common:Tag,,
+tag,common:Tag,,,,
+tags,common:Tag,,,,
+target,events:EntityEvent,,,,
+target,hw:ComplexNode,,,,
+target,hw:ComplexNode,components,hw:Component,,
+target,hw:ComplexNode,components,hw:Component,components,hw:Component,
+target,hw:ComplexNode,components,hw:Component,memories,hw:Memory,
+target,hw:ComplexNode,components,hw:Component,nestedComponents,hw:Component,
+target,hw:ComplexNode,components,hw:Component,networks,hw:Network,
+target,hw:ComplexNode,components,hw:Component,quartzes,hw:Quartz,
+target,hw:ComplexNode,memories,hw:Memory,,
+target,hw:ComplexNode,memories,hw:Memory,components,hw:Component,
+target,hw:ComplexNode,memories,hw:Memory,memories,hw:Memory,
+target,hw:ComplexNode,memories,hw:Memory,networks,hw:Network,
+target,hw:ComplexNode,memories,hw:Memory,quartzes,hw:Quartz,
+target,hw:ComplexNode,networks,hw:Network,,
+target,hw:ComplexNode,networks,hw:Network,components,hw:Component,
+target,hw:ComplexNode,networks,hw:Network,memories,hw:Memory,
+target,hw:ComplexNode,networks,hw:Network,networks,hw:Network,
+target,hw:ComplexNode,networks,hw:Network,quartzes,hw:Quartz,
+target,hw:ComplexNode,prescaler,hw:Prescaler,quartz,hw:Quartz,
+target,hw:ComplexNode,quartzes,hw:Quartz,,
+target,hw:ComplexNode,quartzes,hw:Quartz,components,hw:Component,
+target,hw:ComplexNode,quartzes,hw:Quartz,memories,hw:Memory,
+target,hw:ComplexNode,quartzes,hw:Quartz,networks,hw:Network,
+target,hw:ComplexNode,quartzes,hw:Quartz,quartzes,hw:Quartz,
+target,sw:Runnable,,,,
+target,sw:Runnable,activation,sw:Activation,,
+target,sw:Runnable,tags,common:Tag,,
+targetPort,components:QualifiedPort,instance,components:ComponentInstance,,
+targetPort,components:QualifiedPort,instance,components:ComponentInstance,tags,common:Tag,
+targetPort,components:QualifiedPort,instance,components:ComponentInstance,type,components:Component,
+targetPort,components:QualifiedPort,port,components:IPort,tags,common:Tag,
+taskSchedulers,os:TaskScheduler,,,,
+tasks,sw:AbstractProcess,,,,
+tasks,sw:AbstractProcess,tags,common:Tag,,
+tasks,sw:Task,,,,
+tasks,sw:Task,stimuli,stimuli:Stimulus,,
+tasks,sw:Task,tags,common:Tag,,
+timingConstraints,constraints:TimingConstraint,,,,
+type,components:Component,,,,
+type,components:Component,labels,sw:Label,,
+type,components:Component,labels,sw:Label,tags,common:Tag,
+type,components:Component,osEvents,sw:OSEvent,,
+type,components:Component,osEvents,sw:OSEvent,tags,common:Tag,
+type,components:Component,ports,components:IPort,tags,common:Tag,
+type,components:Component,runnables,sw:Runnable,,
+type,components:Component,runnables,sw:Runnable,activation,sw:Activation,
+type,components:Component,runnables,sw:Runnable,tags,common:Tag,
+type,components:Component,semaphores,os:Semaphore,,
+type,components:Component,tags,common:Tag,,
+type,components:Component,tasks,sw:AbstractProcess,,
+type,components:Component,tasks,sw:AbstractProcess,tags,common:Tag,
+typeDef,sw:TypeDefinition,,,,
+typeDefinitions,sw:TypeDefinition,,,,
+value,common:ModeLiteral,,,,
+valueProvider,common:ModeValueProvider,initialValue,common:ModeLiteral,,
+valueProvider,common:ModeValueProvider,mode,common:Mode,,
+valueProvider,common:ModeValueProvider,mode,common:Mode,literals,common:ModeLiteral,
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.common/schema/org.eclipse.app4mc.amalthea.converters.exsd b/plugins/org.eclipse.app4mc.amalthea.converters.common/schema/org.eclipse.app4mc.amalthea.converters.exsd
new file mode 100644
index 0000000..44414ea
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.common/schema/org.eclipse.app4mc.amalthea.converters.exsd
@@ -0,0 +1,195 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.app4mc.amalthea.converters.common" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.app4mc.amalthea.converters.common" id="org.eclipse.app4mc.amalthea.model.converters" name="ModelConverter"/>
+ </appinfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <choice minOccurs="1" maxOccurs="unbounded">
+ <element ref="converter" minOccurs="1" maxOccurs="unbounded"/>
+ </choice>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="converter">
+ <annotation>
+ <documentation>
+ A.Converter
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="description" minOccurs="0" maxOccurs="1"/>
+ <element ref="dependent-on-converter" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string" use="required">
+ <annotation>
+ <documentation>
+ a translatable name that will be used in the UI for this converter type
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="converter-class" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.app4mc.amalthea.converters.common.base.IConverter"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="input-model-version" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="itea.103">
+ </enumeration>
+ <enumeration value="itea.110">
+ </enumeration>
+ <enumeration value="itea.111">
+ </enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name="output-model-version" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="itea.110">
+ </enumeration>
+ <enumeration value="itea.111">
+ </enumeration>
+ <enumeration value="0.7.0">
+ </enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name="enabled" type="boolean" use="default" value="true">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="description" type="string">
+ <annotation>
+ <appinfo>
+ <meta.element translatable="true"/>
+ </appinfo>
+ <documentation>
+ An optional subelement whose body should contain text providing a short description
+ </documentation>
+ </annotation>
+ </element>
+
+ <element name="dependent-on-converter">
+ <complexType>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="identifier" basedOn="org.eclipse.app4mc.amalthea.model.converters/converter/@id"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.common/schema/org.eclipse.app4mc.amalthea.model.converters.cachebuilders.exsd b/plugins/org.eclipse.app4mc.amalthea.converters.common/schema/org.eclipse.app4mc.amalthea.model.converters.cachebuilders.exsd
new file mode 100644
index 0000000..a5ee322
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.common/schema/org.eclipse.app4mc.amalthea.model.converters.cachebuilders.exsd
@@ -0,0 +1,143 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.itea2.amalthea.model.converters.common" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.itea2.amalthea.model.converters.common" id="org.eclipse.app4mc.amalthea.model.converters.cachebuilders" name="ModelCache"/>
+ </appinfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <choice>
+ <element ref="CacheBuilder" minOccurs="0" maxOccurs="unbounded"/>
+ </choice>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="CacheBuilder">
+ <complexType>
+ <attribute name="ID" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.app4mc.amalthea.converters.common.base.ICache"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="enabled" type="boolean" use="default" value="true">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="input-model-version">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="itea.103">
+ </enumeration>
+ <enumeration value="itea.110">
+ </enumeration>
+ <enumeration value="itea.111">
+ </enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.common/schema/org.eclipse.app4mc.amalthea.model.converters.formatter.exsd b/plugins/org.eclipse.app4mc.amalthea.converters.common/schema/org.eclipse.app4mc.amalthea.model.converters.formatter.exsd
new file mode 100644
index 0000000..f8f0d6d
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.common/schema/org.eclipse.app4mc.amalthea.model.converters.formatter.exsd
@@ -0,0 +1,102 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.app4mc.amalthea.converters.common" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.app4mc.amalthea.converters.common" id="org.eclipse.app4mc.amalthea.model.converters.formatter" name="model.formatter"/>
+ </appinfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <choice minOccurs="1" maxOccurs="unbounded">
+ <element ref="formatter"/>
+ </choice>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="formatter">
+ <complexType>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.app4mc.amalthea.converters.common.base.IFormatter"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.common/schema/org.eclipse.app4mc.amalthea.model.converters.postprocessor.exsd b/plugins/org.eclipse.app4mc.amalthea.converters.common/schema/org.eclipse.app4mc.amalthea.model.converters.postprocessor.exsd
new file mode 100644
index 0000000..6a808dd
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.common/schema/org.eclipse.app4mc.amalthea.model.converters.postprocessor.exsd
@@ -0,0 +1,162 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.app4mc.amalthea.converters.common" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.app4mc.amalthea.converters.common" id="org.eclipse.app4mc.amalthea.model.converters.postprocessor" name="converters.postprocessor"/>
+ </appinfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <choice minOccurs="1" maxOccurs="unbounded">
+ <element ref="converters.postprocessor"/>
+ </choice>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="converters.postprocessor">
+ <complexType>
+ <choice minOccurs="1" maxOccurs="unbounded">
+ <element ref="input-model-version"/>
+ <element ref="output-model-version"/>
+ </choice>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.app4mc.amalthea.converters.common.base.IPostProcessor"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="input-model-version">
+ <complexType>
+ <attribute name="version" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="itea.103">
+ </enumeration>
+ <enumeration value="itea.110">
+ </enumeration>
+ <enumeration value="itea.111">
+ </enumeration>
+ <enumeration value="0.7.0">
+ </enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="output-model-version">
+ <complexType>
+ <attribute name="version" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="itea.110">
+ </enumeration>
+ <enumeration value="itea.111">
+ </enumeration>
+ <enumeration value="0.7.0">
+ </enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.common/schema/org.eclipse.app4mc.amalthea.model.converters.preprocessor.exsd b/plugins/org.eclipse.app4mc.amalthea.converters.common/schema/org.eclipse.app4mc.amalthea.model.converters.preprocessor.exsd
new file mode 100644
index 0000000..b4fe6f2
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.common/schema/org.eclipse.app4mc.amalthea.model.converters.preprocessor.exsd
@@ -0,0 +1,139 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.app4mc.amalthea.converters.common" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.app4mc.amalthea.converters.common" id="org.eclipse.app4mc.amalthea.model.preConverter" name="model.preConverter"/>
+ </appinfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <choice minOccurs="1" maxOccurs="unbounded">
+ <element ref="converters.preprocessor"/>
+ </choice>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="converters.preprocessor">
+ <complexType>
+ <choice minOccurs="1" maxOccurs="unbounded">
+ <element ref="input-model-version"/>
+ </choice>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.app4mc.amalthea.converters.common.base.IPreProcessor"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="input-model-version">
+ <complexType>
+ <attribute name="version" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="itea.103">
+ </enumeration>
+ <enumeration value="itea.110">
+ </enumeration>
+ <enumeration value="itea.111">
+ </enumeration>
+ <enumeration value="0.7.0">
+ </enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/Activator.java b/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/Activator.java
new file mode 100644
index 0000000..a85ada7
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/Activator.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters.common;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+ private static BundleContext context;
+
+ static BundleContext getContext() {
+ return context;
+ }
+
+ /**
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(final BundleContext bundleContext) throws Exception {
+ Activator.context = bundleContext;
+ }
+
+ /**
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(final BundleContext bundleContext) throws Exception {
+ Activator.context = null;
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/base/ICache.java b/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/base/ICache.java
new file mode 100644
index 0000000..dcc3dbd
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/base/ICache.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters.common.base;
+
+import java.io.File;
+import java.util.Map;
+
+import org.jdom2.Document;
+
+public interface ICache {
+
+
+ public void buildCache(final Map<File, Document> fileName_documentsMap);
+
+ public Map<File, Map<String, Object>> getCacheMap();
+
+ public void clearCacheMap();
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/base/IConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/base/IConverter.java
new file mode 100644
index 0000000..0df1585
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/base/IConverter.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters.common.base;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.jdom2.Document;
+
+public interface IConverter {
+ public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap, List<ICache> caches)
+ throws Exception;
+
+ default public Document getDocument(final Map<File, Document> fileName_documentsMap, final String fileName,
+ final String outputDirectory) {
+
+ final Set<File> files = fileName_documentsMap.keySet();
+
+ for (final File file : files) {
+ if (file.equals(fileName)) {
+ return fileName_documentsMap.get(file);
+ }
+ }
+ return null;
+ }
+
+ default File getFile(final Map<File, Document> fileName_documentsMap, final String fileName) {
+
+ final Set<File> files = fileName_documentsMap.keySet();
+
+ for (final File file : files) {
+ if (file.getName().equals(fileName)) {
+ return file;
+ }
+ }
+ return null;
+ }
+
+
+ @SuppressWarnings("unchecked")
+ default <T extends ICache> List<T> getFilteredCaches(final List<ICache> caches, final Class<T>... filterTypes) {
+
+ final List<T> filteredCaches = new ArrayList<T>();
+
+ for (final ICache iCache : caches) {
+
+ for (final Class<T> filterType : filterTypes) {
+ if (iCache.getClass().isAssignableFrom(filterType)) {
+ filteredCaches.add((T) iCache);
+ }
+
+ }
+ }
+
+ return filteredCaches;
+ }
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/base/IFormatter.java b/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/base/IFormatter.java
new file mode 100644
index 0000000..4ef008d
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/base/IFormatter.java
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters.common.base;
+
+import java.io.File;
+import java.util.Collection;
+
+public interface IFormatter {
+
+ public void format(Collection<File> files);
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/base/IPostProcessor.java b/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/base/IPostProcessor.java
new file mode 100644
index 0000000..21a9b25
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/base/IPostProcessor.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters.common.base;
+
+import java.io.File;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.utils.AbstractHelper;
+import org.jdom2.Document;
+
+public interface IPostProcessor {
+
+ public void process(final Map<File, Document> fileName_documentsMap, final AbstractHelper helper) throws Exception;
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/base/IPreProcessor.java b/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/base/IPreProcessor.java
new file mode 100644
index 0000000..80c8141
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/base/IPreProcessor.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters.common.base;
+
+import java.io.File;
+import java.util.Map;
+
+import org.jdom2.Document;
+
+public interface IPreProcessor {
+
+ public void process(final File targetFile, final Map<File, Document> fileName_documentsMap) throws Exception;
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/postprocessor/CustomPropsPostProcessor.java b/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/postprocessor/CustomPropsPostProcessor.java
new file mode 100644
index 0000000..1d80aa0
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/postprocessor/CustomPropsPostProcessor.java
@@ -0,0 +1,847 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters.common.postprocessor;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.AbstractMap;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.StringTokenizer;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.IPostProcessor;
+import org.eclipse.app4mc.amalthea.converters.common.utils.AbstractHelper;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+/**
+ * This PostProcessor is used to migrate CustomProperties which are having value as ReferenceObject
+ *
+ * @author MEZ2RNG
+ *
+ */
+public class CustomPropsPostProcessor implements IPostProcessor {
+
+ public CustomPropsPostProcessor() {
+ }
+
+ private AbstractHelper helper;
+
+ @Override
+ public void process(final Map<File, Document> fileName_documentsMap, final AbstractHelper helper) throws Exception {
+
+ this.helper=helper;
+
+ /*-Map holding File name as a Key and value as a Map:
+ * containing key as : uriFragment or xmi ID of AMALTHEA element
+ * Value as : List of CustomProperties Value object which is of type common:ReferenceObject
+ * */
+ final Map<File, Map<String, List<Element>>> map_values_to_be_investigated = new HashMap<File, Map<String, List<Element>>>();
+
+ boolean areXMIIDsUsed = false;
+
+ Map<File, Map<String, List<Element>>> idElementsCacheMap = new HashMap<File, Map<String, List<Element>>>();
+
+
+ for (final File targetFile : fileName_documentsMap.keySet()) {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+ /*-
+ * Contains key as : uriFragment or xmi ID of AMALTHEA element
+ * Value : List of CustomProperties Value object's having
+ */
+ final Map<String, List<Element>> refCustomProps_ObjectsMap = new HashMap<String, List<Element>>();
+
+ /*-
+ * CustomProperties with Reference to ReferableBaseObject can exists in the following way:
+ *
+ *Case 1: Referring elements inside the same model
+ * <customProperties xmi:id="_p-7r4OnfEeW9t73E3V9yAw" key="key">
+ * <value xsi:type="common:ReferenceObject" xmi:id="_qsGT4OnfEeW9t73E3V9yAw" value="_oi1hUOnfEeW9t73E3V9yAw"/>
+ * </customProperties>
+ *
+ *Case 2: Referring elements across the model files
+ *
+ *<customProperties xmi:id="__0JRIOqOEeW9t73E3V9yAw">
+ * <value xsi:type="common:ReferenceObject" xmi:id="_AmqTMOqPEeW9t73E3V9yAw">
+ * <value href="default.amxmi#_UZWXYOqLEeW9t73E3V9yAw"/>
+ * </value>
+ * </customProperties>
+ *
+ *Case 3: List of Ref objects
+ *
+ *<customProperties xmi:id="_rnhEIBaeEeasLIggkXJ5XQ" key="group_labels">
+ * <value xsi:type="common:ListObject" xmi:id="_sJ_fEBaeEeasLIggkXJ5XQ">
+ * <values xsi:type="common:ReferenceObject" xmi:id="_t-0SsBaeEeasLIggkXJ5XQ" value="_hk2sYBaeEeasLIggkXJ5XQ"/>
+ * <values xsi:type="common:ReferenceObject" xmi:id="_vzxCIBaeEeasLIggkXJ5XQ" value="_k5wysBaeEeasLIggkXJ5XQ"/>
+ * <values xsi:type="common:ReferenceObject" xmi:id="_yQN2cBaeEeasLIggkXJ5XQ" value="_lDRUABaeEeasLIggkXJ5XQ"/>
+ * <values xsi:type="common:ReferenceObject" xmi:id="_9YBRUBaeEeasLIggkXJ5XQ">
+ * <value href="slave_default.amxmi#_hk2sYBaeEeasLIggkXJ5XQ"/>
+ * </values>
+ * </value>
+ * </customProperties>
+ */
+
+
+ final StringBuffer xpathBuffer = new StringBuffer();
+
+ xpathBuffer.append(".//customProperties/value[@xsi:type=\"common:ReferenceObject\"]");
+ xpathBuffer.append("|");
+ xpathBuffer.append(".//customProperties/value/values[@xsi:type=\"common:ReferenceObject\"]");
+
+
+
+ final List<Element> value_custProps_refObjects = helper.getXpathResult(rootElement,
+ xpathBuffer.toString(), Element.class,
+ helper.getGenericNS("xsi"));
+
+
+ for (final Element element : value_custProps_refObjects) {
+
+ String attributeValue = element.getAttributeValue("value");
+
+ if (attributeValue == null) {
+ /*-
+ * Case where elements across the model files are referred:
+ * <value xsi:type="common:ReferenceObject" xmi:id="_AmqTMOqPEeW9t73E3V9yAw">
+ * <value href="default.amxmi#_UZWXYOqLEeW9t73E3V9yAw"/>
+ * </value>
+ */
+ attributeValue = element.getChild("value") != null
+ ? element.getChild("value").getAttributeValue("href") : null;
+ }
+
+ if (attributeValue != null) {
+
+ if (!refCustomProps_ObjectsMap.containsKey(attributeValue)) {
+ refCustomProps_ObjectsMap.put(attributeValue, new ArrayList<Element>());
+ }
+
+ refCustomProps_ObjectsMap.get(attributeValue).add(element);
+
+ if ((areXMIIDsUsed == false) && !isURIFragment(attributeValue)) {
+ areXMIIDsUsed = true;
+ }
+ }
+
+ }
+
+ map_values_to_be_investigated.put(targetFile, refCustomProps_ObjectsMap);
+
+ }
+
+ /*- In the case where XMI ID's are used, fetching the elements through Xpath will be of performance hit.
+ * Instead of Xpath, memory map is built for all the model elements with key as XMI ID
+ */
+ if (areXMIIDsUsed) {
+ idElementsCacheMap = buildCache(fileName_documentsMap, helper);
+ }
+
+ /*
+ * verifying if the referred elements are implementing ReferableBaseObject Interface. In the case elements are
+ * not implementing ReferableBaseObject, then such CustomProperty value elements should be removed from the
+ * model
+ */
+
+ final HashMap<String, File> refFileInfoMap = new HashMap<String, File>();
+
+ final Map<String, List<XSDElement>> tags_refbaseObjectsMap = populateInfoOfAmaltheModelTags_111_Content();
+
+ for (final File modelFile : map_values_to_be_investigated.keySet()) {
+
+ final Map<String, List<Element>> map = map_values_to_be_investigated.get(modelFile);
+
+ if (map != null) {
+
+ for (final String refString : map.keySet()) {
+
+ /*- refString can be either an ID or the URIFragment */
+
+ final List<Element> values = map.get(refString);
+
+ boolean isRefBaseObjectType = true;
+
+ if (!isURIFragment(refString)) {
+
+ /*- case of refering elements across models*/
+
+ final int indexOfHash = refString.indexOf("#");
+
+ if (indexOfHash != -1) {
+
+ final String fileName = refString.substring(0, indexOfHash);
+
+ final String id = refString.substring(indexOfHash + 1);
+
+ final File refFile = getRefFile(modelFile, refFileInfoMap, fileName);
+
+
+ /*- check is performed here to verify if Element associated to id is implementing ReferableBaseObject*/
+
+ Entry<Boolean, ElementRef> result=isElementOfRefBaseObject(refFile, id, idElementsCacheMap,
+ tags_refbaseObjectsMap);
+
+ isRefBaseObjectType = result.getKey();
+
+ ElementRef elementRef=result.getValue();
+
+ /*- in case where elements are referred from other model, corresponding types of it should be updated at the place where they are referred*/
+
+ updateTypeForAllElements(values,elementRef!=null? elementRef.getType():null);
+
+
+ }
+ else {
+ /*- case of refering elements within the same model*/
+
+ Entry<Boolean, ElementRef> result= isElementOfRefBaseObject(modelFile, refString, idElementsCacheMap,
+ tags_refbaseObjectsMap);
+ isRefBaseObjectType = result.getKey();
+
+ }
+
+ }
+ else {
+ /*- This is the case where legacy URI fragments are specified example: //@stimuliModel/@stimuli.0*/
+
+
+ final ElementRef elementRef = elementRefBuilder(refString);
+
+
+ isRefBaseObjectType = isElementOfRefBaseObject(elementRef, tags_refbaseObjectsMap);
+ }
+
+ if (!isRefBaseObjectType) {
+
+ detachElements(values);
+
+ }
+
+
+ }
+ }
+
+ }
+
+ }
+
+ /**
+ * This method is used to check if the supplied tag (through ElementRef) is extending RefBaseObject
+ *
+ * @param elementRef
+ * @param tags_refbaseObjectsMap
+ * @return
+ */
+
+ private boolean isElementOfRefBaseObject(final ElementRef elementRef,
+ final Map<String, List<XSDElement>> tags_refbaseObjectsMap) {
+
+ final List<XSDElement> list = tags_refbaseObjectsMap.get(elementRef.getName());
+
+ if (list != null) {
+
+ final ElementRef parentRef = elementRef.getParentRef();
+
+ final String parentName = parentRef.getName();
+
+ final String parentType = parentRef.getType();
+
+ boolean isParentSame = false;
+
+ mainLoop: for (final XSDElement elementRef2 : list) {
+
+ final Set<XSDElement> parentRefs = elementRef2.getParentRefs();
+
+ for (final XSDElement xsdElementRef : parentRefs) {
+
+ if (parentName != null) {
+ if (xsdElementRef.getName().equals(parentName)) {
+
+ /*- setting the type from the XSD element .. in a case where ElementRef Type is not available from XMI */
+ if(elementRef.getType()==null){
+ elementRef.setType(elementRef2.getType());
+ }
+
+ isParentSame = true;
+ break mainLoop;
+ }
+ }
+ else if (parentType != null) {
+ if (xsdElementRef.getType().equals(parentType)) {
+ isParentSame = true;
+ break mainLoop;
+ }
+ }
+ }
+
+ }
+
+ return isParentSame;
+ }
+
+ return false;
+ }
+
+
+ /**
+ * This method is used to check if the element having a specific XMI ID is belonging to Java class extending
+ * ReferableBaseObject
+ *
+ * @param refFile
+ * File to which XML element is belonging to
+ * @param id
+ * XMI ID of the XML element
+ *
+ * @param idElementsCacheMap
+ * map containing cache of XML elements
+ * @param tags_refbaseObjectsMap
+ * map containing the metadata information of Ecore (1.1.1)
+ * @return
+ */
+ private Entry<Boolean, ElementRef> isElementOfRefBaseObject(final File refFile, final String id,
+ final Map<File, Map<String, List<Element>>> idElementsCacheMap,
+ final Map<String, List<XSDElement>> tags_refbaseObjectsMap) {
+
+ final Map<String, List<Element>> map = idElementsCacheMap.get(refFile);
+
+ if (map != null) {
+
+ final List<Element> elements = map.get(id);
+
+ if (elements != null) {
+
+ for (final Element element2 : elements) {
+
+ /*- ElementRef is a temporary class used to store the information of XML element */
+ final ElementRef elementRef = elementRefBuilder(element2);
+
+ final boolean result = isElementOfRefBaseObject(elementRef, tags_refbaseObjectsMap);
+
+ if (result) {
+ return new AbstractMap.SimpleEntry<Boolean, ElementRef>(true,elementRef);
+ }
+
+ }
+
+ }
+ }
+ return new AbstractMap.SimpleEntry<Boolean, ElementRef>(false,null);
+ }
+
+ /**
+ * This method is used to remove the element from the XML Document
+ *
+ * @param values
+ *
+ * Note: List<Element> consists of either<br>
+ * 1. value element which is the first sub-element of CustomProperties<br>
+ * 2. values element which is the second sub-element of CustomProperties (incase of List of RefObjects) <br>
+ *
+ *
+ * Case 1:
+ *
+ * <customProperties xmi:id="_A0YGsBhQEea3AoorCOXNXA" key="custKey_abstractProcess">
+ <value xsi:type="common:ReferenceObject" xmi:id="_A0YGsRhQEea3AoorCOXNXA"> -------------------------> This element is part of List
+ <value href="default1.amxmi#_nDgKUNotEeWXsaNW2kxe8A" />
+ </value>
+ </customProperties>
+ *
+ * Case 2:
+ *
+ * <customProperties xmi:id="_NaacUBhfEea3AoorCOXNXA" key="custKey_group_refobjs">
+ <value xsi:type="common:ListObject" xmi:id="_8b8TkBhfEea3AoorCOXNXA">
+ <values xsi:type="common:ReferenceObject" xmi:id="__kW2ABhfEea3AoorCOXNXA"> -------------------------> This element is part of List
+ <value href="default1.amxmi#_nDgKUNotEeWXsaNW2kxe8A" />
+ </values>
+ <values xsi:type="common:ReferenceObject" xmi:id="__0BpsBhfEea3AoorCOXNXA">
+ <value href="default1.amxmi#_6PbocBhOEea3AoorCOXNXA" />
+ </values>
+ </value>
+ </customProperties>
+ *
+ *
+ *
+ */
+ private void detachElements(final List<Element> values) {
+ for (final Element element : values) {
+
+ String tag_name = element.getName();
+
+ String key="";
+
+ if(tag_name.equals("value")){
+ key = element.getParentElement() != null ? element.getParentElement().getAttributeValue("key")
+ : null;
+
+ }else if(tag_name.equals("values")){
+ key = element.getParentElement() != null ? element.getParentElement().getParentElement() !=null ? element.getParentElement().getParentElement().getAttributeValue("key"):null
+ : null;
+ }
+
+
+ if (key != null) {
+
+ // TODO: log info/warning message using logger
+ System.out.println("Value of CustomProperty : " + key
+ + " is removed (as it is not inheriting RefereableBaseObject)");
+ }
+
+
+ element.detach();
+ }
+ }
+
+ /**
+ * This method is used to remove the element from the XML Document
+ *
+ * @param values List<Element>
+ * @param type String (e.g: hw:Memory)
+ *
+ * Note: List<Element> consists of either<br>
+ * 1. value element which is the first sub-element of CustomProperties<br>
+ * 2. values element which is the second sub-element of CustomProperties (incase of List of RefObjects) <br>
+ *
+ *
+ * Case 1:
+ *
+ * <customProperties xmi:id="_A0YGsBhQEea3AoorCOXNXA" key="custKey_abstractProcess">
+ <value xsi:type="common:ReferenceObject" xmi:id="_A0YGsRhQEea3AoorCOXNXA"> -------------------------> This element is part of List
+ <value href="default1.amxmi#_nDgKUNotEeWXsaNW2kxe8A" />
+ </value>
+ </customProperties>
+ *
+ * Case 2:
+ *
+ * <customProperties xmi:id="_NaacUBhfEea3AoorCOXNXA" key="custKey_group_refobjs">
+ <value xsi:type="common:ListObject" xmi:id="_8b8TkBhfEea3AoorCOXNXA">
+ <values xsi:type="common:ReferenceObject" xmi:id="__kW2ABhfEea3AoorCOXNXA"> -------------------------> This element is part of List
+ <value href="default1.amxmi#_nDgKUNotEeWXsaNW2kxe8A" />
+ </values>
+ <values xsi:type="common:ReferenceObject" xmi:id="__0BpsBhfEea3AoorCOXNXA">
+ <value href="default1.amxmi#_6PbocBhOEea3AoorCOXNXA" />
+ </values>
+ </value>
+ </customProperties>
+ *
+ *
+ *
+ */
+
+ private void updateTypeForAllElements(final List<Element> values, String type) {
+
+ if(type==null){
+ return;
+ }
+
+ for (final Element element : values) {
+
+ Element child = element.getChild("value");
+
+ if(child !=null){
+
+ String attributeValue = child.getAttributeValue("type",this.helper.getGenericNS("xsi"));
+
+ if(attributeValue ==null && type !=null){
+
+ child.setAttribute("type",type,this.helper.getGenericNS("xsi"));
+ }
+
+ }
+ }
+ }
+
+ /**
+ * This method is used to parse the text content (which has meta model info of elements extending
+ * ReferableBaseObjects and its parents)
+ *
+ * @return
+ */
+ private Map<String, List<XSDElement>> populateInfoOfAmaltheModelTags_111_Content() {
+
+ final Map<String, List<XSDElement>> map = new HashMap<String, List<XSDElement>>();
+
+ URL url;
+ try {
+
+ /*-
+ * Text file contains the content in the following format (which replicates the containment relationship):
+ *
+ * swModel,sw:SWModel,labels,sw:Label,,
+ *
+ * Elements on the left side are the parents
+ */
+
+ InputStream inputStream = null;
+
+ if (System.getProperty("junit:tags_Elements_ReferableBaseObject") != null) {
+
+ inputStream = new FileInputStream(
+ new File(System.getProperty("junit:tags_Elements_ReferableBaseObject")));
+ }
+ else {
+ url = new URL(
+ "platform:/plugin/org.eclipse.app4mc.amalthea.converters.common/resources/tags_Elements_ReferableBaseObject.txt");
+ inputStream = url.openConnection().getInputStream();
+ }
+ final BufferedReader in = new BufferedReader(new InputStreamReader(inputStream));
+ String inputLine;
+
+ while ((inputLine = in.readLine()) != null) {
+
+ final StringTokenizer tokenizer = new StringTokenizer(inputLine, ",");
+
+ XSDElement parentElement = null;
+
+ XSDElement processingElement = null;
+
+ boolean isTagToProcess = true;
+ boolean isTagTypeToProcess = false;
+
+ while (tokenizer.hasMoreTokens()) {
+
+ final String nextToken = tokenizer.nextToken();
+
+ if (isTagToProcess) {
+ processingElement = new XSDElement();
+ processingElement.setName(nextToken);
+
+
+ isTagToProcess = false;
+ isTagTypeToProcess = true;
+ }
+ else if (isTagTypeToProcess && processingElement != null) {
+
+ processingElement.setType(nextToken);
+
+
+ if (!map.containsKey(processingElement.getName())) {
+
+ map.put(processingElement.getName(), new ArrayList<XSDElement>());
+ map.get(processingElement.getName()).add(processingElement);
+
+ }
+ else {
+
+ final List<XSDElement> existingElements = map.get(processingElement.getName());
+
+ boolean isElementWithSamePropsExisting=false;
+
+ for (final XSDElement xsdElementRef : existingElements) {
+
+ if ((processingElement.getName().equals(xsdElementRef.getName()))
+ && (processingElement.getType().equals(xsdElementRef.getType()))) {
+
+ processingElement = xsdElementRef;
+
+ isElementWithSamePropsExisting=true;
+ break;
+
+ }
+
+ }
+
+ if(!isElementWithSamePropsExisting){
+ map.get(processingElement.getName()).add(processingElement);
+ }
+ }
+
+ if (parentElement != null) {
+ processingElement.getParentRefs().add(parentElement);
+ }
+
+ parentElement = processingElement;
+
+ isTagTypeToProcess = false;
+ isTagToProcess = true;
+ }
+
+ }
+
+ }
+
+ in.close();
+
+ }
+ catch (final IOException e) {
+ e.printStackTrace();
+ }
+
+ return map;
+ }
+
+
+ /**
+ * This method is used to take jdom2 Element node and return ElementRef object and its corresponding parent
+ * ElementRef's <br>
+ * Input string example: <StimuliModel><stimuli></stimuli></StimuliModel> <br>
+ * Result of this input : ElementRef (with name : stimuli) --> Parent ElementRef (with name : StimuliModel)
+ *
+ * @param node
+ * @return
+ */
+ private ElementRef elementRefBuilder(final Element node) {
+
+ final String tagName = node.getName();
+
+ final ElementRef elementRef = new ElementRef();
+
+ elementRef.setName(tagName);
+
+ /*- element type from the XMI is fetched */
+ elementRef.setType(node.getAttributeValue("type", this.helper.getGenericNS("xsi")));
+
+ final ElementRef parentElementRef = addParentElementRef(node, elementRef);
+
+ if (parentElementRef != null) {
+ elementRef.setParentRef(parentElementRef);
+ }
+ return elementRef;
+
+ }
+
+ /**
+ * This method is used to create Parent ElementRef object for the supplied JDom node
+ *
+ * @param node
+ * JDOM node element
+ * @param elementRef
+ * ElementRef object for which parent should be created
+ * @return
+ */
+
+ private static ElementRef addParentElementRef(final Element node, final ElementRef elementRef) {
+
+ final Element parentElement = node.getParentElement();
+
+ if (parentElement != null) {
+
+ final String parentTagName = parentElement.getName()
+ + (parentElement.getNamespacePrefix() != null ? parentElement.getNamespacePrefix() : "");
+
+ final ElementRef parentElementRef = new ElementRef();
+
+ if (parentTagName.contains(":")) {
+ parentElementRef.setType(parentTagName);
+ }
+ else {
+ parentElementRef.setName(parentTagName);
+ }
+
+
+ return parentElementRef;
+ }
+
+ return null;
+ }
+
+
+ /**
+ * This method takes legacy URI fragment as an input and builds ElementRef object and its corresponding Parent
+ * ElementRef's
+ *
+ * Input string example: //@stimuliModel/@stimuli.0
+ *
+ * Result of this input : ElementRef (with name : stimuli) --> Parent ElementRef (with name : StimuliModel)
+ *
+ * @param refString
+ * @return
+ */
+ private static ElementRef elementRefBuilder(final String refString) {
+
+ ElementRef elementRef = null;
+
+ ElementRef parentElementRef = null;
+
+
+ final char[] charArray = refString.toCharArray();
+
+
+ boolean isBuildingElement = false;
+
+ final StringBuffer nameBuffer = new StringBuffer();
+
+ for (int i = 0; i < charArray.length; i++) {
+
+ if (charArray[i] == '/') {
+
+ if (nameBuffer.length() > 0 && elementRef != null) {
+
+ elementRef.setName(nameBuffer.toString());
+
+ if (parentElementRef != null) {
+ elementRef.setParentRef(parentElementRef);
+ }
+
+ parentElementRef = elementRef;
+
+ nameBuffer.setLength(0);
+ }
+
+ isBuildingElement = false;
+
+ // lookup for /@
+
+ int lookUp = i + 1;
+
+
+ if ((lookUp < charArray.length) && (charArray[lookUp] == '/')) {
+
+ i++;
+
+ lookUp = lookUp + 1;
+
+ if ((lookUp < charArray.length) && (charArray[lookUp] == '@')) {
+ i++;
+
+ isBuildingElement = true;
+
+ elementRef = new ElementRef();
+ }
+
+ }
+ else if (charArray[lookUp] == '@') {
+
+ i++;
+
+ isBuildingElement = true;
+
+ elementRef = new ElementRef();
+ }
+
+ }
+ else if (charArray[i] == '.') {
+
+ isBuildingElement = false;
+ }
+ else {
+
+ if (isBuildingElement) {
+ nameBuffer.append(charArray[i]);
+ }
+ }
+
+ }
+
+ if (nameBuffer.length() > 0 && elementRef != null) {
+
+ elementRef.setName(nameBuffer.toString());
+
+ if (parentElementRef != null) {
+ elementRef.setParentRef(parentElementRef);
+ }
+ nameBuffer.setLength(0);
+
+ }
+ return elementRef;
+ }
+
+ /**
+ * This method is used to build the cache Map for the supplied XML Document objects
+ *
+ * @param fileName_documentsMap
+ * @param helper
+ * @return
+ */
+
+ private Map<File, Map<String, List<Element>>> buildCache(final Map<File, Document> fileName_documentsMap,
+ final AbstractHelper helper) {
+ Map<File, Map<String, List<Element>>> cacheMap = new HashMap<File, Map<String, List<Element>>>();
+
+ for (final File targetFile : fileName_documentsMap.keySet()) {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ final List<Element> elements = helper.getXpathResult(root, ".//*[@xmi:id]", Element.class,
+ helper.getGenericNS("xmi"));
+
+ for (final Element element : elements) {
+ final String id = element.getAttributeValue("id", helper.getGenericNS("xmi"));
+
+ if (!cacheMap.containsKey(targetFile)) {
+ cacheMap.put(targetFile, new HashMap<String, List<Element>>());
+ }
+ if (!cacheMap.get(targetFile).containsKey(id)) {
+ cacheMap.get(targetFile).put(id, new ArrayList<Element>());
+ }
+ cacheMap.get(targetFile).get(id).add(element);
+
+ }
+
+ }
+ return cacheMap;
+ }
+
+ /*
+ * If the input string is supplied as : "default.amxmi#_UZWXYOqLEeW9t73E3V9yAw"
+ */
+ private boolean isURIFragment(final String string) {
+ if (string.contains("#")) {
+ return string.substring(string.indexOf("#") + 1).contains("/");
+ }
+ return string.contains("/");
+ }
+
+ /**
+ * This method is used to return File object based on the supplied content
+ *
+ * @param targetFile
+ * @param refFileInfoMap
+ * @param fileNameInfo
+ * @return
+ */
+ protected File getRefFile(final File targetFile, final HashMap<String, File> refFileInfoMap,
+ final String fileNameInfo) {
+
+ File referredFile = null;
+
+ if (!refFileInfoMap.containsKey(fileNameInfo)) {
+ referredFile = new File(fileNameInfo);
+
+ if (!referredFile.exists()) {
+ referredFile = new File(targetFile.getParent(), fileNameInfo);
+
+
+ if (!referredFile.exists()) {
+
+ referredFile = null;
+
+ System.err.println("Unable to find the referred file : " + fileNameInfo);
+
+ }
+
+ }
+
+ refFileInfoMap.put(fileNameInfo, referredFile);
+ }
+ else {
+ referredFile = refFileInfoMap.get(fileNameInfo);
+ }
+
+ return referredFile;
+
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/postprocessor/ElementRef.java b/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/postprocessor/ElementRef.java
new file mode 100644
index 0000000..ea112e2
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/postprocessor/ElementRef.java
@@ -0,0 +1,36 @@
+package org.eclipse.app4mc.amalthea.converters.common.postprocessor;
+
+class ElementRef {
+
+ private String name;
+ private String type;
+
+ ElementRef parentRef;
+
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+
+ public String getType() {
+ return this.type;
+ }
+
+ public void setType(final String type) {
+ this.type = type;
+ }
+
+ public ElementRef getParentRef() {
+ return this.parentRef;
+ }
+
+ public void setParentRef(final ElementRef parentRef) {
+ this.parentRef = parentRef;
+ }
+
+
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/postprocessor/FileNameUpdationProcessor.java b/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/postprocessor/FileNameUpdationProcessor.java
new file mode 100644
index 0000000..75292ef
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/postprocessor/FileNameUpdationProcessor.java
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters.common.postprocessor;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.IPostProcessor;
+import org.eclipse.app4mc.amalthea.converters.common.utils.AbstractHelper;
+import org.jdom2.Attribute;
+import org.jdom2.Document;
+
+public class FileNameUpdationProcessor implements IPostProcessor {
+
+ public FileNameUpdationProcessor() {
+ }
+
+ @Override
+ public void process(final Map<File, Document> fileName_documentsMap, final AbstractHelper helper) throws Exception {
+
+ /*-
+ * 1.File name should be updated
+ *
+ * 2.File location should be updated
+ *
+ */
+
+ for (final File inputFile : fileName_documentsMap.keySet()) {
+ final List<Attribute> hrefs = helper.getXpathResult(fileName_documentsMap.get(inputFile).getRootElement(),
+ ".//@href", Attribute.class);
+
+ for (final Attribute attribute : hrefs) {
+
+ /*- example: href="f1/f2/sw.amxmi#_gK_hoMW5EeWBM6uFowTedA" */
+
+ final String attributeValue = attribute.getValue();
+
+ final int indexOfHash = attributeValue.lastIndexOf("#");
+
+ if (indexOfHash != -1 && (indexOfHash + 1) < attributeValue.length()) {
+
+ /*- example: f1/f2/sw.amxmi */
+
+ final String refRelativePath = attributeValue.substring(0, indexOfHash);
+
+ final int lastIndex = refRelativePath.lastIndexOf("/");
+
+ String refFileName = "";
+
+ if (lastIndex == -1) {
+ /*-Example: sw.amxmi i.e. there is no hierarchy to reach to the file from the selected file*/
+ refFileName = refRelativePath;
+ }
+ else if ((lastIndex != -1) && (lastIndex + 1) < refRelativePath.length()) {
+ /*- example: sw.amxmi */
+
+ refFileName = refRelativePath.substring(lastIndex + 1);
+
+ }
+
+ if (refFileName.length() > 0) {
+ /*-check for the file extension */
+ final int indexOfDot = refFileName.indexOf(".");
+
+ if (indexOfDot != -1) {
+ final String extension = refFileName.substring(indexOfDot + 1);
+
+ if (extension.startsWith("amxmi") && !extension.equals("amxmi")) {
+
+ /*- this is the case where extension of the model (e.g: amxmi-hw) is present instead of amxmi*/
+
+ /*- adding amxmi extension, to make the model file compatible to 1.1.1 or higher */
+
+ refFileName = refFileName + ".amxmi";
+
+
+ }
+ }
+
+ /*- example: href="f1/f2/sw.amxmi#_gK_hoMW5EeWBM6uFowTedA"
+ *
+ * In this case attributeValue_part2 is the second part of the above String i.e _gK_hoMW5EeWBM6uFowTedA
+ * */
+ final String attributeValue_part2 = attributeValue.substring(indexOfHash + 1);
+
+ /*- setting the updated file name (and also making the references relative, as files will be moved inside same directory*/
+
+ attribute.setValue(refFileName + "#" + attributeValue_part2);
+
+
+ }
+
+
+ }
+ }
+
+
+ }
+
+
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/postprocessor/XSDElement.java b/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/postprocessor/XSDElement.java
new file mode 100644
index 0000000..f261ff5
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/postprocessor/XSDElement.java
@@ -0,0 +1,34 @@
+package org.eclipse.app4mc.amalthea.converters.common.postprocessor;
+
+import java.util.HashSet;
+import java.util.Set;
+
+class XSDElement {
+
+ private String name;
+ private String type;
+
+ final Set<XSDElement> parentRefs = new HashSet<XSDElement>();
+
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ public Set<XSDElement> getParentRefs() {
+ return this.parentRefs;
+ }
+
+ public String getType() {
+ return this.type;
+ }
+
+ public void setType(final String type) {
+ this.type = type;
+ }
+
+
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/preprocessor/CustomPropsPreProcessor.java b/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/preprocessor/CustomPropsPreProcessor.java
new file mode 100644
index 0000000..a21a541
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/preprocessor/CustomPropsPreProcessor.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters.common.preprocessor;
+
+import java.io.File;
+import java.util.Map;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.IPreProcessor;
+import org.eclipse.app4mc.amalthea.converters.common.utils.AbstractHelper;
+import org.eclipse.app4mc.amalthea.converters.common.utils.BaseHelperUtils;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+public class CustomPropsPreProcessor implements IPreProcessor {
+
+ AbstractHelper helper;
+
+ public CustomPropsPreProcessor() {
+ this.helper = BaseHelperUtils.getInstance();
+ }
+
+ @Override
+ public void process(final File targetFile, final Map<File, Document> fileName_documentsMap) throws Exception {
+
+ final Document root = fileName_documentsMap.get(targetFile);
+
+ if (root == null) {
+ return;
+ }
+ final Element rootElement = root.getRootElement();
+
+
+ /*-
+ *
+ *Custom Properties with reference to an object will be present in the following format :
+ *
+ * <customProperties xmi:id="_Wc8AsNotEeWXsaNW2kxe8A" key="custPropKey">
+ * <value xsi:type="common:ReferenceObject" xmi:id="_bSW3gNotEeWXsaNW2kxe8A" value="_Zp_LgNotEeWXsaNW2kxe8A"/>
+ * </customProperties>
+ *
+ * <customProperties xmi:id="_qefqgNotEeWXsaNW2kxe8A" key="custKey">
+ * <value xsi:type="common:ReferenceObject" xmi:id="_rwIRgNotEeWXsaNW2kxe8A">
+ * <value href="default1.amxmi#_nDgKUNotEeWXsaNW2kxe8A"/>
+ * </value>
+ * </customProperties>
+ *
+ */
+
+ /*- Below query will result in returning value node which has a xsi:type ="common:ReferenceObject" & is immediate child of customProperties*/
+
+ /*-=======================Below code is commented, as it was completely removing the ref elements which is not expected =================*/
+
+
+ /*
+ * final List<Element> value_custProps_refObjects = this.helper.getXpathResult(rootElement,
+ * ".//customProperties/value[@xsi:type=\"common:ReferenceObject\"]", Element.class,
+ * this.helper.getGenericNS("xsi"));
+ *
+ * for (final Element element : value_custProps_refObjects) { final Element parentElement =
+ * element.getParentElement();
+ *
+ * final String key = parentElement.getAttributeValue("key");
+ *
+ * element.detach();
+ *
+ * System.out.println( "Reference Object -> associated as value in CustomProperty having key: \"" + key +
+ * "\" is removed"); }
+ *
+ *
+ * fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
+ */
+ }
+
+}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/utils/AbstractAttributeRefCacheBuilder.java b/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/utils/AbstractAttributeRefCacheBuilder.java
new file mode 100644
index 0000000..737dba8
--- /dev/null
+++ b/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/utils/AbstractAttributeRefCacheBuilder.java
@@ -0,0 +1,590 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Robert Bosch GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Robert Bosch GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.amalthea.converters.common.utils;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
+import org.eclipse.app4mc.amalthea.converters.common.xpath.utils.BulkXpathOperation;
+import org.jdom2.Attribute;
+import org.jdom2.Document;
+import org.jdom2.Element;
+import org.jdom2.Namespace;
+
+import com.google.common.collect.HashBasedTable;
+import com.google.common.collect.Table;
+
+public abstract class AbstractAttributeRefCacheBuilder implements ICache {
+
+ Map<File, Map<String, Object>> map = new HashMap<File, Map<String, Object>>();
+
+ protected AbstractHelper helper;
+
+
+ @Override
+ public Map<File, Map<String, Object>> getCacheMap() {
+ return this.map;
+ }
+
+ @Override
+ public void clearCacheMap() {
+ this.map.clear();
+ }
+
+ /**
+ * This method is used to grab all Elements referred by legacy URI fragments and build a Map containing key as
+ * URIFragment and value as corresponding Element
+ *
+ * Expected keys:
+ *
+ * URIFRAGMENT_SCHEDULER_REFS_ATRIBUTES
+ *
+ * @param targetFile
+ * @param rootDocument
+ * @return
+ */
+ @SuppressWarnings("unchecked")
+ protected Map<String, Element> getAllElements_referred_by_URIFragments(final File targetFile,
+ final Document rootDocument, final String URIFRAGMENT_ELEMENT_REFS_ATRIBUTES) {
+
+
+ final Map<String, List<Attribute>> uriFragment_schedulerRefAttribsMap =
+
+ (Map<String, List<Attribute>>) getCacheMap().get(targetFile).get(URIFRAGMENT_ELEMENT_REFS_ATRIBUTES);
+
+ if (uriFragment_schedulerRefAttribsMap == null) {
+ // TODO: log
+ System.err.println("cache : \"" + URIFRAGMENT_ELEMENT_REFS_ATRIBUTES + "\" not populated");
+ return new HashMap<String, Element>();
+ }
+
+ final Set<String> uriFragments = uriFragment_schedulerRefAttribsMap.keySet();
+
+ final Map<String, Element> uriFragment_ElementsMap = getAllElements_referred_by_URIFragments(rootDocument,
+ uriFragments);
+
+ return uriFragment_ElementsMap;
+ }
+
+ // TODO:Use Xpath bulk operation
+ protected Map<String, Element> getAllElements_referred_by_URIFragments(final Document rootDocument,
+ final Set<String> uriFragments) {
+ final Map<String, Element> uriFragment_ElementsMap = new HashMap<String, Element>();
+
+ /*- temporary Map to store key as URIFragment and Vale as Xpath*/
+ final Map<String, String> uriFragment_XpathStringMap = new HashMap<String, String>();
+
+ /*- Map to store the result of */
+
+ Map<String, List<Element>> xpath_ElementsMap = new HashMap<String, List<Element>>();
+
+
+ for (final String uriFragment : uriFragments) {
+ uriFragment_XpathStringMap.put(uriFragment, getXpathString(uriFragment));
+ }
+
+ /*- Bulk operation applied to fetch the JDOM Element's to improve the performance */
+ final BulkXpathOperation bulkXpathOperation = new BulkXpathOperation();
+
+ xpath_ElementsMap = bulkXpathOperation.invokeXpath(rootDocument, uriFragment_XpathStringMap.values(),
+ this.helper);
+
+ for (final String uriFragment : uriFragments) {
+
+ if (!uriFragment_ElementsMap.containsKey(uriFragment)) {
+
+ final String xpath = uriFragment_XpathStringMap.get(uriFragment);
+
+ final List<Element> list = xpath_ElementsMap.get(xpath);
+
+ if (list.size() > 0) {
+ uriFragment_ElementsMap.put(uriFragment, list.get(0));
+ }
+ else {
+ // TODO: log a WARNING message, as no objects are found for this URIFragment
+ System.err.println("No references can be found for : " + uriFragment
+ + " corresponding Xpath used is : " + xpath);
+ }
+ }
+ }
+ return uriFragment_ElementsMap;
+ }
+
+ @SuppressWarnings("unchecked")
+ protected void addAttributeTo_Href_URIFragment_Attributes_Cache(final File targetFile, final File refFile,
+ final String uriFragment_with_fileInfo, final String fileNameInfo, final String localURIFragment,
+ final Attribute attribute, final String HREF_URIFRAGMENT_ELEMENT_REFS_ATRIBUTES) {
+
+
+ final Map<File, Table<String, String, List<Attribute>>> reffile_uriFragment_schedulerRefAttribsMap = ((Map<File, Table<String, String, List<Attribute>>>) getCacheMap()
+ .get(targetFile).get(HREF_URIFRAGMENT_ELEMENT_REFS_ATRIBUTES));
+
+
+ Table<String, String, List<Attribute>> table = reffile_uriFragment_schedulerRefAttribsMap.get(refFile);
+
+ if (table == null) {
+ table = HashBasedTable.create();
+ reffile_uriFragment_schedulerRefAttribsMap.put(refFile, table);
+ }
+
+ List<Attribute> list = table.get(uriFragment_with_fileInfo, localURIFragment);
+
+ if (list == null) {
+ list = new ArrayList<Attribute>();
+
+ table.put(uriFragment_with_fileInfo, localURIFragment, list);
+ }
+
+ list.add(attribute);
+
+ }
+
+
+ /**
+ * <pre>
+ * This method is used to get Xpath String from URIFragment
+ *
+ * Example: <br>
+ *
+ * Case 1:
+ * If input for this method is : //@osModel/@scheduler.0 <br>
+ * This method will return : //osModel/scheduler[0]
+ *
+ * Case 2:
+ *
+ * If input for this method is : //@osModel/@operatingSystems.0/@taskSchedulers.0
+ * This method will return : //osModel/operatingSystems[0]/taskSchedulers[0]
+ * </pre>
+ *
+ * @param uriFragment
+ * @return
+ */
+
+ protected String getXpathString_old(String uriFragment) {
+
+ uriFragment = uriFragment.replaceAll("@", "");
+
+ if (uriFragment.contains(".")) {
+
+ final int lastIndexOf = uriFragment.lastIndexOf(".");
+
+ final String substring = uriFragment.substring(lastIndexOf + 1);
+
+ try {
+
+ /*- In EMF first element of array starts with index 0. And the same is used for URI fragment*/
+
+ /*- In Xpath 1st element of array starts with index 1 */
+
+ /*- Note: For conversion of URIFragment to Xpath, array index should be incremented by 1 */
+
+ final int arrayIndex = Integer.parseInt(substring) + 1;
+
+ uriFragment = uriFragment.substring(0, lastIndexOf) + "[" + arrayIndex + "]";
+
+ }
+ catch (final Exception e) {
+
+ // TODO:
+ e.printStackTrace();
+ }
+ }
+
+ return uriFragment;
+ }
+
+
+ /**
+ * <pre>
+ * This method is used to get Xpath String from URIFragment
+ *
+ * Example: <br>
+ *
+ * Case 1:
+ * If input for this method is : //@osModel/@scheduler.0 <br>
+ * This method will return : //osModel/scheduler[0]
+ *
+ * Case 2:
+ *
+ * If input for this method is : //@osModel/@operatingSystems.0/@taskSchedulers.0
+ * This method will return : //osModel/operatingSystems[0]/taskSchedulers[0]
+ * </pre>
+ *
+ * @param uriFragment
+ * @return
+ */
+
+ protected String getXpathString(String uriFragment) {
+
+ uriFragment = uriFragment.replaceAll("@", "");
+
+ if (uriFragment.contains(".")) {
+
+ final char[] charArray = uriFragment.toCharArray();
+
+ final StringBuffer xpathBuffer = new StringBuffer();
+
+ boolean isBuildingIndex = false;
+
+ StringBuffer indexBuffer = new StringBuffer();
+
+ for (int i = 0; i < charArray.length; i++) {
+
+ if (charArray[i] == '.') {
+
+ xpathBuffer.append("[");
+
+ isBuildingIndex = true;
+
+ indexBuffer = new StringBuffer();
+
+ }
+ else if (isBuildingIndex && (charArray[i] == '/')) {
+
+ addIndexToBuffer(xpathBuffer, indexBuffer);
+
+
+ indexBuffer = new StringBuffer();
+
+ xpathBuffer.append("]");
+
+ xpathBuffer.append("/");
+ isBuildingIndex = false;
+
+ }
+
+ else if (isBuildingIndex) {
+
+ indexBuffer.append(charArray[i]);
+ }
+ else {
+ xpathBuffer.append(charArray[i]);
+ }
+
+ }
+
+ if (isBuildingIndex) {
+
+ addIndexToBuffer(xpathBuffer, indexBuffer);
+
+ xpathBuffer.append("]");
+ }
+
+ uriFragment = xpathBuffer.toString();
+ }
+
+ return uriFragment;
+ }
+
+ private void addIndexToBuffer(final StringBuffer xpathBuffer, final StringBuffer indexBuffer) {
+ try {
+ final long parseLong = Long.parseLong(indexBuffer.toString());
+
+ /*-
+ * TODO Add additional documentation : As Xpath index starts with 1 and EMF index starts with 0
+ * ===> during the conversion of uri fragment to Xpath ==> index is incremented by 1
+ *
+ */
+ xpathBuffer.append(parseLong + 1);
+
+ }
+ catch (final Exception e) {
+ xpathBuffer.append(indexBuffer);
+
+ }
+ }
+
+ /**
+ * This method is used to grab all the Attributes referring to legacy format of URI fragments and group them
+ * accordingly based on key as URIFragment
+ *
+ * @param rootDocument
+ * @return
+ */
+ protected Map<String, List<Attribute>> getAllAttributes_containing_URIFragments(final Document rootDocument,
+ final String xPath_for_attributes, final Namespace... nameSpaces) {
+
+ final List<Attribute> schedulerAttributes = this.helper.getXpathResult(rootDocument, xPath_for_attributes,
+ Attribute.class, nameSpaces);
+
+ /*- map containing key as URIFragment and value as List of Attribute objects */
+ final Map<String, List<Attribute>> uriFragment_AttributesMap = new HashMap<String, List<Attribute>>();
+
+
+ for (final Attribute attribute : schedulerAttributes) {
+
+ final String uriFragment = attribute.getValue();
+
+ if (!uriFragment_AttributesMap.containsKey(uriFragment)) {
+ uriFragment_AttributesMap.put(uriFragment, new ArrayList<Attribute>());
+ }
+
+ uriFragment_AttributesMap.get(uriFragment).add(attribute);
+ }
+
+ return uriFragment_AttributesMap;
+
+ }
+
+ /**
+ * <pre>
+ * xpath_elementtype_href_attribute :
+ * ".//scheduler/@href[contains(., \"/\")]"
+ *
+ * </pre>
+ *
+ * @param targetFile
+ * @param rootDocument
+ * @param xpath_elementtype_href_attribute
+ */
+
+ protected void populateAllHREF_ElementAttributes_having_legacy_URI_refs(final File targetFile,
+ final Document rootDocument, final String xpath_elementtype_href_attribute,
+ final String HREF_URIFRAGMENT_ELEMENT_REFS_ATRIBUTES, final Namespace... namespaces) {
+
+
+ final List<Attribute> schedulerHrefs = this.helper.getXpathResult(rootDocument,
+ xpath_elementtype_href_attribute, Attribute.class, namespaces);
+
+
+ final HashMap<String, File> refFileInfoMap = new HashMap<String, File>();
+
+
+ final Map<File, Table<String, String, List<Attribute>>> reffile_uriFragment_schedulerRefAttribsMap = new HashMap<File, Table<String, String, List<Attribute>>>();
+
+ /*- Adding elements into Cache */
+ getCacheMap().get(targetFile).put(HREF_URIFRAGMENT_ELEMENT_REFS_ATRIBUTES,
+ reffile_uriFragment_schedulerRefAttribsMap);
+
+
+ loop: for (final Attribute attribute : schedulerHrefs) {
+
+ final String uriFragment_with_fileInfo = attribute.getValue();
+
+ final int indexOfHash = uriFragment_with_fileInfo.indexOf("#");
+
+ if (indexOfHash != -1) {
+ final String fileNameInfo = uriFragment_with_fileInfo.substring(0, indexOfHash);
+
+ final String localURIFragment = uriFragment_with_fileInfo.substring(indexOfHash + 1);
+
+ // TODO:verify if the localURIFragment is of old format and not XMI ID
+
+ if (localURIFragment.contains("//") == false) {
+ // this is the case of UUID (XMI ID) being present as a reference. It is not required to store such
+ // elements in the cache
+ continue loop;
+ }
+
+ final File refFile = getRefFile(targetFile, refFileInfoMap, fileNameInfo);
+
+ if (refFile != null) {
+
+ addAttributeTo_Href_URIFragment_Attributes_Cache(targetFile, refFile, uriFragment_with_fileInfo,
+ fileNameInfo, localURIFragment, attribute, HREF_URIFRAGMENT_ELEMENT_REFS_ATRIBUTES);
+ }
+ else {
+ System.err.println("Skipping attribut with value : " + uriFragment_with_fileInfo);
+ }
+
+ }
+ }
+ }
+
+
+ protected File getRefFile(final File targetFile, final HashMap<String, File> refFileInfoMap,
+ final String fileNameInfo) {
+
+ File referredFile = null;
+
+ if (!refFileInfoMap.containsKey(fileNameInfo)) {
+ referredFile = new File(fileNameInfo);
+
+ if (!referredFile.exists()) {
+ referredFile = new File(targetFile.getParent(), fileNameInfo);
+
+
+ if (!referredFile.exists()) {
+
+ referredFile = null;
+
+ System.err.println("Unable to find the referred file : " + fileNameInfo);
+
+ }
+
+ }
+
+ refFileInfoMap.put(fileNameInfo, referredFile);
+ }
+ else {
+ referredFile = refFileInfoMap.get(fileNameInfo);
+ }
+
+ return referredFile;
+
+ }
+
+ @SuppressWarnings("unchecked")
+ protected void populate_All_UUID_Elements(final File targetFile, final Document rootDocument, final String xpath,
+ final String UUID_ELEMENT, final Namespace... nameSpaces) {
+
+ Map<String, Element> uuid_element_map = null;
+
+ if (!getCacheMap().get(targetFile).containsKey(UUID_ELEMENT)) {
+ uuid_element_map = new HashMap<String, Element>();
+ getCacheMap().get(targetFile).put(UUID_ELEMENT, uuid_element_map);
+ }
+ else {
+ uuid_element_map = (Map<String, Element>) getCacheMap().get(targetFile).get(UUID_ELEMENT);
+ }
+
+ final List<Element> elements = this.helper.getXpathResult(rootDocument, xpath, Element.class, nameSpaces);
+
+ for (final Element element : elements) {
+
+ final Attribute attribute = element.getAttribute("id", this.helper.getGenericNS("xmi"));
+
+ if (attribute != null) {
+ uuid_element_map.put(attribute.getValue(), element);
+ }
+
+ }
+
+ }
+
+ @SuppressWarnings("unchecked")
+ protected void populate_All_Elements_With_Name(final File targetFile, final Document rootDocument,
+ final String xpath, final String ELEMENT_NAME, final Namespace... nameSpaces) {
+
+ Map<String, Element> name_element_map = null;
+
+ if (!getCacheMap().get(targetFile).containsKey(ELEMENT_NAME)) {
+ name_element_map = new HashMap<String, Element>();