Removed migration features, plugins and tests
diff --git a/features/org.eclipse.app4mc.amalthea.converters.sdk/.project b/features/org.eclipse.app4mc.amalthea.converters.sdk/.project
deleted file mode 100644
index 952c3d2..0000000
--- a/features/org.eclipse.app4mc.amalthea.converters.sdk/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.app4mc.amalthea.converters.sdk</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/features/org.eclipse.app4mc.amalthea.converters.sdk/about.html b/features/org.eclipse.app4mc.amalthea.converters.sdk/about.html
deleted file mode 100644
index 164f781..0000000
--- a/features/org.eclipse.app4mc.amalthea.converters.sdk/about.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!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>November 30, 2017</p>
- <h3>License</h3>
-
- <p>
- The Eclipse Foundation makes available 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 2.0 ("EPL"). A copy of the EPL is
- available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>.
- For purposes of the EPL, "Program" will mean the Content.
- </p>
-
- <p>
- If you did not receive this Content directly from the Eclipse
- Foundation, the Content is being redistributed by another party
- ("Redistributor") and different terms and conditions may
- apply to your use of any object code in the Content. Check the
- Redistributor's license that was provided with the Content. If no such
- license exists, contact the Redistributor. Unless otherwise indicated
- below, the terms and conditions of the EPL still apply to any source
- code in the Content and such source code may be obtained at <a
- href="http://www.eclipse.org/">http://www.eclipse.org</a>.
- </p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/features/org.eclipse.app4mc.amalthea.converters.sdk/build.properties b/features/org.eclipse.app4mc.amalthea.converters.sdk/build.properties
deleted file mode 100644
index 09cb93b..0000000
--- a/features/org.eclipse.app4mc.amalthea.converters.sdk/build.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-bin.includes = feature.xml,\
- epl-2.0.html
-src.includes = epl-2.0.html
diff --git a/features/org.eclipse.app4mc.amalthea.converters.sdk/epl-2.0.html b/features/org.eclipse.app4mc.amalthea.converters.sdk/epl-2.0.html
deleted file mode 100644
index 637a181..0000000
--- a/features/org.eclipse.app4mc.amalthea.converters.sdk/epl-2.0.html
+++ /dev/null
@@ -1,300 +0,0 @@
-<!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" xml:lang="en" lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Eclipse Public License - Version 2.0</title>
- <style type="text/css">
- body {
- margin: 1.5em 3em;
- }
- h1{
- font-size:1.5em;
- }
- h2{
- font-size:1em;
- margin-bottom:0.5em;
- margin-top:1em;
- }
- p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- ul, ol{
- list-style-type:none;
- }
- </style>
- </head>
- <body>
- <h1>Eclipse Public License - v 2.0</h1>
- <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>
- <h2 id="definitions">1. DEFINITIONS</h2>
- <p>“Contribution” means:</p>
- <ul>
- <li>a) in the case of the initial Contributor, the initial content
- Distributed under this Agreement, and
- </li>
- <li>
- b) in the case of each subsequent Contributor:
- <ul>
- <li>i) changes to the Program, and</li>
- <li>ii) additions to the Program;</li>
- </ul>
- 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 changes or additions to the Program that
- are not Modified Works.
- </li>
- </ul>
- <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
- or any Secondary License (as applicable), including Contributors.
- </p>
- <p>“Derivative Works” shall mean any work, whether in Source Code or other
- form, that is based on (or derived from) the Program and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship.
- </p>
- <p>“Modified Works” shall mean any work in Source Code or other form that
- results from an addition to, deletion from, or modification of the
- contents of the Program, including, for purposes of clarity any new file
- in Source Code form that contains any contents of the Program. Modified
- Works shall not include works that contain only declarations, interfaces,
- types, classes, structures, or files of the Program solely in each case
- in order to link to, bind by name, or subclass the Program or Modified
- Works thereof.
- </p>
- <p>“Distribute” means the acts of a) distributing or b) making available
- in any manner that enables the transfer of a copy.
- </p>
- <p>“Source Code” means the form of a Program preferred for making
- modifications, including but not limited to software source code,
- documentation source, and configuration files.
- </p>
- <p>“Secondary License” means either the GNU General Public License,
- Version 2.0, or any later versions of that license, including any
- exceptions or additional permissions as identified by the initial
- Contributor.
- </p>
- <h2 id="grant-of-rights">2. GRANT OF RIGHTS</h2>
- <ul>
- <li>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.
- </li>
- <li>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 or other 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.
- </li>
- <li>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.
- </li>
- <li>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.
- </li>
- <li>e) Notwithstanding the terms of any Secondary License, no Contributor
- makes additional grants to any Recipient (other than those set forth
- in this Agreement) as a result of such Recipient's receipt of the
- Program under the terms of a Secondary License (if permitted under
- the terms of Section 3).
- </li>
- </ul>
- <h2 id="requirements">3. REQUIREMENTS</h2>
- <p>3.1 If a Contributor Distributes the Program in any form, then:</p>
- <ul>
- <li>a) the Program must also be made available as Source Code, in
- accordance with section 3.2, and the Contributor must accompany
- the Program with a statement that the Source Code for the Program
- is available under this Agreement, and informs Recipients how to
- obtain it in a reasonable manner on or through a medium customarily
- used for software exchange; and
- </li>
- <li>
- b) the Contributor may Distribute the Program under a license
- different than this Agreement, provided that such license:
- <ul>
- <li>i) effectively disclaims on behalf of all other 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;
- </li>
- <li>ii) effectively excludes on behalf of all other Contributors all
- liability for damages, including direct, indirect, special, incidental
- and consequential damages, such as lost profits;
- </li>
- <li>iii) does not attempt to limit or alter the recipients' rights in the
- Source Code under section 3.2; and
- </li>
- <li>iv) requires any subsequent distribution of the Program by any party
- to be under a license that satisfies the requirements of this section 3.
- </li>
- </ul>
- </li>
- </ul>
- <p>3.2 When the Program is Distributed as Source Code:</p>
- <ul>
- <li>a) it must be made available under this Agreement, or if the Program (i)
- is combined with other material in a separate file or files made available
- under a Secondary License, and (ii) the initial Contributor attached to
- the Source Code the notice described in Exhibit A of this Agreement,
- then the Program may be made available under the terms of such
- Secondary Licenses, and
- </li>
- <li>b) a copy of this Agreement must be included with each copy of the Program.</li>
- </ul>
- <p>3.3 Contributors may not remove or alter any copyright, patent, trademark,
- attribution notices, disclaimers of warranty, or limitations of liability
- (‘notices’) contained within the Program from any copy of the Program which
- they Distribute, provided that Contributors may add their own appropriate
- notices.
- </p>
- <h2 id="commercial-distribution">4. COMMERCIAL DISTRIBUTION</h2>
- <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>
- <h2 id="warranty">5. NO WARRANTY</h2>
- <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
- BY APPLICABLE LAW, 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>
- <h2 id="disclaimer">6. DISCLAIMER OF LIABILITY</h2>
- <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
- BY APPLICABLE LAW, 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>
- <h2 id="general">7. GENERAL</h2>
- <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.
- </p>
- <p>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. Nothing in this Agreement is intended
- to be enforceable by any entity that is not a Contributor or Recipient.
- No third-party beneficiary rights are created under this Agreement.
- </p>
- <h2 id="exhibit-a">Exhibit A – Form of Secondary Licenses Notice</h2>
- <p>“This Source Code may also be made available under the following
- Secondary Licenses when the conditions for such availability set forth
- in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
- version(s), and exceptions or additional permissions here}.”
- </p>
- <blockquote>
- <p>Simply including a copy of this Agreement, including this Exhibit A
- is not sufficient to license the Source Code under Secondary Licenses.
- </p>
- <p>If it is not possible or desirable to put the notice in a particular file,
- then You may include the notice in a location (such as a LICENSE file in a
- relevant directory) where a recipient would be likely to look for
- such a notice.
- </p>
- <p>You may add additional accurate notices of copyright ownership.</p>
- </blockquote>
- </body>
-</html>
\ No newline at end of file
diff --git a/features/org.eclipse.app4mc.amalthea.converters.sdk/feature.xml b/features/org.eclipse.app4mc.amalthea.converters.sdk/feature.xml
deleted file mode 100644
index d2c8e34..0000000
--- a/features/org.eclipse.app4mc.amalthea.converters.sdk/feature.xml
+++ /dev/null
@@ -1,159 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.app4mc.amalthea.converters.sdk"
- label="APP4MC AMALTHEA Converters SDK"
- version="0.9.6.qualifier"
- provider-name="Eclipse APP4MC"
- license-feature="org.eclipse.license"
- license-feature-version="2.0.2.qualifier">
-
- <description url="https://projects.eclipse.org/projects/technology.app4mc">
- APP4MC AMALTHEA Model converters
- </description>
-
- <copyright url="https://projects.eclipse.org/projects/technology.app4mc">
- (c) Copyright Eclipse APP4MC contributors and others. 2018.
-All rights reserved.
- </copyright>
-
- <includes
- id="org.eclipse.app4mc.amalthea.converters"
- version="0.0.0"
- name="APP4MC AMALTHEA Converters"/>
-
- <includes
- id="org.eclipse.app4mc.docu.sdk"
- version="0.0.0"/>
-
- <!-- <plugin
- id="org.eclipse.app4mc.amalthea.converters.110.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.111.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.070.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
--->
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.common.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.ui.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.jdom2.source"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
-
-
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.071.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.072.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.080.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.081.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.082.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.083.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.090.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.091.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.092.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.093.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.094.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.095.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
- <plugin
- id="org.jaxen.source"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
-</feature>
diff --git a/features/org.eclipse.app4mc.amalthea.converters/.project b/features/org.eclipse.app4mc.amalthea.converters/.project
deleted file mode 100644
index af0d27b..0000000
--- a/features/org.eclipse.app4mc.amalthea.converters/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.app4mc.amalthea.converters</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/features/org.eclipse.app4mc.amalthea.converters/about.html b/features/org.eclipse.app4mc.amalthea.converters/about.html
deleted file mode 100644
index 164f781..0000000
--- a/features/org.eclipse.app4mc.amalthea.converters/about.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!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>November 30, 2017</p>
- <h3>License</h3>
-
- <p>
- The Eclipse Foundation makes available 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 2.0 ("EPL"). A copy of the EPL is
- available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>.
- For purposes of the EPL, "Program" will mean the Content.
- </p>
-
- <p>
- If you did not receive this Content directly from the Eclipse
- Foundation, the Content is being redistributed by another party
- ("Redistributor") and different terms and conditions may
- apply to your use of any object code in the Content. Check the
- Redistributor's license that was provided with the Content. If no such
- license exists, contact the Redistributor. Unless otherwise indicated
- below, the terms and conditions of the EPL still apply to any source
- code in the Content and such source code may be obtained at <a
- href="http://www.eclipse.org/">http://www.eclipse.org</a>.
- </p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/features/org.eclipse.app4mc.amalthea.converters/build.properties b/features/org.eclipse.app4mc.amalthea.converters/build.properties
deleted file mode 100644
index 09cb93b..0000000
--- a/features/org.eclipse.app4mc.amalthea.converters/build.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-bin.includes = feature.xml,\
- epl-2.0.html
-src.includes = epl-2.0.html
diff --git a/features/org.eclipse.app4mc.amalthea.converters/epl-2.0.html b/features/org.eclipse.app4mc.amalthea.converters/epl-2.0.html
deleted file mode 100644
index 637a181..0000000
--- a/features/org.eclipse.app4mc.amalthea.converters/epl-2.0.html
+++ /dev/null
@@ -1,300 +0,0 @@
-<!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" xml:lang="en" lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Eclipse Public License - Version 2.0</title>
- <style type="text/css">
- body {
- margin: 1.5em 3em;
- }
- h1{
- font-size:1.5em;
- }
- h2{
- font-size:1em;
- margin-bottom:0.5em;
- margin-top:1em;
- }
- p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- ul, ol{
- list-style-type:none;
- }
- </style>
- </head>
- <body>
- <h1>Eclipse Public License - v 2.0</h1>
- <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>
- <h2 id="definitions">1. DEFINITIONS</h2>
- <p>“Contribution” means:</p>
- <ul>
- <li>a) in the case of the initial Contributor, the initial content
- Distributed under this Agreement, and
- </li>
- <li>
- b) in the case of each subsequent Contributor:
- <ul>
- <li>i) changes to the Program, and</li>
- <li>ii) additions to the Program;</li>
- </ul>
- 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 changes or additions to the Program that
- are not Modified Works.
- </li>
- </ul>
- <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
- or any Secondary License (as applicable), including Contributors.
- </p>
- <p>“Derivative Works” shall mean any work, whether in Source Code or other
- form, that is based on (or derived from) the Program and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship.
- </p>
- <p>“Modified Works” shall mean any work in Source Code or other form that
- results from an addition to, deletion from, or modification of the
- contents of the Program, including, for purposes of clarity any new file
- in Source Code form that contains any contents of the Program. Modified
- Works shall not include works that contain only declarations, interfaces,
- types, classes, structures, or files of the Program solely in each case
- in order to link to, bind by name, or subclass the Program or Modified
- Works thereof.
- </p>
- <p>“Distribute” means the acts of a) distributing or b) making available
- in any manner that enables the transfer of a copy.
- </p>
- <p>“Source Code” means the form of a Program preferred for making
- modifications, including but not limited to software source code,
- documentation source, and configuration files.
- </p>
- <p>“Secondary License” means either the GNU General Public License,
- Version 2.0, or any later versions of that license, including any
- exceptions or additional permissions as identified by the initial
- Contributor.
- </p>
- <h2 id="grant-of-rights">2. GRANT OF RIGHTS</h2>
- <ul>
- <li>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.
- </li>
- <li>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 or other 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.
- </li>
- <li>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.
- </li>
- <li>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.
- </li>
- <li>e) Notwithstanding the terms of any Secondary License, no Contributor
- makes additional grants to any Recipient (other than those set forth
- in this Agreement) as a result of such Recipient's receipt of the
- Program under the terms of a Secondary License (if permitted under
- the terms of Section 3).
- </li>
- </ul>
- <h2 id="requirements">3. REQUIREMENTS</h2>
- <p>3.1 If a Contributor Distributes the Program in any form, then:</p>
- <ul>
- <li>a) the Program must also be made available as Source Code, in
- accordance with section 3.2, and the Contributor must accompany
- the Program with a statement that the Source Code for the Program
- is available under this Agreement, and informs Recipients how to
- obtain it in a reasonable manner on or through a medium customarily
- used for software exchange; and
- </li>
- <li>
- b) the Contributor may Distribute the Program under a license
- different than this Agreement, provided that such license:
- <ul>
- <li>i) effectively disclaims on behalf of all other 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;
- </li>
- <li>ii) effectively excludes on behalf of all other Contributors all
- liability for damages, including direct, indirect, special, incidental
- and consequential damages, such as lost profits;
- </li>
- <li>iii) does not attempt to limit or alter the recipients' rights in the
- Source Code under section 3.2; and
- </li>
- <li>iv) requires any subsequent distribution of the Program by any party
- to be under a license that satisfies the requirements of this section 3.
- </li>
- </ul>
- </li>
- </ul>
- <p>3.2 When the Program is Distributed as Source Code:</p>
- <ul>
- <li>a) it must be made available under this Agreement, or if the Program (i)
- is combined with other material in a separate file or files made available
- under a Secondary License, and (ii) the initial Contributor attached to
- the Source Code the notice described in Exhibit A of this Agreement,
- then the Program may be made available under the terms of such
- Secondary Licenses, and
- </li>
- <li>b) a copy of this Agreement must be included with each copy of the Program.</li>
- </ul>
- <p>3.3 Contributors may not remove or alter any copyright, patent, trademark,
- attribution notices, disclaimers of warranty, or limitations of liability
- (‘notices’) contained within the Program from any copy of the Program which
- they Distribute, provided that Contributors may add their own appropriate
- notices.
- </p>
- <h2 id="commercial-distribution">4. COMMERCIAL DISTRIBUTION</h2>
- <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>
- <h2 id="warranty">5. NO WARRANTY</h2>
- <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
- BY APPLICABLE LAW, 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>
- <h2 id="disclaimer">6. DISCLAIMER OF LIABILITY</h2>
- <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
- BY APPLICABLE LAW, 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>
- <h2 id="general">7. GENERAL</h2>
- <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.
- </p>
- <p>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. Nothing in this Agreement is intended
- to be enforceable by any entity that is not a Contributor or Recipient.
- No third-party beneficiary rights are created under this Agreement.
- </p>
- <h2 id="exhibit-a">Exhibit A – Form of Secondary Licenses Notice</h2>
- <p>“This Source Code may also be made available under the following
- Secondary Licenses when the conditions for such availability set forth
- in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
- version(s), and exceptions or additional permissions here}.”
- </p>
- <blockquote>
- <p>Simply including a copy of this Agreement, including this Exhibit A
- is not sufficient to license the Source Code under Secondary Licenses.
- </p>
- <p>If it is not possible or desirable to put the notice in a particular file,
- then You may include the notice in a location (such as a LICENSE file in a
- relevant directory) where a recipient would be likely to look for
- such a notice.
- </p>
- <p>You may add additional accurate notices of copyright ownership.</p>
- </blockquote>
- </body>
-</html>
\ No newline at end of file
diff --git a/features/org.eclipse.app4mc.amalthea.converters/feature.xml b/features/org.eclipse.app4mc.amalthea.converters/feature.xml
deleted file mode 100644
index d2da324..0000000
--- a/features/org.eclipse.app4mc.amalthea.converters/feature.xml
+++ /dev/null
@@ -1,152 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.app4mc.amalthea.converters"
- label="APP4MC AMALTHEA Converters"
- version="0.9.6.qualifier"
- provider-name="Eclipse APP4MC"
- license-feature="org.eclipse.license"
- license-feature-version="2.0.2.qualifier">
-
- <description url="https://projects.eclipse.org/projects/technology.app4mc">
- APP4MC AMALTHEA Model converters
- </description>
-
- <copyright url="https://projects.eclipse.org/projects/technology.app4mc">
- (c) Copyright Eclipse APP4MC contributors and others. 2018.
-All rights reserved.
- </copyright>
-
- <includes
- id="org.eclipse.app4mc.docu"
- version="0.0.0"/>
-
- <requires>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="com.google.guava" version="12.0.0" match="greaterOrEqual"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.core.databinding"/>
- <import plugin="org.eclipse.core.databinding.beans"/>
- <import plugin="org.eclipse.core.databinding.property"/>
- <import plugin="org.eclipse.jface.databinding"/>
- <import plugin="com.ibm.icu"/>
- <import plugin="org.eclipse.help"/>
- </requires>
-
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.common"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.jdom2"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.help"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.jaxen"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.071"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.072"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.080"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.081"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.082"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.083"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.090"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.091"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.092"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.093"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.094"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.app4mc.amalthea.converters.095"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.071/.classpath b/plugins/org.eclipse.app4mc.amalthea.converters.071/.classpath
deleted file mode 100644
index eca7bdb..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.071/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.071/.gitignore b/plugins/org.eclipse.app4mc.amalthea.converters.071/.gitignore
deleted file mode 100644
index 09e3bc9..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.071/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/bin/
-/target/
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.071/.project b/plugins/org.eclipse.app4mc.amalthea.converters.071/.project
deleted file mode 100644
index 866b324..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.071/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.app4mc.amalthea.converters.071</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.071/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.app4mc.amalthea.converters.071/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 0c68a61..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.071/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-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.071/META-INF/MANIFEST.MF b/plugins/org.eclipse.app4mc.amalthea.converters.071/META-INF/MANIFEST.MF
deleted file mode 100644
index bff8370..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.071/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,10 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: APP4MC Amalthea Converters to 0.7.1
-Bundle-SymbolicName: org.eclipse.app4mc.amalthea.converters.071;singleton:=true
-Bundle-Version: 0.9.6.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-Vendor: Eclipse APP4MC
-Import-Package: org.osgi.framework
-Require-Bundle: org.eclipse.app4mc.amalthea.converters.common
-Automatic-Module-Name: org.eclipse.app4mc.amalthea.converters.071
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.071/about.html b/plugins/org.eclipse.app4mc.amalthea.converters.071/about.html
deleted file mode 100644
index 164f781..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.071/about.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!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>November 30, 2017</p>
- <h3>License</h3>
-
- <p>
- The Eclipse Foundation makes available 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 2.0 ("EPL"). A copy of the EPL is
- available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>.
- For purposes of the EPL, "Program" will mean the Content.
- </p>
-
- <p>
- If you did not receive this Content directly from the Eclipse
- Foundation, the Content is being redistributed by another party
- ("Redistributor") and different terms and conditions may
- apply to your use of any object code in the Content. Check the
- Redistributor's license that was provided with the Content. If no such
- license exists, contact the Redistributor. Unless otherwise indicated
- below, the terms and conditions of the EPL still apply to any source
- code in the Content and such source code may be obtained at <a
- href="http://www.eclipse.org/">http://www.eclipse.org</a>.
- </p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.071/build.properties b/plugins/org.eclipse.app4mc.amalthea.converters.071/build.properties
deleted file mode 100644
index e9863e2..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.071/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.071/epl-2.0.html b/plugins/org.eclipse.app4mc.amalthea.converters.071/epl-2.0.html
deleted file mode 100644
index 637a181..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.071/epl-2.0.html
+++ /dev/null
@@ -1,300 +0,0 @@
-<!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" xml:lang="en" lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Eclipse Public License - Version 2.0</title>
- <style type="text/css">
- body {
- margin: 1.5em 3em;
- }
- h1{
- font-size:1.5em;
- }
- h2{
- font-size:1em;
- margin-bottom:0.5em;
- margin-top:1em;
- }
- p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- ul, ol{
- list-style-type:none;
- }
- </style>
- </head>
- <body>
- <h1>Eclipse Public License - v 2.0</h1>
- <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>
- <h2 id="definitions">1. DEFINITIONS</h2>
- <p>“Contribution” means:</p>
- <ul>
- <li>a) in the case of the initial Contributor, the initial content
- Distributed under this Agreement, and
- </li>
- <li>
- b) in the case of each subsequent Contributor:
- <ul>
- <li>i) changes to the Program, and</li>
- <li>ii) additions to the Program;</li>
- </ul>
- 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 changes or additions to the Program that
- are not Modified Works.
- </li>
- </ul>
- <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
- or any Secondary License (as applicable), including Contributors.
- </p>
- <p>“Derivative Works” shall mean any work, whether in Source Code or other
- form, that is based on (or derived from) the Program and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship.
- </p>
- <p>“Modified Works” shall mean any work in Source Code or other form that
- results from an addition to, deletion from, or modification of the
- contents of the Program, including, for purposes of clarity any new file
- in Source Code form that contains any contents of the Program. Modified
- Works shall not include works that contain only declarations, interfaces,
- types, classes, structures, or files of the Program solely in each case
- in order to link to, bind by name, or subclass the Program or Modified
- Works thereof.
- </p>
- <p>“Distribute” means the acts of a) distributing or b) making available
- in any manner that enables the transfer of a copy.
- </p>
- <p>“Source Code” means the form of a Program preferred for making
- modifications, including but not limited to software source code,
- documentation source, and configuration files.
- </p>
- <p>“Secondary License” means either the GNU General Public License,
- Version 2.0, or any later versions of that license, including any
- exceptions or additional permissions as identified by the initial
- Contributor.
- </p>
- <h2 id="grant-of-rights">2. GRANT OF RIGHTS</h2>
- <ul>
- <li>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.
- </li>
- <li>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 or other 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.
- </li>
- <li>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.
- </li>
- <li>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.
- </li>
- <li>e) Notwithstanding the terms of any Secondary License, no Contributor
- makes additional grants to any Recipient (other than those set forth
- in this Agreement) as a result of such Recipient's receipt of the
- Program under the terms of a Secondary License (if permitted under
- the terms of Section 3).
- </li>
- </ul>
- <h2 id="requirements">3. REQUIREMENTS</h2>
- <p>3.1 If a Contributor Distributes the Program in any form, then:</p>
- <ul>
- <li>a) the Program must also be made available as Source Code, in
- accordance with section 3.2, and the Contributor must accompany
- the Program with a statement that the Source Code for the Program
- is available under this Agreement, and informs Recipients how to
- obtain it in a reasonable manner on or through a medium customarily
- used for software exchange; and
- </li>
- <li>
- b) the Contributor may Distribute the Program under a license
- different than this Agreement, provided that such license:
- <ul>
- <li>i) effectively disclaims on behalf of all other 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;
- </li>
- <li>ii) effectively excludes on behalf of all other Contributors all
- liability for damages, including direct, indirect, special, incidental
- and consequential damages, such as lost profits;
- </li>
- <li>iii) does not attempt to limit or alter the recipients' rights in the
- Source Code under section 3.2; and
- </li>
- <li>iv) requires any subsequent distribution of the Program by any party
- to be under a license that satisfies the requirements of this section 3.
- </li>
- </ul>
- </li>
- </ul>
- <p>3.2 When the Program is Distributed as Source Code:</p>
- <ul>
- <li>a) it must be made available under this Agreement, or if the Program (i)
- is combined with other material in a separate file or files made available
- under a Secondary License, and (ii) the initial Contributor attached to
- the Source Code the notice described in Exhibit A of this Agreement,
- then the Program may be made available under the terms of such
- Secondary Licenses, and
- </li>
- <li>b) a copy of this Agreement must be included with each copy of the Program.</li>
- </ul>
- <p>3.3 Contributors may not remove or alter any copyright, patent, trademark,
- attribution notices, disclaimers of warranty, or limitations of liability
- (‘notices’) contained within the Program from any copy of the Program which
- they Distribute, provided that Contributors may add their own appropriate
- notices.
- </p>
- <h2 id="commercial-distribution">4. COMMERCIAL DISTRIBUTION</h2>
- <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>
- <h2 id="warranty">5. NO WARRANTY</h2>
- <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
- BY APPLICABLE LAW, 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>
- <h2 id="disclaimer">6. DISCLAIMER OF LIABILITY</h2>
- <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
- BY APPLICABLE LAW, 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>
- <h2 id="general">7. GENERAL</h2>
- <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.
- </p>
- <p>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. Nothing in this Agreement is intended
- to be enforceable by any entity that is not a Contributor or Recipient.
- No third-party beneficiary rights are created under this Agreement.
- </p>
- <h2 id="exhibit-a">Exhibit A – Form of Secondary Licenses Notice</h2>
- <p>“This Source Code may also be made available under the following
- Secondary Licenses when the conditions for such availability set forth
- in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
- version(s), and exceptions or additional permissions here}.”
- </p>
- <blockquote>
- <p>Simply including a copy of this Agreement, including this Exhibit A
- is not sufficient to license the Source Code under Secondary Licenses.
- </p>
- <p>If it is not possible or desirable to put the notice in a particular file,
- then You may include the notice in a location (such as a LICENSE file in a
- relevant directory) where a recipient would be likely to look for
- such a notice.
- </p>
- <p>You may add additional accurate notices of copyright ownership.</p>
- </blockquote>
- </body>
-</html>
\ No newline at end of file
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.071/plugin.xml b/plugins/org.eclipse.app4mc.amalthea.converters.071/plugin.xml
deleted file mode 100644
index 8c35a18..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.071/plugin.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<?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.converters071.impl.NamespaceConverter"
- enabled="true"
- id="converters.071.namespace"
- input-model-version="0.7.0"
- name="namespace"
- output-model-version="0.7.1">
- <dependent-on-converter
- id="converters.071.rootelement">
- </dependent-on-converter>
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters071.impl.SwConverter"
- enabled="true"
- id="converters.071.sw"
- input-model-version="0.7.0"
- name="Sw Converter"
- output-model-version="0.7.1">
- <dependent-on-converter
- id="converters.071.rootelement">
- </dependent-on-converter>
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters071.impl.RootElementConverter"
- enabled="true"
- id="converters.071.rootelement"
- input-model-version="0.7.0"
- name="Root Element Converter"
- output-model-version="0.7.1">
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters071.impl.HwConverter"
- enabled="true"
- id="converters.071.hw"
- input-model-version="0.7.0"
- name="Hw Converter"
- output-model-version="0.7.1">
- <dependent-on-converter
- id="converters.071.rootelement">
- </dependent-on-converter>
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters071.impl.PropertyConstraintsConverter"
- enabled="true"
- id="converters.071.propertyconstraints"
- input-model-version="0.7.0"
- name="PropertyConstraints Converter"
- output-model-version="0.7.1">
- <dependent-on-converter
- id="converters.071.rootelement">
- </dependent-on-converter>
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters071.impl.ConstraintsConverter"
- enabled="true"
- id="converters.071.constraints"
- input-model-version="0.7.0"
- name="Constraints Converter"
- output-model-version="0.7.1">
- <dependent-on-converter
- id="converters.071.rootelement">
- </dependent-on-converter>
- </converter>
- </extension>
- <extension
- point="org.eclipse.app4mc.amalthea.model.converters.cachebuilders">
- <CacheBuilder
- ID="org.eclipse.app4mc.amalthea.converters.071.SectionLabelRunnable.builder"
- class="org.eclipse.app4mc.amalthea.converters071.utils.SectionRunnableLabelCacheBuilder"
- enabled="true"
- input-model-version="0.7.0"
- name="Section-Label-Runnable Cache Builder">
- </CacheBuilder>
- </extension>
-
-</plugin>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/Activator.java b/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/Activator.java
deleted file mode 100644
index b971971..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/Activator.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters071;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.app4mc.amalthea.converters.071"; //$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.071/src/org/eclipse/app4mc/amalthea/converters071/impl/AbstractConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/impl/AbstractConverter.java
deleted file mode 100644
index dc30677..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/impl/AbstractConverter.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters071.impl;
-
-import java.util.List;
-
-import org.apache.log4j.Logger;
-import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
-import org.eclipse.app4mc.amalthea.converters071.utils.HelperUtils_070_071;
-import org.jdom2.Attribute;
-import org.jdom2.Element;
-
-public abstract class AbstractConverter implements IConverter {
-
- protected HelperUtils_070_071 helper;
-
- protected Logger logger;
-
- /**
- * This method is used to migrate the size attribute inside MemoryType element, which can be contained inside :<br>
- * HW-Model <br>
- * Property-Constraints-Model<br>
- *
- * <code>
- * Input : <memoryTypes name="MemType1" size="10"/>
- *
- * Output :
- * <memoryTypes name="MemType1">
- <size value="10" />
- * </memoryTypes>
- *
- * </code>
- *
- * Note: In the above case, size attribute is converted to DataSize element -> which will be contained inside
- * MemoryType
- *
- * @param rootElement
- * Root element of the AMALTHEA model
- * @param xpath
- * corresponding Xpath to fetch the element which is the equivalent of "MemoryType"
- */
- protected void update_Size_MemoryType(final Element rootElement, final String xpath) {
-
- final List<Element> memoryTypes = this.helper.getXpathResult(rootElement, xpath, Element.class,
- this.helper.getNS_071("am"));
-
-
- for (final Element memTypeElement : memoryTypes) {
-
- final Attribute sizeAttrib = memTypeElement.getAttribute("size");
-
- if (sizeAttrib != null) {
-
- final String value = sizeAttrib.getValue();
-
- final Element dataSizeElement = new Element("size");
-
- final Attribute unit = new Attribute("value", value);
-
- dataSizeElement.setAttribute(unit);
-
- memTypeElement.addContent(dataSizeElement);
-
- memTypeElement.removeAttribute(sizeAttrib);
- }
- }
-
-
- }
-
- /**
- * Bug 505691 This method is used to migrate the frequency attribute inside Quartz element, which can be contained
- * inside :<br>
- * HW-Model <br>
- * Property-Constraints-Model<br>
- *
- * <code>
- * Input : <quartzes frequency="100"/>
- *
- * Output :
- * <quartzes>
- * <frequency value="100.0" />
- * </quartzes>
- *
- * </code>
- *
- * Note: In the above case, frequency attribute is converted to Frequency element -> which is contained inside
- * Quartz element
- *
- * @param rootElement
- * Root element of the AMALTHEA model
- * @param xpath
- * corresponding Xpath to fetch the element which is the equivalent of "Quartz"
- */
-
- protected void update_frequency_Quartz(final Element rootElement, final String xpath) {
-
- /*-
- * Bug 505691
- * As per the change in 0.7.1, Quartz will not have frequency as integer, instead a Frequency object
- *
- * Model migration should change all the definitions of Quartz in the below Elements:
- *
- * - Core
- * - ECU
- * - HwComponent
- * - HwSystem
- * - Memory (Note: Memory element can be defined inside HW model or in PropertyConstraints model)
- * - Microcontroller
- * - Network
- * - Quartz (Quartz objects can be nested)
- *
- *
- * Xpaths for the above mentioned elements:
- *
- * ./hwModel/system/ecus/microcontrollers/cores//quartzes
- * ./hwModel/system/ecus//quartzes
- * ./hwModel/system//components//quartzes
- * ./hwModel/system/quartzes//quartzes
- * ./hwModel/system//memories/quartzes//quartzes
- * ./hwModel/system/ecus/microcontrollers//quartzes
- * ./hwModel/system//networks/quartzes//quartzes
- *
- * ./propertyConstraintsModel/mappingConstraints/hwConstraint//quartzes
- *
- * Above specified Xpaths can be summarized with the below two Xpaths:
- *
- * ./hwModel/system//quartzes[@frequency]
- * ./propertyConstraintsModel/mappingConstraints/hwConstraint//quartzes[@frequency]
- *
- */
-
- final List<Element> quartzElements = this.helper.getXpathResult(rootElement, xpath, Element.class,
- this.helper.getNS_071("am"));
-
- for (final Element quartzElement : quartzElements) {
-
- final String frequencyValue = quartzElement.getAttributeValue("frequency");
-
- quartzElement.removeAttribute("frequency");
-
- final Element frequencyElement = new Element("frequency");
-
- try {
- frequencyElement.setAttribute("value", Double.parseDouble(frequencyValue) + "");
- }
- catch (final Exception e) {
- /*- If there is a exception during conversion to double, initial value which is fetched from \"frequency attribute \" is set as a value for \"value attribute \" of Frequency element*/
- frequencyElement.setAttribute("value", frequencyValue);
-
- }
-
- quartzElement.addContent(frequencyElement);
-
- }
-
- }
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/impl/ConstraintsConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/impl/ConstraintsConverter.java
deleted file mode 100644
index 734f808..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/impl/ConstraintsConverter.java
+++ /dev/null
@@ -1,340 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters071.impl;
-
-import java.io.File;
-import java.util.AbstractMap;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.log4j.LogManager;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters071.utils.HelperUtils_070_071;
-import org.jdom2.Attribute;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-public class ConstraintsConverter extends AbstractConverter {
-
-
- public ConstraintsConverter() {
- this.helper = HelperUtils_070_071.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info("Migration from 0.7.0 to 0.7.1 : Executing Constraints converter for model file : "
- + targetFile.getName());
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
- }
- final Element rootElement = root.getRootElement();
-
- /*- Migration of SchedulerPairingConstraint and SchedulerSeparationConstraint as per Bug: 500502 */
-
- remove_SchedulerPairing_SchedulerSeparation_Constraints(rootElement);
-
-
- /*- Migration of groupingType attribute of ProcessRunnableGroup --> as per Bug: 500501 */
-
- update_ProcessRunnableGroup(rootElement);
-
- /*- Migration of OrderConstraint as per Bug: 500506 */
-
- remove_OrderConstraints(rootElement);
-
- /*- Migration of Age/Reaction/Delay/Synchronisation Constraints as per Bug: 500506 */
-
- update_Age_Reaction_Delay_SynchronisationConstraints(rootElement);
- }
-
- /**
- * Bug: 500506<br>
- * This method is used to migrate the below Elements:
- *
- * <pre>
- * 1. AgeConstraint
- * AgeConstraint object is changed to EventChainLatencyConstraint.
- * LatencyType attribute should be : Age
- * 2. ReactionConstraint
- * ReactionConstraint object is changed to EventChainLatencyConstraint
- * LatencyType attribute should be : Reaction
- * 3. DelayConstraint
- * mappingType value is set as "Reaction"
- *
- * </pre>
- *
- * @param rootElement
- * Root Element of AMALTHEA model file
- */
- private void update_Age_Reaction_Delay_SynchronisationConstraints(final Element rootElement) {
-
-
- final List<Element> ageConstraints = this.helper.getXpathResult(rootElement,
- "./constraintsModel/timingConstraints[@xsi:type=\"am:AgeConstraint\" or @xsi:type=\"am:ReactionConstraint\" or @xsi:type=\"am:DelayConstraint\" or @xsi:type=\"am:SynchronisationConstraint\"]",
- Element.class, this.helper.getGenericNS("xsi"), this.helper.getNS_071("am"));
-
- for (final Element constraint : ageConstraints) {
-
- final Attribute typeAttrib = constraint.getAttribute("type", this.helper.getGenericNS("xsi"));
-
- final String attribValue = typeAttrib.getValue();
-
- if (attribValue.equals("am:AgeConstraint")) {
-
- /*- Migrating AgeConstraint elements to EventChainLatencyConstraint */
-
- typeAttrib.setValue("am:EventChainLatencyConstraint");
-
- constraint.setAttribute("type", "Age");
-
- }
- else if (attribValue.equals("am:ReactionConstraint")) {
-
- /*- Migrating ReactionConstraint elements to EventChainLatencyConstraint */
-
- typeAttrib.setValue("am:EventChainLatencyConstraint");
-
- constraint.setAttribute("type", "Reaction");
-
- }
- else if (attribValue.equals("am:SynchronisationConstraint")) {
-
- /*- Migrating SynchronisationConstraint elements to EventSynchronizationConstraint */
-
- typeAttrib.setValue("am:EventSynchronizationConstraint");
-
- }
- else if (attribValue.equals("am:DelayConstraint")) {
-
- /*- Migrating DelayConstraint */
-
- constraint.setAttribute("mappingType", "Reaction");
- }
-
-
- }
-
-
- }
-
- /**
- * As per the changes introduced in 0.7.1, OrderConstraint elements are removed from data model
- *
- * For details refer to : Bug: 500506
- *
- * @param rootElement
- */
- private void remove_OrderConstraints(final Element rootElement) {
-
- final List<Element> constraints = this.helper.getXpathResult(rootElement,
- "./constraintsModel/timingConstraints[@xsi:type=\"am:OrderConstraint\"]", Element.class,
- this.helper.getGenericNS("xsi"), this.helper.getNS_071("am"));
-
- for (final Element constraint : constraints) {
- constraint.getParentElement().removeContent(constraint);
- }
-
- }
-
- /**
- * As per the changes introduced in 0.7.1, SchedulerPairing and SchedulerSeparation constraints are removed from
- * data model
- *
- * For details refer to : Bug: 500502
- *
- * @param rootElement
- */
-
- private void remove_SchedulerPairing_SchedulerSeparation_Constraints(final Element rootElement) {
-
- final List<Element> constraints = this.helper.getXpathResult(rootElement,
- "./constraintsModel/affinityConstraints[@xsi:type=\"am:SchedulerPairingConstraint\" or @xsi:type=\"am:SchedulerSeparationConstraint\" ]",
- Element.class, this.helper.getGenericNS("xsi"), this.helper.getNS_071("am"));
-
- for (final Element constraint : constraints) {
- constraint.getParentElement().removeContent(constraint);
- }
- }
-
-
- /**
- * As per the changes introduced in 0.7.1 for ProcessRunnableGroup:<br>
- *
- * groupingType is removed<br>
- *
- * enties are removed (as Element : ProcessRunnableGroupEntry is deleted from the model) <br>
- *
- * For details refer to : Bug: 500501
- *
- * @param rootElement
- */
-
- private void update_ProcessRunnableGroup(final Element rootElement) {
-
- final List<Element> runnableGroups = this.helper.getXpathResult(rootElement,
- "./constraintsModel/runnableSequencingConstraints/runnableGroups", Element.class,
- this.helper.getGenericNS("xsi"), this.helper.getNS_071("am"));
-
- for (final Element runnableGroup : runnableGroups) {
-
- /*- Removing groupingType */
- runnableGroup.removeAttribute("groupingType");
-
- final List<Element> processRunnableGroupEntries = runnableGroup.getChildren("entries");
-
-
- /*- Adding runnable Elements references -> by fetching the data from ProcessRunnableGroupEntry objects */
-
-
- final Map.Entry<Boolean, Set<String>> resultEntry = getRunnableRefs_from_ProcessRunnableGroupEntries(
- processRunnableGroupEntries);
-
- final Boolean isExternalAmaltheaModelElementReferred = resultEntry.getKey();
-
- final Set<String> runnableRefs = resultEntry.getValue();
-
- if (isExternalAmaltheaModelElementReferred) {
-
- /*-
- * Below is the standard behaviour from EMF/Sphinx (also the same is depicted when Amalthea editor is used)
- *
- * If atleast one Runnable element from other model is referred then all the references should be generated as seperate "runnables" tag containing "href" attribute
- *
- * <runnableGroups xmi:id="_bKVRUOL0EeaRdL88dwrE6Q">
- <runnables href="#_c2jikOL0EeaRdL88dwrE6Q"/>
- <runnables href="#_tyEzEOL1EeaRdL88dwrE6Q"/>
- <runnables href="ref.amxmi#_ksC4IOL0EeaRdL88dwrE6Q"/>
- </runnableGroups>
- */
-
- for (String runnableRef : runnableRefs) {
-
- final Element runnableRefElement = new Element("runnables");
-
- if (runnableRef.contains("?")) {
-
- /*-
- * This is the case attribute value can exists in one of the below format:
- *
- * Case 1: "r1?type=Runnable"
- * Case 2: "amlt:/#r2?type=Runnable"
- */
- if (!runnableRef.contains("amlt:/#")) {
- runnableRef = ("amlt:/#" + runnableRef);
- }
-
- }
- else {
- /*-
- * This is the case value is existing in one of the below format:
- *
- * Case 1: elements.amxmi#_USTB0JXtEeaygMeuHaNR-Q
- *
- * Case 2: _USTB0JXtEeaygMeuHaNR-Q
- *
- * Case 3: #_USTB0JXtEeaygMeuHaNR-Q
- *
- *In all the cases valid conversion is : amlt:/#_USTB0JXtEeaygMeuHaNR-Q
- */
-
- final int indexOf = runnableRef.indexOf("#");
- if (indexOf != -1) {
- runnableRef = runnableRef.substring(indexOf + 1);
- }
- runnableRef = "amlt:/#" + runnableRef;
-
- }
-
- runnableRefElement.setAttribute("href", runnableRef);
-
- runnableGroup.addContent(runnableRefElement);
-
- }
- }
- else {
-
- // This is the case where no runnable elements from other models are imported
- final StringBuffer runnablesBuffer = new StringBuffer();
-
- for (final String runnable : runnableRefs) {
- runnablesBuffer.append(runnable);
- runnablesBuffer.append(" ");
- }
-
- runnableGroup.setAttribute(new Attribute("runnables", runnablesBuffer.toString().trim()));
- }
-
- /*- Removing Element : entries, as ProcessRunnableGroupEntry is removed */
- runnableGroup.removeChildren("entries");
-
- }
- }
-
- /**
- * This method is used to get unique Runnable references (in valid AMALTHEA format) from ProcessRunnableGroupEntry
- * objects
- *
- * @param processRunnableGroupEntries
- * List<Element> List of ProcessRunnableGroupEntry objects
- * @return Map.Entry<Boolean, Set<String>> <br>
- * key is the boolean value (used to identify if there exists any runnable elements from other models) <br>
- * value is the Set of runnableRefs
- */
- private Map.Entry<Boolean, Set<String>> getRunnableRefs_from_ProcessRunnableGroupEntries(
- final List<Element> processRunnableGroupEntries) {
-
- boolean isElementFromOtherFilePresent = false;
-
- final Set<String> runnableRefs = new LinkedHashSet<String>();
-
- for (final Element entry : processRunnableGroupEntries) {
- String attributeValue = entry.getAttributeValue("runnable");
-
- if (attributeValue == null) {
- final Element runnableElement = entry.getChild("runnable");
-
- if (runnableElement != null) {
- attributeValue = runnableElement.getAttributeValue("href");
-
- /*- Note: presence of external element will influence the content generation in amxmi file.
- * Due to this reason below check is performed and the result is stored in the boolean value*/
-
- if (attributeValue != null) {
- isElementFromOtherFilePresent = true;
- }
- }
-
- }
-
- if (attributeValue != null) {
- // Attribute value (or) href value is directly stored in the Set (so as to obtain the unique values)
- runnableRefs.add(attributeValue);
- }
- }
- return new AbstractMap.SimpleEntry<>(isElementFromOtherFilePresent, runnableRefs);
- }
-
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/impl/HwConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/impl/HwConverter.java
deleted file mode 100644
index 66801e8..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/impl/HwConverter.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters071.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters071.utils.HelperUtils_070_071;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-public class HwConverter extends AbstractConverter {
-
-
- public HwConverter() {
- this.helper = HelperUtils_070_071.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info("Migration from 0.7.0 to 0.7.1 : Executing PropertyConstraints converter for model file : "
- + targetFile.getName());
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
- }
- final Element rootElement = root.getRootElement();
-
- /*- Migration of size attribute of MemoryType to DataSize element */
-
- update_Size_MemoryType(rootElement, "./hwModel/memoryTypes");
-
- /*- Migration of frequency attribute of Quartz to Frequency element */
- update_frequency_Quartz(rootElement, "./hwModel/system//quartzes[@frequency]");
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
- }
-
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/impl/NamespaceConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/impl/NamespaceConverter.java
deleted file mode 100644
index 2f050a4..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/impl/NamespaceConverter.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters071.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.apache.log4j.Logger;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
-import org.eclipse.app4mc.amalthea.converters071.utils.HelperUtils_070_071;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-public class NamespaceConverter implements IConverter {
-
- private final HelperUtils_070_071 helper;
-
- private final Logger logger;
-
- public NamespaceConverter() {
- this.helper = HelperUtils_070_071.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info("Migration from 0.7.0 to 0.7.1 : Executing Namespace converter for model file : "
- + targetFile.getName());
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
- }
- final Element rootElement = root.getRootElement();
-
- this.helper.updateRootElement_NameSpaces_to_071(rootElement);
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
- }
-
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/impl/PropertyConstraintsConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/impl/PropertyConstraintsConverter.java
deleted file mode 100644
index c19db2c..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/impl/PropertyConstraintsConverter.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters071.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters071.utils.HelperUtils_070_071;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-public class PropertyConstraintsConverter extends AbstractConverter {
-
-
- public PropertyConstraintsConverter() {
- this.helper = HelperUtils_070_071.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info("Migration from 0.7.0 to 0.7.1 : Executing PropertyConstraints converter for model file : "
- + targetFile.getName());
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
- }
- final Element rootElement = root.getRootElement();
-
- /*- Migration of size attribute of MemoryType to DataSize element */
-
- update_Size_MemoryType(rootElement, "./propertyConstraintsModel/memoryTypeDefinitions");
-
- /*- Migration of frequency attribute of Quartz to Frequency element */
-
- update_frequency_Quartz(rootElement,
- "./propertyConstraintsModel/mappingConstraints/hwConstraint//quartzes[@frequency]");
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
- }
-
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/impl/RootElementConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/impl/RootElementConverter.java
deleted file mode 100644
index 46165d3..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/impl/RootElementConverter.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters071.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.apache.log4j.Logger;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
-import org.eclipse.app4mc.amalthea.converters071.utils.HelperUtils_070_071;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-/**
- * This class is responsible for converting the root element of the model file as : "Amalthea" (only if for the supplied
- * model root element is other than "Amalthea" e.g: hwModel or swModel)
- *
- * @author mez2rng
- *
- */
-public class RootElementConverter implements IConverter {
-
- private final HelperUtils_070_071 helper;
-
- private final Logger logger;
-
- public RootElementConverter() {
- this.helper = HelperUtils_070_071.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- /*-
- * ==============
- *|| Input Model :||
- * ==============
- * <am:MappingModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:am="http://app4mc.eclipse.org/amalthea/0.7.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- * </am:MappingModel>
- *
- * ==============
- *|| Output Model :||
- * ==============
- *
- * <am:Amalthea xmlns:am="http://app4mc.eclipse.org/amalthea/0.7.1" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- * <mappingModel>
- *
- * </mappingModel>
- </am:Amalthea>
- */
-
-
- this.logger.info("Migration from 0.7.0 to 0.7.1 : Executing \"Root Element Converter\" for model file : "
- + targetFile.getName());
-
- final Document document = fileName_documentsMap.get(targetFile);
-
- if (document == null) {
- return;
- }
- final Element rootElement = document.getRootElement();
-
- final String rootTagName = rootElement.getName();
-
- if (!rootTagName.equals("Amalthea")) {
-
- if (rootTagName.equals("SWModel") || rootTagName.equals("HWModel") || rootTagName.equals("OSModel")
- || rootTagName.equals("StimuliModel") || rootTagName.equals("ConstraintsModel")
- || rootTagName.equals("EventModel") || rootTagName.equals("PropertyConstraintsModel")
- || rootTagName.equals("MappingModel") || rootTagName.equals("ConfigModel")
- || rootTagName.equals("ComponentsModel")) {
-
- final Element newRootElement = new Element("Amalthea");
-
- this.helper.copyAllNameSpaces(rootElement, newRootElement);
-
- updateCurrentRootTagProps(rootElement);
-
- document.removeContent();
-
- newRootElement.addContent(rootElement);
-
- document.addContent(newRootElement);
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), document);
- }
-
- }
-
-
- }
-
- /**
- * This method is used to remove the default namespaces associated to the Root Element and also change the name of
- * it -> so that it can be added as a sub-tag inside "Amalthea root element"
- *
- * @param rootElement
- * Element This is the root element of the model file (where Amalthea is not root element)
- */
- private void updateCurrentRootTagProps(final Element rootElement) {
-
- this.helper.removeDefaultAttribs(rootElement);
-
- final String name = rootElement.getName();
-
- if (name.equals("SWModel")) {
- rootElement.setName("swModel");
- }
- else if (name.equals("HWModel")) {
- rootElement.setName("hwModel");
- }
- else if (name.equals("OSModel")) {
- rootElement.setName("osModel");
- }
- else if (name.equals("StimuliModel")) {
- rootElement.setName("stimuliModel");
- }
- else if (name.equals("ConstraintsModel")) {
- rootElement.setName("constraintsModel");
- }
- else if (name.equals("EventModel")) {
- rootElement.setName("eventModel");
- }
- else if (name.equals("PropertyConstraintsModel")) {
- rootElement.setName("propertyConstraintsModel");
- }
- else if (name.equals("MappingModel")) {
- rootElement.setName("mappingModel");
- }
- else if (name.equals("ConfigModel")) {
- rootElement.setName("configModel");
- }
- else if (name.equals("ComponentsModel")) {
- rootElement.setName("componentsModel");
- }
-
-
- }
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/impl/SwConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/impl/SwConverter.java
deleted file mode 100644
index a3c686a..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/impl/SwConverter.java
+++ /dev/null
@@ -1,559 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters071.impl;
-
-import java.io.File;
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-import java.nio.charset.StandardCharsets;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.log4j.LogManager;
-import org.apache.log4j.Logger;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
-import org.eclipse.app4mc.amalthea.converters071.utils.HelperUtils_070_071;
-import org.eclipse.app4mc.amalthea.converters071.utils.SectionRunnableLabelCacheBuilder;
-import org.eclipse.app4mc.amalthea.converters071.utils.SectionRunnableLabelCacheEnum;
-import org.jdom2.Attribute;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-import com.google.common.base.Joiner;
-
-public class SwConverter implements IConverter {
-
- private final HelperUtils_070_071 helper;
-
- private final Logger logger;
-
- private List<ICache> caches;
-
-
- private Map<File, Document> fileName_documentsMap;
-
- private File targetFile;
-
- public SwConverter() {
- this.helper = HelperUtils_070_071.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info(
- "Migration from 0.7.0 to 0.7.1 : Executing Sw converter for model file : " + targetFile.getName());
-
- this.caches = caches;
-
- this.fileName_documentsMap = fileName_documentsMap;
-
- this.targetFile = targetFile;
-
- final Document root = fileName_documentsMap.get(this.targetFile);
-
- if (root == null) {
- return;
- }
- final Element rootElement = root.getRootElement();
-
- /*- Migration of DataSize attributes */
- update_DataSize(rootElement);
-
- /*- association of MemoryElements (i.e Label/Runnable elements) with the corresponding Section as per 0.7.1 changes*/
- update_MemoryElements_With_Section_Info(rootElement);
-
- /*-updation of Section as per 0.7.1 i.e. labels, runEntities, size will be removed */
- update_Section(rootElement);
-
- /*- Removing SectionMapping and SectionMappingConstraint elements */
- remove_SectionMapping_and_SectionMappingConstraint(rootElement);
-
- /* Update ModeSwitch */
-
- update_ModeSwitch(rootElement);
-
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
- }
-
-
- /**
- * Based on model changes of 0.7.1 :
- *
- *
- * @param rootElement
- */
-
- private void update_ModeSwitch(final Element rootElement) {
-
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
-
- // xpathBuffer.append(".swModel/tasks/callGraph/graphEntries[@xsi:type=\"am:ModeSwitch\"]/entries");
- xpathBuffer.append("./swModel/tasks/callGraph//graphEntries");
- xpathBuffer.append("|");
- xpathBuffer.append("./swModel/isrs/callGraph//graphEntries");
- // xpathBuffer.append("|");
- // xpathBuffer.append(".swModel/isrs/callGraph/graphEntries[@xsi:type=\"am:ModeSwitch\"]/entries");
-
- final List<Element> graphEntryBaseElements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
- Element.class, this.helper.getGenericNS("xsi"), this.helper.getNS_071("am"));
-
- /*-
- * <callGraph>
- <graphEntries xsi:type="am:CallSequence"/>
- <graphEntries xsi:type="am:ModeSwitch"/>
- <graphEntries xsi:type="am:ProbabiltitySwitch"/>
- </callGraph>
- */
- for (final Element graphEntryBaseElement : graphEntryBaseElements) {
-
-
- /*-
- * Elements whicha are part of : "graphEntries" are to be verified if the parent is "CallGraph".
- * For the elements whose parent is other than "CallGraph" should be renamed to "items"
- */
-
- if (!graphEntryBaseElement.getParentElement().getName().equals("callGraph")) {
- graphEntryBaseElement.setName("items");
- }
-
- final String graphEntryBaseObjectType = graphEntryBaseElement.getAttributeValue("type",
- this.helper.getGenericNS("xsi"));
-
- if (graphEntryBaseObjectType != null && graphEntryBaseObjectType.equals("am:ModeSwitch")) {
-
- final List<Element> entriesElements = graphEntryBaseElement.getChildren("entries");
-
- /*-
- * <callGraph>
- <graphEntries xsi:type="am:ModeSwitch">
- <entries value="md12/a?type=ModeLiteral" default="true">
- <graphEntries xsi:type="am:CallSequence" name="cs2"/>
- </entries>
- </graphEntries>
- </callGraph>
- */
-
- /*-
- * As per change in 0.7.1: Inside a ModeSwitch -> only one ModeSwitchEntry can be default.
- * In previous versions of APP4MC -> it was possible to have several ModeSwitchEntry objects as default (which can not happen practically)
- *
- * Based on the change in 0.7.1 :
- * - first encountered ModeSwitchEntry with default property as "true" is transformed as "defaultEntry"
- * - the other ModeSwitchEntry objects are transformed as "non default" -> eventough they have default as "true"
- */
- boolean isDefaultFound = false;
-
- for (final Element entriesElement : entriesElements) {
-
-
- final Attribute defaultAttribute = entriesElement.getAttribute("default");
-
- if (defaultAttribute != null) {
-
- if (isDefaultFound == false) {
- isDefaultFound = true;
-
- /*- First ModeSwitchEntry with default value as "true" -> should have a tag name as "defaultEntry" */
- entriesElement.setName("defaultEntry");
-
- entriesElement.removeAttribute("value");
-
- entriesElement.removeChild("value");
- }
- /*- "default" attribute is removed from ModeSwitchEntry object */
-
- entriesElement.removeAttribute("default");
-
- }
-
-
- /*- renaming "value" attribute to "values" */
-
- final Attribute valueAttribute = entriesElement.getAttribute("value");
-
- if (valueAttribute != null) {
- valueAttribute.setName("values");
- }
- else {
- final Element valueElement = entriesElement.getChild("value");
-
- if (valueElement != null) {
- valueElement.setName("values");
- }
- }
- }
-
- }
-
-
- }
-
-
- }
-
- /**
- * Based on Bug 500856 : It is no longer required to have SectionMapping and SectionMappingConstraint definitions in
- * AMALTHEA model.
- *
- * Based on this change, corresponding elements of SectionMappingConstraint and SectionMapping are removed from the
- * AMALTHEA model
- *
- * @param rootElement
- */
- private void remove_SectionMapping_and_SectionMappingConstraint(final Element rootElement) {
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
-
- xpathBuffer.append("./mappingModel/mapping[@xsi:type=\"am:SectionMapping\"]");
- xpathBuffer.append("|");
- xpathBuffer.append("./propertyConstraintsModel/mappingConstraints[@xsi:type=\"am:SectionMappingConstraint\"]");
-
- final List<Element> elements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(), Element.class,
- this.helper.getGenericNS("xsi"), this.helper.getNS_071("am"));
-
- final Iterator<Element> iterator = elements.iterator();
-
- while (iterator.hasNext()) {
- final Element sectionMappingElement = iterator.next();
- sectionMappingElement.getParent().removeContent(sectionMappingElement);
- }
-
-
- }
-
- /**
- * This method is used to update the content of the Section element as per the changes introduced in 0.7.1 (Bug
- * 500856 )<br>
- *
- * Section element will not directly contain dataSize, lists of Labels, Runnables <br>
- *
- * - Instead of the above relation, Section reference is directly available at the MemoryElements
- *
- * @param rootElement
- */
- private void update_Section(final Element rootElement) {
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
-
- xpathBuffer.append("./swModel/sections");
-
- final List<Element> sectionElements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
- Element.class, this.helper.getNS_071("am"));
-
- for (final Element element : sectionElements) {
-
- element.removeChildren("size");
- element.removeChildren("labels");
- element.removeChildren("runEntities");
-
- element.removeAttribute("labels");
- element.removeAttribute("runEntities");
- }
-
- }
-
- /**
- * This method is used to associate the Section reference directly at the Memory Element (i.e. Label/Runnable) based
- * on the changes introduced in 0.7.1 (Bug 500856 )
- *
- * @param rootElement
- * Xml Element of amalthea model file
- */
-
- private void update_MemoryElements_With_Section_Info(final Element rootElement) {
-
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./swModel/runnables");
- xpathBuffer.append("|");
- xpathBuffer.append("./swModel/labels");
-
- final List<Element> memoryElements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
- Element.class, this.helper.getNS_071("am"));
-
-
- for (final Element memoryElement : memoryElements) {
-
- final String memoryElementName = memoryElement.getAttributeValue("name");
-
- final String memoryElementID = memoryElement.getAttributeValue("id", this.helper.getGenericNS("xmi"));
-
-
- List<String> sections = new ArrayList<String>();
-
- if (memoryElement.getName().equals("labels")) {
-
- sections = getAssociatedSection_FromCache(SectionRunnableLabelCacheEnum.Label_Sections,
- memoryElementName);
-
- /*- fetching the elements based on the UUID */
-
- sections.addAll(getAssociatedSection_FromCache(SectionRunnableLabelCacheEnum.Label_UUID_Sections,
- memoryElementID));
- }
- else if (memoryElement.getName().equals("runnables")) {
- sections = getAssociatedSection_FromCache(SectionRunnableLabelCacheEnum.Runnable_Sections,
- memoryElementName);
-
- /*- fetching the elements based on the UUID */
-
- sections.addAll(getAssociatedSection_FromCache(SectionRunnableLabelCacheEnum.Runnable_UUID_Sections,
- memoryElementID));
-
- }
-
- /*- Associating section to a memoryelement */
-
- if (sections.size() > 0) {
-
- final String sectionName = sections.get(0); // name without encoding
-
- if (isSectionDefinedInFile(sectionName, this.targetFile)) {
-
- memoryElement
- .setAttribute(new Attribute("section", encodeSectionName(sectionName) + "?type=Section"));
-
- }
- else {
- final Element sectionRef = new Element("section");
- sectionRef.setAttribute("href", "amlt:/#" + encodeSectionName(sectionName) + "?type=Section");
- memoryElement.addContent(sectionRef);
- }
-
- if (sections.size() > 1) {
- this.logger.warn("MemoryElement :" + memoryElementName + " is associated to multiple sections: "
- + Joiner.on(",").join(sections.toArray())
- + ". \nAs per AMALTHEA 0.7.1 it is allowed to be part of one Section only.");
- }
-
- }
-
- }
- }
-
- /**
- * This method is used to associate Section to the corresponding MemoryElemnt. <br>
- *
- * Required input data across the models is fetched from the ICache(SectionRunnableLabelCacheBuilder)<br>
- *
- * <b>Note</b>: In SectionRunnableLabelCacheBuilder Cache is stored in the below format:<br>
- * <ul>
- * <li>Map<File, Map<String, Object>> : CacheMap having key as File (amalthea model file) and value as Map<String,
- * Object><br>
- * </li>
- * <li>In Map<String, Object> : Key is the "SectionRunnableLabelCacheEnum type" and value is the <b> Map<String,
- * List<String>> </b></li>
- * <li>In Map Map<String, List<String>> : Key is the "Runnable/Label name" and value is the list of Section names to
- * which MemoryElement (Label/Runnable) is associated to</li>
- *
- * </ul>
- *
- * @param type
- * SectionRunnableLabelCacheEnum name. This parameter is supplied to identify the MemoryElement type i.e.
- * Runnable/Label and accordingly fetch the cached content
- * @param memoryElementName_or_UUID
- * String. This parameter is the name/UUID of the MemoryElement for which accordingly the corresponding
- * Sections are fetched
- *
- * @return
- */
-
- @SuppressWarnings({ "unchecked", "rawtypes" })
- private List<String> getAssociatedSection_FromCache(final SectionRunnableLabelCacheEnum type,
- final String memoryElementName_or_UUID) {
-
- final SectionRunnableLabelCacheBuilder iCache = getSectionRunnableLabelCacheBuilder();
-
- if (iCache == null) {
-
- throw new RuntimeException(
- "SectionRunnableLabelCache is not buit and Object of it is not available in Converters");
- }
-
- final Map<File, Map<String, Object>> cacheMap = iCache.getCacheMap();
-
- final Set<File> fileSet = this.fileName_documentsMap.keySet();
-
- for (final File file : fileSet) {
-
- final Map<String, Object> map = cacheMap.get(file);
-
- final Object object = map.get(type.name());
-
- if (object instanceof Map) {
- if (((Map) object).containsKey(memoryElementName_or_UUID)) {
- return (List<String>) ((Map) object).get(memoryElementName_or_UUID);
- }
-
- }
-
- }
-
-
- return new ArrayList<String>();
- }
-
- /**
- * This method is used to verify if the Section definition is present in the supplied input file
- *
- * @param sectionName
- * Name of the input Section (without encoding)
- * @param inputFile
- * Input File which is being migrated to version 0.7.1
- * @return boolean true if the Section definition is found in the supplied input model file
- */
- @SuppressWarnings("unchecked")
- private boolean isSectionDefinedInFile(final String sectionName, final File inputFile) {
-
- final SectionRunnableLabelCacheBuilder iCache = getSectionRunnableLabelCacheBuilder();
-
- if (iCache == null) {
-
- throw new RuntimeException(
- "SectionRunnableLabelCache is not buit and Object of it is not available in Converters");
- }
-
- final Map<File, Map<String, Object>> cacheMap = iCache.getCacheMap();
-
- final Map<String, Object> map = cacheMap.get(inputFile);
-
- if (map != null) {
-
- final Object object = map.get(SectionRunnableLabelCacheEnum.Section_Names.name());
-
- if (object instanceof List) {
- if (((List<String>) object).contains(sectionName)) {
- return true;
- }
-
- }
- }
-
- return false;
- }
-
- /**
- * This method is used to get the corresponding SectionRunnableLabelCacheBuilder object from various ICache objects
- *
- * @return SectionRunnableLabelCacheBuilder Object of ICache defined using extension point :
- * org.eclipse.app4mc.amalthea.model.converters.cachebuilders
- */
- private SectionRunnableLabelCacheBuilder getSectionRunnableLabelCacheBuilder() {
-
- for (final ICache cache : this.caches) {
-
- if (cache instanceof SectionRunnableLabelCacheBuilder) {
- return (SectionRunnableLabelCacheBuilder) cache;
- }
- }
- return null;
- }
-
- /**
- * This method is used to migrate the contents of "DataSize" element which can be contained inside following
- * AMALTHEA elements: <br>
- * BaseTypeDefinition <br>
- * Section <br>
- * Task <br>
- * ISR <br>
- * ProcessPrototype <br>
- * ModeLabel <br>
- * Label <br>
- * Runnable<br>
- * CustomEntity<br>
- *
- * Change : in previous version of model (0.7.0) -> DataSize element was consisting of "numberBits". In model
- * (0.7.1) it is changed to "value" and an additional attribute "unit" is introduced [As a part of migration value
- * set for "unit" is "bit"]
- *
- * @param rootElement
- * root XML Element
- */
- private void update_DataSize(final Element rootElement) {
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- /*-
- * As per the change in 0.7.1, Section will not have labels, runEntities, size elements
- *
- * xpathBuffer.append("./swModel/sections/size");
- * xpathBuffer.append("|");
- */
-
- xpathBuffer.append("./swModel/typeDefinitions/size");
- xpathBuffer.append("|");
- xpathBuffer.append("./swModel/tasks/size");
- xpathBuffer.append("|");
- xpathBuffer.append("./swModel/isrs/size");
- xpathBuffer.append("|");
- xpathBuffer.append("./swModel/processPrototypes/size");
- xpathBuffer.append("|");
- xpathBuffer.append("./swModel/modeLabels/size");
- xpathBuffer.append("|");
- xpathBuffer.append("./swModel/labels/size");
- xpathBuffer.append("|");
- xpathBuffer.append("./swModel/runnables/size");
- xpathBuffer.append("|");
- xpathBuffer.append("./swModel/customEntities/size");
-
-
- final List<Element> dataSizes = this.helper.getXpathResult(rootElement, xpathBuffer.toString(), Element.class,
- this.helper.getNS_071("am"));
-
- for (final Element dataSizeElement : dataSizes) {
-
- final Attribute numberBits = dataSizeElement.getAttribute("numberBits");
-
- if (numberBits != null) {
-
- numberBits.setName("value");
-
- final Attribute unit = new Attribute("unit", "bit");
-
- dataSizeElement.setAttribute(unit);
- }
- }
- }
-
- private String encodeSectionName(final String name) {
- if (name == null || name.length() == 0) {
- return "no-name";
- }
-
- String result;
- try {
- result = URLEncoder.encode(name, StandardCharsets.UTF_8.toString());
- }
- catch (final UnsupportedEncodingException e) {
- result = name; // keep old name - we have no better option
- }
- return result;
- }
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/utils/HelperUtils_070_071.java b/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/utils/HelperUtils_070_071.java
deleted file mode 100644
index 5753033..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/utils/HelperUtils_070_071.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters071.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_071;
-import org.jdom2.Attribute;
-import org.jdom2.Element;
-import org.jdom2.Namespace;
-
-public class HelperUtils_070_071 extends AbstractHelper {
-
- private HelperUtils_070_071() {
-
- }
-
- private static HelperUtils_070_071 instance;
-
- public static HelperUtils_070_071 getInstance() {
-
- if (instance == null) {
- instance = new HelperUtils_070_071();
- }
-
- return instance;
- }
-
- public Element createAmaltheaElement_071() {
-
- final Element amaltheaElement = new Element("AMALTHEA");
- amaltheaElement.setNamespace(Namespace.getNamespace("central", NameSpace_071.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_071(final Element rootElement) {
-
- final Namespace defaultNamespace = rootElement.getNamespace();
-
-
- if (isNS_AvailableIn_070(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_071("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_070(ns)) {
-
- rootElement.removeNamespaceDeclaration(ns);
-
- }
-
- }
-
- rootElement.addNamespaceDeclaration(getGenericNS("xmi"));
-
- rootElement.addNamespaceDeclaration(getGenericNS("xsi"));
-
- }
- }
-
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/utils/SectionRunnableLabelCacheBuilder.java b/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/utils/SectionRunnableLabelCacheBuilder.java
deleted file mode 100644
index 0dd1c4c..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/utils/SectionRunnableLabelCacheBuilder.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters071.utils;
-
-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.jdom2.Attribute;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-public class SectionRunnableLabelCacheBuilder implements ICache {
-
- private final Map<File, Map<String, Object>> map = new HashMap<File, Map<String, Object>>();
- private final HelperUtils_070_071 helper;
-
- public SectionRunnableLabelCacheBuilder() {
- this.helper = HelperUtils_070_071.getInstance();
- }
-
-
- @Override
- public void buildCache(final Map<File, Document> fileName_documentsMap) {
-
- for (final File targetFile : fileName_documentsMap.keySet()) {
-
- final Document document1 = fileName_documentsMap.get(targetFile);
-
- if (document1 == null) {
- // log error message
- continue;
- }
-
- final Element rootElement = document1.getRootElement();
-
- /*- Start : Cache initialization */
-
- getCacheMap().put(targetFile, new HashMap<String, Object>());
-
- final Map<String, List<String>> label_Sections_Map = new HashMap<String, List<String>>();
-
- getCacheMap().get(targetFile).put(SectionRunnableLabelCacheEnum.Label_Sections.name(), label_Sections_Map);
-
- final Map<String, List<String>> runnable_Sections_Map = new HashMap<String, List<String>>();
-
- getCacheMap().get(targetFile).put(SectionRunnableLabelCacheEnum.Runnable_Sections.name(),
- runnable_Sections_Map);
-
- final List<String> section_Names = new ArrayList<String>();
-
- getCacheMap().get(targetFile).put(SectionRunnableLabelCacheEnum.Section_Names.name(), section_Names);
-
-
- /*-
- * Note: Below two cache elements are used to support the models which are migrated from version 1.0.3/1.1.0 to the higher versions
- */
-
- final Map<String, List<String>> labelUUID_Sections = new HashMap<String, List<String>>();
-
- getCacheMap().get(targetFile).put(SectionRunnableLabelCacheEnum.Label_UUID_Sections.name(),
- labelUUID_Sections);
-
- final Map<String, List<String>> runnableUUID_Sections = new HashMap<String, List<String>>();
-
- getCacheMap().get(targetFile).put(SectionRunnableLabelCacheEnum.Runnable_UUID_Sections.name(),
- runnableUUID_Sections);
-
- /*- End : Cache initialization */
-
-
- final List<Element> sectionElements = this.helper.getXpathResult(rootElement, "./swModel/sections",
- Element.class, this.helper.getNS_070("am"));
-
-
- for (final Element sectionElement : sectionElements) {
-
- final String sectionName = sectionElement.getAttributeValue("name");
- /*-adding section name in the cache */
- section_Names.add(sectionName);
-
-
- final Attribute labelsAttribute = sectionElement.getAttribute("labels");
-
- if (labelsAttribute != null) {
- extract_MemoryElement_Section_Info(label_Sections_Map, sectionName, labelsAttribute,
- labelUUID_Sections);
- }
-
- final Attribute runEntitiesAttribute = sectionElement.getAttribute("runEntities");
-
- if (runEntitiesAttribute != null) {
- extract_MemoryElement_Section_Info(runnable_Sections_Map, sectionName, runEntitiesAttribute,
- runnableUUID_Sections);
- }
-
-
- final List<Element> labelElements = sectionElement.getChildren("labels");
-
- for (final Element element : labelElements) {
- extract_MemoryElement_Section_Info(label_Sections_Map, sectionName, element, labelUUID_Sections);
- }
-
- final List<Element> runnableElements = sectionElement.getChildren("runEntities");
-
- for (final Element element : runnableElements) {
- extract_MemoryElement_Section_Info(runnable_Sections_Map, sectionName, element,
- runnableUUID_Sections);
-
- }
- }
- }
-
- }
-
- /**
- * This method is used to populate the Label/Runnable name (i.e. MemoryElement name) and the corresponding Section
- * names to which they are associated to
- *
- * @param memoryElement_Sections_Map
- * this map is part of the cache. Depending on type of the MemoryElement i.e. either Label or Runnable,
- * corresponding map is supplied to this method
- * @param sectionName
- * Name of the section to which MemorElement (i.e. Label/Runnable) is associated to
- * @param memoryElementAttribute
- * This the attribute of sections node (in amxmi). This can be either runEntities or labels attribute
- * <b>Note:</b> In case MemoryElements (Label/Runnable) which are defined in the same amxmi as the
- * section, then the corresponding references of label/runnable are generated inside labels/runEntities
- * attribute<br>
- * Example: <sections name="section6" labels="label6?type=Label" runEntities="Runnable7?type=Runnable"/>
- * @param memMElementUUID_Sections
- */
- private void extract_MemoryElement_Section_Info(final Map<String, List<String>> memoryElement_Sections_Map,
- final String sectionName, final Attribute memoryElementAttribute,
- final Map<String, List<String>> memMElementUUID_Sections) {
- final String memoryElementAttributeValue = memoryElementAttribute.getValue();
-
- final StringTokenizer stk = new StringTokenizer(memoryElementAttributeValue);
-
- while (stk.hasMoreTokens()) {
- final String memoryElementReferenceString = stk.nextToken();
-
- final int lastIndexOf = memoryElementReferenceString.lastIndexOf("?");
- if (lastIndexOf != -1) {
- final String memoryElementName = memoryElementReferenceString.substring(0, lastIndexOf);
-
- addEntry(memoryElement_Sections_Map, memoryElementName, sectionName);
- }
- else {
- /*-
- * This is a case of UUID instead of AMALTHEA references
- * Example:
- * labels="_o_iL8JnJEeaK1-VgfUoZ4A _qHmnQJnJEeaK1-VgfUoZ4A"
- */
-
- List<String> list = memMElementUUID_Sections.get(memoryElementReferenceString);
-
- if (list == null) {
- list = new ArrayList<String>();
- memMElementUUID_Sections.put(memoryElementReferenceString, list);
- }
- list.add(sectionName);
- }
- }
- }
-
- /**
- * This method is used to populate the Label/Runnable name (i.e. MemoryElement name) and the corresponding Section
- * names to which they are associated to
- *
- * @param memoryElement_Sections_Map
- * this map is part of the cache. Depending on type of the MemoryElement i.e. either Label or Runnable,
- * corresponding map is supplied to this method
- * @param sectionName
- * Name of the section to which MemorElement (i.e. Label/Runnable) is associated to
- * @param memoryElement
- * This the Element of MemoryElement i.e either Label/Runnable. In amxmi this can be either runEntities
- * or labels element <b>Note:</b> In case MemoryElements (Label/Runnable) which are defined in the
- * different amxmi than the section, then the corresponding references of label/runnable are generated
- * inside labels/runEntities elements<br>
- * Example:<br>
- * <sections name="Section1"><br>
- * <labels href="amlt:/#label1?type=Label"/><br>
- * <labels href="amlt:/#label2?type=Label"/><br>
- * <labels href="amlt:/#label3?type=Label"/><br>
- * <runEntities href="amlt:/#Runnable1?type=Runnable"/><br>
- * <runEntities href="amlt:/#Runnable2?type=Runnable"/><br>
- * <runEntities href="amlt:/#Runnable3?type=Runnable"/><br>
- * </sections><br>
- * @param memMElementUUID_Sections
- */
- private void extract_MemoryElement_Section_Info(final Map<String, List<String>> memoryElement_Sections_Map,
- final String sectionName, final Element memoryElement,
- final Map<String, List<String>> memElementUUID_Sections) {
-
- final String memoryElementAttributeValue = memoryElement.getAttributeValue("href");
-
- if (memoryElementAttributeValue != null) {
-
- final int indexOfHash = memoryElementAttributeValue.lastIndexOf("#");
-
- final int indexOfQuestionmark = memoryElementAttributeValue.lastIndexOf("?");
-
- if ((indexOfHash != -1) && (indexOfQuestionmark != -1)) {
- final String memroyElementName = memoryElementAttributeValue.substring(indexOfHash + 1,
- indexOfQuestionmark);
-
- addEntry(memoryElement_Sections_Map, memroyElementName, sectionName);
- }
- else if (indexOfHash != -1) {
- /*-
- * This is a case of UUID instead of AMALTHEA references
- * Example:
- * <sections xmi:id="_rcL0kJnJEeaK1-VgfUoZ4A" name="s1" >
- * <labels href="#_o_iL8JnJEeaK1-VgfUoZ4A"/>
- * <labels href="#_qHmnQJnJEeaK1-VgfUoZ4A"/>
- * <labels href="default1.amxmi#_fjEtAJnTEeaK1-VgfUoZ4A "/>
- * </sections>
- */
-
- final String memoryElementID = memoryElementAttributeValue.substring(indexOfHash + 1);
-
- List<String> list = memElementUUID_Sections.get(memoryElementID);
-
- if (list == null) {
- list = new ArrayList<String>();
- memElementUUID_Sections.put(memoryElementID, list);
- }
-
- list.add(sectionName);
- }
- }
-
- }
-
- /*- Add a entry */
-
- private void addEntry(final Map<String, List<String>> memoryElement_Sections_Map, final String memoryElementName,
- final String sectionName) {
-
- if (!memoryElement_Sections_Map.containsKey(memoryElementName)) {
-
- memoryElement_Sections_Map.put(memoryElementName, new ArrayList<String>());
- }
- memoryElement_Sections_Map.get(memoryElementName).add(sectionName);
-
- }
-
- @Override
- public Map<File, Map<String, Object>> getCacheMap() {
- return this.map;
- }
-
- @Override
- public void clearCacheMap() {
-
- this.map.clear();
- }
-
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/utils/SectionRunnableLabelCacheEnum.java b/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/utils/SectionRunnableLabelCacheEnum.java
deleted file mode 100644
index 796aa42..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.071/src/org/eclipse/app4mc/amalthea/converters071/utils/SectionRunnableLabelCacheEnum.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters071.utils;
-
-public enum SectionRunnableLabelCacheEnum {
-
- /*- Cache is stored in following format : Map<String, List<String>>
- *
- * Key is the Label name
- *
- * value is the list of Section names
- * */
- Label_Sections,
-
- /*- Cache is stored in following format : Map<String, List<String>>
- *
- * Key is the Runnable name
- *
- * value is the list of Section names
- * */
- Runnable_Sections,
-
- /*- Cache is stored in following format : List<String>
- * */
- Section_Names,
-
- /*- Cache is stored in following format : Map<String, List<String>>
- * */
- Label_UUID_Sections,
-
- /*- Cache is stored in following format : Map<String, List<String>>
- * */
-
- Runnable_UUID_Sections
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.072/.classpath b/plugins/org.eclipse.app4mc.amalthea.converters.072/.classpath
deleted file mode 100644
index eca7bdb..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.072/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.072/.gitignore b/plugins/org.eclipse.app4mc.amalthea.converters.072/.gitignore
deleted file mode 100644
index 09e3bc9..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.072/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/bin/
-/target/
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.072/.project b/plugins/org.eclipse.app4mc.amalthea.converters.072/.project
deleted file mode 100644
index fd467c3..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.072/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.app4mc.amalthea.converters.072</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.072/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.app4mc.amalthea.converters.072/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 0c68a61..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.072/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-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.072/META-INF/MANIFEST.MF b/plugins/org.eclipse.app4mc.amalthea.converters.072/META-INF/MANIFEST.MF
deleted file mode 100644
index 54f6097..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.072/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,9 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: APP4MC Amalthea Converters to 0.7.2
-Bundle-SymbolicName: org.eclipse.app4mc.amalthea.converters.072;singleton:=true
-Bundle-Version: 0.9.6.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-Vendor: Eclipse APP4MC
-Require-Bundle: org.eclipse.app4mc.amalthea.converters.common
-Automatic-Module-Name: org.eclipse.app4mc.amalthea.converters.072
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.072/about.html b/plugins/org.eclipse.app4mc.amalthea.converters.072/about.html
deleted file mode 100644
index 164f781..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.072/about.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!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>November 30, 2017</p>
- <h3>License</h3>
-
- <p>
- The Eclipse Foundation makes available 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 2.0 ("EPL"). A copy of the EPL is
- available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>.
- For purposes of the EPL, "Program" will mean the Content.
- </p>
-
- <p>
- If you did not receive this Content directly from the Eclipse
- Foundation, the Content is being redistributed by another party
- ("Redistributor") and different terms and conditions may
- apply to your use of any object code in the Content. Check the
- Redistributor's license that was provided with the Content. If no such
- license exists, contact the Redistributor. Unless otherwise indicated
- below, the terms and conditions of the EPL still apply to any source
- code in the Content and such source code may be obtained at <a
- href="http://www.eclipse.org/">http://www.eclipse.org</a>.
- </p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.072/build.properties b/plugins/org.eclipse.app4mc.amalthea.converters.072/build.properties
deleted file mode 100644
index e9863e2..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.072/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.072/epl-2.0.html b/plugins/org.eclipse.app4mc.amalthea.converters.072/epl-2.0.html
deleted file mode 100644
index 637a181..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.072/epl-2.0.html
+++ /dev/null
@@ -1,300 +0,0 @@
-<!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" xml:lang="en" lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Eclipse Public License - Version 2.0</title>
- <style type="text/css">
- body {
- margin: 1.5em 3em;
- }
- h1{
- font-size:1.5em;
- }
- h2{
- font-size:1em;
- margin-bottom:0.5em;
- margin-top:1em;
- }
- p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- ul, ol{
- list-style-type:none;
- }
- </style>
- </head>
- <body>
- <h1>Eclipse Public License - v 2.0</h1>
- <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>
- <h2 id="definitions">1. DEFINITIONS</h2>
- <p>“Contribution” means:</p>
- <ul>
- <li>a) in the case of the initial Contributor, the initial content
- Distributed under this Agreement, and
- </li>
- <li>
- b) in the case of each subsequent Contributor:
- <ul>
- <li>i) changes to the Program, and</li>
- <li>ii) additions to the Program;</li>
- </ul>
- 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 changes or additions to the Program that
- are not Modified Works.
- </li>
- </ul>
- <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
- or any Secondary License (as applicable), including Contributors.
- </p>
- <p>“Derivative Works” shall mean any work, whether in Source Code or other
- form, that is based on (or derived from) the Program and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship.
- </p>
- <p>“Modified Works” shall mean any work in Source Code or other form that
- results from an addition to, deletion from, or modification of the
- contents of the Program, including, for purposes of clarity any new file
- in Source Code form that contains any contents of the Program. Modified
- Works shall not include works that contain only declarations, interfaces,
- types, classes, structures, or files of the Program solely in each case
- in order to link to, bind by name, or subclass the Program or Modified
- Works thereof.
- </p>
- <p>“Distribute” means the acts of a) distributing or b) making available
- in any manner that enables the transfer of a copy.
- </p>
- <p>“Source Code” means the form of a Program preferred for making
- modifications, including but not limited to software source code,
- documentation source, and configuration files.
- </p>
- <p>“Secondary License” means either the GNU General Public License,
- Version 2.0, or any later versions of that license, including any
- exceptions or additional permissions as identified by the initial
- Contributor.
- </p>
- <h2 id="grant-of-rights">2. GRANT OF RIGHTS</h2>
- <ul>
- <li>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.
- </li>
- <li>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 or other 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.
- </li>
- <li>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.
- </li>
- <li>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.
- </li>
- <li>e) Notwithstanding the terms of any Secondary License, no Contributor
- makes additional grants to any Recipient (other than those set forth
- in this Agreement) as a result of such Recipient's receipt of the
- Program under the terms of a Secondary License (if permitted under
- the terms of Section 3).
- </li>
- </ul>
- <h2 id="requirements">3. REQUIREMENTS</h2>
- <p>3.1 If a Contributor Distributes the Program in any form, then:</p>
- <ul>
- <li>a) the Program must also be made available as Source Code, in
- accordance with section 3.2, and the Contributor must accompany
- the Program with a statement that the Source Code for the Program
- is available under this Agreement, and informs Recipients how to
- obtain it in a reasonable manner on or through a medium customarily
- used for software exchange; and
- </li>
- <li>
- b) the Contributor may Distribute the Program under a license
- different than this Agreement, provided that such license:
- <ul>
- <li>i) effectively disclaims on behalf of all other 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;
- </li>
- <li>ii) effectively excludes on behalf of all other Contributors all
- liability for damages, including direct, indirect, special, incidental
- and consequential damages, such as lost profits;
- </li>
- <li>iii) does not attempt to limit or alter the recipients' rights in the
- Source Code under section 3.2; and
- </li>
- <li>iv) requires any subsequent distribution of the Program by any party
- to be under a license that satisfies the requirements of this section 3.
- </li>
- </ul>
- </li>
- </ul>
- <p>3.2 When the Program is Distributed as Source Code:</p>
- <ul>
- <li>a) it must be made available under this Agreement, or if the Program (i)
- is combined with other material in a separate file or files made available
- under a Secondary License, and (ii) the initial Contributor attached to
- the Source Code the notice described in Exhibit A of this Agreement,
- then the Program may be made available under the terms of such
- Secondary Licenses, and
- </li>
- <li>b) a copy of this Agreement must be included with each copy of the Program.</li>
- </ul>
- <p>3.3 Contributors may not remove or alter any copyright, patent, trademark,
- attribution notices, disclaimers of warranty, or limitations of liability
- (‘notices’) contained within the Program from any copy of the Program which
- they Distribute, provided that Contributors may add their own appropriate
- notices.
- </p>
- <h2 id="commercial-distribution">4. COMMERCIAL DISTRIBUTION</h2>
- <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>
- <h2 id="warranty">5. NO WARRANTY</h2>
- <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
- BY APPLICABLE LAW, 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>
- <h2 id="disclaimer">6. DISCLAIMER OF LIABILITY</h2>
- <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
- BY APPLICABLE LAW, 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>
- <h2 id="general">7. GENERAL</h2>
- <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.
- </p>
- <p>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. Nothing in this Agreement is intended
- to be enforceable by any entity that is not a Contributor or Recipient.
- No third-party beneficiary rights are created under this Agreement.
- </p>
- <h2 id="exhibit-a">Exhibit A – Form of Secondary Licenses Notice</h2>
- <p>“This Source Code may also be made available under the following
- Secondary Licenses when the conditions for such availability set forth
- in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
- version(s), and exceptions or additional permissions here}.”
- </p>
- <blockquote>
- <p>Simply including a copy of this Agreement, including this Exhibit A
- is not sufficient to license the Source Code under Secondary Licenses.
- </p>
- <p>If it is not possible or desirable to put the notice in a particular file,
- then You may include the notice in a location (such as a LICENSE file in a
- relevant directory) where a recipient would be likely to look for
- such a notice.
- </p>
- <p>You may add additional accurate notices of copyright ownership.</p>
- </blockquote>
- </body>
-</html>
\ No newline at end of file
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.072/plugin.xml b/plugins/org.eclipse.app4mc.amalthea.converters.072/plugin.xml
deleted file mode 100644
index d1f6471..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.072/plugin.xml
+++ /dev/null
@@ -1,117 +0,0 @@
-<?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.converters072.impl.NamespaceConverter"
- enabled="true"
- id="converters.072.namespace"
- input-model-version="0.7.1"
- name="namespace"
- output-model-version="0.7.2">
- <dependent-on-converter
- id="converters.072.rootelement">
- </dependent-on-converter>
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters072.impl.RootElementConverter"
- enabled="true"
- id="converters.072.rootelement"
- input-model-version="0.7.1"
- name="Root Element Converter"
- output-model-version="0.7.2">
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters072.impl.PropertyConstraintsConverter"
- enabled="true"
- id="converters.072.propertyconstraints"
- input-model-version="0.7.1"
- name="PropertyConstraints Converter"
- output-model-version="0.7.2">
- <dependent-on-converter
- id="converters.072.rootelement">
- </dependent-on-converter>
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters072.impl.ConstraintsConverter"
- enabled="true"
- id="converters.072.constraints"
- input-model-version="0.7.1"
- name="Constraints Converter"
- output-model-version="0.7.2">
- <dependent-on-converter
- id="converters.072.rootelement">
- </dependent-on-converter>
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters072.impl.OSConverter"
- enabled="true"
- id="converters.072.Os"
- input-model-version="0.7.1"
- name="Os Converter"
- output-model-version="0.7.2">
- <dependent-on-converter
- id="converters.072.rootelement">
- </dependent-on-converter>
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters072.impl.SwConverter"
- enabled="true"
- id="converters.072.Sw"
- input-model-version="0.7.1"
- name="Sw Converter"
- output-model-version="0.7.2">
- <dependent-on-converter
- id="converters.072.rootelement">
- </dependent-on-converter>
- <dependent-on-converter
- id="converters.072.Os">
- </dependent-on-converter>
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters072.impl.StimuliConverter"
- enabled="true"
- id="converters.072.Stimuli"
- input-model-version="0.7.1"
- name="Stimuli Converter"
- output-model-version="0.7.2">
- <dependent-on-converter
- id="converters.072.rootelement">
- </dependent-on-converter>
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters072.impl.CommonElementsConverter"
- enabled="true"
- id="converters.072.CommonElements"
- input-model-version="0.7.1"
- name="CommonElements Converter"
- output-model-version="0.7.2">
- <dependent-on-converter
- id="converters.072.rootelement">
- </dependent-on-converter>
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters072.impl.ConfigConverter"
- enabled="true"
- id="converters.072.Config"
- input-model-version="0.7.1"
- name="Config Converter"
- output-model-version="0.7.2">
- <dependent-on-converter
- id="converters.072.rootelement">
- </dependent-on-converter>
- </converter>
- </extension>
- <extension
- point="org.eclipse.app4mc.amalthea.model.converters.cachebuilders">
- <CacheBuilder
- ID="org.eclipse.app4mc.amalthea.converters.072.HwElementsCacheBuilder"
- class="org.eclipse.app4mc.amalthea.converters072.utils.HwElementsCacheBuilder"
- enabled="true"
- input-model-version="0.7.1"
- name="HwElementsCacheBuilder">
- </CacheBuilder>
- </extension>
-
-</plugin>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/AbstractConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/AbstractConverter.java
deleted file mode 100644
index 2b44b27..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/AbstractConverter.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters072.impl;
-
-import org.apache.log4j.Logger;
-import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
-import org.eclipse.app4mc.amalthea.converters072.utils.HelperUtils_071_072;
-
-public abstract class AbstractConverter implements IConverter {
-
- protected HelperUtils_071_072 helper;
-
- protected Logger logger;
-
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/CommonElementsConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/CommonElementsConverter.java
deleted file mode 100644
index 7367a1b..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/CommonElementsConverter.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2017-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters072.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters072.utils.HelperUtils_071_072;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-public class CommonElementsConverter extends AbstractConverter {
-
-
- public CommonElementsConverter() {
- this.helper = HelperUtils_071_072.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info("Migration from 0.7.1 to 0.7.2 : Executing \"Common Elements\" converter for model file : "
- + targetFile.getName());
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
- }
- final Element rootElement = root.getRootElement();
-
- updateCommonElements(rootElement);
- }
-
-
- /**
- * Bug 510086 : As per the model changes in 0.7.2 ==>
- *
- * @param rootElement
- */
- private void updateCommonElements(final Element rootElement) {
-
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./componentsModel/tags");
- xpathBuffer.append("|");
- xpathBuffer.append("./hwModel/tags");
- xpathBuffer.append("|");
- xpathBuffer.append("./swModel/tags");
-
- final List<Element> tagElements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(), Element.class,
- this.helper.getGenericNS("xsi"));
-
- if (tagElements.size() > 0) {
-
- this.logger.warn(
- "Tag element's from Components Model, HW Model, SW Model are shifted to CommonElements model");
-
- Element commonElements = rootElement.getChild("commonElements");
-
- // check if "commonElements" tag is already existing. If not then create a Element
- if (commonElements == null) {
- commonElements = new Element("commonElements");
- rootElement.addContent(commonElements);
- }
-
- for (final Element tagElement : tagElements) {
- final Element parentElement = tagElement.getParentElement();
- // removing Tag Elements from its parent and associating it to commonElements Tag
- parentElement.removeContent(tagElement);
- commonElements.addContent(tagElement);
- }
- }
-
-
- }
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/ConfigConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/ConfigConverter.java
deleted file mode 100644
index 61d8ead..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/ConfigConverter.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2017-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters072.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters072.utils.HelperUtils_071_072;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-public class ConfigConverter extends AbstractConverter {
-
-
- public ConfigConverter() {
- this.helper = HelperUtils_071_072.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info("Migration from 0.7.1 to 0.7.2 : Executing \"Config Model\" converter for model file : "
- + targetFile.getName());
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
- }
- final Element rootElement = root.getRootElement();
-
- updateEventConfig(rootElement);
- }
-
-
- /**
- * Bug 510086 : As per the model changes in 0.7.2 ==>
- *
- * EventConfigLink and EventConfigElement are removed <br>
- * ==> Instead (in 0.7.2) EntityEvent is referred inside EventConfig object.
- *
- * @param rootElement
- */
- private void updateEventConfig(final Element rootElement) {
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./configModel/eventsToTrace");
-
- final List<Element> eventsToTracelements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
- Element.class, this.helper.getGenericNS("xsi"));
-
- if (eventsToTracelements.size() > 0) {
-
- Element eventModel = rootElement.getChild("eventModel");
-
- // check if "eventModel" tag is already existing. If not then create a Element
- if (eventModel == null) {
- eventModel = new Element("eventModel");
- rootElement.addContent(eventModel);
- }
-
- for (final Element eventsToTracelement : eventsToTracelements) {
-
- final String tagType = eventsToTracelement.getAttributeValue("type", this.helper.getGenericNS("xsi"));
-
- eventsToTracelement.removeAttribute("type", this.helper.getGenericNS("xsi"));
-
- if (tagType.equals("am:EventConfigElement")) {
-
- final Element eventElement = eventsToTracelement.getChild("event");
- if (eventElement != null) {
-
- // changing the event tag name to events
-
- eventElement.setName("events");
-
- // Removing Event element from EventConfigElement
- eventsToTracelement.removeContent(eventElement);
-
- // Shifting Event element (from config model) to EventModel
- eventModel.addContent(eventElement);
-
- // removing the EventConfigElement defintion as it no longer has any valid data
-
- eventsToTracelement.getParent().removeContent(eventsToTracelement);
- }
-
- }
-
-
- }
- }
-
-
- }
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/ConstraintsConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/ConstraintsConverter.java
deleted file mode 100644
index cf73907..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/ConstraintsConverter.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters072.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters072.utils.HelperUtils_071_072;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-public class ConstraintsConverter extends AbstractConverter {
-
-
- public ConstraintsConverter() {
- this.helper = HelperUtils_071_072.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info("Migration from 0.7.1 to 0.7.2 : Executing Constraints converter for model file : "
- + targetFile.getName());
-
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
- }
- final Element rootElement = root.getRootElement();
-
- update_AffinityConstraints(rootElement);
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
- }
-
- private void update_AffinityConstraints(final Element rootElement) {
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./constraintsModel/affinityConstraints");
-
-
- final List<Element> affinityConstraintElements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
- Element.class, this.helper.getGenericNS("xsi"));
-
- for (final Element affinityConstraintElement : affinityConstraintElements) {
-
- final String type = affinityConstraintElement.getAttributeValue("type", this.helper.getGenericNS("xsi"));
-
- if (type != null) {
- Element childElement = null;
- if (type.equals("am:RunnablePairingConstraint")) {
-
- childElement = affinityConstraintElement.getChild("runnables");
- }
- else if (type.equals("am:ProcessPairingConstraint")) {
- childElement = affinityConstraintElement.getChild("processes");
-
- }
- else if (type.equals("am:DataPairingConstraint")) {
- childElement = affinityConstraintElement.getChild("labels");
-
- }
-
- if (childElement != null) {
- childElement.setName("group");
- }
-
- // in 0.7.2, TargetProcess, TargetCallSequence elements are removed.
- final Element targetElement = affinityConstraintElement.getChild("target");
-
- if (targetElement != null) {
-
- final String targetType = targetElement.getAttributeValue("type", this.helper.getGenericNS("xsi"));
-
- if (targetType != null
- && (targetType.equals("am:TargetCallSequence") || targetType.equals("am:TargetProcess"))) {
-
- affinityConstraintElement.removeContent(targetElement);
-
- }
-
- }
-
- }
- }
- }
-
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/NamespaceConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/NamespaceConverter.java
deleted file mode 100644
index 5e6fa13..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/NamespaceConverter.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters072.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.apache.log4j.Logger;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
-import org.eclipse.app4mc.amalthea.converters072.utils.HelperUtils_071_072;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-public class NamespaceConverter implements IConverter {
-
- private final HelperUtils_071_072 helper;
-
- private final Logger logger;
-
- public NamespaceConverter() {
- this.helper = HelperUtils_071_072.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info("Migration from 0.7.1 to 0.7.2 : Executing Namespace converter for model file : "
- + targetFile.getName());
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
- }
- final Element rootElement = root.getRootElement();
-
- this.helper.updateRootElement_NameSpaces_to_072(rootElement);
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
- }
-
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/OSConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/OSConverter.java
deleted file mode 100644
index 44b7405..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/OSConverter.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters072.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters072.utils.HelperUtils_071_072;
-import org.jdom2.Attribute;
-import org.jdom2.Document;
-import org.jdom2.Element;
-import org.jdom2.Parent;
-
-public class OSConverter extends AbstractConverter {
-
-
- public OSConverter() {
- this.helper = HelperUtils_071_072.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info(
- "Migration from 0.7.1 to 0.7.2 : Executing OS converter for model file : " + targetFile.getName());
-
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
- }
- final Element rootElement = root.getRootElement();
-
- update_AffinityConstraints(rootElement);
-
- update_OsExecutionInstructions(rootElement);
-
- update_OsBuffering(rootElement);
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
- }
-
-
- /**
- * This method is used to migrate the OsBuffering element as per the changes in 0.7.2.
- *
- * Below are the steps which are followed
- *
- * <pre>
- * * OsBuffering element is replaced with element OsDataConsistency
- * Case 1: If (OsBuffering::runnableLevel || OsBuffering::processLevel || OsBuffering::scheduleSectionLevel) =="true" then
- * - OsDataConsistency object is created and the mode is set as "automaticProtection"
- * - DataStability object is created inside OsDataConsistency and below properties are set
- * - enabled=true
- * - algorithm = OsBuffering::bufferingAlgorithm
- * - accessMultiplicity = multipleAccesses
- * - level = <respective OsBuffering flag>
- * Case 2: If (OsBuffering::runnableLevel || OsBuffering::processLevel || OsBuffering::scheduleSectionLevel) =="false" then
- * - OsDataConsistency object is created and the mode is set as "noProtection"
- *
- * Case 3: If OsBuffering element is not present then
- * - OsDataConsistency object is created and the mode is set as "_undefined_" (i.e. default)
- *
- * </pre>
- *
- * @param rootElement
- */
- private void update_OsBuffering(final Element rootElement) {
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./osModel/osBuffering");
-
-
- final List<Element> osBufferingElements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
- Element.class, this.helper.getGenericNS("xsi"));
-
- if (osBufferingElements.size() > 0) {
-
- for (final Element osBufferingElement : osBufferingElements) {
-
- final String runnableLevel = osBufferingElement.getAttributeValue("runnableLevel");
- final String processLevel = osBufferingElement.getAttributeValue("processLevel");
- final String scheduleSectionLevel = osBufferingElement.getAttributeValue("scheduleSectionLevel");
- final String bufferingAlgorithm = osBufferingElement.getAttributeValue("bufferingAlgorithm");
-
- if (Boolean.valueOf(runnableLevel) || Boolean.valueOf(processLevel)
- || Boolean.valueOf(scheduleSectionLevel)) {
-
- final Parent osModelElement = osBufferingElement.getParent();
- osModelElement.removeContent(osBufferingElement);
-
- final Element osDataConsistencyElement = new Element("osDataConsistency");
- osDataConsistencyElement.setAttribute("mode", "automaticProtection");
-
- final Element dataStabilityElement = new Element("dataStability");
- osDataConsistencyElement.addContent(dataStabilityElement);
-
- dataStabilityElement.setAttribute("enabled", "true");
- dataStabilityElement.setAttribute("algorithm",
- bufferingAlgorithm != null ? bufferingAlgorithm : "");
- dataStabilityElement.setAttribute("accessMultiplicity", "multipleAccesses");
-
- if (Boolean.valueOf(processLevel)) {
- dataStabilityElement.setAttribute("level", "process");
- }
- else if (Boolean.valueOf(runnableLevel)) {
- dataStabilityElement.setAttribute("level", "runnable");
- }
- else if (Boolean.valueOf(scheduleSectionLevel)) {
- dataStabilityElement.setAttribute("level", "scheduleSection");
- }
-
- osModelElement.addContent(osDataConsistencyElement);
-
- }
- else {
- // this is the case where all the booleans are resulting false
-
- final Parent osModelElement = osBufferingElement.getParent();
- osModelElement.removeContent(osBufferingElement);
- final Element osDataConsistencyElement = new Element("osDataConsistency");
- osDataConsistencyElement.setAttribute("mode", "noProtection");
-
- osModelElement.addContent(osDataConsistencyElement);
-
- }
-
- }
-
- }
- else {
- // this is the case where OSBuffering is not present
-
- final Element osModelElement = rootElement.getChild("osModel");
-
- if (osModelElement != null) {
- final Element osDataConsistencyElement = new Element("osDataConsistency");
- osModelElement.addContent(osDataConsistencyElement);
-
- }
-
- }
-
- }
-
- private void update_OsExecutionInstructions(final Element rootElement) {
-
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./osModel/operatingSystems/taskSchedulers/schedulingUnit/instructions");
- xpathBuffer.append("|");
- xpathBuffer.append("./osModel/operatingSystems/interruptControllers/schedulingUnit/instructions");
- xpathBuffer.append("|");
- xpathBuffer.append("./osModel/osOverheads/apiOverhead/apiSendMessage");
- xpathBuffer.append("|");
- xpathBuffer.append("./osModel/osOverheads/apiOverhead/apiTerminateTask");
- xpathBuffer.append("|");
- xpathBuffer.append("./osModel/osOverheads/apiOverhead/apiSchedule");
- xpathBuffer.append("|");
- xpathBuffer.append("./osModel/osOverheads/apiOverhead/apiRequestResource");
- xpathBuffer.append("|");
- xpathBuffer.append("./osModel/osOverheads/apiOverhead/apiReleaseResource");
- xpathBuffer.append("|");
- xpathBuffer.append("./osModel/osOverheads/apiOverhead/apiSetEvent");
- xpathBuffer.append("|");
- xpathBuffer.append("./osModel/osOverheads/apiOverhead/apiWaitEvent");
- xpathBuffer.append("|");
- xpathBuffer.append("./osModel/osOverheads/apiOverhead/apiClearEvent");
- xpathBuffer.append("|");
- xpathBuffer.append("./osModel/osOverheads/apiOverhead/apiActivateTask");
- xpathBuffer.append("|");
- xpathBuffer.append("./osModel/osOverheads/apiOverhead/apiEnforcedMigration");
- xpathBuffer.append("|");
- xpathBuffer.append("./osModel/osOverheads/isrCategory1Overhead/preExecutionOverhead");
- xpathBuffer.append("|");
- xpathBuffer.append("./osModel/osOverheads/isrCategory1Overhead/postExecutionOverhead");
- xpathBuffer.append("|");
- xpathBuffer.append("./osModel/osOverheads/isrCategory2Overhead/preExecutionOverhead");
- xpathBuffer.append("|");
- xpathBuffer.append("./osModel/osOverheads/isrCategory2Overhead/postExecutionOverhead");
-
- final List<Element> instructionElements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
- Element.class, this.helper.getGenericNS("xsi"));
-
- for (final Element instructionElement : instructionElements) {
-
- final Attribute attribute = instructionElement.getAttribute("type", this.helper.getGenericNS("xsi"));
-
- if (attribute != null) {
- final String value = attribute.getValue();
- if (value != null) {
- if (value.equals("am:OsExecutionInstructionsConstant")) {
-
- attribute.setValue("am:InstructionsConstant");
- }
- else if (value.equals("am:OsExecutionInstructionsDeviation")) {
- attribute.setValue("am:InstructionsDeviation");
- }
-
- }
- }
- }
-
- }
-
- private void update_AffinityConstraints(final Element rootElement) {
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./osModel/semaphores");
-
-
- final List<Element> semaphoreElements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
- Element.class, this.helper.getGenericNS("xsi"));
-
- for (final Element semaphoreElement : semaphoreElements) {
-
- final Attribute attribute = semaphoreElement.getAttribute("initalValue");
-
- if (attribute != null) {
- attribute.setName("initialValue");
- }
- }
- }
-
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/PropertyConstraintsConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/PropertyConstraintsConverter.java
deleted file mode 100644
index c642017..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/PropertyConstraintsConverter.java
+++ /dev/null
@@ -1,619 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters072.impl;
-
-import java.io.File;
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-import java.nio.charset.StandardCharsets;
-import java.util.AbstractMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.TreeSet;
-
-import org.apache.log4j.LogManager;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters072.utils.HelperUtils_071_072;
-import org.eclipse.app4mc.amalthea.converters072.utils.HwElementsCacheBuilder;
-import org.eclipse.app4mc.amalthea.converters072.utils.HwElementsCacheEnum;
-import org.jdom2.Attribute;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-public class PropertyConstraintsConverter extends AbstractConverter {
-
- private List<ICache> caches;
- private Map<File, Document> fileName_documentsMap;
- private File targetFile;
-
- public PropertyConstraintsConverter() {
- this.helper = HelperUtils_071_072.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info("Migration from 0.7.1 to 0.7.2 : Executing PropertyConstraints converter for model file : "
- + targetFile.getName());
-
- this.caches = caches;
-
- this.fileName_documentsMap = fileName_documentsMap;
-
- this.targetFile = targetFile;
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
- }
- final Element rootElement = root.getRootElement();
-
- remove_CoreTypes_MemoryTypes(rootElement);
-
- update_Core_Refs(rootElement);
-
- update_Memory_Refs(rootElement);
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
- }
-
- /**
- * Bug 507885:
- *
- * Based on the change in MetaModel -> CoreType & MemoryType objects should not be defined inside
- * PropertyConstraints model.
- *
- *
- * Based on the above point -> EStructuralFeatures inside PropertyConstraintsModel class : coreTypeDefinitions,
- * memoryTypeDefinitions are removed as a part of migration.
- *
- * Definitions of corresponding CoreType and MemoryType are checked if they already exists in HW Models (in model
- * scope). If they do not exists, definitions from PropertyConstraints model are moved to HW Model
- *
- * @param rootElement
- * org.jdom2.Element of Amalthea object
- */
-
- @SuppressWarnings("unchecked")
- private void remove_CoreTypes_MemoryTypes(final Element rootElement) {
-
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./propertyConstraintsModel");
-
-
- final List<Element> propertyConstraintsModelElements = this.helper.getXpathResult(rootElement,
- xpathBuffer.toString(), Element.class, this.helper.getGenericNS("xsi"));
-
- if (propertyConstraintsModelElements.size() > 0) {
-
- final Element propertyConstraintsModel = propertyConstraintsModelElements.get(0);
-
- final List<Element> coreTypeDefinitions = propertyConstraintsModel.getChildren("coreTypeDefinitions");
-
- final Iterator<Element> coreTypesIterator = coreTypeDefinitions.iterator();
-
- while (coreTypesIterator.hasNext()) {
-
- final Element coreTypeDefinition = coreTypesIterator.next();
-
- final String coreTypeName = coreTypeDefinition.getAttributeValue("name");
-
- /*-removing the element from iterator -> as in below code iterating list is modified*/
- coreTypesIterator.remove();
- /*- removing the CoreType objects from the PropertyConstraints model */
- propertyConstraintsModel.removeContent(coreTypeDefinition);
-
-
- if (coreTypeName != null) {
-
- /*- Below code is used to check if the CoreType element definition is available in the HW Model*/
-
- if (!isHWElementPresentInCache(HwElementsCacheEnum.CORE_TYPE_NAMES, coreTypeName)) {
-
- final Entry<File, Element> entry = getFirstOccuranceOfHwModelFromModelFiles();
-
- final File fileAssociatedToHwElement = entry.getKey();
-
- final Element hwModelElement = entry.getValue();
-
- /*- renaming the xml tag name from coreTypeDefinitions to coreTypes -> as it will associated to HW Model */
- coreTypeDefinition.setName("coreTypes");
- /*- associating coreTypes to HW Model */
- hwModelElement.addContent(coreTypeDefinition);
-
- /*-newly added coreType elements are updated in the cache */
-
- final List<String> coreTypeNames = (List<String>) getHwElementsCacheBuilder().getCacheMap()
- .get(fileAssociatedToHwElement).get(HwElementsCacheEnum.CORE_TYPE_NAMES.name());
-
- coreTypeNames.add(coreTypeName);
- }
- }
-
-
- }
-
- final List<Element> memoryTypeDefinitions = propertyConstraintsModel.getChildren("memoryTypeDefinitions");
-
- final Iterator<Element> memoryTypesIterator = memoryTypeDefinitions.iterator();
-
- while (memoryTypesIterator.hasNext()) {
-
- final Element memoryTypeDefinition = memoryTypesIterator.next();
-
- final String memoryTypeName = memoryTypeDefinition.getAttributeValue("name");
-
- /*-removing the element from iterator -> as in below code iterating list is modified*/
- memoryTypesIterator.remove();
-
- /*- removing the MemoryType objects from the PropertyConstraints model */
- propertyConstraintsModel.removeContent(memoryTypeDefinition);
-
- if (memoryTypeName != null) {
-
- /*- Below code is used to check if the MemoryType element definition is available in the HW Model*/
-
- if (!isHWElementPresentInCache(HwElementsCacheEnum.MEMORY_TYPE_NAMES, memoryTypeName)) {
-
- final Entry<File, Element> entry = getFirstOccuranceOfHwModelFromModelFiles();
-
- final File fileAssociatedToHwElement = entry.getKey();
-
- final Element hwModelElement = entry.getValue();
-
- /*- renaming the xml tag name from memoryTypeDefinitions to memoryTypes -> as it will associated to HW Model */
- memoryTypeDefinition.setName("memoryTypes");
- /*- associating coreTypes to HW Model */
- hwModelElement.addContent(memoryTypeDefinition);
-
- /*-newly added memorType elements are updated in the cache */
-
- final List<String> memoryTypeNames = (List<String>) getHwElementsCacheBuilder().getCacheMap()
- .get(fileAssociatedToHwElement).get(HwElementsCacheEnum.MEMORY_TYPE_NAMES.name());
-
- memoryTypeNames.add(memoryTypeName);
- }
- }
-
-
- }
- }
-
- }
-
- /**
- * Bug 507885: As HW elements should not be created inside PropertyConstraints model -> Model change is made to
- * refer the Memory elements from HW Model. <br>
- *
- * This method will remove the definitions of Memory objects inside PropertyConstraints model and add the memory
- * references (defined in HW Model)
- *
- * - In case if HW Model doesn't exists in any of the AMALTHEA models (in scope) -> then a new HW Model and the
- * corresponding Memory objects are created accordingly.
- *
- * Note: For the newly created Memory elements -> name of the Memory element is set same as the Memory element which
- * was defined inside PropertyConstraints model
- *
- * @param rootElement
- * org.jdom2.Element of Amalthea object
- */
- @SuppressWarnings("unchecked")
- private void update_Memory_Refs(final Element rootElement) {
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./propertyConstraintsModel//firstConstraint[@xsi:type=\"am:HwMemoryProperty\"]/memory");
- xpathBuffer.append("|");
- xpathBuffer.append("./propertyConstraintsModel//secondConstraint[@xsi:type=\"am:HwMemoryProperty\"]/memory");
- xpathBuffer.append("|");
- xpathBuffer.append("./propertyConstraintsModel//hwConstraint[@xsi:type=\"am:HwMemoryProperty\"]/memory");
-
- final List<Element> memoryElements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
- Element.class, this.helper.getGenericNS("xsi"));
-
-
- final Iterator<Element> memoryElementsIterator = memoryElements.iterator();
-
- while (memoryElementsIterator.hasNext()) {
-
- final Element memoryElement = memoryElementsIterator.next();
-
- final String memoryName = memoryElement.getAttributeValue("name");
-
-
- final Element parent = memoryElement.getParentElement();
-
-
- /*- removing the Memory object from PropertyConstraints model */
- parent.removeContent(memoryElement);
-
- if (memoryName != null) {
-
- /*- Below code is used to check if the referred Memory element definition is available in the HW Model. If not create the required structure and define Memory objects*/
-
- if (!isHWElementPresentInCache(HwElementsCacheEnum.MEMORY_NAMES, memoryName)) {
-
- final Entry<File, Element> entry = getFirstOccuranceOfHwModelFromModelFiles();
-
- final File fileAssociatedToHwElement = entry.getKey();
-
- final Element hwModelElement = entry.getValue();
-
- Element system = hwModelElement.getChild("system");
- if (system == null) {
- system = new Element("system");
- system.setAttribute("name", "migration_gen_system");
- hwModelElement.addContent(system);
- }
-
- final Element genMemoryElement = new Element("memories");
- genMemoryElement.setAttribute("name", memoryName);
- system.addContent(genMemoryElement);
-
- /*-newly added memory elements are updated in the cache */
-
- final List<String> memoryNames = (List<String>) getHwElementsCacheBuilder().getCacheMap()
- .get(fileAssociatedToHwElement).get(HwElementsCacheEnum.MEMORY_NAMES.name());
-
- memoryNames.add(memoryName);
-
- }
-
- /*- Adding refernce to Memory */
- if (isElementDefinedInFile(memoryName, HwElementsCacheEnum.MEMORY_NAMES, this.targetFile)) {
- parent.setAttribute(new Attribute("memory", encodeName(memoryName) + "?type=Memory"));
-
- }
- else {
- final Element refMemoryElement = new Element("memory");
- refMemoryElement.setAttribute("href", "amlt:/#" + encodeName(memoryName) + "?type=Memory");
- /*- adding reference to Memory object (which is defined in the HW Model) */
- parent.addContent(refMemoryElement);
- }
-
- }
- }
-
- }
-
- /**
- * Bug 507885: As HW elements should not be created inside PropertyConstraints model -> Model change is made to
- * refer the Core elements from HW Model. <br>
- *
- * This method will remove the definitions of Core objects inside PropertyConstraints model and add the references
- * to the Core elements (defined in HW Model)
- *
- * - In case if HW Model doesn't exists in any of the AMALTHEA models (in scope) -> then a new HW Model and the
- * corresponding Core objects are created accordingly.
- *
- * Note: For the newly created Core elements -> name of the Core element is set same as the Core element which was
- * defined inside PropertyConstraints model
- *
- * @param rootElement
- * org.jdom2.Element of Amalthea object
- */
- @SuppressWarnings("unchecked")
- private void update_Core_Refs(final Element rootElement) {
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./propertyConstraintsModel//firstConstraint[@xsi:type=\"am:HwCoreProperty\"]/core");
- xpathBuffer.append("|");
- xpathBuffer.append("./propertyConstraintsModel//secondConstraint[@xsi:type=\"am:HwCoreProperty\"]/core");
- xpathBuffer.append("|");
- xpathBuffer.append("./propertyConstraintsModel//hwConstraint[@xsi:type=\"am:HwCoreProperty\"]/core");
-
- final List<Element> coreElements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
- Element.class, this.helper.getGenericNS("xsi"));
-
- final Iterator<Element> coreElementsIterator = coreElements.iterator();
-
- while (coreElementsIterator.hasNext()) {
-
- final Element coreElement = coreElementsIterator.next();
-
- final String coreName = coreElement.getAttributeValue("name");
-
-
- final Element parent = coreElement.getParentElement();
-
- parent.removeContent(coreElement);
-
- if (coreName != null) {
-
- /*- Below code is used to check if the referred Core element definition is available in the HW Model. If not create the required structure and define Core objects*/
-
- if (!isHWElementPresentInCache(HwElementsCacheEnum.CORE_NAMES, coreName)) {
-
- final Entry<File, Element> entry = getFirstOccuranceOfHwModelFromModelFiles();
-
- final File fileAssociatedToHwElement = entry.getKey();
-
- final Element hwModelElement = entry.getValue();
-
- Element system = hwModelElement.getChild("system");
- if (system == null) {
- system = new Element("system");
- system.setAttribute("name", "migration_gen_system");
- hwModelElement.addContent(system);
- }
-
- final List<Element> ecuElements = this.helper.getXpathResult(system,
- ".//ecus[@name=\"migration_gen_ecu\"]", Element.class);
-
- if (ecuElements.size() > 0) {
-
- final Element ecus = ecuElements.get(0);
-
- final List<Element> microControllersList = ecus.getChildren("microcontrollers");
-
- for (final Element microControllers : microControllersList) {
-
- final String microControllerName = microControllers.getAttributeValue("name");
-
- if (microControllerName != null
- && microControllerName.equals("migration_gen_microcontroller")) {
- /*- associating PC model Core Element to HW Model */
- coreElement.setName("cores");
- microControllers.addContent(coreElement);
-
- break;
- }
- }
-
- }
- else {
-
- final Element ecus = new Element("ecus");
-
- ecus.setAttribute("name", "migration_gen_ecu");
-
- system.addContent(ecus);
- final Element microControllers = new Element("microcontrollers");
-
- microControllers.setAttribute("name", "migration_gen_microcontroller");
-
- ecus.addContent(microControllers);
- /*- associating PC model Core Element to HW Model */
- coreElement.setName("cores");
- microControllers.addContent(coreElement);
- }
-
-
- /*-newly added core elements are updated in the cache */
-
- final List<String> coreNames = (List<String>) getHwElementsCacheBuilder().getCacheMap()
- .get(fileAssociatedToHwElement).get(HwElementsCacheEnum.CORE_NAMES.name());
-
- coreNames.add(coreName);
-
- }
-
- /*- Adding reference to Core object*/
-
- if (isElementDefinedInFile(coreName, HwElementsCacheEnum.CORE_NAMES, this.targetFile)) {
- parent.setAttribute(new Attribute("core", encodeName(coreName) + "?type=Core"));
-
- }
- else {
- final Element refCoreElement = new Element("core");
- refCoreElement.setAttribute("href", "amlt:/#" + encodeName(coreName) + "?type=Core");
- /*- adding reference to Core object (which is defined in the HW Model) */
- parent.addContent(refCoreElement);
- }
- }
- }
- }
-
- private Entry<File, Element> firstOccuranceOfHwModelInModelScope;
-
- /**
- * This method is used to get the first HW Model from the model scope (i.e. Model scope can have multiple model
- * files with HW Models -> this method is used to return the first HW Model )
- *
- * @return Entry<File, Element> Entry object -> <br>
- * key is the File containing HW Model, <br>
- * value is the org.jdom2.Element of "HW Model"
- */
- private Entry<File, Element> getFirstOccuranceOfHwModelFromModelFiles() {
-
- if (this.firstOccuranceOfHwModelInModelScope != null) {
- return this.firstOccuranceOfHwModelInModelScope;
- }
-
-
- final HwElementsCacheBuilder iCache = getHwElementsCacheBuilder();
-
- if (iCache == null) {
-
- throw new RuntimeException("HwElementsCache is not buit and Object of it is not available in Converters");
- }
-
- final Map<File, Map<String, Object>> cacheMap = iCache.getCacheMap();
-
- final Set<File> fileSet = this.fileName_documentsMap.keySet();
-
-
- final TreeSet<File> sortedInputFileSet = new TreeSet<File>(fileSet);
-
- for (final File file : sortedInputFileSet) {
-
- final Map<String, Object> map = cacheMap.get(file);
-
- final Object object = map.get(HwElementsCacheEnum.HwModel.name());
-
- /*-this is the case where HW Model is existing inside the AMALTHEA model file*/
- if (object instanceof Element) {
- /*- returning Entry object with key as file (containing HW Model), value as the org.jdom2.Element representing HWModel*/
- this.firstOccuranceOfHwModelInModelScope = new AbstractMap.SimpleEntry<File, Element>(file,
- (Element) object);
- return this.firstOccuranceOfHwModelInModelScope;
- }
-
- }
-
- /*- this is the case where HW model is not found*/
-
- // creating HWModel in the first input AMALTHEA model file
-
- final File firstInputModelFile = sortedInputFileSet.first();
- final Document document = this.fileName_documentsMap.get(firstInputModelFile);
-
- if (document != null) {
-
- final Element rootElement = document.getRootElement();
-
- if (rootElement.getName().equals("Amalthea")) {
-
- final Element hwModel = new Element("hwModel");
-
- rootElement.addContent(hwModel);
-
- final Map<String, Object> map = cacheMap.get(firstInputModelFile);
-
- /*- updating the cace with created HwModel*/
- map.put(HwElementsCacheEnum.HwModel.name(), hwModel);
-
- /*- returning Entry object with key as file (containing HW Model), value as the org.jdom2.Element representing HWModel*/
- this.firstOccuranceOfHwModelInModelScope = new AbstractMap.SimpleEntry<File, Element>(
- firstInputModelFile, hwModel);
- return this.firstOccuranceOfHwModelInModelScope;
-
- }
- }
- return null;
-
- }
-
-
- /**
- * This method is used to check if the HW Element (with a specific name) is existing in the cache i.e. if the
- * element is defined in HW Model
- *
- * @param type
- * Type of HW Element
- * @param hwElementName
- * name of the HW Element
- * @return boolean true if for the supplied type & name there exists a element in HW Model (of model scope)
- */
- @SuppressWarnings("unchecked")
- private boolean isHWElementPresentInCache(final HwElementsCacheEnum type, final String hwElementName) {
-
- final HwElementsCacheBuilder iCache = getHwElementsCacheBuilder();
-
- if (iCache == null) {
-
- throw new RuntimeException("HwElementsCache is not buit and Object of it is not available in Converters");
- }
-
- final Map<File, Map<String, Object>> cacheMap = iCache.getCacheMap();
-
- final Set<File> fileSet = this.fileName_documentsMap.keySet();
-
- for (final File file : fileSet) {
-
- final Map<String, Object> map = cacheMap.get(file);
-
- final Object object = map.get(type.name());
-
- if (object instanceof List) {
- if (((List<String>) object).contains(hwElementName)) {
- return true;
- }
- }
- }
-
- return false;
- }
-
- private HwElementsCacheBuilder hwElementsCacheBuilder;
-
- /**
- * This method is used to get the HwElementsCacheBuilder object
- *
- * @return HwElementsCacheBuilder
- */
- private HwElementsCacheBuilder getHwElementsCacheBuilder() {
-
- if (this.hwElementsCacheBuilder == null) {
- for (final ICache cache : this.caches) {
-
- if (cache instanceof HwElementsCacheBuilder) {
- this.hwElementsCacheBuilder = (HwElementsCacheBuilder) cache;
- return this.hwElementsCacheBuilder;
- }
- }
- }
-
- return this.hwElementsCacheBuilder;
- }
-
- private String encodeName(final String name) {
- if (name == null || name.length() == 0) {
- return "no-name";
- }
-
- String result;
- try {
- result = URLEncoder.encode(name, StandardCharsets.UTF_8.toString());
- }
- catch (final UnsupportedEncodingException e) {
- result = name; // keep old name - we have no better option
- }
- return result;
- }
-
- /**
- * This method is used to verify if the HW Elements definition is present in the supplied input file
- *
- * @param elementName
- * Name of the HW element (e.g: Core name or Memory name)
- * @param inputFile
- * Input File which is being migrated to version 0.7.1
- * @return boolean true if the Element definition is found in the supplied input model file
- */
- @SuppressWarnings("unchecked")
- private boolean isElementDefinedInFile(final String elementName, final HwElementsCacheEnum elementsType,
- final File inputFile) {
-
- final HwElementsCacheBuilder iCache = getHwElementsCacheBuilder();
-
- final Map<File, Map<String, Object>> cacheMap = iCache.getCacheMap();
-
- final Map<String, Object> map = cacheMap.get(inputFile);
-
- if (map != null) {
-
- final Object object = map.get(elementsType.name());
-
- if (object instanceof List) {
- if (((List<String>) object).contains(elementName)) {
- return true;
- }
-
- }
- }
-
- return false;
- }
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/RootElementConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/RootElementConverter.java
deleted file mode 100644
index 5581b54..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/RootElementConverter.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters072.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.apache.log4j.Logger;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
-import org.eclipse.app4mc.amalthea.converters072.utils.HelperUtils_071_072;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-/**
- * This class is responsible for converting the root element of the model file as : "Amalthea" (only if for the supplied
- * model root element is other than "Amalthea" e.g: hwModel or swModel)
- *
- * @author mez2rng
- *
- */
-public class RootElementConverter implements IConverter {
-
- private final HelperUtils_071_072 helper;
-
- private final Logger logger;
-
- public RootElementConverter() {
- this.helper = HelperUtils_071_072.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- /*-
- * ==============
- *|| Input Model :||
- * ==============
- * <am:MappingModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:am="http://app4mc.eclipse.org/amalthea/0.7.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- * </am:MappingModel>
- *
- * ==============
- *|| Output Model :||
- * ==============
- *
- * <am:Amalthea xmlns:am="http://app4mc.eclipse.org/amalthea/0.7.2" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- * <mappingModel>
- *
- * </mappingModel>
- </am:Amalthea>
- */
-
-
- this.logger.info("Migration from 0.7.1 to 0.7.2 : Executing \"Root Element Converter\" for model file : "
- + targetFile.getName());
-
- final Document document = fileName_documentsMap.get(targetFile);
-
- if (document == null) {
- return;
- }
- final Element rootElement = document.getRootElement();
-
- final String rootTagName = rootElement.getName();
-
- if (!rootTagName.equals("Amalthea")) {
-
- if (rootTagName.equals("SWModel") || rootTagName.equals("HWModel") || rootTagName.equals("OSModel")
- || rootTagName.equals("StimuliModel") || rootTagName.equals("ConstraintsModel")
- || rootTagName.equals("EventModel") || rootTagName.equals("PropertyConstraintsModel")
- || rootTagName.equals("MappingModel") || rootTagName.equals("ConfigModel")
- || rootTagName.equals("ComponentsModel")) {
-
- final Element newRootElement = new Element("Amalthea");
-
- this.helper.copyAllNameSpaces(rootElement, newRootElement);
-
- updateCurrentRootTagProps(rootElement);
-
- document.removeContent();
-
- newRootElement.addContent(rootElement);
-
- document.addContent(newRootElement);
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), document);
- }
-
- }
-
-
- }
-
- /**
- * This method is used to remove the default namespaces associated to the Root Element and also change the name of
- * it -> so that it can be added as a sub-tag inside "Amalthea root element"
- *
- * @param rootElement
- * Element This is the root element of the model file (where Amalthea is not root element)
- */
- private void updateCurrentRootTagProps(final Element rootElement) {
-
- this.helper.removeDefaultAttribs(rootElement);
-
- final String name = rootElement.getName();
-
- if (name.equals("SWModel")) {
- rootElement.setName("swModel");
- }
- else if (name.equals("HWModel")) {
- rootElement.setName("hwModel");
- }
- else if (name.equals("OSModel")) {
- rootElement.setName("osModel");
- }
- else if (name.equals("StimuliModel")) {
- rootElement.setName("stimuliModel");
- }
- else if (name.equals("ConstraintsModel")) {
- rootElement.setName("constraintsModel");
- }
- else if (name.equals("EventModel")) {
- rootElement.setName("eventModel");
- }
- else if (name.equals("PropertyConstraintsModel")) {
- rootElement.setName("propertyConstraintsModel");
- }
- else if (name.equals("MappingModel")) {
- rootElement.setName("mappingModel");
- }
- else if (name.equals("ConfigModel")) {
- rootElement.setName("configModel");
- }
- else if (name.equals("ComponentsModel")) {
- rootElement.setName("componentsModel");
- }
-
-
- }
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/StimuliConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/StimuliConverter.java
deleted file mode 100644
index 58cc70b..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/StimuliConverter.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters072.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters072.utils.HelperUtils_071_072;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-public class StimuliConverter extends AbstractConverter {
-
-
- public StimuliConverter() {
- this.helper = HelperUtils_071_072.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info(
- "Migration from 0.7.1 to 0.7.2 : Executing Stimuli converter for model file : " + targetFile.getName());
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
- }
- final Element rootElement = root.getRootElement();
-
- updateArrivalCurve(rootElement);
- }
-
-
- /**
- * Bug 510088 : As per the model changes in 0.7.2 ==> "arrivalCurveEntries" is changed to "entries" inside the class
- * ArrivalCurve
- *
- * @param rootElement
- */
- private void updateArrivalCurve(final Element rootElement) {
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./stimuliModel/stimuli[@xsi:type=\"am:ArrivalCurve\"]/arrivalCurveEntries");
-
- final List<Element> elements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(), Element.class,
- this.helper.getGenericNS("xsi"));
-
- for (final Element element : elements) {
- // changing tag name from : arrivalCurveEntries to entries
- element.setName("entries");
- }
-
- }
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/SwConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/SwConverter.java
deleted file mode 100644
index 1ff33ff..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/impl/SwConverter.java
+++ /dev/null
@@ -1,478 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters072.impl;
-
-import java.io.File;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters072.utils.HelperUtils_071_072;
-import org.jdom2.Attribute;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-public class SwConverter extends AbstractConverter {
-
-
- public SwConverter() {
- this.helper = HelperUtils_071_072.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info(
- "Migration from 0.7.1 to 0.7.2 : Executing SW converter for model file : " + targetFile.getName());
-
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
- }
- final Element rootElement = root.getRootElement();
-
- update_Buffering(rootElement);
-
- update_SamplingType(rootElement);
-
- update_InstructionsConstant(rootElement);
-
- update_InstructionsDeviation(rootElement);
-
- update_ProbabilityGroup(rootElement);
-
- update_Group(rootElement);
-
- update_Preemption(rootElement);
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
- }
-
-
- /**
- * This method is used to migrate the "buffered" attribute of Label and LabelAccess
- *
- * For migration of buffered attribute inside Label, below are the steps which are followed:
- *
- * <pre>
- *
- * *. LabelBufferring is replaced with DataStability element
- * - If LabelBuffering value is "buffered" then the corresponding value of "dataStability" is set as "CustomProtection"
- * - If LabelBuffering value is "notBuffered" then the corresponding value of "dataStability" is set as "noProtection"
- * - If LabelBuffering value is "_undefined_" (default) then the corresponding value of "dataStability" is set as "_undefined_" (default)
- *
- * </pre>
- *
- * *For migration of buffered attribute inside LabelAccess, below are the steps which are followed:
- *
- * <pre>
- *
- * *. LabelAccessBufferring is replaced with DataStability element
- * - If LabelAccessBufferring value is "inherited" then the corresponding value of "dataStability" is set as "inherited"
- * - If LabelAccessBufferring value is "buffered" then the corresponding value of "dataStability" is set as "customProtection"
- * - If LabelAccessBufferring value is "notBuffered" then the corresponding value of "dataStability" is set as "noProtection"
- * - If LabelAccessBufferring value is "_undefined_" (default) then the corresponding value of "dataStability" is set as "_undefined_" (default)
- *
- * </pre>
- *
- * @param rootElement
- */
- private void update_Buffering(final Element rootElement) {
-
- final StringBuffer labelXpathBuffer = new StringBuffer();
-
- labelXpathBuffer.append("./swModel/labels");
-
- final List<Element> elements = this.helper.getXpathResult(rootElement, labelXpathBuffer.toString(),
- Element.class, this.helper.getGenericNS("xsi"));
-
- for (final Element labelElement : elements) {
-
- final Attribute bufferedAttribute = labelElement.getAttribute("buffered");
-
- if (bufferedAttribute != null) {
-
- bufferedAttribute.setName("dataStability");
-
- final String bufferedValue = bufferedAttribute.getValue();
-
- if (bufferedValue.equals("buffered")) {
- bufferedAttribute.setValue("customProtection");
-
- }
- else if (bufferedValue.equals("notBuffered")) {
- bufferedAttribute.setValue("noProtection");
- }
-
- }
-
- }
-
- final StringBuffer labelAccessXpathBuffer = new StringBuffer();
-
- labelAccessXpathBuffer.append("./swModel/runnables//runnableItems[@xsi:type=\"am:LabelAccess\"]");
- labelAccessXpathBuffer.append("|");
- labelAccessXpathBuffer.append("./swModel/runnables//runnableItem[@xsi:type=\"am:LabelAccess\"]");
-
- final List<Element> labelAccesselements = this.helper.getXpathResult(rootElement,
- labelAccessXpathBuffer.toString(), Element.class, this.helper.getGenericNS("xsi"));
-
- for (final Element labelAccessElement : labelAccesselements) {
-
- final Attribute bufferedAttribute = labelAccessElement.getAttribute("buffered");
-
- if (bufferedAttribute != null) {
-
- bufferedAttribute.setName("dataStability");
-
- final String bufferedValue = bufferedAttribute.getValue();
-
- if (bufferedValue.equals("inherited")) {
- bufferedAttribute.setValue("inherited");
-
- }
- else if (bufferedValue.equals("buffered")) {
- bufferedAttribute.setValue("customProtection");
- }
- else if (bufferedValue.equals("notBuffered")) {
- bufferedAttribute.setValue("noProtection");
- }
- }
-
- }
-
-
- }
-
- /**
- *
- * SamplingType Enum is part of Deviation object till 0.7.1
- *
- * Based on bugzilla : 508523, SamplingType is shifted from Deviation element to Boundaries element (sub-class of
- * Distribution)
- *
- * -- As a part of migration, SamplingType content part of Deviation is associted to Boundaries. In case
- * Distribution of type Distribution is not present inside Deviation, SamplingType content is not associated and
- * lost (as expected)
- *
- * Note: Deviation element is used inside Stimulus model, HW model, OS model, SW model
- *
- * @param rootElement
- */
-
- private void update_SamplingType(final Element rootElement) {
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./stimuliModel/stimuli/stimulusDeviation");
- xpathBuffer.append("|");
- xpathBuffer.append("./hwModel/accessPaths/latencies[@xsi:type=\"am:LatencyDeviation\"]/deviation");
- xpathBuffer.append("|");
- xpathBuffer.append("./osModel/operatingSystems/taskSchedulers/schedulingUnit/instructions/deviation");
- xpathBuffer.append("|");
-
- xpathBuffer.append("./osModel/operatingSystems/interruptControllers/schedulingUnit/instructions/deviation");
- xpathBuffer.append("|");
-
- xpathBuffer.append("./osModel/osOverheads//deviation");
- xpathBuffer.append("|");
-
- xpathBuffer.append("./swModel/runnables//deviation");
-
-
- final List<Element> elements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(), Element.class,
- this.helper.getGenericNS("xsi"));
-
- for (final Element deviation : elements) {
- /*- updating the type of the Element as per change introduced in 0.7.2*/
- final Attribute samplingTypeAttribute = deviation.getAttribute("samplingType");
-
- if (samplingTypeAttribute != null) {
- final String value = samplingTypeAttribute.getValue();
-
- final Element distribution = deviation.getChild("distribution");
-
- if (distribution != null) {
-
- final String distributionType = distribution.getAttributeValue("type",
- this.helper.getGenericNS("xsi"));
-
- /*- Setting "samplingType" to "distribution" --> only if the distribution element is of type "am:Boundaries" */
- if (distributionType != null && distributionType.equals("am:Boundaries")) {
- distribution.setAttribute("samplingType", value);
- }
- }
-
- deviation.removeAttribute(samplingTypeAttribute);
-
- }
-
- }
-
-
- }
-
- private void update_InstructionsConstant(final Element rootElement) {
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./swModel/runnables//runnableItems[@xsi:type=\"am:InstructionsConstant\"]");
- xpathBuffer.append("|");
- xpathBuffer.append("./swModel/runnables//runnableItem[@xsi:type=\"am:InstructionsConstant\"]");
-
- final List<Element> elements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(), Element.class,
- this.helper.getGenericNS("xsi"));
-
- for (final Element instructionsConstantElement : elements) {
- /*- updating the type of the Element as per change introduced in 0.7.2*/
- final Attribute typeAttribute = instructionsConstantElement.getAttribute("type",
- this.helper.getGenericNS("xsi"));
- typeAttribute.setValue("am:RunnableInstructions");
-
- final Attribute valueAttribute = instructionsConstantElement.getAttribute("value");
-
-
- final Element subInstructionsConstantElement = new Element("default");
- subInstructionsConstantElement.setAttribute("type", "am:InstructionsConstant",
- this.helper.getGenericNS("xsi"));
-
- if (valueAttribute != null) {
- subInstructionsConstantElement.setAttribute("value", valueAttribute.getValue());
- instructionsConstantElement.removeAttribute(valueAttribute);
- }
-
- instructionsConstantElement.addContent(subInstructionsConstantElement);
- }
-
-
- }
-
- private void update_InstructionsDeviation(final Element rootElement) {
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./swModel/runnables//runnableItems[@xsi:type=\"am:InstructionsDeviation\"]");
- xpathBuffer.append("|");
- xpathBuffer.append("./swModel/runnables//runnableItem[@xsi:type=\"am:InstructionsDeviation\"]");
-
- final List<Element> elements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(), Element.class,
- this.helper.getGenericNS("xsi"));
-
- for (final Element instructionsDeviationElement : elements) {
- /*- updating the type of the Element as per change introduced in 0.7.2*/
- final Attribute typeAttribute = instructionsDeviationElement.getAttribute("type",
- this.helper.getGenericNS("xsi"));
- typeAttribute.setValue("am:RunnableInstructions");
-
-
- final Element subInstructionsDeviationElement = new Element("default");
- subInstructionsDeviationElement.setAttribute("type", "am:InstructionsDeviation",
- this.helper.getGenericNS("xsi"));
-
- final List<Element> instructionsDeviationChildElements = instructionsDeviationElement.getChildren();
-
- final Iterator<Element> instructionsDeviationChildElements_iterator = instructionsDeviationChildElements
- .iterator();
-
- while (instructionsDeviationChildElements_iterator.hasNext()) {
-
- final Element nextChildElement = instructionsDeviationChildElements_iterator.next();
-
- instructionsDeviationChildElements_iterator.remove();
-
- subInstructionsDeviationElement.addContent(nextChildElement);
- }
-
- instructionsDeviationElement.addContent(subInstructionsDeviationElement);
- }
-
-
- }
-
-
- private void update_Preemption(final Element rootElement) {
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./swModel/processPrototypes[@preemption=\"unknown\"]");
- xpathBuffer.append("|");
- xpathBuffer.append("./swModel/tasks[@preemption=\"unknown\"]");
-
- final List<Element> elements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(), Element.class,
- this.helper.getGenericNS("xsi"));
-
- for (final Element element : elements) {
- element.removeAttribute("preemption");
- }
-
-
- }
-
- /**
- * Due to removal of element : DeviationRunnableItem
- *
- *
- * @param rootElement
- */
- private void update_Group(final Element rootElement) {
-
- /*-
- * Input :
- *
- * <runnableItems xsi:type="am:Group" ordered="false">
- * <items>
- * <runnableItem xsi:type="am:RunnableProbabilitySwitch">
- * <entries probability="0" />
- * </runnableItem>
- * </items>
- * </runnableItems>
- *
- */
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./swModel/runnables//runnableItems[@xsi:type=\"am:Group\"]");
- xpathBuffer.append("|");
- xpathBuffer.append("./swModel/runnables//runnableItem[@xsi:type=\"am:Group\"]");
- xpathBuffer.append("|");
- xpathBuffer.append(
- "./swModel/runnables//items[@xsi:type=\"am:Group\"]"); /*- note: the last Xpath is introduced, as the model is adapted to 0.7.2 in update_ProbabilityGroup method*/
-
- final List<Element> runnableItemElements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
- Element.class, this.helper.getGenericNS("xsi"));
-
- for (final Element runnableItemElement : runnableItemElements) {
-
-
- final List<Element> deviationRunnableItemsList = this.helper.getXpathResult(runnableItemElement, "./items",
- Element.class);
-
- final Iterator<Element> deviationRunnableItemsListIterator = deviationRunnableItemsList.iterator();
-
- while (deviationRunnableItemsListIterator.hasNext()) {
-
- final Element deviationRunnableItemElement = deviationRunnableItemsListIterator.next();
-
-
- final List<Element> childRunnableItems = this.helper.getXpathResult(deviationRunnableItemElement,
- "./runnableItem", Element.class);
-
- if (childRunnableItems != null && childRunnableItems.size() > 0) {
-
- final Element childRunnableItem = childRunnableItems.get(0);
-
- /*- disassociating the runnableItem from its parent DeviationRunnableItem */
-
- deviationRunnableItemElement.removeContent(childRunnableItem);
-
- childRunnableItem.setName("items");
-
- runnableItemElement.removeContent(deviationRunnableItemElement);
- /*- now associate RunnableItem to the Group directly */
- runnableItemElement.addContent(childRunnableItem);
-
- }
- else {
- /*- this is the case where empty items tag is present (i.e. DeviationRunnableItem -> without RunnableItems */
- runnableItemElement.removeContent(deviationRunnableItemElement);
-
- }
-
-
- /*- DeviationRunnableItem is removed from metamodel -> RunnableItem which is present inside DeviationRunnableItem is directly associated inside Group
- * Due to the above reason : DeviationRunnableElement is removed from Group
- * */
-
-
- }
-
- }
-
- }
-
- /**
- * Migration of ProbabilityGroup:
- *
- * Based on changes introduced in 0.7.2, ProbabilityGroup is removed and its equivalent is
- * "RunnableProbabilityGroup" (associated to Runnable elements)
- *
- * From 0.7.1 - ProbabilityGroup structure is as shown below:
- *
- * <pre>
- * ProbabilityGroup
- * - ProbabilityRunnableItem items[0-*]
- * - EInt probability[0-1]
- * - RunnableItem runnableItem[0-1]
- * </pre>
- *
- * From 0.7.2 - RunnableProbabilitySwitch structure is as shown below
- *
- * <pre>
- * RunnableProbabilitySwitch
- * - ProbabilitySwitchEntry entries[0-*]
- * - EDouble probability[0-1]
- * - RunnableItem items[0-*]
- * </pre>
- *
- * *
- *
- * @param rootElement
- */
-
- private void update_ProbabilityGroup(final Element rootElement) {
-
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./swModel/runnables//runnableItems[@xsi:type=\"am:ProbabilityGroup\"]");
- xpathBuffer.append("|");
- xpathBuffer.append("./swModel/runnables//runnableItem[@xsi:type=\"am:ProbabilityGroup\"]");
-
- final List<Element> runnableItemElements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
- Element.class, this.helper.getGenericNS("xsi"));
-
- for (final Element runnableItemElement : runnableItemElements) {
-
- final Attribute typeAttribute = runnableItemElement.getAttribute("type", this.helper.getGenericNS("xsi"));
-
- typeAttribute.setValue(
- "am:RunnableProbabilitySwitch"); /*-changing the type from ProbabilityGroup to RunnableProbabilitySwitch*/
-
- final List<Element> itemsElements = runnableItemElement.getChildren("items");
-
- for (final Element itemsElement : itemsElements) {
- itemsElement.setName("entries"); /*-changing the identifier name from items to entries*/
-
- final Element childRunnableItemElement = itemsElement.getChild("runnableItem");
-
- if (childRunnableItemElement != null) {
- childRunnableItemElement
- .setName("items"); /*-changing the identifier name from runnableItem to items*/
- }
- }
-
-
- }
-
- }
-
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/utils/HelperUtils_071_072.java b/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/utils/HelperUtils_071_072.java
deleted file mode 100644
index c9e5861..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/utils/HelperUtils_071_072.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters072.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_072;
-import org.jdom2.Attribute;
-import org.jdom2.Element;
-import org.jdom2.Namespace;
-
-public class HelperUtils_071_072 extends AbstractHelper {
-
- private HelperUtils_071_072() {
-
- }
-
- private static HelperUtils_071_072 instance;
-
- public static HelperUtils_071_072 getInstance() {
-
- if (instance == null) {
- instance = new HelperUtils_071_072();
- }
-
- return instance;
- }
-
- public Element createAmaltheaElement_072() {
-
- final Element amaltheaElement = new Element("Amalthea");
- amaltheaElement.setNamespace(Namespace.getNamespace("central", NameSpace_072.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 072
- *
- * @param rootElement
- */
-
- public void updateRootElement_NameSpaces_to_072(final Element rootElement) {
-
- final Namespace defaultNamespace = rootElement.getNamespace();
-
-
- if (isNS_AvailableIn_071(defaultNamespace)) {
-
- // final String rootElementName = rootElement.getName();
-
- rootElement.setNamespace(null);
-
- rootElement.removeNamespaceDeclaration(defaultNamespace);
-
- rootElement.setNamespace(getNS_072("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_071(ns)) {
-
- rootElement.removeNamespaceDeclaration(ns);
-
- }
-
- }
-
- rootElement.addNamespaceDeclaration(getGenericNS("xmi"));
-
- rootElement.addNamespaceDeclaration(getGenericNS("xsi"));
-
- }
- }
-
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/utils/HwElementsCacheBuilder.java b/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/utils/HwElementsCacheBuilder.java
deleted file mode 100644
index 8862b9a..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/utils/HwElementsCacheBuilder.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters072.utils;
-
-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.jdom2.Document;
-import org.jdom2.Element;
-
-public class HwElementsCacheBuilder implements ICache {
-
- private final Map<File, Map<String, Object>> map = new HashMap<File, Map<String, Object>>();
- private final HelperUtils_071_072 helper;
-
- public HwElementsCacheBuilder() {
- this.helper = HelperUtils_071_072.getInstance();
- }
-
-
- @Override
- public void buildCache(final Map<File, Document> fileName_documentsMap) {
-
- for (final File targetFile : fileName_documentsMap.keySet()) {
-
- final Document document1 = fileName_documentsMap.get(targetFile);
-
- if (document1 == null) {
- // log error message
- continue;
- }
-
- final Element rootElement = document1.getRootElement();
-
- /*- Start : Cache initialization */
-
- getCacheMap().put(targetFile, new HashMap<String, Object>());
-
- final List<String> coreNames = new ArrayList<String>();
-
- getCacheMap().get(targetFile).put(HwElementsCacheEnum.CORE_NAMES.name(), coreNames);
-
- final List<String> coreTypeNames = new ArrayList<String>();
-
- getCacheMap().get(targetFile).put(HwElementsCacheEnum.CORE_TYPE_NAMES.name(), coreTypeNames);
-
-
- final List<String> memoryNames = new ArrayList<String>();
-
- getCacheMap().get(targetFile).put(HwElementsCacheEnum.MEMORY_NAMES.name(), memoryNames);
-
- final List<String> memoryTypeNames = new ArrayList<String>();
-
- getCacheMap().get(targetFile).put(HwElementsCacheEnum.MEMORY_TYPE_NAMES.name(), memoryTypeNames);
-
- getCacheMap().get(targetFile).put(HwElementsCacheEnum.HwModel.name(), null);
-
- /*- End : Cache initialization */
-
- final List<Element> hwModelElements = this.helper.getXpathResult(rootElement, "./hwModel", Element.class,
- this.helper.getNS_070("am"));
-
- if (hwModelElements.size() > 0) {
- getCacheMap().get(targetFile).put(HwElementsCacheEnum.HwModel.name(), hwModelElements.get(0));
- }
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./hwModel//memories");
- xpathBuffer.append("|");
- xpathBuffer.append("./hwModel//cores");
- xpathBuffer.append("|");
- xpathBuffer.append("./hwModel/coreTypes");
- xpathBuffer.append("|");
- xpathBuffer.append("./hwModel/memoryTypes");
-
- final List<Element> hwElements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
- Element.class, this.helper.getNS_070("am"));
-
-
- for (final Element hwElement : hwElements) {
-
- if (hwElement.getName().equals("memories")) {
- memoryNames.add(hwElement.getAttributeValue("name"));
- }
- else if (hwElement.getName().equals("cores")) {
- coreNames.add(hwElement.getAttributeValue("name"));
- }
- else if (hwElement.getName().equals("coreTypes")) {
- coreNames.add(hwElement.getAttributeValue("name"));
- }
- else if (hwElement.getName().equals("memoryTypes")) {
- coreNames.add(hwElement.getAttributeValue("name"));
- }
-
- }
- }
-
- }
-
-
- @Override
- public Map<File, Map<String, Object>> getCacheMap() {
- return this.map;
- }
-
- @Override
- public void clearCacheMap() {
-
- this.map.clear();
- }
-
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/utils/HwElementsCacheEnum.java b/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/utils/HwElementsCacheEnum.java
deleted file mode 100644
index db41130..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.072/src/org/eclipse/app4mc/amalthea/converters072/utils/HwElementsCacheEnum.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters072.utils;
-
-public enum HwElementsCacheEnum {
-
- /*- Cache is stored in following format : List<String>
- *
- * */
- CORE_NAMES,
-
- /*- Cache is stored in following format : List<String>
- *
- * */
- CORE_TYPE_NAMES,
-
- /*- Cache is stored in following format : List<String>
- *
- * */
- MEMORY_NAMES,
-
- /*- Cache is stored in following format : List<String>
- *
- * */
-
- MEMORY_TYPE_NAMES,
-
- /*- Cache is stored in following format : org.jdom2.Element
- *
- * */
- HwModel
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.080/.classpath b/plugins/org.eclipse.app4mc.amalthea.converters.080/.classpath
deleted file mode 100644
index eca7bdb..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.080/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.080/.gitignore b/plugins/org.eclipse.app4mc.amalthea.converters.080/.gitignore
deleted file mode 100644
index 09e3bc9..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.080/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/bin/
-/target/
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.080/.project b/plugins/org.eclipse.app4mc.amalthea.converters.080/.project
deleted file mode 100644
index f80d8b9..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.080/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.app4mc.amalthea.converters.080</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.080/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.app4mc.amalthea.converters.080/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 0c68a61..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.080/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-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.080/META-INF/MANIFEST.MF b/plugins/org.eclipse.app4mc.amalthea.converters.080/META-INF/MANIFEST.MF
deleted file mode 100644
index e31d85f..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.080/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,9 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: APP4MC Amalthea Converters to 0.8.0
-Bundle-SymbolicName: org.eclipse.app4mc.amalthea.converters.080;singleton:=true
-Bundle-Version: 0.9.6.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-Vendor: Eclipse APP4MC
-Require-Bundle: org.eclipse.app4mc.amalthea.converters.common
-Automatic-Module-Name: org.eclipse.app4mc.amalthea.converters.080
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.080/about.html b/plugins/org.eclipse.app4mc.amalthea.converters.080/about.html
deleted file mode 100644
index 164f781..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.080/about.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!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>November 30, 2017</p>
- <h3>License</h3>
-
- <p>
- The Eclipse Foundation makes available 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 2.0 ("EPL"). A copy of the EPL is
- available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>.
- For purposes of the EPL, "Program" will mean the Content.
- </p>
-
- <p>
- If you did not receive this Content directly from the Eclipse
- Foundation, the Content is being redistributed by another party
- ("Redistributor") and different terms and conditions may
- apply to your use of any object code in the Content. Check the
- Redistributor's license that was provided with the Content. If no such
- license exists, contact the Redistributor. Unless otherwise indicated
- below, the terms and conditions of the EPL still apply to any source
- code in the Content and such source code may be obtained at <a
- href="http://www.eclipse.org/">http://www.eclipse.org</a>.
- </p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.080/build.properties b/plugins/org.eclipse.app4mc.amalthea.converters.080/build.properties
deleted file mode 100644
index e9863e2..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.080/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.080/epl-2.0.html b/plugins/org.eclipse.app4mc.amalthea.converters.080/epl-2.0.html
deleted file mode 100644
index 637a181..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.080/epl-2.0.html
+++ /dev/null
@@ -1,300 +0,0 @@
-<!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" xml:lang="en" lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Eclipse Public License - Version 2.0</title>
- <style type="text/css">
- body {
- margin: 1.5em 3em;
- }
- h1{
- font-size:1.5em;
- }
- h2{
- font-size:1em;
- margin-bottom:0.5em;
- margin-top:1em;
- }
- p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- ul, ol{
- list-style-type:none;
- }
- </style>
- </head>
- <body>
- <h1>Eclipse Public License - v 2.0</h1>
- <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>
- <h2 id="definitions">1. DEFINITIONS</h2>
- <p>“Contribution” means:</p>
- <ul>
- <li>a) in the case of the initial Contributor, the initial content
- Distributed under this Agreement, and
- </li>
- <li>
- b) in the case of each subsequent Contributor:
- <ul>
- <li>i) changes to the Program, and</li>
- <li>ii) additions to the Program;</li>
- </ul>
- 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 changes or additions to the Program that
- are not Modified Works.
- </li>
- </ul>
- <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
- or any Secondary License (as applicable), including Contributors.
- </p>
- <p>“Derivative Works” shall mean any work, whether in Source Code or other
- form, that is based on (or derived from) the Program and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship.
- </p>
- <p>“Modified Works” shall mean any work in Source Code or other form that
- results from an addition to, deletion from, or modification of the
- contents of the Program, including, for purposes of clarity any new file
- in Source Code form that contains any contents of the Program. Modified
- Works shall not include works that contain only declarations, interfaces,
- types, classes, structures, or files of the Program solely in each case
- in order to link to, bind by name, or subclass the Program or Modified
- Works thereof.
- </p>
- <p>“Distribute” means the acts of a) distributing or b) making available
- in any manner that enables the transfer of a copy.
- </p>
- <p>“Source Code” means the form of a Program preferred for making
- modifications, including but not limited to software source code,
- documentation source, and configuration files.
- </p>
- <p>“Secondary License” means either the GNU General Public License,
- Version 2.0, or any later versions of that license, including any
- exceptions or additional permissions as identified by the initial
- Contributor.
- </p>
- <h2 id="grant-of-rights">2. GRANT OF RIGHTS</h2>
- <ul>
- <li>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.
- </li>
- <li>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 or other 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.
- </li>
- <li>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.
- </li>
- <li>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.
- </li>
- <li>e) Notwithstanding the terms of any Secondary License, no Contributor
- makes additional grants to any Recipient (other than those set forth
- in this Agreement) as a result of such Recipient's receipt of the
- Program under the terms of a Secondary License (if permitted under
- the terms of Section 3).
- </li>
- </ul>
- <h2 id="requirements">3. REQUIREMENTS</h2>
- <p>3.1 If a Contributor Distributes the Program in any form, then:</p>
- <ul>
- <li>a) the Program must also be made available as Source Code, in
- accordance with section 3.2, and the Contributor must accompany
- the Program with a statement that the Source Code for the Program
- is available under this Agreement, and informs Recipients how to
- obtain it in a reasonable manner on or through a medium customarily
- used for software exchange; and
- </li>
- <li>
- b) the Contributor may Distribute the Program under a license
- different than this Agreement, provided that such license:
- <ul>
- <li>i) effectively disclaims on behalf of all other 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;
- </li>
- <li>ii) effectively excludes on behalf of all other Contributors all
- liability for damages, including direct, indirect, special, incidental
- and consequential damages, such as lost profits;
- </li>
- <li>iii) does not attempt to limit or alter the recipients' rights in the
- Source Code under section 3.2; and
- </li>
- <li>iv) requires any subsequent distribution of the Program by any party
- to be under a license that satisfies the requirements of this section 3.
- </li>
- </ul>
- </li>
- </ul>
- <p>3.2 When the Program is Distributed as Source Code:</p>
- <ul>
- <li>a) it must be made available under this Agreement, or if the Program (i)
- is combined with other material in a separate file or files made available
- under a Secondary License, and (ii) the initial Contributor attached to
- the Source Code the notice described in Exhibit A of this Agreement,
- then the Program may be made available under the terms of such
- Secondary Licenses, and
- </li>
- <li>b) a copy of this Agreement must be included with each copy of the Program.</li>
- </ul>
- <p>3.3 Contributors may not remove or alter any copyright, patent, trademark,
- attribution notices, disclaimers of warranty, or limitations of liability
- (‘notices’) contained within the Program from any copy of the Program which
- they Distribute, provided that Contributors may add their own appropriate
- notices.
- </p>
- <h2 id="commercial-distribution">4. COMMERCIAL DISTRIBUTION</h2>
- <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>
- <h2 id="warranty">5. NO WARRANTY</h2>
- <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
- BY APPLICABLE LAW, 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>
- <h2 id="disclaimer">6. DISCLAIMER OF LIABILITY</h2>
- <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
- BY APPLICABLE LAW, 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>
- <h2 id="general">7. GENERAL</h2>
- <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.
- </p>
- <p>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. Nothing in this Agreement is intended
- to be enforceable by any entity that is not a Contributor or Recipient.
- No third-party beneficiary rights are created under this Agreement.
- </p>
- <h2 id="exhibit-a">Exhibit A – Form of Secondary Licenses Notice</h2>
- <p>“This Source Code may also be made available under the following
- Secondary Licenses when the conditions for such availability set forth
- in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
- version(s), and exceptions or additional permissions here}.”
- </p>
- <blockquote>
- <p>Simply including a copy of this Agreement, including this Exhibit A
- is not sufficient to license the Source Code under Secondary Licenses.
- </p>
- <p>If it is not possible or desirable to put the notice in a particular file,
- then You may include the notice in a location (such as a LICENSE file in a
- relevant directory) where a recipient would be likely to look for
- such a notice.
- </p>
- <p>You may add additional accurate notices of copyright ownership.</p>
- </blockquote>
- </body>
-</html>
\ No newline at end of file
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.080/plugin.xml b/plugins/org.eclipse.app4mc.amalthea.converters.080/plugin.xml
deleted file mode 100644
index aa3baf8..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.080/plugin.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<?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.converters080.impl.NamespaceConverter"
- enabled="true"
- id="converters.080.namespace"
- input-model-version="0.7.2"
- name="namespace"
- output-model-version="0.8.0">
- <dependent-on-converter
- id="converters.080.rootElement">
- </dependent-on-converter>
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters080.impl.RootElementConverter"
- enabled="true"
- id="converters.080.rootElement"
- input-model-version="0.7.2"
- name="rootElement"
- output-model-version="0.8.0">
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters080.impl.SwConverter"
- enabled="true"
- id="converters.080.sw"
- input-model-version="0.7.2"
- name="sw"
- output-model-version="0.8.0">
- <dependent-on-converter
- id="converters.080.rootElement">
- </dependent-on-converter>
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters080.impl.MappingConverter"
- enabled="true"
- id="converters.080.mapping"
- input-model-version="0.7.2"
- name="mapping"
- output-model-version="0.8.0">
- <dependent-on-converter
- id="converters.080.rootElement">
- </dependent-on-converter>
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters080.impl.PropertyConstraintsConverter"
- enabled="true"
- id="converters.080.propertyconstraints"
- input-model-version="0.7.2"
- name="property constraints"
- output-model-version="0.8.0">
- <dependent-on-converter
- id="converters.080.rootElement">
- </dependent-on-converter>
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters080.impl.OSConverter"
- enabled="true"
- id="converters.080.os"
- input-model-version="0.7.2"
- name="os"
- output-model-version="0.8.0">
- <dependent-on-converter
- id="converters.080.rootElement">
- </dependent-on-converter>
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters080.impl.StimuliConverter"
- enabled="true"
- id="converters.080.stimuli"
- input-model-version="0.7.2"
- name="stimuli"
- output-model-version="0.8.0">
- <dependent-on-converter
- id="converters.080.rootElement">
- </dependent-on-converter>
- </converter>
- </extension>
-
-</plugin>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.080/src/org/eclipse/app4mc/amalthea/converters080/impl/AbstractConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.080/src/org/eclipse/app4mc/amalthea/converters080/impl/AbstractConverter.java
deleted file mode 100644
index 3b33202..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.080/src/org/eclipse/app4mc/amalthea/converters080/impl/AbstractConverter.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters080.impl;
-
-import org.apache.log4j.Logger;
-import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
-import org.eclipse.app4mc.amalthea.converters080.utils.HelperUtils_072_080;
-
-public abstract class AbstractConverter implements IConverter {
-
- protected HelperUtils_072_080 helper;
-
- protected Logger logger;
-
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.080/src/org/eclipse/app4mc/amalthea/converters080/impl/MappingConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.080/src/org/eclipse/app4mc/amalthea/converters080/impl/MappingConverter.java
deleted file mode 100644
index 3d17fb2..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.080/src/org/eclipse/app4mc/amalthea/converters080/impl/MappingConverter.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters080.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters080.utils.HelperUtils_072_080;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-/**
- * This class is responsible for converting the Mapping Model elements from 0.7.2 to 0.8.0 version format of AMALTHEA
- * model
- *
- * @author mez2rng
- *
- */
-public class MappingConverter extends AbstractConverter {
-
-
- public MappingConverter() {
- this.helper = HelperUtils_072_080.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info(
- "Migration from 0.7.2 to 0.8.0 : Executing Mapping converter for model file : " + targetFile.getName());
-
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
- }
- final Element rootElement = root.getRootElement();
-
- update_Mapping(rootElement);
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
- }
-
-
- /**
- * Below migration is for the metamodel change : Bug 513977 (Restructure MappingModel)
- *
- * Mapping(Abstract) class and AbstractElementMapping class contents are merged into a class : MemoryMapping
- *
- * @param rootElement
- */
- private void update_Mapping(final Element rootElement) {
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./mappingModel/mapping[@xsi:type=\"am:AbstractElementMapping\"]");
-
-
- final List<Element> elements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(), Element.class,
- this.helper.getGenericNS("xsi"));
-
- for (final Element mappingElements : elements) {
-
- mappingElements.removeAttribute("type", this.helper.getGenericNS("xsi"));
-
- mappingElements.setName("memoryMapping");
-
- }
-
- }
-
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.080/src/org/eclipse/app4mc/amalthea/converters080/impl/NamespaceConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.080/src/org/eclipse/app4mc/amalthea/converters080/impl/NamespaceConverter.java
deleted file mode 100644
index 5ef1af2..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.080/src/org/eclipse/app4mc/amalthea/converters080/impl/NamespaceConverter.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters080.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.apache.log4j.Logger;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
-import org.eclipse.app4mc.amalthea.converters080.utils.HelperUtils_072_080;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-/**
- * This class is responsible for converting the namespace of AMALTHEA model from 0.7.2 to 0.8.0
- *
- * @author mez2rng
- *
- */
-public class NamespaceConverter implements IConverter {
-
- private final HelperUtils_072_080 helper;
-
- private final Logger logger;
-
- public NamespaceConverter() {
- this.helper = HelperUtils_072_080.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info("Migration from 0.7.2 to 0.8.0 : Executing Namespace converter for model file : "
- + targetFile.getName());
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
- }
- final Element rootElement = root.getRootElement();
-
- this.helper.updateRootElement_NameSpaces_to_080(rootElement);
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
- }
-
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.080/src/org/eclipse/app4mc/amalthea/converters080/impl/OSConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.080/src/org/eclipse/app4mc/amalthea/converters080/impl/OSConverter.java
deleted file mode 100644
index 8f25f61..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.080/src/org/eclipse/app4mc/amalthea/converters080/impl/OSConverter.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters080.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters080.utils.HelperUtils_072_080;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-/**
- * This class is responsible for converting the OS Model elements from 0.7.2 to 0.8.0 version format of AMALTHEA model
- *
- * @author mez2rng
- *
- */
-public class OSConverter extends AbstractConverter {
-
-
- public OSConverter() {
- this.helper = HelperUtils_072_080.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info(
- "Migration from 0.7.2 to 0.8.0 : Executing OS converter for model file : " + targetFile.getName());
-
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
- }
- final Element rootElement = root.getRootElement();
-
- move_OsDataConsistency_Element(rootElement);
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
- }
-
-
- /**
- * Below migration is for the metamodel change w.r.t. OS model (For further details, check : Bug 515090 )
- *
- * OsDataConsistency is shifted from OSModel element to OperatingSystem element in APP4MC 0.8.0
- *
- * @param rootElement
- */
- private void move_OsDataConsistency_Element(final Element rootElement) {
-
-
- final List<Element> osDataConsistencyElements = this.helper.getXpathResult(rootElement,
- "./osModel/osDataConsistency", Element.class, this.helper.getGenericNS("xsi"));
-
-
- final List<Element> operatingSystemElements = this.helper.getXpathResult(rootElement,
- "./osModel/operatingSystems", Element.class, this.helper.getGenericNS("xsi"));
-
-
- if (osDataConsistencyElements.size() > 0) {
-
- /*- As per the metamodel (0.7.2) there is a possiblitiy to have only one OsDataConsistency inside OsModel*/
-
- final Element osDataConsistencyElement = osDataConsistencyElements.get(0);
-
- for (final Element operatingSystemElement : operatingSystemElements) {
-
- final Element clone_osDataConsistencyElement = osDataConsistencyElement.clone();
-
- /*-As per change in 0.8.0 : OsDataConsistency element is added as a part of OperatingSystem element */
-
- operatingSystemElement.addContent(clone_osDataConsistencyElement);
-
-
- }
-
- this.logger.warn(
- "OsDataConsistency element is removed from OsModel, and is added (cloned content) to each OperatingSystem element (which is part of corresponding OsModel).");
-
- /*-As per change in 0.8.0 : OsDataConsistency element is removed from OsModel */
- osDataConsistencyElement.getParentElement().removeContent(osDataConsistencyElement);
-
-
- }
-
- }
-
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.080/src/org/eclipse/app4mc/amalthea/converters080/impl/PropertyConstraintsConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.080/src/org/eclipse/app4mc/amalthea/converters080/impl/PropertyConstraintsConverter.java
deleted file mode 100644
index 7febf52..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.080/src/org/eclipse/app4mc/amalthea/converters080/impl/PropertyConstraintsConverter.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters080.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters080.utils.HelperUtils_072_080;
-import org.jdom2.Document;
-import org.jdom2.Element;
-import org.jdom2.output.XMLOutputter;
-
-/**
- * This class is responsible for converting the PropertyConstraints Model elements from 0.7.2 to 0.8.0 version format of
- * AMALTHEA model
- *
- * @author mez2rng
- *
- */
-public class PropertyConstraintsConverter extends AbstractConverter {
-
-
- public PropertyConstraintsConverter() {
- this.helper = HelperUtils_072_080.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info(
- "Migration from 0.7.2 to 0.8.0 : Executing Mapping converter for model file : " + targetFile.getName());
-
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
- }
- final Element rootElement = root.getRootElement();
-
- remove_HWConstraint_Element(rootElement);
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
- }
-
-
- /**
- * Below migration is for the metamodel change w.r.t. PropertyConstraints model (For further details, check : Bug
- * 514779 )
- *
- * HwCoreConstraint and HwMemoryConstraint classes are removed and there is no direct equivalent of these classes as
- * per 0.8.0.
- *
- * -- Based on this change the data associated to HwCoreConstraint and HwMemoryConstraint is removed from the model
- * (as a reference to the users, removed data is stored as a custom property)
- *
- * @param rootElement
- */
- private void remove_HWConstraint_Element(final Element rootElement) {
-
- final XMLOutputter xmlOutputter = new XMLOutputter();
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./propertyConstraintsModel/allocationConstraints/hwConstraint");
- xpathBuffer.append("|");
- xpathBuffer.append("./propertyConstraintsModel/mappingConstraints/hwConstraint");
-
-
- final List<Element> elements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(), Element.class,
- this.helper.getGenericNS("xsi"));
-
- for (final Element hwConstraintElement : elements) {
-
- final String xmlString = xmlOutputter.outputString(hwConstraintElement);
-
- // TODO: this information shall be logged in model migration log file
- // System.out.println(xmlString);
-
- final Element parentElement = hwConstraintElement.getParentElement();
-
- final Element customPropertyElement = new Element("customProperties");
- customPropertyElement.setAttribute("key",
- "hwConstraint (element removed during Migration of Model to 0.8.0 version)");
-
- final Element valueElement = new Element("value");
- valueElement.setAttribute("type", "am:StringObject", this.helper.getGenericNS("xsi"));
- valueElement.setAttribute("value", xmlString);
-
- customPropertyElement.addContent(valueElement);
-
- parentElement.addContent(customPropertyElement);
-
- this.logger.warn("hwConstraint tag is removed from " + parentElement.getName()
- + " . Below is the content of hwConstraint object: \n" + xmlString);
-
- /*- removing HWConstraint model element -> as there is no equivalent of it in AMALTHEA 0.8.0 version */
- parentElement.removeContent(hwConstraintElement);
-
-
- }
-
- }
-
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.080/src/org/eclipse/app4mc/amalthea/converters080/impl/RootElementConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.080/src/org/eclipse/app4mc/amalthea/converters080/impl/RootElementConverter.java
deleted file mode 100644
index d1ec3eb..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.080/src/org/eclipse/app4mc/amalthea/converters080/impl/RootElementConverter.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters080.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters080.utils.HelperUtils_072_080;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-/**
- * This class is responsible for converting the root element of the model file as : "Amalthea" (only if for the supplied
- * model root element is other than "Amalthea" e.g: hwModel or swModel)
- *
- * @author mez2rng
- *
- */
-public class RootElementConverter extends AbstractConverter {
-
- public RootElementConverter() {
- this.helper = HelperUtils_072_080.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- /*-
- * ==============
- *|| Input Model :||
- * ==============
- * <am:MappingModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:am="http://app4mc.eclipse.org/amalthea/0.7.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- * </am:MappingModel>
- *
- * ==============
- *|| Output Model :||
- * ==============
- *
- * <am:Amalthea xmlns:am="http://app4mc.eclipse.org/amalthea/0.7.2" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- * <mappingModel>
- *
- * </mappingModel>
- </am:Amalthea>
- */
-
-
- this.logger.info("Migration from 0.7.2 to 0.8.0 : Executing \"Root Element Converter\" for model file : "
- + targetFile.getName());
-
- final Document document = fileName_documentsMap.get(targetFile);
-
- if (document == null) {
- return;
- }
- final Element rootElement = document.getRootElement();
-
- final String rootTagName = rootElement.getName();
-
- if (!rootTagName.equals("Amalthea")) {
-
- if (rootTagName.equals("SWModel") || rootTagName.equals("HWModel") || rootTagName.equals("OSModel")
- || rootTagName.equals("StimuliModel") || rootTagName.equals("ConstraintsModel")
- || rootTagName.equals("EventModel") || rootTagName.equals("PropertyConstraintsModel")
- || rootTagName.equals("MappingModel") || rootTagName.equals("ConfigModel")
- || rootTagName.equals("ComponentsModel") || rootTagName.equals("CommonElements")) {
-
- final Element newRootElement = new Element("Amalthea");
-
- this.helper.copyAllNameSpaces(rootElement, newRootElement);
-
- updateCurrentRootTagProps(rootElement);
-
- document.removeContent();
-
- newRootElement.addContent(rootElement);
-
- document.addContent(newRootElement);
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), document);
- }
-
- }
-
-
- }
-
- /**
- * This method is used to remove the default namespaces associated to the Root Element and also change the name of
- * it -> so that it can be added as a sub-tag inside "Amalthea root element"
- *
- * @param rootElement
- * Element This is the root element of the model file (where Amalthea is not root element)
- */
- private void updateCurrentRootTagProps(final Element rootElement) {
-
- this.helper.removeDefaultAttribs(rootElement);
-
- final String name = rootElement.getName();
-
- if (name.equals("SWModel")) {
- rootElement.setName("swModel");
- }
- else if (name.equals("HWModel")) {
- rootElement.setName("hwModel");
- }
- else if (name.equals("OSModel")) {
- rootElement.setName("osModel");
- }
- else if (name.equals("StimuliModel")) {
- rootElement.setName("stimuliModel");
- }
- else if (name.equals("ConstraintsModel")) {
- rootElement.setName("constraintsModel");
- }
- else if (name.equals("EventModel")) {
- rootElement.setName("eventModel");
- }
- else if (name.equals("PropertyConstraintsModel")) {
- rootElement.setName("propertyConstraintsModel");
- }
- else if (name.equals("MappingModel")) {
- rootElement.setName("mappingModel");
- }
- else if (name.equals("ConfigModel")) {
- rootElement.setName("configModel");
- }
- else if (name.equals("ComponentsModel")) {
- rootElement.setName("componentsModel");
- }
- else if (name.equals("CommonElements")) {
- rootElement.setName("commonElements");
- }
-
-
- }
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.080/src/org/eclipse/app4mc/amalthea/converters080/impl/StimuliConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.080/src/org/eclipse/app4mc/amalthea/converters080/impl/StimuliConverter.java
deleted file mode 100644
index 4ab952e..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.080/src/org/eclipse/app4mc/amalthea/converters080/impl/StimuliConverter.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters080.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters080.utils.HelperUtils_072_080;
-import org.jdom2.Attribute;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-/**
- * This class is responsible for converting the Stimuli Model elements from 0.7.2 to 0.8.0 version format of AMALTHEA
- * model
- *
- * @author mez2rng
- *
- */
-public class StimuliConverter extends AbstractConverter {
-
-
- public StimuliConverter() {
- this.helper = HelperUtils_072_080.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info(
- "Migration from 0.7.2 to 0.8.0 : Executing Stimuli converter for model file : " + targetFile.getName());
-
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
- }
- final Element rootElement = root.getRootElement();
-
-
- update_SignedTime(rootElement);
-
- update_SignedTimeObject(rootElement);
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
- }
-
-
- /**
- * Below migration is for the metamodel change : SignedTimeObject class is removed -> instead of it TimeObject class
- * is used
- *
- * For details w.r.t. metamodel change, see : Bug 514334
- *
- * @param rootElement
- */
- private void update_SignedTimeObject(final Element rootElement) {
-
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append(".//customProperties//@xsi:type[.=\"am:SignedTimeObject\"]");
-
-
- final List<Attribute> types = this.helper.getXpathResult(rootElement, xpathBuffer.toString(), Attribute.class,
- this.helper.getGenericNS("xsi"));
-
-
- for (final Attribute signedTimeObjectAttribute : types) {
- signedTimeObjectAttribute.setValue("am:TimeObject");
- }
-
-
- }
-
- /**
- * Below migration is for the metamodel change : SignedTime class is removed -> instead of it Time class is used
- *
- * For details w.r.t. metamodel change, see : Bug 514334
- *
- * @param rootElement
- */
- private void update_SignedTime(final Element rootElement) {
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./stimuliModel/stimuli/stimulusDeviation//*[@xsi:type=\"am:SignedTime\"]");
-
-
- final List<Element> elements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(), Element.class,
- this.helper.getGenericNS("xsi"));
-
- for (final Element signedTimeElement : elements) {
-
- final Attribute attribute = signedTimeElement.getAttribute("type", this.helper.getGenericNS("xsi"));
-
- if (attribute != null) {
- attribute.setValue("am:Time");
-
- }
-
-
- }
-
-
- }
-
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.080/src/org/eclipse/app4mc/amalthea/converters080/impl/SwConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.080/src/org/eclipse/app4mc/amalthea/converters080/impl/SwConverter.java
deleted file mode 100644
index 21eb43f..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.080/src/org/eclipse/app4mc/amalthea/converters080/impl/SwConverter.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters080.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters080.utils.HelperUtils_072_080;
-import org.jdom2.Attribute;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-/**
- * This class is responsible for converting the SW Model elements from 0.7.2 to 0.8.0 version format of AMALTHEA model
- *
- * @author mez2rng
- *
- */
-public class SwConverter extends AbstractConverter {
-
-
- public SwConverter() {
- this.helper = HelperUtils_072_080.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info(
- "Migration from 0.7.2 to 0.8.0 : Executing SW converter for model file : " + targetFile.getName());
-
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
- }
- final Element rootElement = root.getRootElement();
-
- update_mode_Label(rootElement);
-
- update_DataSize(rootElement);
-
- update_ProbabiltitySwitch(rootElement);
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
- }
-
-
- /**
- * Below migration is for the metamodel change : ProbabiltitySwitch class changed to ProbabilitySwitch (typo fixed)
- *
- * @param rootElement
- */
- private void update_ProbabiltitySwitch(final Element rootElement) {
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./swModel/tasks//*[@xsi:type=\"am:ProbabiltitySwitch\"]");
- xpathBuffer.append("|");
- xpathBuffer.append("./swModel/isrs//*[@xsi:type=\"am:ProbabilitySwitch\"]");
-
-
- final List<Element> elements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(), Element.class,
- this.helper.getGenericNS("xsi"));
-
- for (final Element probabilitySwitchElement : elements) {
-
- final Attribute attribute = probabilitySwitchElement.getAttribute("type", this.helper.getGenericNS("xsi"));
-
- if (attribute != null) {
- attribute.setValue("am:ProbabilitySwitch");
-
- }
-
-
- }
-
-
- }
-
- /**
- * Below migration is for the metamodel change : Bug 513969 (Inconsistent unit names for data size)
- *
- * In DataSizeUnit enum following values are changed: kibit, byte to : Kibit, B
- *
- * @param rootElement
- */
- private void update_DataSize(final Element rootElement) {
-
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./swModel/typeDefinitions[@xsi:type=\"am:BaseTypeDefinition\"]/size");
- xpathBuffer.append("|");
- xpathBuffer.append("./hwModel/memoryTypes/size");
- xpathBuffer.append("|");
- xpathBuffer.append("./swModel/runnables/runnableItems//transmissionPolicy/chunkSize");
- xpathBuffer.append("|");
- xpathBuffer.append("./swModel/runnables/size");
- xpathBuffer.append("|");
- xpathBuffer.append("./swModel/labels/size");
- xpathBuffer.append("|");
- xpathBuffer.append("./swModel/modeLabels/size");
- xpathBuffer.append("|");
- xpathBuffer.append("./swModel/channels/size");
- xpathBuffer.append("|");
- xpathBuffer.append("./swModel/customEntities/size");
- xpathBuffer.append("|");
- xpathBuffer.append("./swModel/processPrototypes/size");
- xpathBuffer.append("|");
- xpathBuffer.append("./swModel/isrs/size");
- xpathBuffer.append("|");
- xpathBuffer.append("./swModel/tasks/size");
-
-
- final List<Element> elements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(), Element.class,
- this.helper.getGenericNS("xsi"));
-
- for (final Element dataSizeElement : elements) {
-
- final Attribute attribute = dataSizeElement.getAttribute("unit");
-
- if (attribute != null) {
- final String value = attribute.getValue();
- if (value.equals("kibit")) {
- attribute.setValue("Kibit");
- }
- else if (value.equals("byte")) {
- attribute.setValue("B");
- }
- }
-
-
- }
-
- }
-
- /**
- * Below migration is for the metamodel change : Bug 513976 (Simplify Modes Handling).
- *
- * Migration is required : As mode reference is not serialized in the model (as it is set as transient in the
- * metamodel definition).
- *
- *
- * @param rootElement
- */
- private void update_mode_Label(final Element rootElement) {
-
- final StringBuffer labelXpathBuffer = new StringBuffer();
-
- labelXpathBuffer.append("./swModel/modeLabels");
-
- final List<Element> elements = this.helper.getXpathResult(rootElement, labelXpathBuffer.toString(),
- Element.class, this.helper.getGenericNS("xsi"));
-
- for (final Element modeLabel : elements) {
-
- final Attribute modeAttribute = modeLabel.getAttribute("mode");
-
- if (modeAttribute != null) {
- modeLabel.removeAttribute(modeAttribute);
- }
- else {
-
- final Element modeElement = modeLabel.getChild("mode");
- if (modeElement != null) {
- modeLabel.removeChild("mode");
- }
- }
-
-
- }
- }
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.080/src/org/eclipse/app4mc/amalthea/converters080/utils/HelperUtils_072_080.java b/plugins/org.eclipse.app4mc.amalthea.converters.080/src/org/eclipse/app4mc/amalthea/converters080/utils/HelperUtils_072_080.java
deleted file mode 100644
index eb1bdaa..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.080/src/org/eclipse/app4mc/amalthea/converters080/utils/HelperUtils_072_080.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters080.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_080;
-import org.jdom2.Attribute;
-import org.jdom2.Element;
-import org.jdom2.Namespace;
-
-public class HelperUtils_072_080 extends AbstractHelper {
-
- private HelperUtils_072_080() {
-
- }
-
- private static HelperUtils_072_080 instance;
-
- public static HelperUtils_072_080 getInstance() {
-
- if (instance == null) {
- instance = new HelperUtils_072_080();
- }
-
- return instance;
- }
-
- public Element createAmaltheaElement_080() {
-
- final Element amaltheaElement = new Element("Amalthea");
- amaltheaElement.setNamespace(Namespace.getNamespace("am", NameSpace_080.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 080
- *
- * @param rootElement
- */
-
- public void updateRootElement_NameSpaces_to_080(final Element rootElement) {
-
- final Namespace defaultNamespace = rootElement.getNamespace();
-
-
- if (isNS_AvailableIn_072(defaultNamespace)) {
-
- // final String rootElementName = rootElement.getName();
-
- rootElement.setNamespace(null);
-
- rootElement.removeNamespaceDeclaration(defaultNamespace);
-
- rootElement.setNamespace(getNS_080("am"));
-
- // updating additional namespaces to the ones from 0.8.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_072(ns)) {
-
- rootElement.removeNamespaceDeclaration(ns);
-
- }
-
- }
-
- rootElement.addNamespaceDeclaration(getGenericNS("xmi"));
-
- rootElement.addNamespaceDeclaration(getGenericNS("xsi"));
-
- }
- }
-
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.081/.classpath b/plugins/org.eclipse.app4mc.amalthea.converters.081/.classpath
deleted file mode 100644
index eca7bdb..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.081/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.081/.gitignore b/plugins/org.eclipse.app4mc.amalthea.converters.081/.gitignore
deleted file mode 100644
index 09e3bc9..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.081/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/bin/
-/target/
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.081/.project b/plugins/org.eclipse.app4mc.amalthea.converters.081/.project
deleted file mode 100644
index ffae479..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.081/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.app4mc.amalthea.converters.081</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.081/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.app4mc.amalthea.converters.081/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 0c68a61..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.081/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-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.081/META-INF/MANIFEST.MF b/plugins/org.eclipse.app4mc.amalthea.converters.081/META-INF/MANIFEST.MF
deleted file mode 100644
index 752a15c..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.081/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,9 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: APP4MC Amalthea Converters to 0.8.1
-Bundle-SymbolicName: org.eclipse.app4mc.amalthea.converters.081;singleton:=true
-Bundle-Version: 0.9.6.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-Vendor: Eclipse APP4MC
-Require-Bundle: org.eclipse.app4mc.amalthea.converters.common
-Automatic-Module-Name: org.eclipse.app4mc.amalthea.converters.081
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.081/about.html b/plugins/org.eclipse.app4mc.amalthea.converters.081/about.html
deleted file mode 100644
index 164f781..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.081/about.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!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>November 30, 2017</p>
- <h3>License</h3>
-
- <p>
- The Eclipse Foundation makes available 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 2.0 ("EPL"). A copy of the EPL is
- available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>.
- For purposes of the EPL, "Program" will mean the Content.
- </p>
-
- <p>
- If you did not receive this Content directly from the Eclipse
- Foundation, the Content is being redistributed by another party
- ("Redistributor") and different terms and conditions may
- apply to your use of any object code in the Content. Check the
- Redistributor's license that was provided with the Content. If no such
- license exists, contact the Redistributor. Unless otherwise indicated
- below, the terms and conditions of the EPL still apply to any source
- code in the Content and such source code may be obtained at <a
- href="http://www.eclipse.org/">http://www.eclipse.org</a>.
- </p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.081/build.properties b/plugins/org.eclipse.app4mc.amalthea.converters.081/build.properties
deleted file mode 100644
index e9863e2..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.081/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.081/epl-2.0.html b/plugins/org.eclipse.app4mc.amalthea.converters.081/epl-2.0.html
deleted file mode 100644
index 637a181..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.081/epl-2.0.html
+++ /dev/null
@@ -1,300 +0,0 @@
-<!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" xml:lang="en" lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Eclipse Public License - Version 2.0</title>
- <style type="text/css">
- body {
- margin: 1.5em 3em;
- }
- h1{
- font-size:1.5em;
- }
- h2{
- font-size:1em;
- margin-bottom:0.5em;
- margin-top:1em;
- }
- p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- ul, ol{
- list-style-type:none;
- }
- </style>
- </head>
- <body>
- <h1>Eclipse Public License - v 2.0</h1>
- <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>
- <h2 id="definitions">1. DEFINITIONS</h2>
- <p>“Contribution” means:</p>
- <ul>
- <li>a) in the case of the initial Contributor, the initial content
- Distributed under this Agreement, and
- </li>
- <li>
- b) in the case of each subsequent Contributor:
- <ul>
- <li>i) changes to the Program, and</li>
- <li>ii) additions to the Program;</li>
- </ul>
- 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 changes or additions to the Program that
- are not Modified Works.
- </li>
- </ul>
- <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
- or any Secondary License (as applicable), including Contributors.
- </p>
- <p>“Derivative Works” shall mean any work, whether in Source Code or other
- form, that is based on (or derived from) the Program and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship.
- </p>
- <p>“Modified Works” shall mean any work in Source Code or other form that
- results from an addition to, deletion from, or modification of the
- contents of the Program, including, for purposes of clarity any new file
- in Source Code form that contains any contents of the Program. Modified
- Works shall not include works that contain only declarations, interfaces,
- types, classes, structures, or files of the Program solely in each case
- in order to link to, bind by name, or subclass the Program or Modified
- Works thereof.
- </p>
- <p>“Distribute” means the acts of a) distributing or b) making available
- in any manner that enables the transfer of a copy.
- </p>
- <p>“Source Code” means the form of a Program preferred for making
- modifications, including but not limited to software source code,
- documentation source, and configuration files.
- </p>
- <p>“Secondary License” means either the GNU General Public License,
- Version 2.0, or any later versions of that license, including any
- exceptions or additional permissions as identified by the initial
- Contributor.
- </p>
- <h2 id="grant-of-rights">2. GRANT OF RIGHTS</h2>
- <ul>
- <li>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.
- </li>
- <li>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 or other 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.
- </li>
- <li>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.
- </li>
- <li>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.
- </li>
- <li>e) Notwithstanding the terms of any Secondary License, no Contributor
- makes additional grants to any Recipient (other than those set forth
- in this Agreement) as a result of such Recipient's receipt of the
- Program under the terms of a Secondary License (if permitted under
- the terms of Section 3).
- </li>
- </ul>
- <h2 id="requirements">3. REQUIREMENTS</h2>
- <p>3.1 If a Contributor Distributes the Program in any form, then:</p>
- <ul>
- <li>a) the Program must also be made available as Source Code, in
- accordance with section 3.2, and the Contributor must accompany
- the Program with a statement that the Source Code for the Program
- is available under this Agreement, and informs Recipients how to
- obtain it in a reasonable manner on or through a medium customarily
- used for software exchange; and
- </li>
- <li>
- b) the Contributor may Distribute the Program under a license
- different than this Agreement, provided that such license:
- <ul>
- <li>i) effectively disclaims on behalf of all other 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;
- </li>
- <li>ii) effectively excludes on behalf of all other Contributors all
- liability for damages, including direct, indirect, special, incidental
- and consequential damages, such as lost profits;
- </li>
- <li>iii) does not attempt to limit or alter the recipients' rights in the
- Source Code under section 3.2; and
- </li>
- <li>iv) requires any subsequent distribution of the Program by any party
- to be under a license that satisfies the requirements of this section 3.
- </li>
- </ul>
- </li>
- </ul>
- <p>3.2 When the Program is Distributed as Source Code:</p>
- <ul>
- <li>a) it must be made available under this Agreement, or if the Program (i)
- is combined with other material in a separate file or files made available
- under a Secondary License, and (ii) the initial Contributor attached to
- the Source Code the notice described in Exhibit A of this Agreement,
- then the Program may be made available under the terms of such
- Secondary Licenses, and
- </li>
- <li>b) a copy of this Agreement must be included with each copy of the Program.</li>
- </ul>
- <p>3.3 Contributors may not remove or alter any copyright, patent, trademark,
- attribution notices, disclaimers of warranty, or limitations of liability
- (‘notices’) contained within the Program from any copy of the Program which
- they Distribute, provided that Contributors may add their own appropriate
- notices.
- </p>
- <h2 id="commercial-distribution">4. COMMERCIAL DISTRIBUTION</h2>
- <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>
- <h2 id="warranty">5. NO WARRANTY</h2>
- <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
- BY APPLICABLE LAW, 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>
- <h2 id="disclaimer">6. DISCLAIMER OF LIABILITY</h2>
- <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
- BY APPLICABLE LAW, 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>
- <h2 id="general">7. GENERAL</h2>
- <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.
- </p>
- <p>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. Nothing in this Agreement is intended
- to be enforceable by any entity that is not a Contributor or Recipient.
- No third-party beneficiary rights are created under this Agreement.
- </p>
- <h2 id="exhibit-a">Exhibit A – Form of Secondary Licenses Notice</h2>
- <p>“This Source Code may also be made available under the following
- Secondary Licenses when the conditions for such availability set forth
- in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
- version(s), and exceptions or additional permissions here}.”
- </p>
- <blockquote>
- <p>Simply including a copy of this Agreement, including this Exhibit A
- is not sufficient to license the Source Code under Secondary Licenses.
- </p>
- <p>If it is not possible or desirable to put the notice in a particular file,
- then You may include the notice in a location (such as a LICENSE file in a
- relevant directory) where a recipient would be likely to look for
- such a notice.
- </p>
- <p>You may add additional accurate notices of copyright ownership.</p>
- </blockquote>
- </body>
-</html>
\ No newline at end of file
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.081/plugin.xml b/plugins/org.eclipse.app4mc.amalthea.converters.081/plugin.xml
deleted file mode 100644
index ff2a0cd..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.081/plugin.xml
+++ /dev/null
@@ -1,106 +0,0 @@
-<?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.converters081.impl.NamespaceConverter"
- enabled="true"
- id="converters.081.namespace"
- input-model-version="0.8.0"
- name="namespace"
- output-model-version="0.8.1">
- <dependent-on-converter
- id="converters.081.rootElement">
- </dependent-on-converter>
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters081.impl.RootElementConverter"
- enabled="true"
- id="converters.081.rootElement"
- input-model-version="0.8.0"
- name="rootElement"
- output-model-version="0.8.1">
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters081.impl.ConstraintsConverter"
- enabled="true"
- id="converters.081.constraints"
- input-model-version="0.8.0"
- name="constraints"
- output-model-version="0.8.1">
- <dependent-on-converter
- id="converters.081.rootElement">
- </dependent-on-converter>
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters081.impl.HwConverter"
- enabled="true"
- id="converters.081.hw"
- input-model-version="0.8.0"
- name="hw"
- output-model-version="0.8.1">
- <dependent-on-converter
- id="converters.081.rootElement">
- </dependent-on-converter>
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters081.impl.SwConverter"
- enabled="true"
- id="converters.081.sw"
- input-model-version="0.8.0"
- name="sw"
- output-model-version="0.8.1">
- <dependent-on-converter
- id="converters.081.rootElement">
- </dependent-on-converter>
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters081.impl.OSConverter"
- enabled="true"
- id="converters.081.os"
- input-model-version="0.8.0"
- name="os"
- output-model-version="0.8.1">
- <dependent-on-converter
- id="converters.081.rootElement">
- </dependent-on-converter>
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters081.impl.MappingConverter"
- enabled="true"
- id="converters.081.mapping"
- input-model-version="0.8.0"
- name="mapping"
- output-model-version="0.8.1">
- <dependent-on-converter
- id="converters.081.rootElement">
- </dependent-on-converter>
- </converter>
-
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters081.impl.StimuliConverter"
- enabled="true"
- id="converters.081.stimuli"
- input-model-version="0.8.0"
- name="stimuli"
- output-model-version="0.8.1">
- <dependent-on-converter
- id="converters.081.rootElement">
- </dependent-on-converter>
- </converter>
-
-
- </extension>
- <extension
- point="org.eclipse.app4mc.amalthea.model.converters.cachebuilders">
- <CacheBuilder
- ID="org.eclipse.app4mc.amalthea.converters.081.ConstraintElementsCacheBuilder"
- class="org.eclipse.app4mc.amalthea.converters081.utils.ConstraintElementsCacheBuilder"
- enabled="true"
- input-model-version="0.8.0"
- name="ConstraintElementsCacheBuilder">
- </CacheBuilder>
- </extension>
-
-</plugin>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/impl/AbstractConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/impl/AbstractConverter.java
deleted file mode 100644
index b9176c3..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/impl/AbstractConverter.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters081.impl;
-
-import org.apache.log4j.Logger;
-import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
-import org.eclipse.app4mc.amalthea.converters081.utils.HelperUtils_080_081;
-import org.jdom2.Element;
-
-public abstract class AbstractConverter implements IConverter {
-
- protected HelperUtils_080_081 helper;
-
- protected Logger logger;
-
-
- /**
- * This method is used to add CustomProperty to the parent Element, with the supplied key and value
- * @param parentElement Element for which CustomProperty shall be added to
- * @param key
- * @param value
- */
- protected void addCustomProperty(Element parentElement, String key, String value){
-
- if(value == null){
- return ;
- }
-
- Element customPropertiesElement=new Element("customProperties");
-
- customPropertiesElement.setAttribute("key", key);
-
- Element valueElement=new Element("value");
-
- valueElement.setAttribute("type", "am:StringObject", this.helper.getGenericNS("xsi"));
-
- valueElement.setAttribute("value", value);
-
- customPropertiesElement.addContent(valueElement);
-
- parentElement.addContent(customPropertiesElement);
-
-
- }
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/impl/ConstraintsConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/impl/ConstraintsConverter.java
deleted file mode 100644
index 37d4cc9..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/impl/ConstraintsConverter.java
+++ /dev/null
@@ -1,477 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters081.impl;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-import org.apache.log4j.LogManager;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters081.utils.ConstraintElementsCacheBuilder;
-import org.eclipse.app4mc.amalthea.converters081.utils.ConstraintElementsCacheEnum;
-import org.eclipse.app4mc.amalthea.converters081.utils.HelperUtils_080_081;
-import org.jdom2.Attribute;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-/**
- * This class is responsible for converting the Constraints Model elements from 0.8.0 to 0.8.1 version format of
- * AMALTHEA model
- *
- * @author mez2rng
- *
- */
-public class ConstraintsConverter extends AbstractConverter {
-
- private ConstraintElementsCacheBuilder constraintElementsCacheBuilder;
- private List<ICache> caches;
-
-
- public ConstraintsConverter() {
- this.helper = HelperUtils_080_081.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info("Migration from 0.8.0 to 0.8.1 : Executing Constraints converter for model file : "
- + targetFile.getName());
-
- this.caches = caches;
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
- }
- final Element rootElement = root.getRootElement();
-
- updateEventChainElementDefinitions_and_references(rootElement);
-
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
- }
-
-
- /**
- * This method is used for the migration of EventChain definitions and references present inside the Constraints
- * model (For further details, check : Bug 518119 )
- *
- * @param rootElement
- * Amalthea root element
- */
- private void updateEventChainElementDefinitions_and_references(final Element rootElement) {
-
-
- final List<Element> rootEventChainElements = this.helper.getXpathResult(rootElement,
- "./constraintsModel/eventChains", Element.class, this.helper.getGenericNS("xsi"));
-
- final List<String> allRootEventChainElements = getAllRootEventChainElements();
-
- if (rootEventChainElements.size() > 0) {
-
- for (final Element rootEventChainElement : rootEventChainElements) {
-
- final List<Element> subEventChainElements = this.helper.getXpathResult(rootEventChainElement,
- ".//*[@xsi:type=\"am:SubEventChain\"]", Element.class, this.helper.getGenericNS("xsi"));
-
- for (final Element subEventChainElement : subEventChainElements) {
-
- final Attribute typeAttribute = subEventChainElement.getAttribute("type",
- this.helper.getGenericNS("xsi"));
-
- if (typeAttribute != null) {
- typeAttribute.setValue("am:EventChainContainer");
- }
-
- }
-
- updateEventChainReferences(allRootEventChainElements, rootEventChainElement);
-
-
- }
- }
-
- updateEventChainReferences_in_TimingConstraints(allRootEventChainElements, rootElement);
-
-
- }
-
- /**
- * This method is used to migrate the contents of TimingConstraint elements of type EventChainLatencyConstraint and
- * EventChainSynchronizationConstraint, which are present inside Constraints Model.
- *
- * <b>Note:</b> As a part of migration, it should be ensured that sub EventChain elements are not directly referred
- * inside TimingConstraint elements. Till 0.8.1, it was possible to refer sub EventChain elements --> but based on
- * this change such references are removed. To preserve the data specified by the user, reference String is stored
- * as a CustomProperty
- *
- *
- * @param allRootEventChainElements
- * List<String> contains the names of all the root EventChain elements (in the entire model scope)
- * @param rootElement
- * Amalthea root element
- *
- */
-
- private void updateEventChainReferences_in_TimingConstraints(final List<String> allRootEventChainElements,
- final Element rootElement) {
-
- final List<Element> eventChainReferenceEleemnts = this.helper.getXpathResult(rootElement,
- "./constraintsModel/timingConstraints[@xsi:type=\"am:EventChainLatencyConstraint\" or @xsi:type=\"am:EventChainSynchronizationConstraint\"]",
- Element.class, this.helper.getGenericNS("xsi"));
-
-
- for (final Element timingConstraint : eventChainReferenceEleemnts) {
-
- final List<String> invalidEventChainRefs = new ArrayList<String>();
-
- final Attribute eventChainsAttribute = timingConstraint.getAttribute("scope");
-
-
- if (eventChainsAttribute != null) {
-
- boolean isRefEventChainStringsUpdated = false;
-
- String refEventChainStrings = eventChainsAttribute.getValue();
-
- final StringTokenizer stringTokenizer = new StringTokenizer(refEventChainStrings);
-
- while (stringTokenizer.hasMoreTokens()) {
-
-
- final String refEventChainString = stringTokenizer.nextToken();
-
-
- final String refEventChainName = refEventChainString.substring(0,
- refEventChainString.lastIndexOf("?"));
-
- /*- performing validation, to identify if childelements are referred */
-
- if (!allRootEventChainElements.contains(refEventChainName)) {
-
- isRefEventChainStringsUpdated = true;
-
- /*- this is the case child EventChain element is referred (Note: As per AMALTHEA 0.8.1, it is not supported)*/
-
- refEventChainStrings = refEventChainStrings.replace(refEventChainString, "");
-
- /*- adding invalid EventChain reference string to a list -> to create CustomProperty object later */
- invalidEventChainRefs.add(refEventChainString);
-
- if (refEventChainStrings.trim().length() == 0) {
- timingConstraint.removeAttribute(eventChainsAttribute);
- }
-
- logEventChainMessage_TimingConstraint(timingConstraint, refEventChainName);
-
- }
-
- }
-
- if (isRefEventChainStringsUpdated) {
-
- /*- setting the updated EventChain reference String */
-
- eventChainsAttribute.setValue(refEventChainStrings.trim());
- }
-
-
- }
-
- /*-
- * If EventChain element is defined in other model file, then the reference inside TimingConstraint element will be generated as a separate tag in XMI
- *
- * Example:
- *
- * <timingConstraints xsi:type="am:EventChainLatencyConstraint" name="ecl2">
- * <scope href="amlt:/#eventChain_from_second_file_sub_element?type=EventChain"/>
- * </timingConstraints>
- * */
- final List<Element> eventChains = timingConstraint.getChildren("scope");
-
-
- if (eventChains != null) {
-
- for (final Element eventChainElement : eventChains) {
-
- final String hrefValue = eventChainElement.getAttributeValue("href");
-
- if (hrefValue != null && hrefValue.contains("amlt:/#")) {
-
- final String refEventChainName = hrefValue.substring(hrefValue.indexOf("#") + 1,
- hrefValue.indexOf("?"));
-
- /*- performing validation, to identify if childelements are referred */
-
- if (!allRootEventChainElements.contains(refEventChainName)) {
-
- /*- this is the case child EventChain element is referred (Note: As per AMALTHEA 0.8.1, it is not supported)*/
-
- timingConstraint.removeContent(eventChainElement);
-
- invalidEventChainRefs.add(hrefValue);
-
- logEventChainMessage_TimingConstraint(timingConstraint, refEventChainName);
-
- }
-
- }
- }
-
- }
-
-
- /*-
- * =================== Creating CustomProperty and associating invalid EventChain reference Strings to it. This step is performed to avoid loss of data ===========
- */
- if (invalidEventChainRefs.size() > 0) {
-
- final Element customPropertyElement = new Element("customProperties");
-
- customPropertyElement.setAttribute("key", "scope");
-
- final Element valueElement = new Element("value");
-
- valueElement.setAttribute("type", "am:ListObject", this.helper.getGenericNS("xsi"));
-
-
- for (final String invalidEventChainRef : invalidEventChainRefs) {
-
- final Element valuesElement = new Element("values");
-
- valuesElement.setAttribute("type", "am:StringObject", this.helper.getGenericNS("xsi"));
-
- valuesElement.setAttribute("value", invalidEventChainRef);
-
- valueElement.addContent(valuesElement);
-
- }
-
- customPropertyElement.addContent(valueElement);
- timingConstraint.addContent(customPropertyElement);
-
- }
-
- }
- }
-
-
- /**
- * This method is used to migrate the contents of EventChainReference objects which are present inside EventChain
- * object in Constraints Model.
- *
- * <b>Note:</b> As a part of migration, it should be ensured that sub EventChain elements are not directly referred
- * inside EventChainReference elements. Till 0.8.1, there was a possibility to refer sub EventChain elements --> but
- * based on this change such references are removed. To preserve the data specified by the user, reference String is
- * stored as a CustomProperty
- *
- *
- * @param allRootEventChainElements
- * List<String> contains the names of all the root EventChain elements (in the entire model scope)
- * @param rootEventChainElement
- * EventChain element which is directly present inside Constraints Model
- */
- private void updateEventChainReferences(final List<String> allRootEventChainElements,
- final Element rootEventChainElement) {
-
- final List<Element> eventChainReferenceEleemnts = this.helper.getXpathResult(rootEventChainElement,
- ".//*[@xsi:type=\"am:EventChainReference\"]", Element.class, this.helper.getGenericNS("xsi"));
-
-
- for (final Element eventChainReferenceElement : eventChainReferenceEleemnts) {
-
- final Attribute eventChainReferenceAttribute = eventChainReferenceElement.getAttribute("eventChain");
-
-
- if (eventChainReferenceAttribute != null) {
- final String refEventChainString = eventChainReferenceAttribute.getValue();
-
- if (refEventChainString != null && refEventChainString.contains("?")) {
-
- final String refEventChainName = refEventChainString.substring(0,
- refEventChainString.lastIndexOf("?"));
-
- /*- performing validation, to identify if childelements are referred */
-
- /*
- * ASSUMPTION !!! : In case of model element reference, elements name should be already encoded as a part of the reference.
- *
- * allRootEventChainElements -> obtained from the CacheBuilder should already contain encoded names of the EventChain elements
- */
- if (!allRootEventChainElements.contains((refEventChainName))) {
-
- /*- this is the case child EventChain element is referred (Note: As per AMALTHEA 0.8.1, it is not supported)*/
-
- eventChainReferenceElement.removeAttribute(eventChainReferenceAttribute);
-
- logEventChainMessage_and_Create_CustomProperty(rootEventChainElement,
- eventChainReferenceElement, refEventChainString, refEventChainName);
-
- }
-
- }
-
- }
-
- /*-
- * if EventChain element is defined in other model file, then the eventChain element will be generated as a separate tag in XMI
- *
- * Example:
- *
- * <segments xsi:type="am:EventChainReference">
- * <eventChain href="amlt:/#eventChain_from_second_file?type=EventChain"/>
- * </segments>
- *
- * */
- final Element eventChainElement = eventChainReferenceElement.getChild("eventChain");
-
- if (eventChainElement != null) {
-
- final String hrefValue = eventChainElement.getAttributeValue("href");
-
- if (hrefValue != null && hrefValue.contains("amlt:/#")) {
-
- final String refEventChainName = hrefValue.substring(hrefValue.indexOf("#") + 1,
- hrefValue.indexOf("?"));
-
- /*- performing validation, to identify if childelements are referred */
-
- /*
- * ASSUMPTION !!! : In case of model element reference (refEventChainName), elements name should be already encoded as a part of the reference.
- *
- * allRootEventChainElements -> obtained from the CacheBuilder should already contain encoded names of the EventChain elements
- */
-
- if (!allRootEventChainElements.contains((refEventChainName))) {
-
- /*- this is the case child EventChain element is referred (Note: As per AMALTHEA 0.8.1, it is not supported)*/
-
- eventChainReferenceElement.removeContent(eventChainElement);
-
- logEventChainMessage_and_Create_CustomProperty(rootEventChainElement,
- eventChainReferenceElement, hrefValue, refEventChainName);
-
- }
-
- }
-
- }
-
-
- }
- }
-
- private void logEventChainMessage_TimingConstraint(final Element timingConstraintElement,
- final String refEventChainName) {
-
- this.logger.warn("Sub EventChain : " + this.helper.decodeName(refEventChainName) + " is referred inside TimingConstraint as \"Scope\": "
- + timingConstraintElement.getAttributeValue("name")
- + ". As per 0.8.1, it is not valid to refer sub EventChain elements directly."
- + System.getProperty("line.separator") + " EventChain " + refEventChainName
- + "'s association is removed from TimingConstraint object, and corresponding information is stored as a CustomProperty");
-
- }
-
-
- private void logEventChainMessage_and_Create_CustomProperty(final Element rootEventChainElement,
- final Element eventChainReferenceElement, final String refEventChainString,
- final String refEventChainName) {
-
- this.logger.warn("Sub EventChain : " + this.helper.decodeName(refEventChainName)
- + " is referred inside EventChainReference of EventChain : "
- + rootEventChainElement.getAttributeValue("name")
- + ". As per 0.8.1, it is not valid to refer sub EventChain elements inside EventChainReference."
- + System.getProperty("line.separator")
- + " eventChain association is removed from EventChainReference object, and corresponding information is stored as a CustomProperty");
-
-
- final Element customPropertyElement = new Element("customProperties");
-
- customPropertyElement.setAttribute("key", "eventChain");
-
- final Element valueElement = new Element("value");
-
- valueElement.setAttribute("type", "am:StringObject", this.helper.getGenericNS("xsi"));
-
- valueElement.setAttribute("value", refEventChainString);
-
- customPropertyElement.addContent(valueElement);
-
- eventChainReferenceElement.addContent(customPropertyElement);
- }
-
- /**
- * This method returns the names of all root EventChain elements -- from different AMALTHEA models which are in
- * folder scope
- *
- * @return
- */
- @SuppressWarnings("unchecked")
- private List<String> getAllRootEventChainElements() {
-
- final ArrayList<String> rootEventChainNames = new ArrayList<String>();
-
- if (getConstraintElementsCacheBuilder() != null) {
-
- final Map<File, Map<String, Object>> cacheMap = getConstraintElementsCacheBuilder().getCacheMap();
-
- final Collection<Map<String, Object>> values = cacheMap.values();
-
- for (final Map<String, Object> map : values) {
-
- final Object value = map.get(ConstraintElementsCacheEnum.ROOT_EVENTCHAIN_NAMES.name());
-
- if (value instanceof List<?>) {
- rootEventChainNames.addAll((Collection<? extends String>) value);
- }
- }
-
-
- }
-
- return rootEventChainNames;
- }
-
- /**
- * This method is used to get the ConstraintElementsCacheBuilder object
- *
- * @return ConstraintElementsCacheBuilder
- */
- private ConstraintElementsCacheBuilder getConstraintElementsCacheBuilder() {
-
- if (this.constraintElementsCacheBuilder == null) {
- for (final ICache cache : this.caches) {
-
- if (cache instanceof ConstraintElementsCacheBuilder) {
- this.constraintElementsCacheBuilder = (ConstraintElementsCacheBuilder) cache;
- return this.constraintElementsCacheBuilder;
- }
- }
- }
-
- return this.constraintElementsCacheBuilder;
- }
-
-
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/impl/HwConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/impl/HwConverter.java
deleted file mode 100644
index e6bf09d..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/impl/HwConverter.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters081.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters081.utils.HelperUtils_080_081;
-import org.jdom2.Attribute;
-import org.jdom2.Document;
-import org.jdom2.Element;
-import org.jdom2.Parent;
-
-/**
- * This class is responsible for converting the HW Model elements from 0.8.0 to 0.8.1 version format of AMALTHEA model
- *
- * @author mez2rng
- *
- */
-public class HwConverter extends AbstractConverter {
-
- public HwConverter() {
- this.helper = HelperUtils_080_081.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info("Migration from 0.8.0 to 0.8.1 : Executing Hardware converter for model file : "
- + targetFile.getName());
-
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
- }
- final Element rootElement = root.getRootElement();
-
- removeXAccessPattern(rootElement);
-
- updateQuartz(rootElement);
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
- }
-
- /**
- * This method is used to move all Quartz elements to a single global list inside Hardware model i.e. directly inside HwSystem element (For further
- * details, check : Bug 518069 )
- *
- *
- * @param rootElement
- * Amalthea root element
- */
- private void updateQuartz(Element rootElement) {
-
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./hwModel/system//quartzes");
-
-
- final List<Element> hwSystemElements = this.helper.getXpathResult(rootElement, "./hwModel/system",
- Element.class, this.helper.getGenericNS("xsi"));
-
- final List<Element> quartzElements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
- Element.class, this.helper.getGenericNS("xsi"));
-
- Element hwSystemElement = null;
-
- if ( hwSystemElements.size() > 0) {
- hwSystemElement = hwSystemElements.get(0);
- }
-
-
- for (Element quartzElement : quartzElements) {
- //removing content of quartz element from existing parent
- Parent parent = quartzElement.getParent();
-
- if(parent !=null){
- //In case of nested Quartz, elements would have been removed from their parents
- parent.removeContent(quartzElement);
- }
-
- //changing the tag name of Quartz
- quartzElement.setName("quartzes");
-
- //setting Quartz element to HwSystem
- hwSystemElement.addContent(quartzElement);
-
- Attribute nameAttribute = quartzElement.getAttribute("name");
-
- String quartzName = nameAttribute!=null? nameAttribute.getValue():"";
-
-
- logger.info("Moved Quartz element"+quartzName+" as a child element of HwSystem");
-
- //removing sub-elements which are no longer valid as per 0.8.1
- boolean removedComponents = quartzElement.removeChild("components");
- if(removedComponents){
- this.logger.warn("-- Removed all HwComponent objects defined inside Quartz : "+quartzName);
- }
- boolean removedMemories = quartzElement.removeChild("memories");
-
- if(removedMemories){
- this.logger.warn("-- Removed all Memory objects defined inside Quartz : "+quartzName);
- }
- boolean removedNetworks = quartzElement.removeChild("networks");
- if(removedNetworks){
- this.logger.warn("-- Removed all Network objects defined inside Quartz : "+quartzName);
- }
- boolean removedPorts = quartzElement.removeChild("ports");
- if(removedPorts){
- this.logger.warn("-- Removed all HwPort objects defined inside Quartz : "+quartzName);
- }
- boolean removedPrescalers = quartzElement.removeChild("prescaler");
- if(removedPrescalers){
- this.logger.warn("-- Removed all Prescaler objects defined inside Quartz : "+quartzName);
- }
- boolean removedQuartzes = quartzElement.removeChild("quartzes");
-
- if(removedQuartzes){
- this.logger.warn("-- Moved all Quartz objects defined inside Quartz : "+quartzName + " as elements inside HwSystem");
- }
- }
-
-
-
-
- }
-
- /**
- * This method is used for the migration of MemmoryType element present inside the Hardware model (For further
- * details, check : Bug 518068 )
- *
- * As the metamodel change in 0.8.1: xAccessPattern attribute is removed from the MemoryType element
- *
- * @param rootElement
- * Amalthea root element
- */
- private void removeXAccessPattern(final Element rootElement) {
-
-
- final List<Element> memoryTypeElements = this.helper.getXpathResult(rootElement, "./hwModel/memoryTypes",
- Element.class, this.helper.getGenericNS("xsi"));
-
-
- for (final Element memoryTypeElement : memoryTypeElements) {
-
- memoryTypeElement.removeAttribute("xAccessPattern");
-
- this.logger.info("xAccessPattern attribute and its value are removed from MemoryType: "
- + memoryTypeElement.getAttributeValue("name"));
- }
-
-
- }
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/impl/MappingConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/impl/MappingConverter.java
deleted file mode 100644
index 65516c3..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/impl/MappingConverter.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters081.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters081.utils.HelperUtils_080_081;
-import org.jdom2.Attribute;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-/**
- * This class is responsible for converting the Mapping Model elements from 0.8.0 to 0.8.1 version format of AMALTHEA model
- *
- * @author mez2rng
- *
- */
-public class MappingConverter extends AbstractConverter {
-
- public MappingConverter() {
- this.helper = HelperUtils_080_081.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info("Migration from 0.8.0 to 0.8.1 : Executing Mapping converter for model file : "
- + targetFile.getName());
-
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
- }
- final Element rootElement = root.getRootElement();
-
- updateMappingModel_coreAllocation(rootElement);
-
- updateMappingModel_schedulerAllocation(rootElement);
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
- }
-
- /**
- * This method is used to migrate the MappingModel data (priority element from TaskAllocation should be moved to SchedulingParameters element: For further
- * details, check : Bug 511284, 518070 )
- *
- *
- * @param rootElement
- * Amalthea root element
- */
- private void updateMappingModel_schedulerAllocation(Element rootElement) {
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./mappingModel/taskAllocation");
-
-
- final List<Element> taskAllocationElements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
- Element.class, this.helper.getGenericNS("xsi"));
-
- boolean priorityAddedAsSchedulingParameter=false;
-
- for (Element taskAllocationElement : taskAllocationElements) {
-
- Attribute priorityAttribute = taskAllocationElement.getAttribute("priority");
-
- if(priorityAttribute !=null){
-
- String value = priorityAttribute.getValue();
-
- /*-- removing attribute based on the metamodel changes introduced in 0.8.1 --*/
-
- taskAllocationElement.removeAttribute(priorityAttribute);
-
- if(!value.equals("0")){
-
- priorityAddedAsSchedulingParameter=true;
-
- Element schedulingParametersElement=new Element("schedulingParameters");
-
- schedulingParametersElement.setAttribute("priority", value);
-
- taskAllocationElement.addContent(schedulingParametersElement);
- }
-
-
- }
-
- }
-
- if(priorityAddedAsSchedulingParameter){
- this.logger.info("Priority is removed from TaskAllocation elements and added as a attribute in corresponding SchedulingParameters element");
- }
- }
-
- /**
- * This method is used to migrate the MappingModel data (CoreAllocations elements to SchedulerAllocation : For further
- * details, check : Bug 518070 )
- *
- *
- * @param rootElement
- * Amalthea root element
- */
- private void updateMappingModel_coreAllocation(Element rootElement) {
-
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./mappingModel/coreAllocation");
-
-
- final List<Element> coreAllocationElements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
- Element.class, this.helper.getGenericNS("xsi"));
-
-
-
- for (Element coreAllocationElement : coreAllocationElements) {
-
- coreAllocationElement.setName("schedulerAllocation");
-
- Attribute coreAttribute = coreAllocationElement.getAttribute("core");
-
- Element coreElement = coreAllocationElement.getChild("core");
-
- if(coreAttribute!=null){
- coreAttribute.setName("responsibility");
- }else if(coreElement!=null){
- coreElement.setName("responsibility");
- }
-
-
- }
-
-
-
-
- }
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/impl/NamespaceConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/impl/NamespaceConverter.java
deleted file mode 100644
index 696ea8b..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/impl/NamespaceConverter.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters081.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.apache.log4j.Logger;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
-import org.eclipse.app4mc.amalthea.converters081.utils.HelperUtils_080_081;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-/**
- * This class is responsible for converting the namespace of AMALTHEA model from 0.8.0 to 0.8.1
- *
- * @author mez2rng
- *
- */
-public class NamespaceConverter implements IConverter {
-
- private final HelperUtils_080_081 helper;
-
- private final Logger logger;
-
- public NamespaceConverter() {
- this.helper = HelperUtils_080_081.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info("Migration from 0.8.0 to 0.8.1 : Executing Namespace converter for model file : "
- + targetFile.getName());
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
- }
- final Element rootElement = root.getRootElement();
-
- this.helper.updateRootElement_NameSpaces_to_081(rootElement);
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
- }
-
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/impl/OSConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/impl/OSConverter.java
deleted file mode 100644
index 1d8b10a..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/impl/OSConverter.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters081.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters081.utils.HelperUtils_080_081;
-import org.jdom2.Attribute;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-/**
- * This class is responsible for converting the OS Model elements from 0.8.0 to 0.8.1 version format of AMALTHEA model
- *
- * @author mez2rng
- *
- */
-public class OSConverter extends AbstractConverter {
-
- public OSConverter() {
- this.helper = HelperUtils_080_081.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info("Migration from 0.8.0 to 0.8.1 : Executing OS converter for model file : "
- + targetFile.getName());
-
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
- }
- final Element rootElement = root.getRootElement();
-
- updateOSModel(rootElement);
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
- }
-
- /**
- * This method is used to migrate the OS model data
- *
- * 1. AlgorithmParameter elements to ParameterExtension inside UserSpecificSchedulingAlgorithm : For further
- * details, check : Bug 518070
- *
- * 2. Removal of SchedulingUnit from TaskScheduler and InterruptContoller elements. For further details check :
- *
- *
- * @param rootElement
- * Amalthea root element
- */
- private void updateOSModel(Element rootElement) {
-
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./osModel/operatingSystems/interruptControllers");
- xpathBuffer.append("|");
- xpathBuffer.append("./osModel/operatingSystems/taskSchedulers");
-
-
- final List<Element> sourceElements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
- Element.class, this.helper.getGenericNS("xsi"));
-
-
- for (Element schedulerElement : sourceElements) {
-
- //Changing model based on : Bug 518070
-
- final List<Element> algorithmParameterElements = this.helper.getXpathResult(schedulerElement, "./schedulingAlgorithm[@xsi:type=\"am:UserSpecificSchedulingAlgorithm\"]/parameter",
- Element.class, this.helper.getGenericNS("xsi"));
-
- for (Element algorithmParameterElement : algorithmParameterElements) {
-
- algorithmParameterElement.setName("parameterExtensions");
- }
-
- /*====================== Changing model based on : Bug 519746 ======================*/
-
- //Adding customProperty "scheduleUnitPriority"
-
- String scheduleUnitPriority= schedulerElement.getAttributeValue("scheduleUnitPriority");
-
- if(scheduleUnitPriority!=null && !scheduleUnitPriority.equals("0")){
- addCustomProperty(schedulerElement, "scheduleUnitPriority", schedulerElement.getAttributeValue("scheduleUnitPriority"));
- }
-
- //removal of scheduleUnitPriority attribute
- schedulerElement.removeAttribute("scheduleUnitPriority");
-
- Element schedulingUnitElement = schedulerElement.getChild("schedulingUnit");
-
- if(schedulingUnitElement !=null){
-
- this.logger.warn("SchedulingUnit removed from Scheduler : "+ schedulerElement.getAttributeValue("name"));
-
- String schedulingUnitType = schedulingUnitElement.getAttributeValue("type", this.helper.getGenericNS("xsi"));
-
- if(schedulingUnitType !=null){
-
- if(schedulingUnitType.equals("am:SchedulingHWUnit")){
-
- moveCustomPropertiesOfSchedulingUnit(schedulerElement, schedulingUnitElement,"SchedulingHWUnit_CustomProperty__");
-
- //Adding customProperty "delay"
- Element delayElement = schedulingUnitElement.getChild("delay");
- if(delayElement!=null){
- delayElement.detach();
-
- Element customPropertiesElement=new Element("customProperties");
-
- customPropertiesElement.setAttribute("key", "SchedulingHWUnit___delay");
-
- delayElement.setName("value");
-
- delayElement.setAttribute("type", "am:TimeObject", this.helper.getGenericNS("xsi"));
-
- //adding as a value to CustomProperty
- customPropertiesElement.addContent(delayElement);
-
- //adding customProperty to Scheduler Eleemnt
- schedulerElement.addContent(customPropertiesElement);
-
- addCustomProperty(schedulerElement, "SchedulingHWUnit___delay", schedulerElement.getAttributeValue("delay"));
- }
-
-
- }else if(schedulingUnitType.equals("am:SchedulingSWUnit")){
-
- moveCustomPropertiesOfSchedulingUnit(schedulerElement, schedulingUnitElement,"SchedulingSWUnit_CustomProperty__");
-
- /*- fetching all Instruction elements and associating to RunnableInstructions */
- List<Element> instructionElements = schedulingUnitElement.getChildren("instructions");
-
- if(instructionElements.size()>0){
- this.logger.warn("-- Instructions inside SchedulingSWUnit are migrated to RunnableInstructions element");
- }
-
- for (Element instructionElement : instructionElements) {
-
- Element clone = instructionElement.clone();
-
- clone.setName("default");
-
- Element computationItemElement=new Element("computationItems");
-
- computationItemElement.setAttribute("type", "am:RunnableInstructions", this.helper.getGenericNS("xsi"));
-
- computationItemElement.addContent(clone);
-
- schedulerElement.addContent(computationItemElement);
-
- }
-
- //Adding customProperty "priority"
-
- String priority=schedulingUnitElement.getAttributeValue("priority");
-
- if(priority !=null && !priority.equals("0")){
- addCustomProperty(schedulerElement, "SchedulingSWUnit___priority", priority);
- }
-
- //removing interruptController
- if(schedulingUnitElement.removeAttribute("interruptController") || schedulingUnitElement.removeChild("interruptController")){
- this.logger.warn("-- InterruptController inside SchedulingSWUnit is removed, as there is no equivalent element for it in AMALTHEA 0.8.1");
- }
-
- }
- }
-
-
- /*- removing SchedulingHWUnit --*/
-
- schedulerElement.removeChild("schedulingUnit");
-
-
- }
-
- }
-
-
-
-
- }
-
- private void moveCustomPropertiesOfSchedulingUnit(Element schedulerElement, Element schedulingUnitElement, String prefix) {
-
- List<Element> customPropertyElements = schedulingUnitElement.getChildren("customProperties");
-
- for (Element customProperty : customPropertyElements) {
-
- Element cloneCustomProperty = customProperty.clone();
-
- Attribute keyAttribute = cloneCustomProperty.getAttribute("key");
-
- if(keyAttribute !=null){
- String value = keyAttribute.getValue();
- keyAttribute.setValue(prefix+value);
- }
-
- /*- adding CustomProperty to Scheduler */
-
- schedulerElement.addContent(cloneCustomProperty);
-
- }
- }
-
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/impl/RootElementConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/impl/RootElementConverter.java
deleted file mode 100644
index f1b0412..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/impl/RootElementConverter.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters081.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters081.utils.HelperUtils_080_081;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-/**
- * This class is responsible for converting the root element of the model file as : "Amalthea" (only if for the supplied
- * model root element is other than "Amalthea" e.g: hwModel or swModel)
- *
- * @author mez2rng
- *
- */
-public class RootElementConverter extends AbstractConverter {
-
- public RootElementConverter() {
- this.helper = HelperUtils_080_081.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- /*-
- * ==============
- *|| Input Model :||
- * ==============
- * <am:MappingModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:am="http://app4mc.eclipse.org/amalthea/0.7.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- * </am:MappingModel>
- *
- * ==============
- *|| Output Model :||
- * ==============
- *
- * <am:Amalthea xmlns:am="http://app4mc.eclipse.org/amalthea/0.7.2" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- * <mappingModel>
- *
- * </mappingModel>
- </am:Amalthea>
- */
-
-
- this.logger.info("Migration from 0.8.0 to 0.8.1: Executing \"Root Element Converter\" for model file : "
- + targetFile.getName());
-
- final Document document = fileName_documentsMap.get(targetFile);
-
- if (document == null) {
- return;
- }
- final Element rootElement = document.getRootElement();
-
- final String rootTagName = rootElement.getName();
-
- if (!rootTagName.equals("Amalthea")) {
-
- if (rootTagName.equals("SWModel") || rootTagName.equals("HWModel") || rootTagName.equals("OSModel")
- || rootTagName.equals("StimuliModel") || rootTagName.equals("ConstraintsModel")
- || rootTagName.equals("EventModel") || rootTagName.equals("PropertyConstraintsModel")
- || rootTagName.equals("MappingModel") || rootTagName.equals("ConfigModel")
- || rootTagName.equals("ComponentsModel") || rootTagName.equals("CommonElements")) {
-
- final Element newRootElement = new Element("Amalthea");
-
- this.helper.copyAllNameSpaces(rootElement, newRootElement);
-
- updateCurrentRootTagProps(rootElement);
-
- document.removeContent();
-
- newRootElement.addContent(rootElement);
-
- document.addContent(newRootElement);
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), document);
- }
-
- }
-
-
- }
-
- /**
- * This method is used to remove the default namespaces associated to the Root Element and also change the name of
- * it -> so that it can be added as a sub-tag inside "Amalthea root element"
- *
- * @param rootElement
- * Element This is the root element of the model file (where Amalthea is not root element)
- */
- private void updateCurrentRootTagProps(final Element rootElement) {
-
- this.helper.removeDefaultAttribs(rootElement);
-
- final String name = rootElement.getName();
-
- if (name.equals("SWModel")) {
- rootElement.setName("swModel");
- }
- else if (name.equals("HWModel")) {
- rootElement.setName("hwModel");
- }
- else if (name.equals("OSModel")) {
- rootElement.setName("osModel");
- }
- else if (name.equals("StimuliModel")) {
- rootElement.setName("stimuliModel");
- }
- else if (name.equals("ConstraintsModel")) {
- rootElement.setName("constraintsModel");
- }
- else if (name.equals("EventModel")) {
- rootElement.setName("eventModel");
- }
- else if (name.equals("PropertyConstraintsModel")) {
- rootElement.setName("propertyConstraintsModel");
- }
- else if (name.equals("MappingModel")) {
- rootElement.setName("mappingModel");
- }
- else if (name.equals("ConfigModel")) {
- rootElement.setName("configModel");
- }
- else if (name.equals("ComponentsModel")) {
- rootElement.setName("componentsModel");
- }
- else if (name.equals("CommonElements")) {
- rootElement.setName("commonElements");
- }
-
-
- }
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/impl/StimuliConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/impl/StimuliConverter.java
deleted file mode 100644
index 57f2bb2..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/impl/StimuliConverter.java
+++ /dev/null
@@ -1,452 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters081.impl;
-
-import java.io.File;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-import org.apache.log4j.LogManager;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters081.utils.HelperUtils_080_081;
-import org.jdom2.Attribute;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-/**
- * This class is responsible for converting the Stimuli Model elements from 0.8.0 to 0.8.1 version format of AMALTHEA model
- *
- * @author mez2rng
- *
- */
-public class StimuliConverter extends AbstractConverter {
-
- public StimuliConverter() {
- this.helper = HelperUtils_080_081.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info("Migration from 0.8.0 to 0.8.1 : Executing Stimuli converter for model file : "
- + targetFile.getName());
-
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
- }
- final Element rootElement = root.getRootElement();
-
- updateAllModeValueListEntryElements(rootElement);
-
- updateAllStimulusElements(rootElement);
-
- updateCustomPropertiesForStimulus(rootElement);
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
- }
-
- private void updateCustomPropertiesForStimulus(Element rootElement) {
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append(".//customProperties/value[@value]");
- xpathBuffer.append("|");
- xpathBuffer.append(".//customProperties/value/value");
- xpathBuffer.append("|");
- xpathBuffer.append(".//customProperties//values[@value]");
- xpathBuffer.append("|");
- xpathBuffer.append(".//customProperties//values/value");
-
-
- Map<String, String> namesMap=new HashMap<String, String>();
-
- namesMap.put("ArrivalCurve","ArrivalCurveStimulus");
- namesMap.put("InterProcess","InterProcessStimulus");
- namesMap.put("Periodic","PeriodicStimulus");
- namesMap.put("PeriodicEvent","VariableRateStimulus");
- namesMap.put("Single","SingleStimulus");
- namesMap.put("Sporadic","SporadicStimulus");
- namesMap.put("Synthetic","SyntheticStimulus");
-
-
-
- final List<Element> elements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
- Element.class, this.helper.getGenericNS("xsi"));
-
- for (Element element : elements) {
-
- Attribute typeAttribute = element.getAttribute("type", this.helper.getGenericNS("xsi"));
-
- Attribute valueAttribute = element.getAttribute("value");
-
- Attribute hrefAttribute = element.getAttribute("href");
-
- /*-
- * Case 1: <value xsi:type="am:ReferenceObject" value="no-name?type=ArrivalCurve"/>
- *
- */
- if(typeAttribute !=null && valueAttribute !=null){
-
- String value = valueAttribute.getValue();
-
- final int indexOfEquals = value.indexOf("=");
-
- if(indexOfEquals!=-1){
- String stimulusName = value.substring(indexOfEquals+1, value.length());
-
- if(namesMap.containsKey(stimulusName)){
-
- String newValue = value.substring(0, indexOfEquals+1)+namesMap.get(stimulusName);
-
- valueAttribute.setValue(newValue);
-
- }
- }
-
- }
-
- /*-
- * Case 2: <value xsi:type="am:EventStimulus" href="amlt:/#foreignEventStimulus?type=EventStimulus"/>
- */
- else if((valueAttribute == null) && (hrefAttribute !=null) && (typeAttribute !=null)){
-
- updateStimulusTypeAttribute(element);
-
-
- String value = hrefAttribute.getValue();
-
- final int indexOfEquals = value.indexOf("=");
-
- if(indexOfEquals!=-1){
- String stimulusName = value.substring(indexOfEquals+1, value.length());
-
- if(namesMap.containsKey(stimulusName)){
-
- String newValue = value.substring(0, indexOfEquals+1)+namesMap.get(stimulusName);
-
- hrefAttribute.setValue(newValue);
-
- }
- }
-
-
-
- }
-
-
-
- }
-
-
- }
-
- /**
- * This method is used to migrate all EventStimulus elements + update type info of Stimulus elements (For further
- * details, check : Bug 519925, Bug 519930 )
- *
- *
- * @param rootElement
- * Amalthea root element
- */
- private void updateAllStimulusElements(Element rootElement) {
-
- updateAllStimulusElementsDefinition(rootElement);
-
- updateAllStimulusElementsReferences(rootElement);
-
- }
-
- private void updateAllStimulusElementsReferences(Element rootElement) {
-
- Map<String, String> old_new_StimulusNamesMap=new HashMap<String, String>();
-
- old_new_StimulusNamesMap.put("ArrivalCurve", "ArrivalCurveStimulus");
- old_new_StimulusNamesMap.put("InterProcess", "InterProcessStimulus");
- old_new_StimulusNamesMap.put("Periodic", "PeriodicStimulus");
- old_new_StimulusNamesMap.put("PeriodicEvent", "VariableRateStimulus");
- old_new_StimulusNamesMap.put("Single", "SingleStimulus");
- old_new_StimulusNamesMap.put("Sporadic", "SporadicStimulus");
- old_new_StimulusNamesMap.put("Synthetic", "SyntheticStimulus");
-
-
- final StringBuffer stimulusEventBuffer = new StringBuffer();
-
- stimulusEventBuffer.append("./eventModel/events[@xsi:type=\"am:StimulusEvent\"]");
-
-
- updateStimulusReferences(rootElement, old_new_StimulusNamesMap, stimulusEventBuffer, "entity",false);
-
-
-
- final StringBuffer processBuffer = new StringBuffer();
- processBuffer.append("./swModel/tasks");
- processBuffer.append("|");
- processBuffer.append("./swModel/isrs");
-
- updateStimulusReferences(rootElement, old_new_StimulusNamesMap, processBuffer, "stimuli",false);
-
-
- final StringBuffer interProcessActivationBuffer = new StringBuffer();
-
- interProcessActivationBuffer.append("./swModel/tasks//calls[@xsi:type=\"am:InterProcessActivation\"]");
- interProcessActivationBuffer.append("|");
- interProcessActivationBuffer.append("./swModel/isrs//calls[@xsi:type=\"am:InterProcessActivation\"]");
-
- updateStimulusReferences(rootElement, old_new_StimulusNamesMap, interProcessActivationBuffer, "stimulus",true);
-
- }
-
- private void updateStimulusReferences(Element rootElement, Map<String, String> old_new_StimulusNamesMap,
- final StringBuffer stimulusEventBuffer, String variableName, boolean isInterProcessActivation) {
-
-
- final List<Element> elements = this.helper.getXpathResult(rootElement, stimulusEventBuffer.toString(),
- Element.class, this.helper.getGenericNS("xsi"));
-
- for (Element targetElement : elements) {
-
- Attribute attribute = targetElement.getAttribute(variableName);
-
- if (attribute != null) {
-
- StringBuffer updatedValueBuffer = new StringBuffer();
-
- StringTokenizer stk = new StringTokenizer(attribute.getValue());
-
- while (stk.hasMoreTokens()) {
-
- String nextToken = stk.nextToken();
-
- updatedValueBuffer.append(getUpdatedStimulusReference(nextToken, old_new_StimulusNamesMap,isInterProcessActivation) + " ");
-
- }
-
- String trimmedValue = updatedValueBuffer.toString().trim();
-
- if(trimmedValue.length()!=0){
- attribute.setValue(trimmedValue);
- }else{
- attribute.detach();
- }
- }
-
-
-
- List<Element> children = this.helper.getXpathResult(targetElement, "./"+variableName,
- Element.class, this.helper.getGenericNS("xsi"));
-
- for (Element element : children) {
-
- if(isInterProcessActivation){
-
- //Note: in case of InterProcessActivation, only InterProcessStimulus is supported (for details refer : 519930)
- String attributeValue = element.getAttributeValue("type", this.helper.getGenericNS("xsi"));
-
- if(attributeValue!=null && ! attributeValue.equals("InterProcess") ){
- element.detach();
- continue;
- }
- }
-
- /*-- element will also have the type information, if in the model, contents are defined using its super class */
-
- updateStimulusTypeAttribute(element);
-
-
- /*--- below code is used to update the references */
- Attribute hrefAttribute = element.getAttribute("href");
-
- if (hrefAttribute != null) {
- String value = hrefAttribute.getValue();
-
- String updatedValue = getUpdatedStimulusReference(value, old_new_StimulusNamesMap,isInterProcessActivation);
-
- if (value.equals(updatedValue) == false) {
- hrefAttribute.setValue(updatedValue);
- }
-
- }
- }
-
-
- /*-
- * update root elements type for InterProcessActivation as per the meta model change in 0.8.1:
- */
-
- if(isInterProcessActivation){
- Attribute typeAttribute = targetElement.getAttribute("type",this.helper.getGenericNS("xsi"));
-
- if (typeAttribute != null) {
-
- String typeValue = typeAttribute.getValue();
-
- if(typeValue.equals("am:InterProcessActivation")){
- typeAttribute.setValue("am:InterProcessTrigger");
- }
-
- }
- }
- }
-
-
-
-
- }
-
- private String getUpdatedStimulusReference(String token, Map<String, String> old_new_StimulusNamesMap, boolean isInterProcessActivation) {
-
- final int indexOfEquals = token.indexOf("=");
-
- if(indexOfEquals!=-1){
- String stimulusType = token.substring(indexOfEquals+1, token.length());
-
- //Note: in case of InterProcessActivation, only InterProcessStimulus is supported (for details refer : 519930)
- if(isInterProcessActivation && ! stimulusType.equals("InterProcess")){
- return "";
- }
-
- if(old_new_StimulusNamesMap.containsKey(stimulusType)){
-
- return token.substring(0, indexOfEquals+1)+old_new_StimulusNamesMap.get(stimulusType);
- }
-
- }
-
-
- return token;
- }
-
- private void updateAllStimulusElementsDefinition(Element rootElement) {
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./stimuliModel/stimuli");
-
- final List<Element> stimulusElements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
- Element.class, this.helper.getGenericNS("xsi"));
-
- for (Element stimulusElement : stimulusElements) {
-
- updateStimulusTypeAttribute(stimulusElement);
-
-
- }
- }
-
- /**
- * This method is used to update the type attribute of both Stimulus definition and references
- * @param stimulusElement
- */
- private void updateStimulusTypeAttribute(Element stimulusElement) {
- Attribute typeAttribute = stimulusElement.getAttribute("type",this.helper.getGenericNS("xsi"));
-
- if (typeAttribute != null) {
-
- String stimulusType = typeAttribute.getValue();
-
- if (stimulusType.equals("am:EventStimulus")) {
-
- /*-Model migration of EventStimulus element as per Bug 519925*/
-
- updateEventStimulus(stimulusElement);
-
- } else if (stimulusType.equals("am:ArrivalCurve")) {
-
- typeAttribute.setValue("am:ArrivalCurveStimulus");
-
- } else if (stimulusType.equals("am:InterProcess")) {
-
- typeAttribute.setValue("am:InterProcessStimulus");
-
- } else if (stimulusType.equals("am:Periodic")) {
-
- typeAttribute.setValue("am:PeriodicStimulus");
-
- } else if (stimulusType.equals("am:PeriodicEvent")) {
-
- typeAttribute.setValue("am:VariableRateStimulus");
-
- } else if (stimulusType.equals("am:Single")) {
-
- typeAttribute.setValue("am:SingleStimulus");
-
- } else if (stimulusType.equals("am:Sporadic")) {
-
- typeAttribute.setValue("am:SporadicStimulus");
-
- } else if (stimulusType.equals("am:Synthetic")) {
-
- typeAttribute.setValue("am:SyntheticStimulus");
-
- }
- }
- }
-
- /**
- * This method is used to migrate all EventStimulus elements + (For further
- * details, check : Bug 519925 )
- * @param stimulusElement
- */
- private void updateEventStimulus(Element stimulusElement) {
- Attribute triggerAttribute = stimulusElement.getAttribute("trigger");
-
- if(triggerAttribute!=null){
- triggerAttribute.setName("triggeringEvents");
- }
-
- List<Element> triggerElements = stimulusElement.getChildren("trigger");
-
- if(triggerElements !=null ){
- for (Element triggerElement : triggerElements) {
- triggerElement.setName("triggeringEvents");
- }
- }
- }
-
- /**
- * This method is used to migrate all ModeValueListEntry elements (For further
- * details, check : Bug 519860 )
- *
- *
- * @param rootElement
- * Amalthea root element
- */
- private void updateAllModeValueListEntryElements(Element rootElement) {
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./stimuliModel/stimuli/setModeValueList/entries");
- xpathBuffer.append("|");
- xpathBuffer.append("./stimuliModel/stimuli/enablingModeValueList/entries");
- xpathBuffer.append("|");
- xpathBuffer.append("./stimuliModel/stimuli/disablingModeValueList/entries");
-
- final List<Element> modeValueListEntryElements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
- Element.class, this.helper.getGenericNS("xsi"));
-
- for (Element modeValueListEntry : modeValueListEntryElements) {
- modeValueListEntry.setAttribute("type", "am:ModeValue", this.helper.getGenericNS("xsi"));
- }
-
- }
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/impl/SwConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/impl/SwConverter.java
deleted file mode 100644
index aba3c0b..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/impl/SwConverter.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters081.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters081.utils.HelperUtils_080_081;
-import org.jdom2.Attribute;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-/**
- * This class is responsible for converting the SW Model elements from 0.8.0 to 0.8.1 version format of AMALTHEA model
- *
- * @author mez2rng
- *
- */
-public class SwConverter extends AbstractConverter {
-
- public SwConverter() {
- this.helper = HelperUtils_080_081.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info("Migration from 0.8.0 to 0.8.1 : Executing Software converter for model file : "
- + targetFile.getName());
-
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
- }
- final Element rootElement = root.getRootElement();
-
- updateRunnable(rootElement);
-
- updateActivations(rootElement);
-
- updateAllAbstractProcessElements(rootElement);
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
- }
-
- /**
- * This method is used to remove priority from sub-classes of AbstractProcess (For further
- * details, check : Bug 511284, 518070 )
- *
- *
- * @param rootElement
- * Amalthea root element
- */
- private void updateAllAbstractProcessElements(Element rootElement) {
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./swModel/tasks");
- xpathBuffer.append("|");
- xpathBuffer.append("./swModel/isrs");
- xpathBuffer.append("|");
- xpathBuffer.append("./swModel/processPrototypes");
-
- final List<Element> abstractProcessElements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
- Element.class, this.helper.getGenericNS("xsi"));
-
- for (Element abstractProcessElement : abstractProcessElements) {
-
- Attribute priorityAttribute = abstractProcessElement.getAttribute("priority");
-
- if(priorityAttribute !=null){
- String value = priorityAttribute.getValue();
-
- /*-- removing attribute based on the metamodel changes introduced in 0.8.1 --*/
-
- abstractProcessElement.removeAttribute(priorityAttribute);
-
- if(!value.equals("0")){
-
- Element customPropertiesElement=new Element("customProperties");
-
- customPropertiesElement.setAttribute("key", "priority");
-
- Element valueElement=new Element("value");
-
- valueElement.setAttribute("type", "am:StringObject", this.helper.getGenericNS("xsi"));
-
- valueElement.setAttribute("value", value);
-
- customPropertiesElement.addContent(valueElement);
-
- abstractProcessElement.addContent(customPropertiesElement);
-
- this.logger.info("Priority is removed from : "+abstractProcessElement.getName()+" element ("+abstractProcessElement.getAttributeValue("name")+") and added as a CustomProperty with key as Priority");
-
- }
-
- }
-
- /*-- removing osekTaskGroup attribute inside Task element: based on the metamodel changes introduced in 0.8.1 --*/
-
- if(abstractProcessElement.getName().equals("tasks")){
-
- Attribute osekTaskGroupAttribute = abstractProcessElement.getAttribute("osekTaskGroup");
-
- if(osekTaskGroupAttribute !=null){
-
- String osekTaskGroupValue = osekTaskGroupAttribute.getValue();
-
- abstractProcessElement.removeAttribute(osekTaskGroupAttribute);
-
- if(!osekTaskGroupValue.equals("0")){
- addCustomProperty(abstractProcessElement, "osekTaskGroup", osekTaskGroupValue);
-
- this.logger.info("osekTaskGroup attribute is removed from Task ("+abstractProcessElement.getAttributeValue("name")+") and added as a CustomProperty with key as osekTaskGroup");
- }
-
- }
-
-
- }
-
- }
-
-
- }
-
- /**
- * This method is used to migrate the Runnable data to support multiple Activations (For further
- * details, check : Bug 519357 )
- *
- *
- * @param rootElement
- * Amalthea root element
- */
- private void updateRunnable(Element rootElement) {
-
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./swModel/runnables");
-
-
- final List<Element> runnableElements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
- Element.class, this.helper.getGenericNS("xsi"));
-
-
-
- for (Element runnableElement : runnableElements) {
-
- Attribute activationAttribute = runnableElement.getAttribute("activation");
- Element activationElement = runnableElement.getChild("activation");
-
- if(activationAttribute !=null){
- activationAttribute.setName("activations");
- }else if(activationElement !=null){
- activationElement.setName("activations");
- }
- }
-
-
-
-
- }
- /**
- * This method is used to migrate both PeriodicAtivation (removal of deadline ) and EventActivation (change of trigger tag to triggeringEvents)
- *
- * @param rootElement
- * Amalthea root element
- */
- private void updateActivations(Element rootElement) {
-
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./swModel/activations");
-
-
- final List<Element> activationElements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
- Element.class, this.helper.getGenericNS("xsi"));
-
-
- boolean removedDeadLine=false;
-
- for (Element activationElement : activationElements) {
-
- if(activationElement.getAttributeValue("type", this.helper.getGenericNS("xsi")).contains("am:PeriodicActivation")){
-
- Element deadlineElement = activationElement.getChild("deadline");
-
- if(deadlineElement !=null){
-
- deadlineElement.detach();
-
-
- Element customPropertiesElement=new Element("customProperties");
-
- customPropertiesElement.setAttribute("key", "deadline");
-
- deadlineElement.setName("value");
-
- deadlineElement.setAttribute("type", "am:TimeObject", this.helper.getGenericNS("xsi"));
-
- //adding as a value to CustomProperty
- customPropertiesElement.addContent(deadlineElement);
-
- //adding customProperty to Activation Eleemnt
- activationElement.addContent(customPropertiesElement);
-
- removedDeadLine=true;
-
- }
-
- }else if(activationElement.getAttributeValue("type", this.helper.getGenericNS("xsi")).contains("am:EventActivation")){
-
- List<Element> triggerElements = activationElement.getChildren("trigger");
-
- if(triggerElements !=null){
- for (Element element : triggerElements) {
- element.setName("triggeringEvents");
- }
- }
-
- Attribute triggerAttribute = activationElement.getAttribute("trigger");
-
- if(triggerAttribute!=null){
- triggerAttribute.setName("triggeringEvents");
- }
-
-
- }
-
- }
-
- if(removedDeadLine){
- this.logger.warn("-- Deadline inside PeriodicActivation elements is removed, as there is no equivalent element for it in AMALTHEA 0.8.1");
- }
-
-
-
-
- }
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/utils/ConstraintElementsCacheBuilder.java b/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/utils/ConstraintElementsCacheBuilder.java
deleted file mode 100644
index 818c375..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/utils/ConstraintElementsCacheBuilder.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters081.utils;
-
-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.jdom2.Document;
-import org.jdom2.Element;
-
-public class ConstraintElementsCacheBuilder implements ICache {
-
- private final Map<File, Map<String, Object>> map = new HashMap<File, Map<String, Object>>();
- private final HelperUtils_080_081 helper;
-
- public ConstraintElementsCacheBuilder() {
- this.helper = HelperUtils_080_081.getInstance();
- }
-
-
- @Override
- public void buildCache(final Map<File, Document> fileName_documentsMap) {
-
- for (final File targetFile : fileName_documentsMap.keySet()) {
-
- final Document document1 = fileName_documentsMap.get(targetFile);
-
- if (document1 == null) {
- // log error message
- continue;
- }
-
- final Element rootElement = document1.getRootElement();
-
- /*- Start : Cache initialization */
-
- getCacheMap().put(targetFile, new HashMap<String, Object>());
-
- final List<String> rootEventChainNames = new ArrayList<String>();
-
- getCacheMap().get(targetFile).put(ConstraintElementsCacheEnum.ROOT_EVENTCHAIN_NAMES.name(),
- rootEventChainNames);
-
- /*- End : Cache initialization */
-
- final List<Element> rootEventChainElements = this.helper.getXpathResult(rootElement,
- "./constraintsModel/eventChains", Element.class, this.helper.getNS_070("am"));
-
-
- /*- ================START: Collecting root level eventchain elements ======================== */
-
- for (final Element element : rootEventChainElements) {
-
- final String eventChain_name = element.getAttributeValue("name");
-
- if (eventChain_name != null) {
- rootEventChainNames.add(this.helper.encodeName(eventChain_name));
- }
- }
-
- /*- ================END: Collecting root level eventchain elements ======================== */
-
- }
-
- }
-
-
- @Override
- public Map<File, Map<String, Object>> getCacheMap() {
- return this.map;
- }
-
- @Override
- public void clearCacheMap() {
-
- this.map.clear();
- }
-
-
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/utils/ConstraintElementsCacheEnum.java b/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/utils/ConstraintElementsCacheEnum.java
deleted file mode 100644
index cddb510..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/utils/ConstraintElementsCacheEnum.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package org.eclipse.app4mc.amalthea.converters081.utils;
-
-public enum ConstraintElementsCacheEnum {
-
- /*- Cache is stored in following format : List<String>
- *
- * */
- ROOT_EVENTCHAIN_NAMES,
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/utils/HelperUtils_080_081.java b/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/utils/HelperUtils_080_081.java
deleted file mode 100644
index cb8c488..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.081/src/org/eclipse/app4mc/amalthea/converters081/utils/HelperUtils_080_081.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters081.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_081;
-import org.jdom2.Attribute;
-import org.jdom2.Element;
-import org.jdom2.Namespace;
-
-public class HelperUtils_080_081 extends AbstractHelper {
-
- private HelperUtils_080_081() {
-
- }
-
- private static HelperUtils_080_081 instance;
-
- public static HelperUtils_080_081 getInstance() {
-
- if (instance == null) {
- instance = new HelperUtils_080_081();
- }
-
- return instance;
- }
-
- public Element createAmaltheaElement_081() {
-
- final Element amaltheaElement = new Element("Amalthea");
- amaltheaElement.setNamespace(Namespace.getNamespace("am", NameSpace_081.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 080
- *
- * @param rootElement
- */
-
- public void updateRootElement_NameSpaces_to_081(final Element rootElement) {
-
- final Namespace defaultNamespace = rootElement.getNamespace();
-
-
- if (isNS_AvailableIn_080(defaultNamespace)) {
-
- // final String rootElementName = rootElement.getName();
-
- rootElement.setNamespace(null);
-
- rootElement.removeNamespaceDeclaration(defaultNamespace);
-
- rootElement.setNamespace(getNS_081("am"));
-
- // updating additional namespaces to the ones from 0.8.1
-
- 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_080(ns)) {
-
- rootElement.removeNamespaceDeclaration(ns);
-
- }
-
- }
-
- rootElement.addNamespaceDeclaration(getGenericNS("xmi"));
-
- rootElement.addNamespaceDeclaration(getGenericNS("xsi"));
-
- }
- }
-
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.082/.classpath b/plugins/org.eclipse.app4mc.amalthea.converters.082/.classpath
deleted file mode 100644
index eca7bdb..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.082/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.082/.gitignore b/plugins/org.eclipse.app4mc.amalthea.converters.082/.gitignore
deleted file mode 100644
index 09e3bc9..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.082/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/bin/
-/target/
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.082/.project b/plugins/org.eclipse.app4mc.amalthea.converters.082/.project
deleted file mode 100644
index 5b8fcf0..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.082/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.app4mc.amalthea.converters.082</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.082/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.app4mc.amalthea.converters.082/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 0c68a61..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.082/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-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.082/META-INF/MANIFEST.MF b/plugins/org.eclipse.app4mc.amalthea.converters.082/META-INF/MANIFEST.MF
deleted file mode 100644
index 44f94a0..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.082/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,9 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: APP4MC Amalthea Converters to 0.8.2
-Bundle-SymbolicName: org.eclipse.app4mc.amalthea.converters.082;singleton:=true
-Bundle-Version: 0.9.6.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Require-Bundle: org.eclipse.app4mc.amalthea.converters.common;bundle-version="0.8.2"
-Bundle-Vendor: Eclipse APP4MC
-Automatic-Module-Name: org.eclipse.app4mc.amalthea.converters.082
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.082/about.html b/plugins/org.eclipse.app4mc.amalthea.converters.082/about.html
deleted file mode 100644
index 164f781..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.082/about.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!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>November 30, 2017</p>
- <h3>License</h3>
-
- <p>
- The Eclipse Foundation makes available 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 2.0 ("EPL"). A copy of the EPL is
- available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>.
- For purposes of the EPL, "Program" will mean the Content.
- </p>
-
- <p>
- If you did not receive this Content directly from the Eclipse
- Foundation, the Content is being redistributed by another party
- ("Redistributor") and different terms and conditions may
- apply to your use of any object code in the Content. Check the
- Redistributor's license that was provided with the Content. If no such
- license exists, contact the Redistributor. Unless otherwise indicated
- below, the terms and conditions of the EPL still apply to any source
- code in the Content and such source code may be obtained at <a
- href="http://www.eclipse.org/">http://www.eclipse.org</a>.
- </p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.082/build.properties b/plugins/org.eclipse.app4mc.amalthea.converters.082/build.properties
deleted file mode 100644
index e9863e2..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.082/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.082/epl-2.0.html b/plugins/org.eclipse.app4mc.amalthea.converters.082/epl-2.0.html
deleted file mode 100644
index 637a181..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.082/epl-2.0.html
+++ /dev/null
@@ -1,300 +0,0 @@
-<!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" xml:lang="en" lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Eclipse Public License - Version 2.0</title>
- <style type="text/css">
- body {
- margin: 1.5em 3em;
- }
- h1{
- font-size:1.5em;
- }
- h2{
- font-size:1em;
- margin-bottom:0.5em;
- margin-top:1em;
- }
- p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- ul, ol{
- list-style-type:none;
- }
- </style>
- </head>
- <body>
- <h1>Eclipse Public License - v 2.0</h1>
- <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>
- <h2 id="definitions">1. DEFINITIONS</h2>
- <p>“Contribution” means:</p>
- <ul>
- <li>a) in the case of the initial Contributor, the initial content
- Distributed under this Agreement, and
- </li>
- <li>
- b) in the case of each subsequent Contributor:
- <ul>
- <li>i) changes to the Program, and</li>
- <li>ii) additions to the Program;</li>
- </ul>
- 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 changes or additions to the Program that
- are not Modified Works.
- </li>
- </ul>
- <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
- or any Secondary License (as applicable), including Contributors.
- </p>
- <p>“Derivative Works” shall mean any work, whether in Source Code or other
- form, that is based on (or derived from) the Program and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship.
- </p>
- <p>“Modified Works” shall mean any work in Source Code or other form that
- results from an addition to, deletion from, or modification of the
- contents of the Program, including, for purposes of clarity any new file
- in Source Code form that contains any contents of the Program. Modified
- Works shall not include works that contain only declarations, interfaces,
- types, classes, structures, or files of the Program solely in each case
- in order to link to, bind by name, or subclass the Program or Modified
- Works thereof.
- </p>
- <p>“Distribute” means the acts of a) distributing or b) making available
- in any manner that enables the transfer of a copy.
- </p>
- <p>“Source Code” means the form of a Program preferred for making
- modifications, including but not limited to software source code,
- documentation source, and configuration files.
- </p>
- <p>“Secondary License” means either the GNU General Public License,
- Version 2.0, or any later versions of that license, including any
- exceptions or additional permissions as identified by the initial
- Contributor.
- </p>
- <h2 id="grant-of-rights">2. GRANT OF RIGHTS</h2>
- <ul>
- <li>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.
- </li>
- <li>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 or other 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.
- </li>
- <li>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.
- </li>
- <li>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.
- </li>
- <li>e) Notwithstanding the terms of any Secondary License, no Contributor
- makes additional grants to any Recipient (other than those set forth
- in this Agreement) as a result of such Recipient's receipt of the
- Program under the terms of a Secondary License (if permitted under
- the terms of Section 3).
- </li>
- </ul>
- <h2 id="requirements">3. REQUIREMENTS</h2>
- <p>3.1 If a Contributor Distributes the Program in any form, then:</p>
- <ul>
- <li>a) the Program must also be made available as Source Code, in
- accordance with section 3.2, and the Contributor must accompany
- the Program with a statement that the Source Code for the Program
- is available under this Agreement, and informs Recipients how to
- obtain it in a reasonable manner on or through a medium customarily
- used for software exchange; and
- </li>
- <li>
- b) the Contributor may Distribute the Program under a license
- different than this Agreement, provided that such license:
- <ul>
- <li>i) effectively disclaims on behalf of all other 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;
- </li>
- <li>ii) effectively excludes on behalf of all other Contributors all
- liability for damages, including direct, indirect, special, incidental
- and consequential damages, such as lost profits;
- </li>
- <li>iii) does not attempt to limit or alter the recipients' rights in the
- Source Code under section 3.2; and
- </li>
- <li>iv) requires any subsequent distribution of the Program by any party
- to be under a license that satisfies the requirements of this section 3.
- </li>
- </ul>
- </li>
- </ul>
- <p>3.2 When the Program is Distributed as Source Code:</p>
- <ul>
- <li>a) it must be made available under this Agreement, or if the Program (i)
- is combined with other material in a separate file or files made available
- under a Secondary License, and (ii) the initial Contributor attached to
- the Source Code the notice described in Exhibit A of this Agreement,
- then the Program may be made available under the terms of such
- Secondary Licenses, and
- </li>
- <li>b) a copy of this Agreement must be included with each copy of the Program.</li>
- </ul>
- <p>3.3 Contributors may not remove or alter any copyright, patent, trademark,
- attribution notices, disclaimers of warranty, or limitations of liability
- (‘notices’) contained within the Program from any copy of the Program which
- they Distribute, provided that Contributors may add their own appropriate
- notices.
- </p>
- <h2 id="commercial-distribution">4. COMMERCIAL DISTRIBUTION</h2>
- <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>
- <h2 id="warranty">5. NO WARRANTY</h2>
- <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
- BY APPLICABLE LAW, 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>
- <h2 id="disclaimer">6. DISCLAIMER OF LIABILITY</h2>
- <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
- BY APPLICABLE LAW, 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>
- <h2 id="general">7. GENERAL</h2>
- <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.
- </p>
- <p>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. Nothing in this Agreement is intended
- to be enforceable by any entity that is not a Contributor or Recipient.
- No third-party beneficiary rights are created under this Agreement.
- </p>
- <h2 id="exhibit-a">Exhibit A – Form of Secondary Licenses Notice</h2>
- <p>“This Source Code may also be made available under the following
- Secondary Licenses when the conditions for such availability set forth
- in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
- version(s), and exceptions or additional permissions here}.”
- </p>
- <blockquote>
- <p>Simply including a copy of this Agreement, including this Exhibit A
- is not sufficient to license the Source Code under Secondary Licenses.
- </p>
- <p>If it is not possible or desirable to put the notice in a particular file,
- then You may include the notice in a location (such as a LICENSE file in a
- relevant directory) where a recipient would be likely to look for
- such a notice.
- </p>
- <p>You may add additional accurate notices of copyright ownership.</p>
- </blockquote>
- </body>
-</html>
\ No newline at end of file
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.082/plugin.xml b/plugins/org.eclipse.app4mc.amalthea.converters.082/plugin.xml
deleted file mode 100644
index a647642..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.082/plugin.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?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.converters082.impl.RootElementConverter"
- enabled="true"
- id="converters.082.rootElement"
- input-model-version="0.8.1"
- name="rootElement"
- output-model-version="0.8.2">
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters082.impl.NamespaceConverter"
- enabled="true"
- id="converters.082.namespace"
- input-model-version="0.8.1"
- name="namespace"
- output-model-version="0.8.2">
- <dependent-on-converter
- id="converters.082.rootElement">
- </dependent-on-converter>
- </converter>
- </extension>
-
-</plugin>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.082/src/org/eclipse/app4mc/amalthea/converters082/impl/AbstractConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.082/src/org/eclipse/app4mc/amalthea/converters082/impl/AbstractConverter.java
deleted file mode 100644
index ffd959f..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.082/src/org/eclipse/app4mc/amalthea/converters082/impl/AbstractConverter.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2017-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters082.impl;
-
-import org.apache.log4j.Logger;
-import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
-import org.eclipse.app4mc.amalthea.converters082.utils.HelperUtils_081_082;
-import org.jdom2.Element;
-
-public abstract class AbstractConverter implements IConverter {
-
- protected HelperUtils_081_082 helper;
-
- protected Logger logger;
-
-
- /**
- * This method is used to add CustomProperty to the parent Element, with the supplied key and value
- * @param parentElement Element for which CustomProperty shall be added to
- * @param key
- * @param value
- */
- protected void addCustomProperty(Element parentElement, String key, String value){
-
- if(value == null){
- return ;
- }
-
- Element customPropertiesElement=new Element("customProperties");
-
- customPropertiesElement.setAttribute("key", key);
-
- Element valueElement=new Element("value");
-
- valueElement.setAttribute("type", "am:StringObject", this.helper.getGenericNS("xsi"));
-
- valueElement.setAttribute("value", value);
-
- customPropertiesElement.addContent(valueElement);
-
- parentElement.addContent(customPropertiesElement);
-
-
- }
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.082/src/org/eclipse/app4mc/amalthea/converters082/impl/NamespaceConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.082/src/org/eclipse/app4mc/amalthea/converters082/impl/NamespaceConverter.java
deleted file mode 100644
index db441aa..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.082/src/org/eclipse/app4mc/amalthea/converters082/impl/NamespaceConverter.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2017-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters082.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.apache.log4j.Logger;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
-import org.eclipse.app4mc.amalthea.converters082.utils.HelperUtils_081_082;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-/**
- * This class is responsible for converting the namespace of AMALTHEA model from 0.8.1 to 0.8.2
- *
- * @author mez2rng
- *
- */
-public class NamespaceConverter implements IConverter {
-
- private final HelperUtils_081_082 helper;
-
- private final Logger logger;
-
- public NamespaceConverter() {
- this.helper = HelperUtils_081_082.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info("Migration from 0.8.1 to 0.8.2 : Executing Namespace converter for model file : "
- + targetFile.getName());
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
- }
- final Element rootElement = root.getRootElement();
-
- this.helper.updateRootElement_NameSpaces_to_082(rootElement);
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
- }
-
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.082/src/org/eclipse/app4mc/amalthea/converters082/impl/RootElementConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.082/src/org/eclipse/app4mc/amalthea/converters082/impl/RootElementConverter.java
deleted file mode 100644
index 0d8fbea..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.082/src/org/eclipse/app4mc/amalthea/converters082/impl/RootElementConverter.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters082.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters082.utils.HelperUtils_081_082;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-/**
- * This class is responsible for converting the root element of the model file as : "Amalthea" (only if for the supplied
- * model root element is other than "Amalthea" e.g: hwModel or swModel)
- *
- * @author mez2rng
- *
- */
-public class RootElementConverter extends AbstractConverter {
-
- public RootElementConverter() {
- this.helper = HelperUtils_081_082.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- /*-
- * ==============
- *|| Input Model :||
- * ==============
- * <am:MappingModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:am="http://app4mc.eclipse.org/amalthea/0.7.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- * </am:MappingModel>
- *
- * ==============
- *|| Output Model :||
- * ==============
- *
- * <am:Amalthea xmlns:am="http://app4mc.eclipse.org/amalthea/0.7.2" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- * <mappingModel>
- *
- * </mappingModel>
- </am:Amalthea>
- */
-
-
- this.logger.info("Migration from 0.8.1 to 0.8.2: Executing \"Root Element Converter\" for model file : "
- + targetFile.getName());
-
- final Document document = fileName_documentsMap.get(targetFile);
-
- if (document == null) {
- return;
- }
- final Element rootElement = document.getRootElement();
-
- final String rootTagName = rootElement.getName();
-
- if (!rootTagName.equals("Amalthea")) {
-
- if (rootTagName.equals("SWModel") || rootTagName.equals("HWModel") || rootTagName.equals("OSModel")
- || rootTagName.equals("StimuliModel") || rootTagName.equals("ConstraintsModel")
- || rootTagName.equals("EventModel") || rootTagName.equals("PropertyConstraintsModel")
- || rootTagName.equals("MappingModel") || rootTagName.equals("ConfigModel")
- || rootTagName.equals("ComponentsModel") || rootTagName.equals("CommonElements")) {
-
- final Element newRootElement = new Element("Amalthea");
-
- this.helper.copyAllNameSpaces(rootElement, newRootElement);
-
- updateCurrentRootTagProps(rootElement);
-
- document.removeContent();
-
- newRootElement.addContent(rootElement);
-
- document.addContent(newRootElement);
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), document);
- }
-
- }
-
-
- }
-
- /**
- * This method is used to remove the default namespaces associated to the Root Element and also change the name of
- * it -> so that it can be added as a sub-tag inside "Amalthea root element"
- *
- * @param rootElement
- * Element This is the root element of the model file (where Amalthea is not root element)
- */
- private void updateCurrentRootTagProps(final Element rootElement) {
-
- this.helper.removeDefaultAttribs(rootElement);
-
- final String name = rootElement.getName();
-
- if (name.equals("SWModel")) {
- rootElement.setName("swModel");
- }
- else if (name.equals("HWModel")) {
- rootElement.setName("hwModel");
- }
- else if (name.equals("OSModel")) {
- rootElement.setName("osModel");
- }
- else if (name.equals("StimuliModel")) {
- rootElement.setName("stimuliModel");
- }
- else if (name.equals("ConstraintsModel")) {
- rootElement.setName("constraintsModel");
- }
- else if (name.equals("EventModel")) {
- rootElement.setName("eventModel");
- }
- else if (name.equals("PropertyConstraintsModel")) {
- rootElement.setName("propertyConstraintsModel");
- }
- else if (name.equals("MappingModel")) {
- rootElement.setName("mappingModel");
- }
- else if (name.equals("ConfigModel")) {
- rootElement.setName("configModel");
- }
- else if (name.equals("ComponentsModel")) {
- rootElement.setName("componentsModel");
- }
- else if (name.equals("CommonElements")) {
- rootElement.setName("commonElements");
- }
-
-
- }
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.082/src/org/eclipse/app4mc/amalthea/converters082/utils/HelperUtils_081_082.java b/plugins/org.eclipse.app4mc.amalthea.converters.082/src/org/eclipse/app4mc/amalthea/converters082/utils/HelperUtils_081_082.java
deleted file mode 100644
index 10d9c4a..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.082/src/org/eclipse/app4mc/amalthea/converters082/utils/HelperUtils_081_082.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters082.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_082;
-import org.jdom2.Attribute;
-import org.jdom2.Element;
-import org.jdom2.Namespace;
-
-public class HelperUtils_081_082 extends AbstractHelper {
-
- private HelperUtils_081_082() {
-
- }
-
- private static HelperUtils_081_082 instance;
-
- public static HelperUtils_081_082 getInstance() {
-
- if (instance == null) {
- instance = new HelperUtils_081_082();
- }
-
- return instance;
- }
-
- public Element createAmaltheaElement_082() {
-
- final Element amaltheaElement = new Element("Amalthea");
- amaltheaElement.setNamespace(Namespace.getNamespace("am", NameSpace_082.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 080
- *
- * @param rootElement
- */
-
- public void updateRootElement_NameSpaces_to_082(final Element rootElement) {
-
- final Namespace defaultNamespace = rootElement.getNamespace();
-
-
- if (isNS_AvailableIn_081(defaultNamespace)) {
-
- // final String rootElementName = rootElement.getName();
-
- rootElement.setNamespace(null);
-
- rootElement.removeNamespaceDeclaration(defaultNamespace);
-
- rootElement.setNamespace(getNS_082("am"));
-
- // updating additional namespaces to the ones from 0.8.2
-
- 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_081(ns)) {
-
- rootElement.removeNamespaceDeclaration(ns);
-
- }
-
- }
-
- rootElement.addNamespaceDeclaration(getGenericNS("xmi"));
-
- rootElement.addNamespaceDeclaration(getGenericNS("xsi"));
-
- }
- }
-
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.083/.classpath b/plugins/org.eclipse.app4mc.amalthea.converters.083/.classpath
deleted file mode 100644
index eca7bdb..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.083/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.083/.gitignore b/plugins/org.eclipse.app4mc.amalthea.converters.083/.gitignore
deleted file mode 100644
index 09e3bc9..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.083/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/bin/
-/target/
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.083/.project b/plugins/org.eclipse.app4mc.amalthea.converters.083/.project
deleted file mode 100644
index 7ee0018..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.083/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.app4mc.amalthea.converters.083</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.083/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.app4mc.amalthea.converters.083/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 0c68a61..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.083/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-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.083/META-INF/MANIFEST.MF b/plugins/org.eclipse.app4mc.amalthea.converters.083/META-INF/MANIFEST.MF
deleted file mode 100644
index 5aea095..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.083/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,9 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: APP4MC Amalthea Converters to 0.8.3
-Bundle-SymbolicName: org.eclipse.app4mc.amalthea.converters.083;singleton:=true
-Bundle-Version: 0.9.6.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Require-Bundle: org.eclipse.app4mc.amalthea.converters.common;bundle-version="0.8.2"
-Bundle-Vendor: Eclipse APP4MC
-Automatic-Module-Name: org.eclipse.app4mc.amalthea.converters.083
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.083/about.html b/plugins/org.eclipse.app4mc.amalthea.converters.083/about.html
deleted file mode 100644
index 164f781..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.083/about.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!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>November 30, 2017</p>
- <h3>License</h3>
-
- <p>
- The Eclipse Foundation makes available 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 2.0 ("EPL"). A copy of the EPL is
- available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>.
- For purposes of the EPL, "Program" will mean the Content.
- </p>
-
- <p>
- If you did not receive this Content directly from the Eclipse
- Foundation, the Content is being redistributed by another party
- ("Redistributor") and different terms and conditions may
- apply to your use of any object code in the Content. Check the
- Redistributor's license that was provided with the Content. If no such
- license exists, contact the Redistributor. Unless otherwise indicated
- below, the terms and conditions of the EPL still apply to any source
- code in the Content and such source code may be obtained at <a
- href="http://www.eclipse.org/">http://www.eclipse.org</a>.
- </p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.083/build.properties b/plugins/org.eclipse.app4mc.amalthea.converters.083/build.properties
deleted file mode 100644
index e9863e2..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.083/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.083/epl-2.0.html b/plugins/org.eclipse.app4mc.amalthea.converters.083/epl-2.0.html
deleted file mode 100644
index 637a181..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.083/epl-2.0.html
+++ /dev/null
@@ -1,300 +0,0 @@
-<!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" xml:lang="en" lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Eclipse Public License - Version 2.0</title>
- <style type="text/css">
- body {
- margin: 1.5em 3em;
- }
- h1{
- font-size:1.5em;
- }
- h2{
- font-size:1em;
- margin-bottom:0.5em;
- margin-top:1em;
- }
- p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- ul, ol{
- list-style-type:none;
- }
- </style>
- </head>
- <body>
- <h1>Eclipse Public License - v 2.0</h1>
- <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>
- <h2 id="definitions">1. DEFINITIONS</h2>
- <p>“Contribution” means:</p>
- <ul>
- <li>a) in the case of the initial Contributor, the initial content
- Distributed under this Agreement, and
- </li>
- <li>
- b) in the case of each subsequent Contributor:
- <ul>
- <li>i) changes to the Program, and</li>
- <li>ii) additions to the Program;</li>
- </ul>
- 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 changes or additions to the Program that
- are not Modified Works.
- </li>
- </ul>
- <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
- or any Secondary License (as applicable), including Contributors.
- </p>
- <p>“Derivative Works” shall mean any work, whether in Source Code or other
- form, that is based on (or derived from) the Program and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship.
- </p>
- <p>“Modified Works” shall mean any work in Source Code or other form that
- results from an addition to, deletion from, or modification of the
- contents of the Program, including, for purposes of clarity any new file
- in Source Code form that contains any contents of the Program. Modified
- Works shall not include works that contain only declarations, interfaces,
- types, classes, structures, or files of the Program solely in each case
- in order to link to, bind by name, or subclass the Program or Modified
- Works thereof.
- </p>
- <p>“Distribute” means the acts of a) distributing or b) making available
- in any manner that enables the transfer of a copy.
- </p>
- <p>“Source Code” means the form of a Program preferred for making
- modifications, including but not limited to software source code,
- documentation source, and configuration files.
- </p>
- <p>“Secondary License” means either the GNU General Public License,
- Version 2.0, or any later versions of that license, including any
- exceptions or additional permissions as identified by the initial
- Contributor.
- </p>
- <h2 id="grant-of-rights">2. GRANT OF RIGHTS</h2>
- <ul>
- <li>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.
- </li>
- <li>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 or other 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.
- </li>
- <li>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.
- </li>
- <li>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.
- </li>
- <li>e) Notwithstanding the terms of any Secondary License, no Contributor
- makes additional grants to any Recipient (other than those set forth
- in this Agreement) as a result of such Recipient's receipt of the
- Program under the terms of a Secondary License (if permitted under
- the terms of Section 3).
- </li>
- </ul>
- <h2 id="requirements">3. REQUIREMENTS</h2>
- <p>3.1 If a Contributor Distributes the Program in any form, then:</p>
- <ul>
- <li>a) the Program must also be made available as Source Code, in
- accordance with section 3.2, and the Contributor must accompany
- the Program with a statement that the Source Code for the Program
- is available under this Agreement, and informs Recipients how to
- obtain it in a reasonable manner on or through a medium customarily
- used for software exchange; and
- </li>
- <li>
- b) the Contributor may Distribute the Program under a license
- different than this Agreement, provided that such license:
- <ul>
- <li>i) effectively disclaims on behalf of all other 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;
- </li>
- <li>ii) effectively excludes on behalf of all other Contributors all
- liability for damages, including direct, indirect, special, incidental
- and consequential damages, such as lost profits;
- </li>
- <li>iii) does not attempt to limit or alter the recipients' rights in the
- Source Code under section 3.2; and
- </li>
- <li>iv) requires any subsequent distribution of the Program by any party
- to be under a license that satisfies the requirements of this section 3.
- </li>
- </ul>
- </li>
- </ul>
- <p>3.2 When the Program is Distributed as Source Code:</p>
- <ul>
- <li>a) it must be made available under this Agreement, or if the Program (i)
- is combined with other material in a separate file or files made available
- under a Secondary License, and (ii) the initial Contributor attached to
- the Source Code the notice described in Exhibit A of this Agreement,
- then the Program may be made available under the terms of such
- Secondary Licenses, and
- </li>
- <li>b) a copy of this Agreement must be included with each copy of the Program.</li>
- </ul>
- <p>3.3 Contributors may not remove or alter any copyright, patent, trademark,
- attribution notices, disclaimers of warranty, or limitations of liability
- (‘notices’) contained within the Program from any copy of the Program which
- they Distribute, provided that Contributors may add their own appropriate
- notices.
- </p>
- <h2 id="commercial-distribution">4. COMMERCIAL DISTRIBUTION</h2>
- <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>
- <h2 id="warranty">5. NO WARRANTY</h2>
- <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
- BY APPLICABLE LAW, 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>
- <h2 id="disclaimer">6. DISCLAIMER OF LIABILITY</h2>
- <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
- BY APPLICABLE LAW, 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>
- <h2 id="general">7. GENERAL</h2>
- <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.
- </p>
- <p>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. Nothing in this Agreement is intended
- to be enforceable by any entity that is not a Contributor or Recipient.
- No third-party beneficiary rights are created under this Agreement.
- </p>
- <h2 id="exhibit-a">Exhibit A – Form of Secondary Licenses Notice</h2>
- <p>“This Source Code may also be made available under the following
- Secondary Licenses when the conditions for such availability set forth
- in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
- version(s), and exceptions or additional permissions here}.”
- </p>
- <blockquote>
- <p>Simply including a copy of this Agreement, including this Exhibit A
- is not sufficient to license the Source Code under Secondary Licenses.
- </p>
- <p>If it is not possible or desirable to put the notice in a particular file,
- then You may include the notice in a location (such as a LICENSE file in a
- relevant directory) where a recipient would be likely to look for
- such a notice.
- </p>
- <p>You may add additional accurate notices of copyright ownership.</p>
- </blockquote>
- </body>
-</html>
\ No newline at end of file
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.083/plugin.xml b/plugins/org.eclipse.app4mc.amalthea.converters.083/plugin.xml
deleted file mode 100644
index 88b8230..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.083/plugin.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?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.converters083.impl.RootElementConverter"
- enabled="true"
- id="converters.083.rootElement"
- input-model-version="0.8.2"
- name="rootElement"
- output-model-version="0.8.3">
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters083.impl.NamespaceConverter"
- enabled="true"
- id="converters.083.namespace"
- input-model-version="0.8.2"
- name="namespace"
- output-model-version="0.8.3">
- <dependent-on-converter
- id="converters.083.rootElement">
- </dependent-on-converter>
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters083.impl.ComponentModelConverter"
- enabled="true"
- id="ComponentModelConverter"
- input-model-version="0.8.2"
- name="org.eclipse.app4mc.amalthea.converters.083.componentmodel.converter"
- output-model-version="0.8.3">
- <dependent-on-converter
- id="converters.083.rootElement">
- </dependent-on-converter>
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters083.impl.SwConverter"
- enabled="true"
- id="SwConverter"
- input-model-version="0.8.2"
- name="org.eclipse.app4mc.amalthea.converters.083.swconverter"
- output-model-version="0.8.3">
- <dependent-on-converter
- id="converters.083.rootElement">
- </dependent-on-converter>
- </converter>
- <converter
- converter-class="org.eclipse.app4mc.amalthea.converters083.impl.StimuliConverter"
- enabled="true"
- id="StimuliConverter"
- input-model-version="0.8.2"
- name="org.eclipse.app4mc.amalthea.converters.083.stimuliConverter"
- output-model-version="0.8.3">
- <dependent-on-converter
- id="converters.083.rootElement">
- </dependent-on-converter>
- </converter>
- </extension>
- <extension
- point="org.eclipse.app4mc.amalthea.model.converters.cachebuilders">
- <CacheBuilder
- ID="org.eclipse.app4mc.amalthea.converters.083.PeriodicStimulusCacheBuilder"
- class="org.eclipse.app4mc.amalthea.converters083.utils.PeriodicStimulusCacheBuilder"
- enabled="true"
- input-model-version="0.8.2"
- name="PeriodicStimulusCacheBuilder">
- </CacheBuilder>
- </extension>
-
-</plugin>
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.083/src/org/eclipse/app4mc/amalthea/converters083/impl/AbstractConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.083/src/org/eclipse/app4mc/amalthea/converters083/impl/AbstractConverter.java
deleted file mode 100644
index ec6bb6b..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.083/src/org/eclipse/app4mc/amalthea/converters083/impl/AbstractConverter.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2017-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters083.impl;
-
-import org.apache.log4j.Logger;
-import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
-import org.eclipse.app4mc.amalthea.converters083.utils.HelperUtils_082_083;
-import org.jdom2.Element;
-
-public abstract class AbstractConverter implements IConverter {
-
- protected HelperUtils_082_083 helper;
-
- protected Logger logger;
-
-
- /**
- * This method is used to add CustomProperty to the parent Element, with the supplied key and value
- * @param parentElement Element for which CustomProperty shall be added to
- * @param key
- * @param value
- */
- protected void addCustomProperty(Element parentElement, String key, String value){
-
- if(value == null){
- return ;
- }
-
- Element customPropertiesElement=new Element("customProperties");
-
- customPropertiesElement.setAttribute("key", key);
-
- Element valueElement=new Element("value");
-
- valueElement.setAttribute("type", "am:StringObject", this.helper.getGenericNS("xsi"));
-
- valueElement.setAttribute("value", value);
-
- customPropertiesElement.addContent(valueElement);
-
- parentElement.addContent(customPropertiesElement);
-
-
- }
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.083/src/org/eclipse/app4mc/amalthea/converters083/impl/ComponentModelConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.083/src/org/eclipse/app4mc/amalthea/converters083/impl/ComponentModelConverter.java
deleted file mode 100644
index e267b45..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.083/src/org/eclipse/app4mc/amalthea/converters083/impl/ComponentModelConverter.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters083.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters083.utils.HelperUtils_082_083;
-import org.jdom2.Attribute;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-/**
- * This class is responsible for converting the HW Model elements from 0.8.2 to 0.8.3 version format of AMALTHEA model
- *
- * @author zmeer
- *
- */
-public class ComponentModelConverter extends AbstractConverter {
-
- public ComponentModelConverter() {
- this.helper = HelperUtils_082_083.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info("Migration from 0.8.2 to 0.8.3 : Executing Component model converter for model file : "
- + targetFile.getName());
-
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
- }
- final Element rootElement = root.getRootElement();
-
-
- updateInterfacePort(rootElement);
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
- }
-
- /**
- * This method is used to change the reference of FInterfacePort to InterfacePort , check : Bug 528932)
- *
- *
- * @param rootElement
- * Amalthea root element
- */
- private void updateInterfacePort(Element rootElement) {
-
-
- final StringBuffer xpathBuffer = new StringBuffer();
-
- xpathBuffer.append("./componentsModel/components/ports");
-
-
- final List<Element> portElements = this.helper.getXpathResult(rootElement, xpathBuffer.toString(),
- Element.class, this.helper.getGenericNS("xsi"));
-
- //Setting xsi:type value of Port
- for (Element portElement : portElements) {
- Attribute typeAttribute = portElement.getAttribute("type", helper.getGenericNS("xsi"));
-
- if(typeAttribute !=null) {
- String value = typeAttribute.getValue();
- if(value.equals("am:FInterfacePort")) {
- typeAttribute.setValue("am:InterfacePort");
- }
- }
-
- }
-
- /*========== updating references ==================*/
-
- final StringBuffer xpathBufferForReferences = new StringBuffer();
-
- xpathBufferForReferences.append("./componentsModel/components/groundedPorts");
-
- xpathBufferForReferences.append("|");
-
- xpathBufferForReferences.append("./componentsModel/components/connectors/sourcePort");
-
- xpathBufferForReferences.append("|");
-
- xpathBufferForReferences.append("./componentsModel/components/connectors/targetPort");
-
- xpathBufferForReferences.append("|");
-
- xpathBufferForReferences.append("./componentsModel/systems/groundedPorts");
-
- xpathBufferForReferences.append("|");
-
- xpathBufferForReferences.append("./componentsModel/systems/connectors/sourcePort");
-
- xpathBufferForReferences.append("|");
-
- xpathBufferForReferences.append("./componentsModel/systems/connectors/targetPort");
-
-
-
- final List<Element> elementsReferringPorts = this.helper.getXpathResult(rootElement, xpathBufferForReferences.toString(),
- Element.class, this.helper.getGenericNS("xsi"));
-
- for (Element elementReferringPort : elementsReferringPorts) {
-
- Attribute portAttribute = elementReferringPort.getAttribute("port");
-
- if(portAttribute==null) {
-
- Element portElement = elementReferringPort.getChild("port");
-
- if(portElement!=null) {
-
- /*
- * This is the case where Port element from other file is referenced
- * In this case, below scernarios should be considered:
- * 1.type updation
- * 2.reference href updation
- */
-
- //type updation
-
- Attribute typeAttribute = portElement.getAttribute("type", helper.getGenericNS("xsi"));
-
- if(typeAttribute !=null) {
- String value = typeAttribute.getValue();
- if(value.equals("am:FInterfacePort")) {
- typeAttribute.setValue("am:InterfacePort");
- }
- }
- //href updation
-
- Attribute hrefAttribute = portElement.getAttribute("href");
-
- if(hrefAttribute!=null) {
- String value = hrefAttribute.getValue();
-
- value=value.replace("=FInterfacePort", "=InterfacePort");
- hrefAttribute.setValue(value);
- }
- }
- }else {
- //referring to local ports
-
- String value = portAttribute.getValue();
-
- value=value.replace("=FInterfacePort", "=InterfacePort");
- portAttribute.setValue(value);
- }
-
- }
-
-
-
- }
-
-
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.083/src/org/eclipse/app4mc/amalthea/converters083/impl/NamespaceConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.083/src/org/eclipse/app4mc/amalthea/converters083/impl/NamespaceConverter.java
deleted file mode 100644
index a168451..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.083/src/org/eclipse/app4mc/amalthea/converters083/impl/NamespaceConverter.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2017-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters083.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.apache.log4j.Logger;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters.common.base.IConverter;
-import org.eclipse.app4mc.amalthea.converters083.utils.HelperUtils_082_083;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-/**
- * This class is responsible for converting the namespace of AMALTHEA model from 0.8.1 to 0.8.2
- *
- * @author mez2rng
- *
- */
-public class NamespaceConverter implements IConverter {
-
- private final HelperUtils_082_083 helper;
-
- private final Logger logger;
-
- public NamespaceConverter() {
- this.helper = HelperUtils_082_083.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info("Migration from 0.8.2 to 0.8.3 : Executing Namespace converter for model file : "
- + targetFile.getName());
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
- }
- final Element rootElement = root.getRootElement();
-
- this.helper.updateRootElement_NameSpaces_to_083(rootElement);
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
- }
-
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.083/src/org/eclipse/app4mc/amalthea/converters083/impl/RootElementConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.083/src/org/eclipse/app4mc/amalthea/converters083/impl/RootElementConverter.java
deleted file mode 100644
index 9359dd8..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.083/src/org/eclipse/app4mc/amalthea/converters083/impl/RootElementConverter.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2015-2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters083.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters083.utils.HelperUtils_082_083;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-/**
- * This class is responsible for converting the root element of the model file as : "Amalthea" (only if for the supplied
- * model root element is other than "Amalthea" e.g: hwModel or swModel)
- *
- * @author mez2rng
- *
- */
-public class RootElementConverter extends AbstractConverter {
-
- public RootElementConverter() {
- this.helper = HelperUtils_082_083.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- /*-
- * ==============
- *|| Input Model :||
- * ==============
- * <am:MappingModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:am="http://app4mc.eclipse.org/amalthea/0.7.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- * </am:MappingModel>
- *
- * ==============
- *|| Output Model :||
- * ==============
- *
- * <am:Amalthea xmlns:am="http://app4mc.eclipse.org/amalthea/0.7.2" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- * <mappingModel>
- *
- * </mappingModel>
- </am:Amalthea>
- */
-
-
- this.logger.info("Migration from 0.8.2 to 0.8.3: Executing \"Root Element Converter\" for model file : "
- + targetFile.getName());
-
- final Document document = fileName_documentsMap.get(targetFile);
-
- if (document == null) {
- return;
- }
- final Element rootElement = document.getRootElement();
-
- final String rootTagName = rootElement.getName();
-
- if (!rootTagName.equals("Amalthea")) {
-
- if (rootTagName.equals("SWModel") || rootTagName.equals("HWModel") || rootTagName.equals("OSModel")
- || rootTagName.equals("StimuliModel") || rootTagName.equals("ConstraintsModel")
- || rootTagName.equals("EventModel") || rootTagName.equals("PropertyConstraintsModel")
- || rootTagName.equals("MappingModel") || rootTagName.equals("ConfigModel")
- || rootTagName.equals("ComponentsModel") || rootTagName.equals("CommonElements")) {
-
- final Element newRootElement = new Element("Amalthea");
-
- this.helper.copyAllNameSpaces(rootElement, newRootElement);
-
- updateCurrentRootTagProps(rootElement);
-
- document.removeContent();
-
- newRootElement.addContent(rootElement);
-
- document.addContent(newRootElement);
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), document);
- }
-
- }
-
-
- }
-
- /**
- * This method is used to remove the default namespaces associated to the Root Element and also change the name of
- * it -> so that it can be added as a sub-tag inside "Amalthea root element"
- *
- * @param rootElement
- * Element This is the root element of the model file (where Amalthea is not root element)
- */
- private void updateCurrentRootTagProps(final Element rootElement) {
-
- this.helper.removeDefaultAttribs(rootElement);
-
- final String name = rootElement.getName();
-
- if (name.equals("SWModel")) {
- rootElement.setName("swModel");
- }
- else if (name.equals("HWModel")) {
- rootElement.setName("hwModel");
- }
- else if (name.equals("OSModel")) {
- rootElement.setName("osModel");
- }
- else if (name.equals("StimuliModel")) {
- rootElement.setName("stimuliModel");
- }
- else if (name.equals("ConstraintsModel")) {
- rootElement.setName("constraintsModel");
- }
- else if (name.equals("EventModel")) {
- rootElement.setName("eventModel");
- }
- else if (name.equals("PropertyConstraintsModel")) {
- rootElement.setName("propertyConstraintsModel");
- }
- else if (name.equals("MappingModel")) {
- rootElement.setName("mappingModel");
- }
- else if (name.equals("ConfigModel")) {
- rootElement.setName("configModel");
- }
- else if (name.equals("ComponentsModel")) {
- rootElement.setName("componentsModel");
- }
- else if (name.equals("CommonElements")) {
- rootElement.setName("commonElements");
- }
-
-
- }
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.083/src/org/eclipse/app4mc/amalthea/converters083/impl/StimuliConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.083/src/org/eclipse/app4mc/amalthea/converters083/impl/StimuliConverter.java
deleted file mode 100644
index f2b90c7..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.083/src/org/eclipse/app4mc/amalthea/converters083/impl/StimuliConverter.java
+++ /dev/null
@@ -1,810 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters083.impl;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.log4j.LogManager;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters083.utils.HelperUtils_082_083;
-import org.eclipse.app4mc.amalthea.converters083.utils.PeriodicStimulusCacheBuilder;
-import org.jdom2.Attribute;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-/**
- * This class is responsible for converting the Stimulus model elements from 0.8.2 to 0.8.3 version format of AMALTHEA model
- *
- * @author zmeer
- *
- */
-public class StimuliConverter extends AbstractConverter {
-
- private List<ICache> caches;
- private PeriodicStimulusCacheBuilder periodicStimulusCacheBuilder;
-
- public StimuliConverter() {
- this.helper = HelperUtils_082_083.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info("Migration from 0.8.2 to 0.8.3 : Executing Stimulus model converter for model file : "
- + targetFile.getName());
-
- this.caches = caches;
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
- }
-
- final Element rootElement = root.getRootElement();
-
- migrateVariableRateStimulus(rootElement);
-
- migrateSyntheticStimulus(rootElement);
-
- migrateSporadicStimulus(rootElement);
-
- migrateArrivalCurveStimulus(rootElement);
-
- migrateSingleStimulus(rootElement);
-
- migrateRemainingStimulusTypes(rootElement);
-
- migratePeriodicStimulus(rootElement);
-
- migrateStimulusReferences(rootElement);
-
- fileName_documentsMap.put(targetFile.getCanonicalFile(), root);
- }
-
-
-
-
- /**
- * This method is used to get the PeriodicStimulusCacheBuilder object
- *
- * @return PeriodicStimulusCacheBuilder
- */
- private PeriodicStimulusCacheBuilder getPeriodicStimulusCacheBuilder() {
-
- if (this.periodicStimulusCacheBuilder == null) {
- for (final ICache cache : this.caches) {
-
- if (cache instanceof PeriodicStimulusCacheBuilder) {
- this.periodicStimulusCacheBuilder = (PeriodicStimulusCacheBuilder) cache;
- return this.periodicStimulusCacheBuilder;
- }
- }
- }
-
- return this.periodicStimulusCacheBuilder;
- }
-
- private void migrateStimulusReferences(Element rootElement) {
-
- // updating the references
-
- final StringBuffer xpathBufferForReferences = new StringBuffer();
-
- xpathBufferForReferences.append("./swModel/isrs");
- xpathBufferForReferences.append("|");
- xpathBufferForReferences.append("./swModel/tasks");
- xpathBufferForReferences.append("|");
- xpathBufferForReferences.append("./eventModel/events");
-
- final List<Element> stimulusReferenceContainers = this.helper.getXpathResult(rootElement, xpathBufferForReferences.toString(),
- Element.class, this.helper.getGenericNS("xsi"),this.helper.getNS_083("am") );
-
- for (Element stimulusReferenceContainer : stimulusReferenceContainers) {
-
- migrate_references_PeriodicStimulus(stimulusReferenceContainer);
- migrate_references_SporadicStimulus(stimulusReferenceContainer);
- migrate_references_SyntheticStimulus(stimulusReferenceContainer);
- }
- }
-
- /**
- * This method is used to migrate the contents of PeriodicStimulus based on the changes introduced as per Bug 529831
- *
- *
- * @param rootElement
- * Amalthea root element
- */
- private void migratePeriodicStimulus(Element rootElement) {
-
-
- final StringBuffer xpathBufferForDefinition = new StringBuffer();
-
- xpathBufferForDefinition.append("./stimuliModel/stimuli[@xsi:type=\"am:PeriodicStimulus\"]");
-
-
- final List<Element> stimulusElements = this.helper.getXpathResult(rootElement, xpathBufferForDefinition.toString(),
- Element.class, this.helper.getGenericNS("xsi"),this.helper.getNS_083("am") );
-
- for (Element stimulusElement : stimulusElements) {
-
- Element clockElement = stimulusElement.getChild("clock");
-
- Attribute clockAttribute = stimulusElement.getAttribute("clock");
-
- if((clockElement==null) && (clockAttribute==null)) {
- //renaming stimulusDeviation to jitter
- Element stimulusDeviationElement = stimulusElement.getChild("stimulusDeviation");
- if(stimulusDeviationElement !=null) {
- stimulusDeviationElement.setName("jitter");
- }
-
- }else {
- //changing the type of PeriodicStimulus to VariableRateStimulus
-
- Attribute typeAttribute = stimulusElement.getAttribute("type", helper.getGenericNS("xsi"));
-
- typeAttribute.setValue("am:VariableRateStimulus");
-
- //renaming recurrence to step
- Element recurrenceElement = stimulusElement.getChild("recurrence");
-
- Element offsetElement = stimulusElement.getChild("offset");
-
- /* ================Scenario Eleemnt======================*/
- Element scenarioElement=new Element("scenario");
-
- if(recurrenceElement !=null) {
- recurrenceElement.detach();
- //Adding recurrance as a part of scenario
- scenarioElement.addContent(recurrenceElement);
- }
-
- if(clockElement!=null) {
- clockElement.detach();
- //Adding clock as a part of Clock
- scenarioElement.addContent(clockElement);
- }else if(clockAttribute!=null) {
- clockAttribute.detach();
- scenarioElement.setAttribute(clockAttribute);
- }
-
- //Adding Scenario as a part of stimulus element
- stimulusElement.addContent(scenarioElement);
-
- if(offsetElement !=null) {
-
- Element customPropertiesElement=new Element("customProperties");
-
- customPropertiesElement.setAttribute("key", "offset");
-
- offsetElement.detach();
-
- offsetElement.setName("value");
-
- offsetElement.setAttribute("type", "am:TimeObject", this.helper.getGenericNS("xsi"));
-
- customPropertiesElement.addContent(offsetElement);
-
- scenarioElement.addContent(customPropertiesElement);
-
- }
-
- /* ================Scenario Eleemnt======================*/
-
-
- stimulusElement.removeChild("offset");
-
- stimulusElement.removeChild("stimulusDeviation");
-
- }
-
-
-
- }
-
- }
-
- /**
- * This method is used to verify if a PeriodicStimulus type be changed to VariableRateStimulus (as it consists of Clock definition. Based on 0.8.3 -> such PeriodicStimulus elements type are changed)
- * @param elementName href (e.g: "amlt:/#Timer_10MS?type=PeriodicStimulus ")
- * @return boolean ("true" - if PeriodicStimulus is containing Clock reference, else "false")
- */
-
- private boolean canPeriodicStimulusTypeBeChangedForHref(String href) {
- /*
- * Example: <stimuli xsi:type="am:PeriodicStimulus" href="amlt:/#Timer_10MS?type=PeriodicStimulus"/>
- *
- * parameter : "href" -> contains amlt:/#Timer_10MS?type=PeriodicStimulus
- */
-
- int start = href.indexOf("#");
- int end = href.lastIndexOf("?");
-
- if((start !=-1) & (end !=-1)) {
-
- String elementName=href.substring(start+1, end);
-
-
- boolean result=isPeriodicStimulusPresentInCache(elementName);
-
- return result;
- }
- return false;
- }
-
- /**
- * This method is used to verify if a PeriodicStimulus is avaialble in Cache (Note: Storage in cache is done only if Clock is referred inside PeriodicStimulus element)
- * @param elementName String (e.g: "testStimulus")
- * @return boolean ("true" - if PeriodicStimulus is containing Clock reference, else "false")
- */
- private boolean isPeriodicStimulusPresentInCache(String elementName) {
- Map<File, Map<String, Object>> cacheMap = getPeriodicStimulusCacheBuilder().getCacheMap();
-
- if(cacheMap !=null) {
-
- Set<File> keySet = cacheMap.keySet();
-
- for (File file : keySet) {
-
- Map<String, Object> map = cacheMap.get(file);
-
- if(map!=null) {
- Object object = map.get(PeriodicStimulusCacheBuilder.cache_key);
-
- if(object !=null) {
- @SuppressWarnings("unchecked")
- final List<String> periodicStimulus_with_clock = (List<String>) object;
-
- if(periodicStimulus_with_clock.contains(elementName)) {
- return true;
- }
-
- }
-
- }
- }
- }
-
- return false;
- }
-
- /**
- * This method is used to check and update the reference of PeriodicStimulus.
- * Note:
- * 1. If PeriodicStimulus consists of clock, then type of it should be changed to VariableRateStimulus
- * 2. If PeriodicStimulus doesn't contain clock definition -> type should remain as PeriodicStimulus
- *
- * @param reference String (e.g: "ss1?type=SporadicStimulus")
- * @return String - Updated string with type info (only if PeriodicStimulus element consists of clock )
- */
- private String checkAndUpdatePeriodicStimulusReference(String reference) {
-
- /*
- * Example: <tasks name="t3" stimuli="ss1?type=SporadicStimulus" multipleTaskActivationLimit="0"/>
- *
- * parameter : "reference" -> contains ss1?type=SporadicStimulus
- */
-
- int index=reference.lastIndexOf("?");
-
- if(index !=-1) {
- String elementName=reference.substring(0, index);
-
- boolean result=isPeriodicStimulusPresentInCache(elementName);
-
- if(result) {
- elementName=reference.replace("?type=PeriodicStimulus", "?type=VariableRateStimulus");
-
- return elementName;
-
- }
- }
-
- return reference;
-
- }
-
- /**
- * This method is used to migrate the contents of CustomStimulus, InterProcessStimulus, EventStimulus based on the changes introduced as per Bug 529831
- *
- *
- * @param rootElement
- * Amalthea root element
- */
- private void migrateRemainingStimulusTypes(Element rootElement) {
-
-
- final StringBuffer xpathBufferForDefinition = new StringBuffer();
-
- xpathBufferForDefinition.append("./stimuliModel/stimuli[@xsi:type=\"am:CustomStimulus\" or @xsi:type=\"am:InterProcessStimulus\" or @xsi:type=\"am:EventStimulus\"]");
-
-
- final List<Element> stimulusElements = this.helper.getXpathResult(rootElement, xpathBufferForDefinition.toString(),
- Element.class, this.helper.getGenericNS("xsi"),this.helper.getNS_083("am") );
-
- for (Element stimulusElement : stimulusElements) {
-
-
- //removing stimulusDeviation
- stimulusElement.removeChild("stimulusDeviation");
-
-
- }
- }
-
-
- /**
- * This method is used to migrate the contents of SingleStimulus based on the changes introduced as per Bug 529831
- *
- *
- * @param rootElement
- * Amalthea root element
- */
- private void migrateSingleStimulus(Element rootElement) {
-
-
- // Step 1: changing the type from SyntheticStimulus to PeriodicSyntheticStimulus
- final StringBuffer xpathBufferForDefinition = new StringBuffer();
-
- xpathBufferForDefinition.append("./stimuliModel/stimuli[@xsi:type=\"am:SingleStimulus\"]");
-
-
- final List<Element> stimulusElements = this.helper.getXpathResult(rootElement, xpathBufferForDefinition.toString(),
- Element.class, this.helper.getGenericNS("xsi"),this.helper.getNS_083("am") );
-
- for (Element stimulusElement : stimulusElements) {
-
-
- //removing stimulusDeviation
- stimulusElement.removeChild("stimulusDeviation");
-
- //changing the activation tag name to occurrence
-
- Element activationElement = stimulusElement.getChild("activation");
-
- if(activationElement !=null) {
- activationElement.setName("occurrence");
- }
-
- }
- }
-
- /**
- * This method is used to migrate the contents of ArrivalCurveStimulus based on the changes introduced as per Bug 529831
- *
- *
- * @param rootElement
- * Amalthea root element
- */
- private void migrateArrivalCurveStimulus(Element rootElement) {
-
-
- final StringBuffer xpathBufferForDefinition = new StringBuffer();
-
- xpathBufferForDefinition.append("./stimuliModel/stimuli[@xsi:type=\"am:ArrivalCurveStimulus\"]");
-
-
- final List<Element> stimulusElements = this.helper.getXpathResult(rootElement, xpathBufferForDefinition.toString(),
- Element.class, this.helper.getGenericNS("xsi"),this.helper.getNS_083("am") );
-
- for (Element stimulusElement : stimulusElements) {
-
-
- //removing stimulusDeviation
- stimulusElement.removeChild("stimulusDeviation");
-
- //changing the attribute name from numberOfEvents to numberOfOccurences
-
- List<Element> entriesElements = stimulusElement.getChildren("entries");
-
- for (Element entriesElement : entriesElements) {
- Attribute attribute = entriesElement.getAttribute("numberOfEvents");
-
- if(attribute !=null) {
- attribute.setName("numberOfOccurrences");
- }
- }
-
- }
- }
-
-
- /**
- * This method is used to migrate the contents of SporadicStimulus based on the changes introduced as per Bug 529831
- *
- *
- * @param rootElement
- * Amalthea root element
- */
- private void migrateSporadicStimulus(Element rootElement) {
-
-
- // Step 1: changing the type from SporadicStimulus to RelativePeriodicStimulus
- final StringBuffer xpathBufferForDefinition = new StringBuffer();
-
- xpathBufferForDefinition.append("./stimuliModel/stimuli[@xsi:type=\"am:SporadicStimulus\"]");
-
-
- final List<Element> sporadicStimulusElements = this.helper.getXpathResult(rootElement, xpathBufferForDefinition.toString(),
- Element.class, this.helper.getGenericNS("xsi"),this.helper.getNS_083("am") );
-
- for (Element sporadicStimulusElement : sporadicStimulusElements) {
-
- Attribute typeAttribute = sporadicStimulusElement.getAttribute("type", helper.getGenericNS("xsi"));
-
- typeAttribute.setValue("am:RelativePeriodicStimulus");
-
- sporadicStimulusElement.removeAttribute("description");
-
- //changing of stimulusDeviation to nextOccurrence
- Element stimulusDeviationElement = sporadicStimulusElement.getChild("stimulusDeviation");
-
- if(stimulusDeviationElement !=null) {
- stimulusDeviationElement.setName("nextOccurrence");
- }
-
- }
-
-
-
- }
-
-
- /**
- * This method is used to migrate the contents of VariableRateStimulus based on the changes introduced as per Bug 529831
- *
- * @param rootElement
- * Amalthea root element
- */
- private void migrateVariableRateStimulus(Element rootElement) {
-
- final StringBuffer xpathBufferForDefinition = new StringBuffer();
-
- xpathBufferForDefinition.append("./stimuliModel/stimuli[@xsi:type=\"am:VariableRateStimulus\"]");
-
-
- final List<Element> stimulusElements = this.helper.getXpathResult(rootElement, xpathBufferForDefinition.toString(),
- Element.class, this.helper.getGenericNS("xsi"),this.helper.getNS_083("am") );
-
- for (Element stimulusElement : stimulusElements) {
- stimulusElement.removeChild("stimulusDeviation");
- }
-
- }
-
-
-
- /**
- * This method is used to migrate the contents of SyntheticStimulus based on the changes introduced as per Bug 529831
- *
- *
- * @param rootElement
- * Amalthea root element
- */
- private void migrateSyntheticStimulus(Element rootElement) {
-
-
- // Step 1: changing the type from SyntheticStimulus to PeriodicSyntheticStimulus
- final StringBuffer xpathBufferForDefinition = new StringBuffer();
-
- xpathBufferForDefinition.append("./stimuliModel/stimuli[@xsi:type=\"am:SyntheticStimulus\"]");
-
-
- final List<Element> syntheticStimulusElements = this.helper.getXpathResult(rootElement, xpathBufferForDefinition.toString(),
- Element.class, this.helper.getGenericNS("xsi"),this.helper.getNS_083("am") );
-
- for (Element syntheticStimulusElement : syntheticStimulusElements) {
-
- Attribute typeAttribute = syntheticStimulusElement.getAttribute("type", helper.getGenericNS("xsi"));
-
- typeAttribute.setValue("am:PeriodicSyntheticStimulus");
-
- //deletion of stimulusDeviation
- syntheticStimulusElement.removeChild("stimulusDeviation");
-
- Element periodElement = syntheticStimulusElement.getChild("period");
-
- if(periodElement!=null) {
- periodElement.setName("recurrence");
- }
- Element triggerTimesElement = syntheticStimulusElement.getChild("triggerTimes");
-
- if(triggerTimesElement!=null) {
-
- final List<Element> timeStampsElements = this.helper.getXpathResult(triggerTimesElement, ".//timestamps",
- Element.class, this.helper.getGenericNS("xsi"),this.helper.getNS_083("am") );
-
- for (Element timeStampsElement : timeStampsElements) {
- timeStampsElement.setName("occurrenceTimes");
- timeStampsElement.detach();
- syntheticStimulusElement.addContent(timeStampsElement);
- }
-
- //removing element triggerTimesElement
- syntheticStimulusElement.removeContent(triggerTimesElement);
- }
-
-
- }
-
- }
-
-
-
- /**
- * This method is used to migrate the references of SporadicStimulus elements
- * @param stimulusReferenceContainer (e.g: tasks, isrs, events)
- */
- private void migrate_references_SporadicStimulus(Element stimulusReferenceContainer) {
- String containerTagName = stimulusReferenceContainer.getName();
- if(containerTagName.equals("isrs")||containerTagName.equals("tasks")) {
-
- List<Element> stimuliElements = stimulusReferenceContainer.getChildren("stimuli");
- Attribute stimuliAttribute = stimulusReferenceContainer.getAttribute("stimuli");
-
- for (Element stimuliElement : stimuliElements) {
-
- if(stimuliElement!=null) {
-
- Attribute typeAttribute = stimuliElement.getAttribute("type", helper.getGenericNS("xsi"));
-
- if(typeAttribute !=null) {
- if(typeAttribute.getValue().equals("am:SporadicStimulus")) {
- typeAttribute.setValue("am:RelativePeriodicStimulus");
- }
- }
-
- Attribute hrefAttribute = stimuliElement.getAttribute("href");
- if(hrefAttribute!=null) {
- String value = hrefAttribute.getValue();
- value=value.replace("?type=SporadicStimulus", "?type=RelativePeriodicStimulus");
- hrefAttribute.setValue(value);
- }
- }
- }
-
- if(stimuliAttribute !=null) {
- String value = stimuliAttribute.getValue();
- value=value.replaceAll("\\?type\\=SporadicStimulus", "?type=RelativePeriodicStimulus");
- stimuliAttribute.setValue(value);
- }
-
-
-
- }else if(containerTagName.equals("events")) {
- //case of events
-
- Element stimuliElement = stimulusReferenceContainer.getChild("entity");
-
- Attribute stimuliAttribute = stimulusReferenceContainer.getAttribute("entity");
-
- if(stimuliElement!=null) {
-
- Attribute typeAttribute = stimuliElement.getAttribute("type", helper.getGenericNS("xsi"));
-
- if(typeAttribute !=null) {
- if(typeAttribute.getValue().equals("am:SporadicStimulus")) {
- typeAttribute.setValue("am:RelativePeriodicStimulus");
- }
- }
-
- Attribute hrefAttribute = stimuliElement.getAttribute("href");
- if(hrefAttribute !=null) {
- String value = hrefAttribute.getValue();
- value=value.replace("?type=SporadicStimulus", "?type=RelativePeriodicStimulus");
- hrefAttribute.setValue(value);
-
- }
- }else if(stimuliAttribute !=null) {
- String value = stimuliAttribute.getValue();
- value=value.replace("?type=SporadicStimulus", "?type=RelativePeriodicStimulus");
- stimuliAttribute.setValue(value);
- }
- }
- }
-
- /**
- * This method is used to migrate the references of Synthetic Stimulus references
- * @param syntheticStimulusReferenceContainer (e.g: tasks, isrs, events)
- */
- private void migrate_references_SyntheticStimulus(Element syntheticStimulusReferenceContainer) {
- String containerTagName = syntheticStimulusReferenceContainer.getName();
- if(containerTagName.equals("isrs")||containerTagName.equals("tasks")) {
-
- List<Element> stimuliElements = syntheticStimulusReferenceContainer.getChildren("stimuli");
- Attribute stimuliAttribute = syntheticStimulusReferenceContainer.getAttribute("stimuli");
-
- for (Element stimuliElement : stimuliElements) {
-
- if(stimuliElement!=null) {
-
- Attribute typeAttribute = stimuliElement.getAttribute("type", helper.getGenericNS("xsi"));
-
- if(typeAttribute !=null) {
- if(typeAttribute.getValue().equals("am:SyntheticStimulus")) {
- typeAttribute.setValue("am:PeriodicSyntheticStimulus");
- }
- }
-
- Attribute hrefAttribute = stimuliElement.getAttribute("href");
- if(hrefAttribute!=null) {
- String value = hrefAttribute.getValue();
- value=value.replace("?type=SyntheticStimulus", "?type=PeriodicSyntheticStimulus");
- hrefAttribute.setValue(value);
- }
- }
- }
-
- if(stimuliAttribute !=null) {
- String value = stimuliAttribute.getValue();
- value=value.replaceAll("\\?type\\=SyntheticStimulus", "?type=PeriodicSyntheticStimulus");
- stimuliAttribute.setValue(value);
- }
-
-
-
- }else if(containerTagName.equals("events")) {
- //case of events
-
- Element stimuliElement = syntheticStimulusReferenceContainer.getChild("entity");
-
- Attribute stimuliAttribute = syntheticStimulusReferenceContainer.getAttribute("entity");
-
- if(stimuliElement!=null) {
-
- Attribute typeAttribute = stimuliElement.getAttribute("type", helper.getGenericNS("xsi"));
-
- if(typeAttribute !=null) {
- if(typeAttribute.getValue().equals("am:SyntheticStimulus")) {
- typeAttribute.setValue("am:PeriodicSyntheticStimulus");
- }
- }
-
- Attribute hrefAttribute = stimuliElement.getAttribute("href");
- if(hrefAttribute !=null) {
- String value = hrefAttribute.getValue();
- value=value.replace("?type=SyntheticStimulus", "?type=PeriodicSyntheticStimulus");
- hrefAttribute.setValue(value);
-
- }
- }else if(stimuliAttribute !=null) {
- String value = stimuliAttribute.getValue();
- value=value.replace("?type=SyntheticStimulus", "?type=PeriodicSyntheticStimulus");
- stimuliAttribute.setValue(value);
- }
- }
- }
-
-
- /**
- * This method is used to migrate the references of PeriodicStimulus elements
- * @param stimulusReferenceContainer (e.g: tasks, isrs, events)
- */
- private void migrate_references_PeriodicStimulus(Element stimulusReferenceContainer) {
- String containerTagName = stimulusReferenceContainer.getName();
- if(containerTagName.equals("isrs")||containerTagName.equals("tasks")) {
-
- List<Element> stimuliElements = stimulusReferenceContainer.getChildren("stimuli");
-
- Attribute stimuliAttribute = stimulusReferenceContainer.getAttribute("stimuli");
-
- for (Element stimuliElement : stimuliElements) {
-
- if(stimuliElement!=null) {
-
-
- Attribute typeAttribute = stimuliElement.getAttribute("type", helper.getGenericNS("xsi"));
-
- if(typeAttribute !=null) {
- if(typeAttribute.getValue().equals("am:PeriodicStimulus")) {
-
- Attribute hrefAttribute = stimuliElement.getAttribute("href");
- if(hrefAttribute!=null) {
- String hrefValue = hrefAttribute.getValue();
- //<stimuli xsi:type="am:PeriodicStimulus" href="amlt:/#Timer_10MS?type=PeriodicStimulus"/>
- if(canPeriodicStimulusTypeBeChangedForHref(hrefValue)) {
- //setting type
- typeAttribute.setValue("am:VariableRateStimulus");
-
- hrefValue=hrefValue.replace("?type=PeriodicStimulus", "?type=VariableRateStimulus");
-
- hrefAttribute.setValue(hrefValue);
- }
- }
-
- }
- }
-
- }
- }
-
- if(stimuliAttribute !=null) {
- String value = stimuliAttribute.getValue();
-
- String[] split = value.split("\\s+");
-
- StringBuffer updatedRefsBuffer=new StringBuffer();
-
- for (String reference : split) {
-
- if(reference.contains("?type=PeriodicStimulus")) {
-
- updatedRefsBuffer.append(checkAndUpdatePeriodicStimulusReference(reference)+" ");
- }else {
- updatedRefsBuffer.append(reference+" ");
- }
- }
- value=updatedRefsBuffer.toString().trim();
-
- stimuliAttribute.setValue(value);
- }
-
-
-
- }else if(containerTagName.equals("events")) {
- //case of events
-
- Element stimuliElement = stimulusReferenceContainer.getChild("entity");
-
- Attribute stimuliAttribute = stimulusReferenceContainer.getAttribute("entity");
-
- if(stimuliElement!=null) {
-
- Attribute typeAttribute = stimuliElement.getAttribute("type", helper.getGenericNS("xsi"));
-
- if(typeAttribute !=null) {
- if(typeAttribute.getValue().equals("am:PeriodicStimulus")) {
-
-
- Attribute hrefAttribute = stimuliElement.getAttribute("href");
- if(hrefAttribute !=null) {
- String hrefValue = hrefAttribute.getValue();
-
- //<stimuli xsi:type="am:PeriodicStimulus" href="amlt:/#Timer_10MS?type=PeriodicStimulus"/>
- if(canPeriodicStimulusTypeBeChangedForHref(hrefValue)) {
- //setting type
-
- typeAttribute.setValue("am:VariableRateStimulus");
-
- hrefValue=hrefValue.replace("?type=PeriodicStimulus", "?type=VariableRateStimulus");
-
- hrefAttribute.setValue(hrefValue);
- }
- }
-
- }
- }
-
-
- }else if(stimuliAttribute !=null) {
- String reference = stimuliAttribute.getValue();
-
- if(reference.contains("?type=PeriodicStimulus")) {
-
- reference= (checkAndUpdatePeriodicStimulusReference(reference));
- }
- stimuliAttribute.setValue(reference);
- }
- }
- }
-
-}
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.083/src/org/eclipse/app4mc/amalthea/converters083/impl/SwConverter.java b/plugins/org.eclipse.app4mc.amalthea.converters.083/src/org/eclipse/app4mc/amalthea/converters083/impl/SwConverter.java
deleted file mode 100644
index 6e8b01d..0000000
--- a/plugins/org.eclipse.app4mc.amalthea.converters.083/src/org/eclipse/app4mc/amalthea/converters083/impl/SwConverter.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/**
- ********************************************************************************
- * Copyright (c) 2018 Robert Bosch GmbH and others.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Robert Bosch GmbH - initial API and implementation
- ********************************************************************************
- */
-
-package org.eclipse.app4mc.amalthea.converters083.impl;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.LogManager;
-import org.eclipse.app4mc.amalthea.converters.common.base.ICache;
-import org.eclipse.app4mc.amalthea.converters083.utils.HelperUtils_082_083;
-import org.jdom2.Attribute;
-import org.jdom2.Document;
-import org.jdom2.Element;
-
-/**
- * This class is responsible for converting the HW Model elements from 0.8.2 to 0.8.3 version format of AMALTHEA model
- *
- * @author zmeer
- *
- */
-public class SwConverter extends AbstractConverter {
-
- public SwConverter() {
- this.helper = HelperUtils_082_083.getInstance();
- this.logger = LogManager.getLogger("org.eclipse.app4mc.amalthea.modelmigration");
- }
-
- @Override
- public void convert(final File targetFile, final Map<File, Document> fileName_documentsMap,
- final List<ICache> caches) throws Exception {
-
- this.logger.info("Migration from 0.8.2 to 0.8.3 : Executing Component model converter for model file : "
- + targetFile.getName());
-
-
- final Document root = fileName_documentsMap.get(targetFile);
-
- if (root == null) {
- return;
-