parallel ip - initial checkin Signed-off-by: Ralf Mollik <ramollik@compex-commerce.com>
diff --git a/.project b/.project new file mode 100644 index 0000000..ea8c43b --- /dev/null +++ b/.project
@@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.osbp.utils.functionnormalizer.aggregator</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.m2e.core.maven2Builder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.m2e.core.maven2Nature</nature> + </natures> +</projectDescription>
diff --git a/about.html b/about.html new file mode 100644 index 0000000..64c0598 --- /dev/null +++ b/about.html
@@ -0,0 +1,28 @@ +<!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>June 1, 2016</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 1.0 ("EPL"). A copy of the EPL is available +at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. +For purposes of the EPL, "Program" will mean the Content.</p> + +<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/jenkins.build.config.xml b/jenkins.build.config.xml new file mode 100644 index 0000000..1ca796e --- /dev/null +++ b/jenkins.build.config.xml
@@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--#======================================================================= --> +<!--# Copyright (c) 2016 - Loetz GmbH&Co.KG --> +<!--# All rights reserved. This program and the accompanying materials --> +<!--# are made available under the terms of the Eclipse Public License v1.0 --> +<!--# which accompanies this distribution, and is available at --> +<!--# http://www.eclipse.org/legal/epl-v10.html --> +<!--# --> +<!--# Contributors: --> +<!--# Christophe Loetz (Loetz GmbH&Co.KG) - initial API and implementation --> +<!--#======================================================================= --> +<!--# Module specific parameters for the Jenkins Job --> +<!--#======================================================================= --> + +<jenkins> + <!-- DO NOT EDIT BELOW THIS LINE --> + <jenkins.build.dependencies> + <jenkins.build.dependency>org.eclipse.osbp.dsl</jenkins.build.dependency> + <jenkins.build.dependency>org.eclipse.osbp.runtime</jenkins.build.dependency> + <jenkins.build.dependency>org.eclipse.osbp.xtext.i18n</jenkins.build.dependency> + </jenkins.build.dependencies> +</jenkins>
diff --git a/notice.html b/notice.html new file mode 100644 index 0000000..c3d34c3 --- /dev/null +++ b/notice.html
@@ -0,0 +1,107 @@ +<?xml version="1.0" encoding="ISO-8859-1" ?> +<!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>Eclipse Foundation Software User Agreement</title> +</head> + +<body lang="EN-US"> +<h2>Eclipse Foundation Software User Agreement</h2> +<p>April 9, 2014</p> + +<h3>Usage Of Content</h3> + +<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS + (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND + CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE + OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR + NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND + CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p> + +<h3>Applicable Licenses</h3> + +<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 + ("EPL"). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. + For purposes of the EPL, "Program" will mean the Content.</p> + +<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code + repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p> + +<ul> + <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li> + <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li> + <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins + and/or Fragments associated with that Feature.</li> + <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li> +</ul> + +<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and +Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module +including, but not limited to the following locations:</p> + +<ul> + <li>The top-level (root) directory</li> + <li>Plug-in and Fragment directories</li> + <li>Inside Plug-ins and Fragments packaged as JARs</li> + <li>Sub-directories of the directory named "src" of certain Plug-ins</li> + <li>Feature directories</li> +</ul> + +<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the +installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or +inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature. +Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in +that directory.</p> + +<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE +OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p> + +<ul> + <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li> + <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li> + <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li> + <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li> + <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li> +</ul> + +<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please +contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p> + + +<h3>Use of Provisioning Technology</h3> + +<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse + Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or + other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to + install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a + href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a> + ("Specification").</p> + +<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the + applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology + in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the + Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p> + +<ol> + <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology + on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based + product.</li> + <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be + accessed and copied to the Target Machine.</li> + <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable + Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target + Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern + the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such + indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li> +</ol> + +<h3>Cryptography</h3> + +<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to + another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import, + possession, or use, and re-export of encryption software, to see if this is permitted.</p> + +<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p> +</body> +</html>
diff --git a/org.eclipse.osbp.utils.functionnormalizer.feature/.project b/org.eclipse.osbp.utils.functionnormalizer.feature/.project new file mode 100644 index 0000000..cdcf4f1 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer.feature/.project
@@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.osbp.utils.functionnormalizer.feature</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.FeatureBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.m2e.core.maven2Builder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.babel.editor.rbeBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.m2e.core.maven2Nature</nature> + <nature>org.eclipse.pde.FeatureNature</nature> + <nature>org.eclipse.babel.editor.rbeNature</nature> + </natures> +</projectDescription>
diff --git a/org.eclipse.osbp.utils.functionnormalizer.feature/LICENSE.txt b/org.eclipse.osbp.utils.functionnormalizer.feature/LICENSE.txt new file mode 100644 index 0000000..ff42ad4 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer.feature/LICENSE.txt
@@ -0,0 +1,161 @@ +Eclipse Public License -v 1.0 + +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. + +1. DEFINITIONS + +"Contribution" means: + +a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and + +b) in the case of each subsequent Contributor: + +i) changes to the Program, and + +ii) additions to the Program; + +where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. +A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone +acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate +modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not +derivative works of the Program. + +"Contributor" means any person or entity that distributes the Program. + +"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. + +"Program" means the Contributions distributed in accordance with this Agreement. + +"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. + +2. GRANT OF RIGHTS + +a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, +royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute +and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code +form. + +b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, +royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the +Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the +combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such +addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not +apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. + +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. + +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. + +3. REQUIREMENTS + +A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: + +a) it complies with the terms and conditions of this Agreement; and + +b) its license agreement: + +i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including +warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and +fitness for a particular purpose; + +ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, +incidental and consequential damages, such as lost profits; + +iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any +other party; and + +iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it +in a reasonable manner on or through a medium customarily used for software exchange. + +When the Program is made available in source code form: + +a) it must be made available under this Agreement; and + +b) a copy of this Agreement must be included with each copy of the Program. + +Contributors may not remove or alter any copyright notices contained within the Program. + +Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows +subsequent Recipients to identify the originator of the Contribution. + +4. COMMERCIAL DISTRIBUTION + +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. + +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. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, +NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for +determining the appropriateness of using and distributing the Program and assumes all risks associated with its +exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance +with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED +HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. GENERAL + +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. + +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. + +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. + +Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement +is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish +new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the +right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may +assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the +Agreement will be given a distinguishing version number. The Program (including Contributions) may always be +distributed subject to the version of the Agreement under which it was received. In addition, after a new version of +the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the +new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to +the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or +otherwise. All rights in the Program not expressly granted under this Agreement are reserved. + +This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States +of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause +of action arose. Each party waives its rights to a jury trial in any resulting litigation. \ No newline at end of file
diff --git a/org.eclipse.osbp.utils.functionnormalizer.feature/build.properties b/org.eclipse.osbp.utils.functionnormalizer.feature/build.properties new file mode 100644 index 0000000..b8920ff --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer.feature/build.properties
@@ -0,0 +1,2 @@ +bin.includes = license.html, epl-v10.html, feature.xml,\ + feature.properties
diff --git a/org.eclipse.osbp.utils.functionnormalizer.feature/epl-v10.html b/org.eclipse.osbp.utils.functionnormalizer.feature/epl-v10.html new file mode 100644 index 0000000..b398acc --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer.feature/epl-v10.html
@@ -0,0 +1,259 @@ +<!--?xml version="1.0" encoding="ISO-8859-1" ?--> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"><head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Eclipse Public License - Version 1.0</title> +<style type="text/css"> + body { + size: 8.5in 11.0in; + margin: 0.25in 0.5in 0.25in 0.5in; + tab-interval: 0.5in; + } + p { + margin-left: auto; + margin-top: 0.5em; + margin-bottom: 0.5em; + } + p.list { + margin-left: 0.5in; + margin-top: 0.05em; + margin-bottom: 0.05em; + } + </style> + +</head> + +<body lang="EN-US"> + +<h2>Eclipse Public License - v 1.0</h2> + +<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE +PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR +DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS +AGREEMENT.</p> + +<p><b>1. DEFINITIONS</b></p> + +<p>"Contribution" means:</p> + +<p class="list">a) in the case of the initial Contributor, the initial +code and documentation distributed under this Agreement, and</p> +<p class="list">b) in the case of each subsequent Contributor:</p> +<p class="list">i) changes to the Program, and</p> +<p class="list">ii) additions to the Program;</p> +<p class="list">where such changes and/or additions to the Program +originate from and are distributed by that particular Contributor. A +Contribution 'originates' from a Contributor if it was added to the +Program by such Contributor itself or anyone acting on such +Contributor's behalf. Contributions do not include additions to the +Program which: (i) are separate modules of software distributed in +conjunction with the Program under their own license agreement, and (ii) +are not derivative works of the Program.</p> + +<p>"Contributor" means any person or entity that distributes +the Program.</p> + +<p>"Licensed Patents" mean patent claims licensable by a +Contributor which are necessarily infringed by the use or sale of its +Contribution alone or when combined with the Program.</p> + +<p>"Program" means the Contributions distributed in accordance +with this Agreement.</p> + +<p>"Recipient" means anyone who receives the Program under +this Agreement, including all Contributors.</p> + +<p><b>2. GRANT OF RIGHTS</b></p> + +<p class="list">a) Subject to the terms of this Agreement, each +Contributor hereby grants Recipient a non-exclusive, worldwide, +royalty-free copyright license to reproduce, prepare derivative works +of, publicly display, publicly perform, distribute and sublicense the +Contribution of such Contributor, if any, and such derivative works, in +source code and object code form.</p> + +<p class="list">b) Subject to the terms of this Agreement, each +Contributor hereby grants Recipient a non-exclusive, worldwide, +royalty-free patent license under Licensed Patents to make, use, sell, +offer to sell, import and otherwise transfer the Contribution of such +Contributor, if any, in source code and object code form. This patent +license shall apply to the combination of the Contribution and the +Program if, at the time the Contribution is added by the Contributor, +such addition of the Contribution causes such combination to be covered +by the Licensed Patents. The patent license shall not apply to any other +combinations which include the Contribution. No hardware per se is +licensed hereunder.</p> + +<p class="list">c) Recipient understands that although each Contributor +grants the licenses to its Contributions set forth herein, no assurances +are provided by any Contributor that the Program does not infringe the +patent or other intellectual property rights of any other entity. Each +Contributor disclaims any liability to Recipient for claims brought by +any other entity based on infringement of intellectual property rights +or otherwise. As a condition to exercising the rights and licenses +granted hereunder, each Recipient hereby assumes sole responsibility to +secure any other intellectual property rights needed, if any. For +example, if a third party patent license is required to allow Recipient +to distribute the Program, it is Recipient's responsibility to acquire +that license before distributing the Program.</p> + +<p class="list">d) Each Contributor represents that to its knowledge it +has sufficient copyright rights in its Contribution, if any, to grant +the copyright license set forth in this Agreement.</p> + +<p><b>3. REQUIREMENTS</b></p> + +<p>A Contributor may choose to distribute the Program in object code +form under its own license agreement, provided that:</p> + +<p class="list">a) it complies with the terms and conditions of this +Agreement; and</p> + +<p class="list">b) its license agreement:</p> + +<p class="list">i) effectively disclaims on behalf of all Contributors +all warranties and conditions, express and implied, including warranties +or conditions of title and non-infringement, and implied warranties or +conditions of merchantability and fitness for a particular purpose;</p> + +<p class="list">ii) effectively excludes on behalf of all Contributors +all liability for damages, including direct, indirect, special, +incidental and consequential damages, such as lost profits;</p> + +<p class="list">iii) states that any provisions which differ from this +Agreement are offered by that Contributor alone and not by any other +party; and</p> + +<p class="list">iv) states that source code for the Program is available +from such Contributor, and informs licensees how to obtain it in a +reasonable manner on or through a medium customarily used for software +exchange.</p> + +<p>When the Program is made available in source code form:</p> + +<p class="list">a) it must be made available under this Agreement; and</p> + +<p class="list">b) a copy of this Agreement must be included with each +copy of the Program.</p> + +<p>Contributors may not remove or alter any copyright notices contained +within the Program.</p> + +<p>Each Contributor must identify itself as the originator of its +Contribution, if any, in a manner that reasonably allows subsequent +Recipients to identify the originator of the Contribution.</p> + +<p><b>4. COMMERCIAL DISTRIBUTION</b></p> + +<p>Commercial distributors of software may accept certain +responsibilities with respect to end users, business partners and the +like. While this license is intended to facilitate the commercial use of +the Program, the Contributor who includes the Program in a commercial +product offering should do so in a manner which does not create +potential liability for other Contributors. Therefore, if a Contributor +includes the Program in a commercial product offering, such Contributor +("Commercial Contributor") hereby agrees to defend and +indemnify every other Contributor ("Indemnified Contributor") +against any losses, damages and costs (collectively "Losses") +arising from claims, lawsuits and other legal actions brought by a third +party against the Indemnified Contributor to the extent caused by the +acts or omissions of such Commercial Contributor in connection with its +distribution of the Program in a commercial product offering. The +obligations in this section do not apply to any claims or Losses +relating to any actual or alleged intellectual property infringement. In +order to qualify, an Indemnified Contributor must: a) promptly notify +the Commercial Contributor in writing of such claim, and b) allow the +Commercial Contributor to control, and cooperate with the Commercial +Contributor in, the defense and any related settlement negotiations. The +Indemnified Contributor may participate in any such claim at its own +expense.</p> + +<p>For example, a Contributor might include the Program in a commercial +product offering, Product X. That Contributor is then a Commercial +Contributor. If that Commercial Contributor then makes performance +claims, or offers warranties related to Product X, those performance +claims and warranties are such Commercial Contributor's responsibility +alone. Under this section, the Commercial Contributor would have to +defend claims against the other Contributors related to those +performance claims and warranties, and if a court requires any other +Contributor to pay any damages as a result, the Commercial Contributor +must pay those damages.</p> + +<p><b>5. NO WARRANTY</b></p> + +<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS +PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS +OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, +ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY +OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely +responsible for determining the appropriateness of using and +distributing the Program and assumes all risks associated with its +exercise of rights under this Agreement , including but not limited to +the risks and costs of program errors, compliance with applicable laws, +damage to or loss of data, programs or equipment, and unavailability or +interruption of operations.</p> + +<p><b>6. DISCLAIMER OF LIABILITY</b></p> + +<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT +NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING +WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR +DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED +HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p> + +<p><b>7. GENERAL</b></p> + +<p>If any provision of this Agreement is invalid or unenforceable under +applicable law, it shall not affect the validity or enforceability of +the remainder of the terms of this Agreement, and without further action +by the parties hereto, such provision shall be reformed to the minimum +extent necessary to make such provision valid and enforceable.</p> + +<p>If Recipient institutes patent litigation against any entity +(including a cross-claim or counterclaim in a lawsuit) alleging that the +Program itself (excluding combinations of the Program with other +software or hardware) infringes such Recipient's patent(s), then such +Recipient's rights granted under Section 2(b) shall terminate as of the +date such litigation is filed.</p> + +<p>All Recipient's rights under this Agreement shall terminate if it +fails to comply with any of the material terms or conditions of this +Agreement and does not cure such failure in a reasonable period of time +after becoming aware of such noncompliance. If all Recipient's rights +under this Agreement terminate, Recipient agrees to cease use and +distribution of the Program as soon as reasonably practicable. However, +Recipient's obligations under this Agreement and any licenses granted by +Recipient relating to the Program shall continue and survive.</p> + +<p>Everyone is permitted to copy and distribute copies of this +Agreement, but in order to avoid inconsistency the Agreement is +copyrighted and may only be modified in the following manner. The +Agreement Steward reserves the right to publish new versions (including +revisions) of this Agreement from time to time. No one other than the +Agreement Steward has the right to modify this Agreement. The Eclipse +Foundation is the initial Agreement Steward. The Eclipse Foundation may +assign the responsibility to serve as the Agreement Steward to a +suitable separate entity. Each new version of the Agreement will be +given a distinguishing version number. The Program (including +Contributions) may always be distributed subject to the version of the +Agreement under which it was received. In addition, after a new version +of the Agreement is published, Contributor may elect to distribute the +Program (including its Contributions) under the new version. Except as +expressly stated in Sections 2(a) and 2(b) above, Recipient receives no +rights or licenses to the intellectual property of any Contributor under +this Agreement, whether expressly, by implication, estoppel or +otherwise. All rights in the Program not expressly granted under this +Agreement are reserved.</p> + +<p>This Agreement is governed by the laws of the State of New York and +the intellectual property laws of the United States of America. No party +to this Agreement will bring a legal action under this Agreement more +than one year after the cause of action arose. Each party waives its +rights to a jury trial in any resulting litigation.</p> + + + +</body></html> \ No newline at end of file
diff --git a/org.eclipse.osbp.utils.functionnormalizer.feature/feature.properties b/org.eclipse.osbp.utils.functionnormalizer.feature/feature.properties new file mode 100644 index 0000000..1cdffa7 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer.feature/feature.properties Binary files differ
diff --git a/org.eclipse.osbp.utils.functionnormalizer.feature/feature.xml b/org.eclipse.osbp.utils.functionnormalizer.feature/feature.xml new file mode 100644 index 0000000..6063ffc --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer.feature/feature.xml
@@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--#======================================================================= --> +<!--# Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) --> +<!--# All rights reserved. This program and the accompanying materials --> +<!--# are made available under the terms of the Eclipse Public License v1.0 --> +<!--# which accompanies this distribution, and is available at --> +<!--# http://www.eclipse.org/legal/epl-v10.html --> +<!--# --> +<!--# Contributors: --> +<!--# Christophe Loetz (Loetz GmbH&Co.KG) - initial API and implementation --> +<!--#======================================================================= --> + +<feature + id="org.eclipse.osbp.utils.functionnormalizer.feature" + label="%featureName" + version="0.9.0.qualifier" + provider-name="%providerName"> + + <description> + %description + </description> + + <copyright> + %copyright + </copyright> + + <license url="%licenseURL"> + %license + </license> + + <plugin + id="org.eclipse.osbp.utils.functionnormalizer" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + + <plugin + id="org.eclipse.osbp.utils.functionnormalizer.tests" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + + +</feature>
diff --git a/org.eclipse.osbp.utils.functionnormalizer.feature/license.html b/org.eclipse.osbp.utils.functionnormalizer.feature/license.html new file mode 100644 index 0000000..6e579a5 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer.feature/license.html
@@ -0,0 +1,164 @@ +<!--?xml version="1.0" encoding="ISO-8859-1" ?--> +<!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>Eclipse Foundation Software User Agreement</title> +</head> + +<body lang="EN-US"> +<h2>Eclipse Foundation Software User Agreement</h2> +<p>February 1, 2011</p> + +<h3>Usage Of Content</h3> + +<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS + (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND + CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE + OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR + NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND + CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p> + +<h3>Applicable Licenses</h3> + +<p>Unless otherwise indicated, all Content made available by the Eclipse + Foundation is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 + ("EPL"). A copy of the EPL is provided with this Content and is also + available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. + For purposes of the EPL, "Program" will mean the Content.</p> + +<p>Content includes, but is not limited to, source code, object code, +documentation and other files maintained in the Eclipse Foundation +source code + repository ("Repository") in software modules ("Modules") and made +available as downloadable archives ("Downloads").</p> + +<ul> + <li>Content may be structured and packaged into modules to +facilitate delivering, extending, and upgrading the Content. Typical +modules may include plug-ins ("Plug-ins"), plug-in fragments +("Fragments"), and features ("Features").</li> + <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li> + <li>A Feature is a bundle of one or more Plug-ins and/or +Fragments and associated material. Each Feature may be packaged as a +sub-directory in a directory named "features". Within a Feature, files +named "feature.xml" may contain a list of the names and version numbers +of the Plug-ins + and/or Fragments associated with that Feature.</li> + <li>Features may also include other Features ("Included +Features"). Within a Feature, files named "feature.xml" may contain a +list of the names and version numbers of Included Features.</li> +</ul> + +<p>The terms and conditions governing Plug-ins and Fragments should be +contained in files named "about.html" ("Abouts"). The terms and +conditions governing Features and +Included Features should be contained in files named "license.html" +("Feature Licenses"). Abouts and Feature Licenses may be located in any + directory of a Download or Module +including, but not limited to the following locations:</p> + +<ul> + <li>The top-level (root) directory</li> + <li>Plug-in and Fragment directories</li> + <li>Inside Plug-ins and Fragments packaged as JARs</li> + <li>Sub-directories of the directory named "src" of certain Plug-ins</li> + <li>Feature directories</li> +</ul> + +<p>Note: if a Feature made available by the Eclipse Foundation is +installed using the Provisioning Technology (as defined below), you must + agree to a license ("Feature Update License") during the +installation process. If the Feature contains Included Features, the +Feature Update License should either provide you with the terms and +conditions governing the Included Features or +inform you where you can locate them. Feature Update Licenses may be +found in the "license" property of files named "feature.properties" +found within a Feature. +Such Abouts, Feature Licenses, and Feature Update Licenses contain the +terms and conditions (or references to such terms and conditions) that +govern your use of the associated Content in +that directory.</p> + +<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER +TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. + SOME OF THESE +OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p> + +<ul> + <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li> + <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li> + <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li> + <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li> + <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li> + <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li> +</ul> + +<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND +CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, +or Feature Update License is provided, please +contact the Eclipse Foundation to determine what terms and conditions +govern that particular Content.</p> + + +<h3>Use of Provisioning Technology</h3> + +<p>The Eclipse Foundation makes available provisioning software, +examples of which include, but are not limited to, p2 and the Eclipse + Update Manager ("Provisioning Technology") for the purpose of +allowing users to install software, documentation, information and/or + other materials (collectively "Installable Software"). This +capability is provided with the intent of allowing such users to + install, extend and update Eclipse-based products. Information about +packaging Installable Software is available at <a href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a> + ("Specification").</p> + +<p>You may use Provisioning Technology to allow other parties to install + Installable Software. You shall be responsible for enabling the + applicable license agreements relating to the Installable Software to + be presented to, and accepted by, the users of the Provisioning +Technology + in accordance with the Specification. By using Provisioning +Technology in such a manner and making it available in accordance with +the + Specification, you further acknowledge your agreement to, and the +acquisition of all necessary rights to permit the following:</p> + +<ol> + <li>A series of actions may occur ("Provisioning Process") in +which a user may execute the Provisioning Technology + on a machine ("Target Machine") with the intent of installing, +extending or updating the functionality of an Eclipse-based + product.</li> + <li>During the Provisioning Process, the Provisioning Technology +may cause third party Installable Software or a portion thereof to be + accessed and copied to the Target Machine.</li> + <li>Pursuant to the Specification, you will provide to the user +the terms and conditions that govern the use of the Installable + Software ("Installable Software Agreement") and such Installable +Software Agreement shall be accessed from the Target + Machine in accordance with the Specification. Such Installable +Software Agreement must inform the user of the terms and conditions that + govern + the Installable Software and must solicit acceptance by the end +user in the manner prescribed in such Installable Software Agreement. +Upon such + indication of agreement by the user, the provisioning Technology +will complete installation of the Installable Software.</li> +</ol> + +<h3>Cryptography</h3> + +<p>Content may contain encryption software. The country in which you are + currently may have restrictions on the import, possession, and use, +and/or re-export to + another country, of encryption software. BEFORE using any encryption +software, please check the country's laws, regulations and policies +concerning the import, + possession, or use, and re-export of encryption software, to see if +this is permitted.</p> + +<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p> + + +</body></html> \ No newline at end of file
diff --git a/org.eclipse.osbp.utils.functionnormalizer.feature/pom.xml b/org.eclipse.osbp.utils.functionnormalizer.feature/pom.xml new file mode 100644 index 0000000..2ef42a5 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer.feature/pom.xml
@@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--#======================================================================= --> +<!--# Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) --> +<!--# All rights reserved. This program and the accompanying materials --> +<!--# are made available under the terms of the Eclipse Public License v1.0 --> +<!--# which accompanies this distribution, and is available at --> +<!--# http://www.eclipse.org/legal/epl-v10.html --> +<!--# --> +<!--# Contributors: --> +<!--# Christophe Loetz (Loetz GmbH&Co.KG) - initial API and implementation --> +<!--#======================================================================= --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <artifactId>org.eclipse.osbp.utils.functionnormalizer.feature</artifactId> + <packaging>eclipse-feature</packaging> + <parent> + <groupId>org.eclipse.osbp.utils.functionnormalizer</groupId> + <artifactId>org.eclipse.osbp.utils.functionnormalizer.aggregator</artifactId> + <version>0.9.0-SNAPSHOT</version> + <relativePath>..</relativePath> + </parent> + + <build> + <plugins> + <plugin> + <groupId>org.eclipse.tycho.extras</groupId> + <artifactId>tycho-source-feature-plugin</artifactId> + <version>${tychoExtrasVersion}</version> + <executions> + <execution> + <id>source-feature</id> + <phase>package</phase> + <goals> + <goal>source-feature</goal> + </goals> + </execution> + </executions> + <configuration> + <labelSuffix> (source)</labelSuffix> + </configuration> + </plugin> + <plugin> + <!-- workaround while bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=398250 + is not fixed --> + <groupId>org.eclipse.tycho</groupId> + <artifactId>tycho-p2-plugin</artifactId> + <version>${tycho-version}</version> + <executions> + <execution> + <id>attached-p2-metadata</id> + <phase>package</phase> + <goals> + <goal>p2-metadata</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-javadoc-plugin</artifactId> + <executions> + <execution> + <id>javadoc-jar</id> + <phase>package</phase> + <goals> + <goal>jar</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + + <dependencies> + <dependency> + <groupId>org.eclipse.osbp.utils.functionnormalizer</groupId> + <artifactId>org.eclipse.osbp.utils.functionnormalizer</artifactId> + <version>0.9.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.eclipse.osbp.utils.functionnormalizer</groupId> + <artifactId>org.eclipse.osbp.utils.functionnormalizer.tests</artifactId> + <version>0.9.0-SNAPSHOT</version> + </dependency> + </dependencies> +</project>
diff --git a/org.eclipse.osbp.utils.functionnormalizer.feature/src/main/javadoc/README.txt b/org.eclipse.osbp.utils.functionnormalizer.feature/src/main/javadoc/README.txt new file mode 100644 index 0000000..831da7e --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer.feature/src/main/javadoc/README.txt
@@ -0,0 +1 @@ +Resource folder for javadoc resources. \ No newline at end of file
diff --git a/org.eclipse.osbp.utils.functionnormalizer.feature/src/overview.html b/org.eclipse.osbp.utils.functionnormalizer.feature/src/overview.html new file mode 100644 index 0000000..c62dd84 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer.feature/src/overview.html
@@ -0,0 +1,9 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html> +<head> + <title>OSBP Tools Graphical Entity</title> +</head> +<body> +<p>The <strong>OSBP Utils Functionnormalizer </strong>provides basic bundles used in some OSBP DSL.</p> +</body> +</html>
diff --git a/org.eclipse.osbp.utils.functionnormalizer.tests/.project b/org.eclipse.osbp.utils.functionnormalizer.tests/.project new file mode 100644 index 0000000..b3fe4cb --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer.tests/.project
@@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.osbp.utils.functionnormalizer.tests</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> + <buildCommand> + <name>org.eclipse.babel.editor.rbeBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.m2e.core.maven2Builder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.m2e.core.maven2Nature</nature> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.babel.editor.rbeNature</nature> + </natures> +</projectDescription>
diff --git a/org.eclipse.osbp.utils.functionnormalizer.tests/LICENSE.txt b/org.eclipse.osbp.utils.functionnormalizer.tests/LICENSE.txt new file mode 100644 index 0000000..ff42ad4 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer.tests/LICENSE.txt
@@ -0,0 +1,161 @@ +Eclipse Public License -v 1.0 + +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. + +1. DEFINITIONS + +"Contribution" means: + +a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and + +b) in the case of each subsequent Contributor: + +i) changes to the Program, and + +ii) additions to the Program; + +where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. +A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone +acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate +modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not +derivative works of the Program. + +"Contributor" means any person or entity that distributes the Program. + +"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. + +"Program" means the Contributions distributed in accordance with this Agreement. + +"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. + +2. GRANT OF RIGHTS + +a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, +royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute +and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code +form. + +b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, +royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the +Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the +combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such +addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not +apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. + +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. + +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. + +3. REQUIREMENTS + +A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: + +a) it complies with the terms and conditions of this Agreement; and + +b) its license agreement: + +i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including +warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and +fitness for a particular purpose; + +ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, +incidental and consequential damages, such as lost profits; + +iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any +other party; and + +iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it +in a reasonable manner on or through a medium customarily used for software exchange. + +When the Program is made available in source code form: + +a) it must be made available under this Agreement; and + +b) a copy of this Agreement must be included with each copy of the Program. + +Contributors may not remove or alter any copyright notices contained within the Program. + +Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows +subsequent Recipients to identify the originator of the Contribution. + +4. COMMERCIAL DISTRIBUTION + +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. + +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. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, +NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for +determining the appropriateness of using and distributing the Program and assumes all risks associated with its +exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance +with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED +HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. GENERAL + +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. + +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. + +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. + +Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement +is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish +new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the +right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may +assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the +Agreement will be given a distinguishing version number. The Program (including Contributions) may always be +distributed subject to the version of the Agreement under which it was received. In addition, after a new version of +the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the +new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to +the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or +otherwise. All rights in the Program not expressly granted under this Agreement are reserved. + +This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States +of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause +of action arose. Each party waives its rights to a jury trial in any resulting litigation. \ No newline at end of file
diff --git a/org.eclipse.osbp.utils.functionnormalizer.tests/META-INF/MANIFEST.MF b/org.eclipse.osbp.utils.functionnormalizer.tests/META-INF/MANIFEST.MF new file mode 100644 index 0000000..03707fe --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.osbp.utils.functionnormalizer.tests +Bundle-SymbolicName: org.eclipse.osbp.utils.functionnormalizer.tests +Bundle-Vendor: Eclipse OSBP +Bundle-Version: 0.9.0.qualifier +Bundle-Activator: org.eclipse.osbp.utils.functionnormalizer.tests.Activator +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Import-Package: org.osgi.framework;version="1.3.0" +Bundle-ActivationPolicy: lazy +Require-Bundle: org.junit;bundle-version="4.11.0", + org.knowhowlab.osgi.testing.assertions;bundle-version="1.3.0", + org.knowhowlab.osgi.testing.utils;bundle-version="1.2.2", + org.eclipse.osbp.utils.functionnormalizer;bundle-version="[0.9.0,0.10.0)"
diff --git a/org.eclipse.osbp.utils.functionnormalizer.tests/about.html b/org.eclipse.osbp.utils.functionnormalizer.tests/about.html new file mode 100644 index 0000000..64c0598 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer.tests/about.html
@@ -0,0 +1,28 @@ +<!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>June 1, 2016</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 1.0 ("EPL"). A copy of the EPL is available +at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. +For purposes of the EPL, "Program" will mean the Content.</p> + +<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/org.eclipse.osbp.utils.functionnormalizer.tests/about.ini b/org.eclipse.osbp.utils.functionnormalizer.tests/about.ini new file mode 100644 index 0000000..7df671f --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer.tests/about.ini
@@ -0,0 +1,17 @@ +# about.ini +# contains information about a feature +# java.io.Properties file (ISO 8859-1 with "\" escapes) +# "%key" are externalized strings defined in about.properties +# This file does not need to be translated. + +# Property "aboutText" contains blurb for "About" dialog (translated) +aboutText=%featureText + +# Property "featureImage" contains path to feature image (32x32) +featureImage= + +# Property "appName" contains name of the application (translated) +appName=%featureName + +# Property "welcomePage" contains path to welcome page (special XML-based format) +welcomePage=
diff --git a/org.eclipse.osbp.utils.functionnormalizer.tests/about.mappings b/org.eclipse.osbp.utils.functionnormalizer.tests/about.mappings new file mode 100644 index 0000000..4511a0a --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer.tests/about.mappings
@@ -0,0 +1,6 @@ +# about.mappings +# contains fill-ins for about.properties +# java.io.Properties file (ISO 8859-1 with "\" escapes) +# This file does not need to be translated. + +0=qualifier
diff --git a/org.eclipse.osbp.utils.functionnormalizer.tests/about.properties b/org.eclipse.osbp.utils.functionnormalizer.tests/about.properties new file mode 100644 index 0000000..601d1cb --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer.tests/about.properties
@@ -0,0 +1,26 @@ +# +# Copyright (c) 2012, 2016 - Loetz GmbH&Co.KG (Heidelberg) +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Christophe Loetz (Loetz GmbH&Co.KG) - initial API and implementation +# + +# NLS_MESSAGEFORMAT_VAR + +featureName=org.eclipse.osbp.utils.functionnormalizer.tests + +################ blurb property #################################### +featureText=\ +Copyright (c) 2012-2016 - Loetz GmbH&Co.KG \n\ +All rights reserved. This program and the accompanying materials\n\ +are made available under the terms of the Eclipse Public License v1.0\n\ +which accompanies this distribution, and is available at\n\ +http://www.eclipse.org/legal/epl-v10.html\n\ +\n\ +Contributors:\n\ + Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation\n +################ end of blurb property ####################################
diff --git a/org.eclipse.osbp.utils.functionnormalizer.tests/build.properties b/org.eclipse.osbp.utils.functionnormalizer.tests/build.properties new file mode 100644 index 0000000..c72fb45 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer.tests/build.properties
@@ -0,0 +1,17 @@ +<<<<<<< HEAD +source.. = src/ +output.. = target/classes/ +bin.includes = about.properties, about.mappings, about.ini, about.html, META-INF/,\ + . +======= +source.. = src/ +output.. = target/classes/ +bin.includes = about.properties, about.mappings, about.ini, about.html, META-INF/,\ + .,\ + license.html,\ + LICENSE.txt,\ + epl-v10.html +src.includes = about.properties, about.mappings, about.ini, about.html, license.html,\ + LICENSE.txt,\ + epl-v10.html +>>>>>>> branch 'development' of ssh://osbp@10.1.13.14/cxgit/org.eclipse.osbp.utils.functionnormalizer.git
diff --git a/org.eclipse.osbp.utils.functionnormalizer.tests/epl-v10.html b/org.eclipse.osbp.utils.functionnormalizer.tests/epl-v10.html new file mode 100644 index 0000000..b398acc --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer.tests/epl-v10.html
@@ -0,0 +1,259 @@ +<!--?xml version="1.0" encoding="ISO-8859-1" ?--> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"><head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Eclipse Public License - Version 1.0</title> +<style type="text/css"> + body { + size: 8.5in 11.0in; + margin: 0.25in 0.5in 0.25in 0.5in; + tab-interval: 0.5in; + } + p { + margin-left: auto; + margin-top: 0.5em; + margin-bottom: 0.5em; + } + p.list { + margin-left: 0.5in; + margin-top: 0.05em; + margin-bottom: 0.05em; + } + </style> + +</head> + +<body lang="EN-US"> + +<h2>Eclipse Public License - v 1.0</h2> + +<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE +PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR +DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS +AGREEMENT.</p> + +<p><b>1. DEFINITIONS</b></p> + +<p>"Contribution" means:</p> + +<p class="list">a) in the case of the initial Contributor, the initial +code and documentation distributed under this Agreement, and</p> +<p class="list">b) in the case of each subsequent Contributor:</p> +<p class="list">i) changes to the Program, and</p> +<p class="list">ii) additions to the Program;</p> +<p class="list">where such changes and/or additions to the Program +originate from and are distributed by that particular Contributor. A +Contribution 'originates' from a Contributor if it was added to the +Program by such Contributor itself or anyone acting on such +Contributor's behalf. Contributions do not include additions to the +Program which: (i) are separate modules of software distributed in +conjunction with the Program under their own license agreement, and (ii) +are not derivative works of the Program.</p> + +<p>"Contributor" means any person or entity that distributes +the Program.</p> + +<p>"Licensed Patents" mean patent claims licensable by a +Contributor which are necessarily infringed by the use or sale of its +Contribution alone or when combined with the Program.</p> + +<p>"Program" means the Contributions distributed in accordance +with this Agreement.</p> + +<p>"Recipient" means anyone who receives the Program under +this Agreement, including all Contributors.</p> + +<p><b>2. GRANT OF RIGHTS</b></p> + +<p class="list">a) Subject to the terms of this Agreement, each +Contributor hereby grants Recipient a non-exclusive, worldwide, +royalty-free copyright license to reproduce, prepare derivative works +of, publicly display, publicly perform, distribute and sublicense the +Contribution of such Contributor, if any, and such derivative works, in +source code and object code form.</p> + +<p class="list">b) Subject to the terms of this Agreement, each +Contributor hereby grants Recipient a non-exclusive, worldwide, +royalty-free patent license under Licensed Patents to make, use, sell, +offer to sell, import and otherwise transfer the Contribution of such +Contributor, if any, in source code and object code form. This patent +license shall apply to the combination of the Contribution and the +Program if, at the time the Contribution is added by the Contributor, +such addition of the Contribution causes such combination to be covered +by the Licensed Patents. The patent license shall not apply to any other +combinations which include the Contribution. No hardware per se is +licensed hereunder.</p> + +<p class="list">c) Recipient understands that although each Contributor +grants the licenses to its Contributions set forth herein, no assurances +are provided by any Contributor that the Program does not infringe the +patent or other intellectual property rights of any other entity. Each +Contributor disclaims any liability to Recipient for claims brought by +any other entity based on infringement of intellectual property rights +or otherwise. As a condition to exercising the rights and licenses +granted hereunder, each Recipient hereby assumes sole responsibility to +secure any other intellectual property rights needed, if any. For +example, if a third party patent license is required to allow Recipient +to distribute the Program, it is Recipient's responsibility to acquire +that license before distributing the Program.</p> + +<p class="list">d) Each Contributor represents that to its knowledge it +has sufficient copyright rights in its Contribution, if any, to grant +the copyright license set forth in this Agreement.</p> + +<p><b>3. REQUIREMENTS</b></p> + +<p>A Contributor may choose to distribute the Program in object code +form under its own license agreement, provided that:</p> + +<p class="list">a) it complies with the terms and conditions of this +Agreement; and</p> + +<p class="list">b) its license agreement:</p> + +<p class="list">i) effectively disclaims on behalf of all Contributors +all warranties and conditions, express and implied, including warranties +or conditions of title and non-infringement, and implied warranties or +conditions of merchantability and fitness for a particular purpose;</p> + +<p class="list">ii) effectively excludes on behalf of all Contributors +all liability for damages, including direct, indirect, special, +incidental and consequential damages, such as lost profits;</p> + +<p class="list">iii) states that any provisions which differ from this +Agreement are offered by that Contributor alone and not by any other +party; and</p> + +<p class="list">iv) states that source code for the Program is available +from such Contributor, and informs licensees how to obtain it in a +reasonable manner on or through a medium customarily used for software +exchange.</p> + +<p>When the Program is made available in source code form:</p> + +<p class="list">a) it must be made available under this Agreement; and</p> + +<p class="list">b) a copy of this Agreement must be included with each +copy of the Program.</p> + +<p>Contributors may not remove or alter any copyright notices contained +within the Program.</p> + +<p>Each Contributor must identify itself as the originator of its +Contribution, if any, in a manner that reasonably allows subsequent +Recipients to identify the originator of the Contribution.</p> + +<p><b>4. COMMERCIAL DISTRIBUTION</b></p> + +<p>Commercial distributors of software may accept certain +responsibilities with respect to end users, business partners and the +like. While this license is intended to facilitate the commercial use of +the Program, the Contributor who includes the Program in a commercial +product offering should do so in a manner which does not create +potential liability for other Contributors. Therefore, if a Contributor +includes the Program in a commercial product offering, such Contributor +("Commercial Contributor") hereby agrees to defend and +indemnify every other Contributor ("Indemnified Contributor") +against any losses, damages and costs (collectively "Losses") +arising from claims, lawsuits and other legal actions brought by a third +party against the Indemnified Contributor to the extent caused by the +acts or omissions of such Commercial Contributor in connection with its +distribution of the Program in a commercial product offering. The +obligations in this section do not apply to any claims or Losses +relating to any actual or alleged intellectual property infringement. In +order to qualify, an Indemnified Contributor must: a) promptly notify +the Commercial Contributor in writing of such claim, and b) allow the +Commercial Contributor to control, and cooperate with the Commercial +Contributor in, the defense and any related settlement negotiations. The +Indemnified Contributor may participate in any such claim at its own +expense.</p> + +<p>For example, a Contributor might include the Program in a commercial +product offering, Product X. That Contributor is then a Commercial +Contributor. If that Commercial Contributor then makes performance +claims, or offers warranties related to Product X, those performance +claims and warranties are such Commercial Contributor's responsibility +alone. Under this section, the Commercial Contributor would have to +defend claims against the other Contributors related to those +performance claims and warranties, and if a court requires any other +Contributor to pay any damages as a result, the Commercial Contributor +must pay those damages.</p> + +<p><b>5. NO WARRANTY</b></p> + +<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS +PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS +OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, +ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY +OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely +responsible for determining the appropriateness of using and +distributing the Program and assumes all risks associated with its +exercise of rights under this Agreement , including but not limited to +the risks and costs of program errors, compliance with applicable laws, +damage to or loss of data, programs or equipment, and unavailability or +interruption of operations.</p> + +<p><b>6. DISCLAIMER OF LIABILITY</b></p> + +<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT +NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING +WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR +DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED +HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p> + +<p><b>7. GENERAL</b></p> + +<p>If any provision of this Agreement is invalid or unenforceable under +applicable law, it shall not affect the validity or enforceability of +the remainder of the terms of this Agreement, and without further action +by the parties hereto, such provision shall be reformed to the minimum +extent necessary to make such provision valid and enforceable.</p> + +<p>If Recipient institutes patent litigation against any entity +(including a cross-claim or counterclaim in a lawsuit) alleging that the +Program itself (excluding combinations of the Program with other +software or hardware) infringes such Recipient's patent(s), then such +Recipient's rights granted under Section 2(b) shall terminate as of the +date such litigation is filed.</p> + +<p>All Recipient's rights under this Agreement shall terminate if it +fails to comply with any of the material terms or conditions of this +Agreement and does not cure such failure in a reasonable period of time +after becoming aware of such noncompliance. If all Recipient's rights +under this Agreement terminate, Recipient agrees to cease use and +distribution of the Program as soon as reasonably practicable. However, +Recipient's obligations under this Agreement and any licenses granted by +Recipient relating to the Program shall continue and survive.</p> + +<p>Everyone is permitted to copy and distribute copies of this +Agreement, but in order to avoid inconsistency the Agreement is +copyrighted and may only be modified in the following manner. The +Agreement Steward reserves the right to publish new versions (including +revisions) of this Agreement from time to time. No one other than the +Agreement Steward has the right to modify this Agreement. The Eclipse +Foundation is the initial Agreement Steward. The Eclipse Foundation may +assign the responsibility to serve as the Agreement Steward to a +suitable separate entity. Each new version of the Agreement will be +given a distinguishing version number. The Program (including +Contributions) may always be distributed subject to the version of the +Agreement under which it was received. In addition, after a new version +of the Agreement is published, Contributor may elect to distribute the +Program (including its Contributions) under the new version. Except as +expressly stated in Sections 2(a) and 2(b) above, Recipient receives no +rights or licenses to the intellectual property of any Contributor under +this Agreement, whether expressly, by implication, estoppel or +otherwise. All rights in the Program not expressly granted under this +Agreement are reserved.</p> + +<p>This Agreement is governed by the laws of the State of New York and +the intellectual property laws of the United States of America. No party +to this Agreement will bring a legal action under this Agreement more +than one year after the cause of action arose. Each party waives its +rights to a jury trial in any resulting litigation.</p> + + + +</body></html> \ No newline at end of file
diff --git a/org.eclipse.osbp.utils.functionnormalizer.tests/license.html b/org.eclipse.osbp.utils.functionnormalizer.tests/license.html new file mode 100644 index 0000000..6e579a5 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer.tests/license.html
@@ -0,0 +1,164 @@ +<!--?xml version="1.0" encoding="ISO-8859-1" ?--> +<!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>Eclipse Foundation Software User Agreement</title> +</head> + +<body lang="EN-US"> +<h2>Eclipse Foundation Software User Agreement</h2> +<p>February 1, 2011</p> + +<h3>Usage Of Content</h3> + +<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS + (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND + CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE + OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR + NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND + CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p> + +<h3>Applicable Licenses</h3> + +<p>Unless otherwise indicated, all Content made available by the Eclipse + Foundation is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 + ("EPL"). A copy of the EPL is provided with this Content and is also + available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. + For purposes of the EPL, "Program" will mean the Content.</p> + +<p>Content includes, but is not limited to, source code, object code, +documentation and other files maintained in the Eclipse Foundation +source code + repository ("Repository") in software modules ("Modules") and made +available as downloadable archives ("Downloads").</p> + +<ul> + <li>Content may be structured and packaged into modules to +facilitate delivering, extending, and upgrading the Content. Typical +modules may include plug-ins ("Plug-ins"), plug-in fragments +("Fragments"), and features ("Features").</li> + <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li> + <li>A Feature is a bundle of one or more Plug-ins and/or +Fragments and associated material. Each Feature may be packaged as a +sub-directory in a directory named "features". Within a Feature, files +named "feature.xml" may contain a list of the names and version numbers +of the Plug-ins + and/or Fragments associated with that Feature.</li> + <li>Features may also include other Features ("Included +Features"). Within a Feature, files named "feature.xml" may contain a +list of the names and version numbers of Included Features.</li> +</ul> + +<p>The terms and conditions governing Plug-ins and Fragments should be +contained in files named "about.html" ("Abouts"). The terms and +conditions governing Features and +Included Features should be contained in files named "license.html" +("Feature Licenses"). Abouts and Feature Licenses may be located in any + directory of a Download or Module +including, but not limited to the following locations:</p> + +<ul> + <li>The top-level (root) directory</li> + <li>Plug-in and Fragment directories</li> + <li>Inside Plug-ins and Fragments packaged as JARs</li> + <li>Sub-directories of the directory named "src" of certain Plug-ins</li> + <li>Feature directories</li> +</ul> + +<p>Note: if a Feature made available by the Eclipse Foundation is +installed using the Provisioning Technology (as defined below), you must + agree to a license ("Feature Update License") during the +installation process. If the Feature contains Included Features, the +Feature Update License should either provide you with the terms and +conditions governing the Included Features or +inform you where you can locate them. Feature Update Licenses may be +found in the "license" property of files named "feature.properties" +found within a Feature. +Such Abouts, Feature Licenses, and Feature Update Licenses contain the +terms and conditions (or references to such terms and conditions) that +govern your use of the associated Content in +that directory.</p> + +<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER +TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. + SOME OF THESE +OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p> + +<ul> + <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li> + <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li> + <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li> + <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li> + <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li> + <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li> +</ul> + +<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND +CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, +or Feature Update License is provided, please +contact the Eclipse Foundation to determine what terms and conditions +govern that particular Content.</p> + + +<h3>Use of Provisioning Technology</h3> + +<p>The Eclipse Foundation makes available provisioning software, +examples of which include, but are not limited to, p2 and the Eclipse + Update Manager ("Provisioning Technology") for the purpose of +allowing users to install software, documentation, information and/or + other materials (collectively "Installable Software"). This +capability is provided with the intent of allowing such users to + install, extend and update Eclipse-based products. Information about +packaging Installable Software is available at <a href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a> + ("Specification").</p> + +<p>You may use Provisioning Technology to allow other parties to install + Installable Software. You shall be responsible for enabling the + applicable license agreements relating to the Installable Software to + be presented to, and accepted by, the users of the Provisioning +Technology + in accordance with the Specification. By using Provisioning +Technology in such a manner and making it available in accordance with +the + Specification, you further acknowledge your agreement to, and the +acquisition of all necessary rights to permit the following:</p> + +<ol> + <li>A series of actions may occur ("Provisioning Process") in +which a user may execute the Provisioning Technology + on a machine ("Target Machine") with the intent of installing, +extending or updating the functionality of an Eclipse-based + product.</li> + <li>During the Provisioning Process, the Provisioning Technology +may cause third party Installable Software or a portion thereof to be + accessed and copied to the Target Machine.</li> + <li>Pursuant to the Specification, you will provide to the user +the terms and conditions that govern the use of the Installable + Software ("Installable Software Agreement") and such Installable +Software Agreement shall be accessed from the Target + Machine in accordance with the Specification. Such Installable +Software Agreement must inform the user of the terms and conditions that + govern + the Installable Software and must solicit acceptance by the end +user in the manner prescribed in such Installable Software Agreement. +Upon such + indication of agreement by the user, the provisioning Technology +will complete installation of the Installable Software.</li> +</ol> + +<h3>Cryptography</h3> + +<p>Content may contain encryption software. The country in which you are + currently may have restrictions on the import, possession, and use, +and/or re-export to + another country, of encryption software. BEFORE using any encryption +software, please check the country's laws, regulations and policies +concerning the import, + possession, or use, and re-export of encryption software, to see if +this is permitted.</p> + +<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p> + + +</body></html> \ No newline at end of file
diff --git a/org.eclipse.osbp.utils.functionnormalizer.tests/pom.xml b/org.eclipse.osbp.utils.functionnormalizer.tests/pom.xml new file mode 100644 index 0000000..5005425 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer.tests/pom.xml
@@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--#======================================================================= --> +<!--# Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) --> +<!--# All rights reserved. This program and the accompanying materials --> +<!--# are made available under the terms of the Eclipse Public License v1.0 --> +<!--# which accompanies this distribution, and is available at --> +<!--# http://www.eclipse.org/legal/epl-v10.html --> +<!--# --> +<!--# Contributors: --> +<!--# Christophe Loetz (Loetz GmbH&Co.KG) - initial API and implementation --> +<!--#======================================================================= --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.eclipse.osbp.utils.functionnormalizer</groupId> + <artifactId>org.eclipse.osbp.utils.functionnormalizer.aggregator</artifactId> + <version>0.9.0-SNAPSHOT</version> + <relativePath>..</relativePath> + </parent> + <packaging>eclipse-plugin</packaging> + <artifactId>org.eclipse.osbp.utils.functionnormalizer.tests</artifactId> + <build> + <sourceDirectory>src</sourceDirectory> + <plugins> + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.1</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + </configuration> + </plugin> + </plugins> + </build> +</project>
diff --git a/org.eclipse.osbp.utils.functionnormalizer.tests/src/org/eclipse/osbp/utils/functionnormalizer/tests/Activator.java b/org.eclipse.osbp.utils.functionnormalizer.tests/src/org/eclipse/osbp/utils/functionnormalizer/tests/Activator.java new file mode 100644 index 0000000..40d1e8b --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer.tests/src/org/eclipse/osbp/utils/functionnormalizer/tests/Activator.java
@@ -0,0 +1,53 @@ +/* + * + * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation + * + */ +package org.eclipse.osbp.utils.functionnormalizer.tests; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +// TODO: Auto-generated Javadoc +/** + * The Class Activator. + */ +public class Activator implements BundleActivator { + + /** The context. */ + private static BundleContext context; + + /** + * Gets the context. + * + * @return the context + */ + static BundleContext getContext() { + return context; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext bundleContext) throws Exception { + Activator.context = bundleContext; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext bundleContext) throws Exception { + Activator.context = null; + } + +}
diff --git a/org.eclipse.osbp.utils.functionnormalizer.tests/src/org/eclipse/osbp/utils/functionnormalizer/tests/FunctionnormalizerTests.java b/org.eclipse.osbp.utils.functionnormalizer.tests/src/org/eclipse/osbp/utils/functionnormalizer/tests/FunctionnormalizerTests.java new file mode 100644 index 0000000..8b3c8a8 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer.tests/src/org/eclipse/osbp/utils/functionnormalizer/tests/FunctionnormalizerTests.java
@@ -0,0 +1,59 @@ +/* + * + * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation + * + */ + +package org.eclipse.osbp.utils.functionnormalizer.tests; + +import static org.junit.Assert.assertEquals; + +import org.eclipse.osbp.utils.functionnormalizer.api.FunctionTypingAPI; +import org.junit.Test; + +// TODO: Auto-generated Javadoc +/** + * Tests the {@link TextFieldPresentation}. + */ +public class FunctionnormalizerTests { + + + /** + * Tests rendering issues. + * + * @throws Exception + * the exception + */ + @Test + // BEGIN SUPRESS CATCH EXCEPTION + public void test_FunctionTypingAPI() throws Exception { + + FunctionTypingAPI functionTypingAPI = new FunctionTypingAPI(); + + assertEquals("functionCss", functionTypingAPI.getFunctionTypeNameByListIndex(0)); + assertEquals("functionConverter", functionTypingAPI.getFunctionTypeNameByListIndex(1)); + assertEquals("functionImagePicker", functionTypingAPI.getFunctionTypeNameByListIndex(2)); + + assertEquals("functionCss", functionTypingAPI.getFunctionCssTypeName()); + assertEquals("functionConverter", functionTypingAPI.getFunctionConverterTypeName()); + assertEquals("functionImagePicker", functionTypingAPI.getFunctionImagePickerTypeName()); + + assertEquals("booleanFunction", functionTypingAPI.getFunctionNormalizerNameByListIndex(0)); + assertEquals("StringFunction", functionTypingAPI.getFunctionNormalizerNameByListIndex(1)); + + assertEquals("boolean", functionTypingAPI.getFunctionNormalizerReturnTypeByListIndex(0)); + assertEquals("String", functionTypingAPI.getFunctionNormalizerReturnTypeByListIndex(1)); + + assertEquals("boolean", functionTypingAPI.getFunctionNormalizerReturnTypeByName("booleanFunction")); + assertEquals("String", functionTypingAPI.getFunctionNormalizerReturnTypeByName("StringFunction")); + } + +}
diff --git a/org.eclipse.osbp.utils.functionnormalizer/.project b/org.eclipse.osbp.utils.functionnormalizer/.project new file mode 100644 index 0000000..416dd4b --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/.project
@@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.osbp.utils.functionnormalizer</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.xtext.ui.shared.xtextBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.osbp.ide.core.ui.shared.OSBPModelEnhancingBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.osbp.ide.core.ui.shared.OSBPI18nBuilder</name> + <arguments> + </arguments> + </buildCommand> + <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> + <buildCommand> + <name>org.eclipse.babel.editor.rbeBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.m2e.core.maven2Builder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.m2e.core.maven2Nature</nature> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.xtext.ui.shared.xtextNature</nature> + <nature>org.eclipse.babel.editor.rbeNature</nature> + <nature>org.eclipse.osbp.ide.core.ui.shared.OSBPNature</nature> + </natures> +</projectDescription>
diff --git a/org.eclipse.osbp.utils.functionnormalizer/LICENSE.txt b/org.eclipse.osbp.utils.functionnormalizer/LICENSE.txt new file mode 100644 index 0000000..ff42ad4 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/LICENSE.txt
@@ -0,0 +1,161 @@ +Eclipse Public License -v 1.0 + +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. + +1. DEFINITIONS + +"Contribution" means: + +a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and + +b) in the case of each subsequent Contributor: + +i) changes to the Program, and + +ii) additions to the Program; + +where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. +A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone +acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate +modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not +derivative works of the Program. + +"Contributor" means any person or entity that distributes the Program. + +"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. + +"Program" means the Contributions distributed in accordance with this Agreement. + +"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. + +2. GRANT OF RIGHTS + +a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, +royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute +and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code +form. + +b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, +royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the +Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the +combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such +addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not +apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. + +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. + +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. + +3. REQUIREMENTS + +A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: + +a) it complies with the terms and conditions of this Agreement; and + +b) its license agreement: + +i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including +warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and +fitness for a particular purpose; + +ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, +incidental and consequential damages, such as lost profits; + +iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any +other party; and + +iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it +in a reasonable manner on or through a medium customarily used for software exchange. + +When the Program is made available in source code form: + +a) it must be made available under this Agreement; and + +b) a copy of this Agreement must be included with each copy of the Program. + +Contributors may not remove or alter any copyright notices contained within the Program. + +Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows +subsequent Recipients to identify the originator of the Contribution. + +4. COMMERCIAL DISTRIBUTION + +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. + +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. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, +NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for +determining the appropriateness of using and distributing the Program and assumes all risks associated with its +exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance +with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED +HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. GENERAL + +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. + +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. + +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. + +Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement +is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish +new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the +right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may +assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the +Agreement will be given a distinguishing version number. The Program (including Contributions) may always be +distributed subject to the version of the Agreement under which it was received. In addition, after a new version of +the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the +new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to +the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or +otherwise. All rights in the Program not expressly granted under this Agreement are reserved. + +This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States +of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause +of action arose. Each party waives its rights to a jury trial in any resulting litigation. \ No newline at end of file
diff --git a/org.eclipse.osbp.utils.functionnormalizer/META-INF/MANIFEST.MF b/org.eclipse.osbp.utils.functionnormalizer/META-INF/MANIFEST.MF new file mode 100644 index 0000000..8381867 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/META-INF/MANIFEST.MF
@@ -0,0 +1,26 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.osbp.utils.functionnormalizer +Bundle-SymbolicName: org.eclipse.osbp.utils.functionnormalizer +Bundle-Vendor: Eclipse OSBP +Bundle-Version: 0.9.0.qualifier +Bundle-Activator: org.eclipse.osbp.utils.functionnormalizer.Activator +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Import-Package: javax.validation, + javax.validation.constraints, + org.osgi.framework;version="1.3.0" +Bundle-ActivationPolicy: lazy +Require-Bundle: org.eclipse.osbp.gitinfo;bundle-version="[0.9.0,0.10.0)", + org.eclipse.xtext.xbase.lib;bundle-version="[2.7.3,2.8.0)", + org.eclipse.osbp.dsl.datatype.lib;bundle-version="[0.9.0,0.10.0)", + org.eclipse.osbp.runtime.common;bundle-version="[0.9.0,0.10.0)", + javax.persistence;bundle-version="2.1.0", + org.eclipse.osbp.xtext.i18n;bundle-version="[0.9.0,0.10.0)", + org.slf4j.api;bundle-version="1.7.2", + org.eclipse.osbp.dsl.dto.lib;bundle-version="[0.9.0,0.10.0)" +Export-Package: org.eclipse.osbp.utils.functionnormalizer;version="0.9.0", + org.eclipse.osbp.utils.functionnormalizer.api;version="0.9.0", + org.eclipse.osbp.utils.functionnormalizer.entities +OSBP-RuntimeBuilder-BundleSpace: +OSBP-ECView-I18nProvider: +Factory-Model: datatype, entity, dto
diff --git a/org.eclipse.osbp.utils.functionnormalizer/about.html b/org.eclipse.osbp.utils.functionnormalizer/about.html new file mode 100644 index 0000000..64c0598 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/about.html
@@ -0,0 +1,28 @@ +<!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>June 1, 2016</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 1.0 ("EPL"). A copy of the EPL is available +at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. +For purposes of the EPL, "Program" will mean the Content.</p> + +<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/org.eclipse.osbp.utils.functionnormalizer/about.ini b/org.eclipse.osbp.utils.functionnormalizer/about.ini new file mode 100644 index 0000000..7df671f --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/about.ini
@@ -0,0 +1,17 @@ +# about.ini +# contains information about a feature +# java.io.Properties file (ISO 8859-1 with "\" escapes) +# "%key" are externalized strings defined in about.properties +# This file does not need to be translated. + +# Property "aboutText" contains blurb for "About" dialog (translated) +aboutText=%featureText + +# Property "featureImage" contains path to feature image (32x32) +featureImage= + +# Property "appName" contains name of the application (translated) +appName=%featureName + +# Property "welcomePage" contains path to welcome page (special XML-based format) +welcomePage=
diff --git a/org.eclipse.osbp.utils.functionnormalizer/about.mappings b/org.eclipse.osbp.utils.functionnormalizer/about.mappings new file mode 100644 index 0000000..4511a0a --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/about.mappings
@@ -0,0 +1,6 @@ +# about.mappings +# contains fill-ins for about.properties +# java.io.Properties file (ISO 8859-1 with "\" escapes) +# This file does not need to be translated. + +0=qualifier
diff --git a/org.eclipse.osbp.utils.functionnormalizer/about.properties b/org.eclipse.osbp.utils.functionnormalizer/about.properties new file mode 100644 index 0000000..a5eda46 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/about.properties
@@ -0,0 +1,26 @@ +# +# Copyright (c) 2012, 2016 - Loetz GmbH&Co.KG (Heidelberg) +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Christophe Loetz (Loetz GmbH&Co.KG) - initial API and implementation +# + +# NLS_MESSAGEFORMAT_VAR + +featureName=org.eclipse.osbp.utils.functionnormalizer + +################ blurb property #################################### +featureText=\ +Copyright (c) 2012-2016 - Loetz GmbH&Co.KG \n\ +All rights reserved. This program and the accompanying materials\n\ +are made available under the terms of the Eclipse Public License v1.0\n\ +which accompanies this distribution, and is available at\n\ +http://www.eclipse.org/legal/epl-v10.html\n\ +\n\ +Contributors:\n\ + Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation\n +################ end of blurb property ####################################
diff --git a/org.eclipse.osbp.utils.functionnormalizer/build.properties b/org.eclipse.osbp.utils.functionnormalizer/build.properties new file mode 100644 index 0000000..489d904 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/build.properties
@@ -0,0 +1,12 @@ +source.. = src/,\ + src-gen +output.. = target/classes/ +bin.includes = about.properties, about.mappings, about.ini, about.html, META-INF/,\ + .,\ + OSGI-INF/,\ + license.html,\ + LICENSE.txt,\ + epl-v10.html +src.includes = about.properties, about.mappings, about.ini, about.html, license.html,\ + LICENSE.txt,\ + epl-v10.html
diff --git a/org.eclipse.osbp.utils.functionnormalizer/epl-v10.html b/org.eclipse.osbp.utils.functionnormalizer/epl-v10.html new file mode 100644 index 0000000..b398acc --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/epl-v10.html
@@ -0,0 +1,259 @@ +<!--?xml version="1.0" encoding="ISO-8859-1" ?--> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"><head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Eclipse Public License - Version 1.0</title> +<style type="text/css"> + body { + size: 8.5in 11.0in; + margin: 0.25in 0.5in 0.25in 0.5in; + tab-interval: 0.5in; + } + p { + margin-left: auto; + margin-top: 0.5em; + margin-bottom: 0.5em; + } + p.list { + margin-left: 0.5in; + margin-top: 0.05em; + margin-bottom: 0.05em; + } + </style> + +</head> + +<body lang="EN-US"> + +<h2>Eclipse Public License - v 1.0</h2> + +<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE +PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR +DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS +AGREEMENT.</p> + +<p><b>1. DEFINITIONS</b></p> + +<p>"Contribution" means:</p> + +<p class="list">a) in the case of the initial Contributor, the initial +code and documentation distributed under this Agreement, and</p> +<p class="list">b) in the case of each subsequent Contributor:</p> +<p class="list">i) changes to the Program, and</p> +<p class="list">ii) additions to the Program;</p> +<p class="list">where such changes and/or additions to the Program +originate from and are distributed by that particular Contributor. A +Contribution 'originates' from a Contributor if it was added to the +Program by such Contributor itself or anyone acting on such +Contributor's behalf. Contributions do not include additions to the +Program which: (i) are separate modules of software distributed in +conjunction with the Program under their own license agreement, and (ii) +are not derivative works of the Program.</p> + +<p>"Contributor" means any person or entity that distributes +the Program.</p> + +<p>"Licensed Patents" mean patent claims licensable by a +Contributor which are necessarily infringed by the use or sale of its +Contribution alone or when combined with the Program.</p> + +<p>"Program" means the Contributions distributed in accordance +with this Agreement.</p> + +<p>"Recipient" means anyone who receives the Program under +this Agreement, including all Contributors.</p> + +<p><b>2. GRANT OF RIGHTS</b></p> + +<p class="list">a) Subject to the terms of this Agreement, each +Contributor hereby grants Recipient a non-exclusive, worldwide, +royalty-free copyright license to reproduce, prepare derivative works +of, publicly display, publicly perform, distribute and sublicense the +Contribution of such Contributor, if any, and such derivative works, in +source code and object code form.</p> + +<p class="list">b) Subject to the terms of this Agreement, each +Contributor hereby grants Recipient a non-exclusive, worldwide, +royalty-free patent license under Licensed Patents to make, use, sell, +offer to sell, import and otherwise transfer the Contribution of such +Contributor, if any, in source code and object code form. This patent +license shall apply to the combination of the Contribution and the +Program if, at the time the Contribution is added by the Contributor, +such addition of the Contribution causes such combination to be covered +by the Licensed Patents. The patent license shall not apply to any other +combinations which include the Contribution. No hardware per se is +licensed hereunder.</p> + +<p class="list">c) Recipient understands that although each Contributor +grants the licenses to its Contributions set forth herein, no assurances +are provided by any Contributor that the Program does not infringe the +patent or other intellectual property rights of any other entity. Each +Contributor disclaims any liability to Recipient for claims brought by +any other entity based on infringement of intellectual property rights +or otherwise. As a condition to exercising the rights and licenses +granted hereunder, each Recipient hereby assumes sole responsibility to +secure any other intellectual property rights needed, if any. For +example, if a third party patent license is required to allow Recipient +to distribute the Program, it is Recipient's responsibility to acquire +that license before distributing the Program.</p> + +<p class="list">d) Each Contributor represents that to its knowledge it +has sufficient copyright rights in its Contribution, if any, to grant +the copyright license set forth in this Agreement.</p> + +<p><b>3. REQUIREMENTS</b></p> + +<p>A Contributor may choose to distribute the Program in object code +form under its own license agreement, provided that:</p> + +<p class="list">a) it complies with the terms and conditions of this +Agreement; and</p> + +<p class="list">b) its license agreement:</p> + +<p class="list">i) effectively disclaims on behalf of all Contributors +all warranties and conditions, express and implied, including warranties +or conditions of title and non-infringement, and implied warranties or +conditions of merchantability and fitness for a particular purpose;</p> + +<p class="list">ii) effectively excludes on behalf of all Contributors +all liability for damages, including direct, indirect, special, +incidental and consequential damages, such as lost profits;</p> + +<p class="list">iii) states that any provisions which differ from this +Agreement are offered by that Contributor alone and not by any other +party; and</p> + +<p class="list">iv) states that source code for the Program is available +from such Contributor, and informs licensees how to obtain it in a +reasonable manner on or through a medium customarily used for software +exchange.</p> + +<p>When the Program is made available in source code form:</p> + +<p class="list">a) it must be made available under this Agreement; and</p> + +<p class="list">b) a copy of this Agreement must be included with each +copy of the Program.</p> + +<p>Contributors may not remove or alter any copyright notices contained +within the Program.</p> + +<p>Each Contributor must identify itself as the originator of its +Contribution, if any, in a manner that reasonably allows subsequent +Recipients to identify the originator of the Contribution.</p> + +<p><b>4. COMMERCIAL DISTRIBUTION</b></p> + +<p>Commercial distributors of software may accept certain +responsibilities with respect to end users, business partners and the +like. While this license is intended to facilitate the commercial use of +the Program, the Contributor who includes the Program in a commercial +product offering should do so in a manner which does not create +potential liability for other Contributors. Therefore, if a Contributor +includes the Program in a commercial product offering, such Contributor +("Commercial Contributor") hereby agrees to defend and +indemnify every other Contributor ("Indemnified Contributor") +against any losses, damages and costs (collectively "Losses") +arising from claims, lawsuits and other legal actions brought by a third +party against the Indemnified Contributor to the extent caused by the +acts or omissions of such Commercial Contributor in connection with its +distribution of the Program in a commercial product offering. The +obligations in this section do not apply to any claims or Losses +relating to any actual or alleged intellectual property infringement. In +order to qualify, an Indemnified Contributor must: a) promptly notify +the Commercial Contributor in writing of such claim, and b) allow the +Commercial Contributor to control, and cooperate with the Commercial +Contributor in, the defense and any related settlement negotiations. The +Indemnified Contributor may participate in any such claim at its own +expense.</p> + +<p>For example, a Contributor might include the Program in a commercial +product offering, Product X. That Contributor is then a Commercial +Contributor. If that Commercial Contributor then makes performance +claims, or offers warranties related to Product X, those performance +claims and warranties are such Commercial Contributor's responsibility +alone. Under this section, the Commercial Contributor would have to +defend claims against the other Contributors related to those +performance claims and warranties, and if a court requires any other +Contributor to pay any damages as a result, the Commercial Contributor +must pay those damages.</p> + +<p><b>5. NO WARRANTY</b></p> + +<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS +PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS +OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, +ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY +OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely +responsible for determining the appropriateness of using and +distributing the Program and assumes all risks associated with its +exercise of rights under this Agreement , including but not limited to +the risks and costs of program errors, compliance with applicable laws, +damage to or loss of data, programs or equipment, and unavailability or +interruption of operations.</p> + +<p><b>6. DISCLAIMER OF LIABILITY</b></p> + +<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT +NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING +WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR +DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED +HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p> + +<p><b>7. GENERAL</b></p> + +<p>If any provision of this Agreement is invalid or unenforceable under +applicable law, it shall not affect the validity or enforceability of +the remainder of the terms of this Agreement, and without further action +by the parties hereto, such provision shall be reformed to the minimum +extent necessary to make such provision valid and enforceable.</p> + +<p>If Recipient institutes patent litigation against any entity +(including a cross-claim or counterclaim in a lawsuit) alleging that the +Program itself (excluding combinations of the Program with other +software or hardware) infringes such Recipient's patent(s), then such +Recipient's rights granted under Section 2(b) shall terminate as of the +date such litigation is filed.</p> + +<p>All Recipient's rights under this Agreement shall terminate if it +fails to comply with any of the material terms or conditions of this +Agreement and does not cure such failure in a reasonable period of time +after becoming aware of such noncompliance. If all Recipient's rights +under this Agreement terminate, Recipient agrees to cease use and +distribution of the Program as soon as reasonably practicable. However, +Recipient's obligations under this Agreement and any licenses granted by +Recipient relating to the Program shall continue and survive.</p> + +<p>Everyone is permitted to copy and distribute copies of this +Agreement, but in order to avoid inconsistency the Agreement is +copyrighted and may only be modified in the following manner. The +Agreement Steward reserves the right to publish new versions (including +revisions) of this Agreement from time to time. No one other than the +Agreement Steward has the right to modify this Agreement. The Eclipse +Foundation is the initial Agreement Steward. The Eclipse Foundation may +assign the responsibility to serve as the Agreement Steward to a +suitable separate entity. Each new version of the Agreement will be +given a distinguishing version number. The Program (including +Contributions) may always be distributed subject to the version of the +Agreement under which it was received. In addition, after a new version +of the Agreement is published, Contributor may elect to distribute the +Program (including its Contributions) under the new version. Except as +expressly stated in Sections 2(a) and 2(b) above, Recipient receives no +rights or licenses to the intellectual property of any Contributor under +this Agreement, whether expressly, by implication, estoppel or +otherwise. All rights in the Program not expressly granted under this +Agreement are reserved.</p> + +<p>This Agreement is governed by the laws of the State of New York and +the intellectual property laws of the United States of America. No party +to this Agreement will bring a legal action under this Agreement more +than one year after the cause of action arose. Each party waives its +rights to a jury trial in any resulting litigation.</p> + + + +</body></html> \ No newline at end of file
diff --git a/org.eclipse.osbp.utils.functionnormalizer/i18n/I18N.properties b/org.eclipse.osbp.utils.functionnormalizer/i18n/I18N.properties new file mode 100644 index 0000000..85b97b8 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/i18n/I18N.properties
@@ -0,0 +1,28 @@ +#default +activation_time=activation_time +actual_owner=actual_owner +created_by=created_by +created_on=created_on +description=description +expiration_time=expiration_time +function_normalizer=function_normalizer +function_type=function_type +function_typing=function_typing +name=name +normalizer=normalizer +org.eclipse.osbp.utils.functionnormalizer.entities.function_normalizer=function_normalizer +org.eclipse.osbp.utils.functionnormalizer.entities.function_type=function_type +org.eclipse.osbp.utils.functionnormalizer.entities.function_typing=function_typing +org.eclipse.osbp.utils.functionnormalizer.entities.name=name +org.eclipse.osbp.utils.functionnormalizer.entities.normalizer=normalizer +org.eclipse.osbp.utils.functionnormalizer.entities.return_type=return_type +org.eclipse.osbp.utils.functionnormalizer.entities.types=types +priority=priority +process_id=process_id +process_instance_id=process_instance_id +process_session_id=process_session_id +return_type=return_type +status=status +subject=subject +task_id=task_id +types=types
diff --git a/org.eclipse.osbp.utils.functionnormalizer/i18n/I18N_de.properties b/org.eclipse.osbp.utils.functionnormalizer/i18n/I18N_de.properties new file mode 100644 index 0000000..af6fdef --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/i18n/I18N_de.properties
@@ -0,0 +1 @@ +#de
diff --git a/org.eclipse.osbp.utils.functionnormalizer/i18n/I18N_de_AT.properties b/org.eclipse.osbp.utils.functionnormalizer/i18n/I18N_de_AT.properties new file mode 100644 index 0000000..6c73e1d --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/i18n/I18N_de_AT.properties
@@ -0,0 +1 @@ +#de_AT
diff --git a/org.eclipse.osbp.utils.functionnormalizer/i18n/I18N_en.properties b/org.eclipse.osbp.utils.functionnormalizer/i18n/I18N_en.properties new file mode 100644 index 0000000..1a61348 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/i18n/I18N_en.properties
@@ -0,0 +1,38 @@ +#en +activation_time=Activation time +actual_owner=Actual owner +created_by=Created by +created_on=Created on +description=Description +expiration_time=Expiration time +function_normalizer=Function normalizer +function_type=Function type +function_typing=Function typing +name=Name +normalizer=Normalizer +org.eclipse.osbp.utils.functionnormalizer.entities.function_normalizer=function normalizer +org.eclipse.osbp.utils.functionnormalizer.entities.function_type=function type +org.eclipse.osbp.utils.functionnormalizer.entities.function_typing=function typing +org.eclipse.osbp.utils.functionnormalizer.entities.name=name +org.eclipse.osbp.utils.functionnormalizer.entities.normalizer=normalizer +org.eclipse.osbp.utils.functionnormalizer.entities.return_type=return type +org.eclipse.osbp.utils.functionnormalizer.entities.types=types +org.eclipse.osbp.utils.functionnormalizer.function_normalizer=function normalizer +org.eclipse.osbp.utils.functionnormalizer.function_type=function type +org.eclipse.osbp.utils.functionnormalizer.function_typing=function typing +org.eclipse.osbp.utils.functionnormalizer.id=identifier +org.eclipse.osbp.utils.functionnormalizer.name=name +org.eclipse.osbp.utils.functionnormalizer.normalizer=normalizer +org.eclipse.osbp.utils.functionnormalizer.resolution=resolution +org.eclipse.osbp.utils.functionnormalizer.return_type=return type +org.eclipse.osbp.utils.functionnormalizer.type=type +org.eclipse.osbp.utils.functionnormalizer.types=types +priority=Priority +process_id=Process identifier +process_instance_id=Process instance identifier +process_session_id=Process session identifier +return_type=Return type +status=Status +subject=Subject +task_id=Task identifier +types=Types
diff --git a/org.eclipse.osbp.utils.functionnormalizer/i18n/I18N_en_US.properties b/org.eclipse.osbp.utils.functionnormalizer/i18n/I18N_en_US.properties new file mode 100644 index 0000000..d89e21c --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/i18n/I18N_en_US.properties
@@ -0,0 +1 @@ +#en_US
diff --git a/org.eclipse.osbp.utils.functionnormalizer/i18n/I18N_fr.properties b/org.eclipse.osbp.utils.functionnormalizer/i18n/I18N_fr.properties new file mode 100644 index 0000000..a84da83 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/i18n/I18N_fr.properties
@@ -0,0 +1 @@ +#fr
diff --git a/org.eclipse.osbp.utils.functionnormalizer/license.html b/org.eclipse.osbp.utils.functionnormalizer/license.html new file mode 100644 index 0000000..6e579a5 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/license.html
@@ -0,0 +1,164 @@ +<!--?xml version="1.0" encoding="ISO-8859-1" ?--> +<!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>Eclipse Foundation Software User Agreement</title> +</head> + +<body lang="EN-US"> +<h2>Eclipse Foundation Software User Agreement</h2> +<p>February 1, 2011</p> + +<h3>Usage Of Content</h3> + +<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS + (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND + CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE + OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR + NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND + CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p> + +<h3>Applicable Licenses</h3> + +<p>Unless otherwise indicated, all Content made available by the Eclipse + Foundation is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 + ("EPL"). A copy of the EPL is provided with this Content and is also + available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. + For purposes of the EPL, "Program" will mean the Content.</p> + +<p>Content includes, but is not limited to, source code, object code, +documentation and other files maintained in the Eclipse Foundation +source code + repository ("Repository") in software modules ("Modules") and made +available as downloadable archives ("Downloads").</p> + +<ul> + <li>Content may be structured and packaged into modules to +facilitate delivering, extending, and upgrading the Content. Typical +modules may include plug-ins ("Plug-ins"), plug-in fragments +("Fragments"), and features ("Features").</li> + <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li> + <li>A Feature is a bundle of one or more Plug-ins and/or +Fragments and associated material. Each Feature may be packaged as a +sub-directory in a directory named "features". Within a Feature, files +named "feature.xml" may contain a list of the names and version numbers +of the Plug-ins + and/or Fragments associated with that Feature.</li> + <li>Features may also include other Features ("Included +Features"). Within a Feature, files named "feature.xml" may contain a +list of the names and version numbers of Included Features.</li> +</ul> + +<p>The terms and conditions governing Plug-ins and Fragments should be +contained in files named "about.html" ("Abouts"). The terms and +conditions governing Features and +Included Features should be contained in files named "license.html" +("Feature Licenses"). Abouts and Feature Licenses may be located in any + directory of a Download or Module +including, but not limited to the following locations:</p> + +<ul> + <li>The top-level (root) directory</li> + <li>Plug-in and Fragment directories</li> + <li>Inside Plug-ins and Fragments packaged as JARs</li> + <li>Sub-directories of the directory named "src" of certain Plug-ins</li> + <li>Feature directories</li> +</ul> + +<p>Note: if a Feature made available by the Eclipse Foundation is +installed using the Provisioning Technology (as defined below), you must + agree to a license ("Feature Update License") during the +installation process. If the Feature contains Included Features, the +Feature Update License should either provide you with the terms and +conditions governing the Included Features or +inform you where you can locate them. Feature Update Licenses may be +found in the "license" property of files named "feature.properties" +found within a Feature. +Such Abouts, Feature Licenses, and Feature Update Licenses contain the +terms and conditions (or references to such terms and conditions) that +govern your use of the associated Content in +that directory.</p> + +<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER +TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. + SOME OF THESE +OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p> + +<ul> + <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li> + <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li> + <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li> + <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li> + <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li> + <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li> +</ul> + +<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND +CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, +or Feature Update License is provided, please +contact the Eclipse Foundation to determine what terms and conditions +govern that particular Content.</p> + + +<h3>Use of Provisioning Technology</h3> + +<p>The Eclipse Foundation makes available provisioning software, +examples of which include, but are not limited to, p2 and the Eclipse + Update Manager ("Provisioning Technology") for the purpose of +allowing users to install software, documentation, information and/or + other materials (collectively "Installable Software"). This +capability is provided with the intent of allowing such users to + install, extend and update Eclipse-based products. Information about +packaging Installable Software is available at <a href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a> + ("Specification").</p> + +<p>You may use Provisioning Technology to allow other parties to install + Installable Software. You shall be responsible for enabling the + applicable license agreements relating to the Installable Software to + be presented to, and accepted by, the users of the Provisioning +Technology + in accordance with the Specification. By using Provisioning +Technology in such a manner and making it available in accordance with +the + Specification, you further acknowledge your agreement to, and the +acquisition of all necessary rights to permit the following:</p> + +<ol> + <li>A series of actions may occur ("Provisioning Process") in +which a user may execute the Provisioning Technology + on a machine ("Target Machine") with the intent of installing, +extending or updating the functionality of an Eclipse-based + product.</li> + <li>During the Provisioning Process, the Provisioning Technology +may cause third party Installable Software or a portion thereof to be + accessed and copied to the Target Machine.</li> + <li>Pursuant to the Specification, you will provide to the user +the terms and conditions that govern the use of the Installable + Software ("Installable Software Agreement") and such Installable +Software Agreement shall be accessed from the Target + Machine in accordance with the Specification. Such Installable +Software Agreement must inform the user of the terms and conditions that + govern + the Installable Software and must solicit acceptance by the end +user in the manner prescribed in such Installable Software Agreement. +Upon such + indication of agreement by the user, the provisioning Technology +will complete installation of the Installable Software.</li> +</ol> + +<h3>Cryptography</h3> + +<p>Content may contain encryption software. The country in which you are + currently may have restrictions on the import, possession, and use, +and/or re-export to + another country, of encryption software. BEFORE using any encryption +software, please check the country's laws, regulations and policies +concerning the import, + possession, or use, and re-export of encryption software, to see if +this is permitted.</p> + +<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p> + + +</body></html> \ No newline at end of file
diff --git a/org.eclipse.osbp.utils.functionnormalizer/pom.xml b/org.eclipse.osbp.utils.functionnormalizer/pom.xml new file mode 100644 index 0000000..0121c58 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/pom.xml
@@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--#======================================================================= --> +<!--# Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) --> +<!--# All rights reserved. This program and the accompanying materials --> +<!--# are made available under the terms of the Eclipse Public License v1.0 --> +<!--# which accompanies this distribution, and is available at --> +<!--# http://www.eclipse.org/legal/epl-v10.html --> +<!--# --> +<!--# Contributors: --> +<!--# Christophe Loetz (Loetz GmbH&Co.KG) - initial API and implementation --> +<!--#======================================================================= --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.eclipse.osbp.utils.functionnormalizer</groupId> + <artifactId>org.eclipse.osbp.utils.functionnormalizer.aggregator</artifactId> + <version>0.9.0-SNAPSHOT</version> + <relativePath>..</relativePath> + </parent> + <artifactId>org.eclipse.osbp.utils.functionnormalizer</artifactId> + <packaging>eclipse-plugin</packaging> +</project>
diff --git a/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/dtos/FunctionNormalizerDto.java b/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/dtos/FunctionNormalizerDto.java new file mode 100644 index 0000000..4536a59 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/dtos/FunctionNormalizerDto.java
@@ -0,0 +1,224 @@ +/** + * Copyright (c) 2015 - 2016 - Loetz GmbH&Co.KG, 69115 Heidelberg, Germany + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Loetz GmbH&Co.KG - Initial implementation + */ +package org.eclipse.osbp.utils.functionnormalizer.dtos; + +import java.beans.PropertyChangeListener; +import java.beans.PropertyChangeSupport; +import java.io.Serializable; +import org.eclipse.osbp.dsl.common.datatypes.IDto; +import org.eclipse.osbp.dsl.dto.lib.MappingContext; +import org.eclipse.osbp.runtime.common.annotations.Dispose; + +@SuppressWarnings("all") +public class FunctionNormalizerDto implements IDto, Serializable, PropertyChangeListener { + private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this); + + @Dispose + private boolean disposed; + + private String name; + + private String returnType; + + /** + * @return true, if the object is disposed. + * Disposed means, that it is prepared for garbage collection and may not be used anymore. + * Accessing objects that are already disposed will cause runtime exceptions. + * + */ + public boolean isDisposed() { + return this.disposed; + } + + /** + * @see PropertyChangeSupport#addPropertyChangeListener(PropertyChangeListener) + */ + public void addPropertyChangeListener(final PropertyChangeListener listener) { + propertyChangeSupport.addPropertyChangeListener(listener); + } + + /** + * @see PropertyChangeSupport#addPropertyChangeListener(String, PropertyChangeListener) + */ + public void addPropertyChangeListener(final String propertyName, final PropertyChangeListener listener) { + propertyChangeSupport.addPropertyChangeListener(propertyName, listener); + } + + /** + * @see PropertyChangeSupport#removePropertyChangeListener(PropertyChangeListener) + */ + public void removePropertyChangeListener(final PropertyChangeListener listener) { + propertyChangeSupport.removePropertyChangeListener(listener); + } + + /** + * @see PropertyChangeSupport#removePropertyChangeListener(String, PropertyChangeListener) + */ + public void removePropertyChangeListener(final String propertyName, final PropertyChangeListener listener) { + propertyChangeSupport.removePropertyChangeListener(propertyName, listener); + } + + /** + * @see PropertyChangeSupport#firePropertyChange(String, Object, Object) + */ + public void firePropertyChange(final String propertyName, final Object oldValue, final Object newValue) { + propertyChangeSupport.firePropertyChange(propertyName, oldValue, newValue); + } + + /** + * Checks whether the object is disposed. + * @throws RuntimeException if the object is disposed. + */ + private void checkDisposed() { + if (isDisposed()) { + throw new RuntimeException("Object already disposed: " + this); + } + } + + /** + * Calling dispose will destroy that instance. The internal state will be + * set to 'disposed' and methods of that object must not be used anymore. + * Each call will result in runtime exceptions.<br/> + * If this object keeps composition containments, these will be disposed too. + * So the whole composition containment tree will be disposed on calling this method. + */ + @Dispose + public void dispose() { + if (isDisposed()) { + return; + } + firePropertyChange("disposed", this.disposed, this.disposed = true); + } + + /** + * Installs lazy collection resolving for entity {@link FunctionNormalizer} to the dto {@link FunctionNormalizerDto}. + * + */ + protected void installLazyCollections() { + + } + + /** + * Returns the name property or <code>null</code> if not present. + */ + public String getName() { + return this.name; + } + + /** + * Sets the <code>name</code> property to this instance. + * + * @param name - the property + * @throws RuntimeException if instance is <code>disposed</code> + * + */ + public void setName(final String name) { + firePropertyChange("name", this.name, this.name = name ); + } + + /** + * Returns the returnType property or <code>null</code> if not present. + */ + public String getReturnType() { + return this.returnType; + } + + /** + * Sets the <code>returnType</code> property to this instance. + * + * @param returnType - the property + * @throws RuntimeException if instance is <code>disposed</code> + * + */ + public void setReturnType(final String returnType) { + firePropertyChange("returnType", this.returnType, this.returnType = returnType ); + } + + public FunctionNormalizerDto createDto() { + return new FunctionNormalizerDto(); + } + + public FunctionNormalizerDto copy(final MappingContext context) { + checkDisposed(); + + if (context == null) { + throw new IllegalArgumentException("Context must not be null!"); + } + + if(context.isMaxLevel()){ + return null; + } + + // if context contains a copied instance of this object + // then return it + FunctionNormalizerDto newDto = context.get(this); + if(newDto != null){ + return newDto; + } + + try{ + context.increaseLevel(); + + newDto = createDto(); + context.register(this, newDto); + + // first copy the containments and attributes + copyContainments(this, newDto, context); + + // then copy cross references to ensure proper + // opposite references are copied too. + copyCrossReferences(this, newDto, context); + } finally { + context.decreaseLevel(); + } + + return newDto; + } + + public void copyContainments(final FunctionNormalizerDto dto, final FunctionNormalizerDto newDto, final MappingContext context) { + checkDisposed(); + + if (context == null) { + throw new IllegalArgumentException("Context must not be null!"); + } + + + // copy attributes and beans (beans if derived from entity model) + // copy name + newDto.setName(getName()); + // copy returnType + newDto.setReturnType(getReturnType()); + + // copy containment references (cascading is true) + } + + public void copyCrossReferences(final FunctionNormalizerDto dto, final FunctionNormalizerDto newDto, final org.eclipse.osbp.dsl.dto.lib.MappingContext context) { + checkDisposed(); + + if (context == null) { + throw new IllegalArgumentException("Context must not be null!"); + } + + + // copy cross references (cascading is false) + } + + public void propertyChange(final java.beans.PropertyChangeEvent event) { + Object source = event.getSource(); + + // forward the event from embeddable beans to all listeners. So the parent of the embeddable + // bean will become notified and its dirty state can be handled properly + { + // no super class available to forward event + } + } +}
diff --git a/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/dtos/FunctionTypeDto.java b/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/dtos/FunctionTypeDto.java new file mode 100644 index 0000000..760c6f5 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/dtos/FunctionTypeDto.java
@@ -0,0 +1,202 @@ +/** + * Copyright (c) 2015 - 2016 - Loetz GmbH&Co.KG, 69115 Heidelberg, Germany + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Loetz GmbH&Co.KG - Initial implementation + */ +package org.eclipse.osbp.utils.functionnormalizer.dtos; + +import java.beans.PropertyChangeListener; +import java.beans.PropertyChangeSupport; +import java.io.Serializable; +import org.eclipse.osbp.dsl.common.datatypes.IDto; +import org.eclipse.osbp.dsl.dto.lib.MappingContext; +import org.eclipse.osbp.runtime.common.annotations.Dispose; + +@SuppressWarnings("all") +public class FunctionTypeDto implements IDto, Serializable, PropertyChangeListener { + private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this); + + @Dispose + private boolean disposed; + + private String name; + + /** + * @return true, if the object is disposed. + * Disposed means, that it is prepared for garbage collection and may not be used anymore. + * Accessing objects that are already disposed will cause runtime exceptions. + * + */ + public boolean isDisposed() { + return this.disposed; + } + + /** + * @see PropertyChangeSupport#addPropertyChangeListener(PropertyChangeListener) + */ + public void addPropertyChangeListener(final PropertyChangeListener listener) { + propertyChangeSupport.addPropertyChangeListener(listener); + } + + /** + * @see PropertyChangeSupport#addPropertyChangeListener(String, PropertyChangeListener) + */ + public void addPropertyChangeListener(final String propertyName, final PropertyChangeListener listener) { + propertyChangeSupport.addPropertyChangeListener(propertyName, listener); + } + + /** + * @see PropertyChangeSupport#removePropertyChangeListener(PropertyChangeListener) + */ + public void removePropertyChangeListener(final PropertyChangeListener listener) { + propertyChangeSupport.removePropertyChangeListener(listener); + } + + /** + * @see PropertyChangeSupport#removePropertyChangeListener(String, PropertyChangeListener) + */ + public void removePropertyChangeListener(final String propertyName, final PropertyChangeListener listener) { + propertyChangeSupport.removePropertyChangeListener(propertyName, listener); + } + + /** + * @see PropertyChangeSupport#firePropertyChange(String, Object, Object) + */ + public void firePropertyChange(final String propertyName, final Object oldValue, final Object newValue) { + propertyChangeSupport.firePropertyChange(propertyName, oldValue, newValue); + } + + /** + * Checks whether the object is disposed. + * @throws RuntimeException if the object is disposed. + */ + private void checkDisposed() { + if (isDisposed()) { + throw new RuntimeException("Object already disposed: " + this); + } + } + + /** + * Calling dispose will destroy that instance. The internal state will be + * set to 'disposed' and methods of that object must not be used anymore. + * Each call will result in runtime exceptions.<br/> + * If this object keeps composition containments, these will be disposed too. + * So the whole composition containment tree will be disposed on calling this method. + */ + @Dispose + public void dispose() { + if (isDisposed()) { + return; + } + firePropertyChange("disposed", this.disposed, this.disposed = true); + } + + /** + * Installs lazy collection resolving for entity {@link FunctionType} to the dto {@link FunctionTypeDto}. + * + */ + protected void installLazyCollections() { + + } + + /** + * Returns the name property or <code>null</code> if not present. + */ + public String getName() { + return this.name; + } + + /** + * Sets the <code>name</code> property to this instance. + * + * @param name - the property + * @throws RuntimeException if instance is <code>disposed</code> + * + */ + public void setName(final String name) { + firePropertyChange("name", this.name, this.name = name ); + } + + public FunctionTypeDto createDto() { + return new FunctionTypeDto(); + } + + public FunctionTypeDto copy(final MappingContext context) { + checkDisposed(); + + if (context == null) { + throw new IllegalArgumentException("Context must not be null!"); + } + + if(context.isMaxLevel()){ + return null; + } + + // if context contains a copied instance of this object + // then return it + FunctionTypeDto newDto = context.get(this); + if(newDto != null){ + return newDto; + } + + try{ + context.increaseLevel(); + + newDto = createDto(); + context.register(this, newDto); + + // first copy the containments and attributes + copyContainments(this, newDto, context); + + // then copy cross references to ensure proper + // opposite references are copied too. + copyCrossReferences(this, newDto, context); + } finally { + context.decreaseLevel(); + } + + return newDto; + } + + public void copyContainments(final FunctionTypeDto dto, final FunctionTypeDto newDto, final MappingContext context) { + checkDisposed(); + + if (context == null) { + throw new IllegalArgumentException("Context must not be null!"); + } + + + // copy attributes and beans (beans if derived from entity model) + // copy name + newDto.setName(getName()); + + // copy containment references (cascading is true) + } + + public void copyCrossReferences(final FunctionTypeDto dto, final FunctionTypeDto newDto, final org.eclipse.osbp.dsl.dto.lib.MappingContext context) { + checkDisposed(); + + if (context == null) { + throw new IllegalArgumentException("Context must not be null!"); + } + + + // copy cross references (cascading is false) + } + + public void propertyChange(final java.beans.PropertyChangeEvent event) { + Object source = event.getSource(); + + // forward the event from embeddable beans to all listeners. So the parent of the embeddable + // bean will become notified and its dirty state can be handled properly + { + // no super class available to forward event + } + } +}
diff --git a/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/dtos/FunctionTypingDto.java b/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/dtos/FunctionTypingDto.java new file mode 100644 index 0000000..f960546 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/dtos/FunctionTypingDto.java
@@ -0,0 +1,367 @@ +/** + * Copyright (c) 2015 - 2016 - Loetz GmbH&Co.KG, 69115 Heidelberg, Germany + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Loetz GmbH&Co.KG - Initial implementation + */ +package org.eclipse.osbp.utils.functionnormalizer.dtos; + +import java.beans.PropertyChangeListener; +import java.beans.PropertyChangeSupport; +import java.io.Serializable; +import java.util.Collections; +import java.util.List; +import org.eclipse.osbp.dsl.common.datatypes.IDto; +import org.eclipse.osbp.dsl.dto.lib.MappingContext; +import org.eclipse.osbp.runtime.common.annotations.Dispose; +import org.eclipse.osbp.runtime.common.annotations.DomainReference; +import org.eclipse.osbp.utils.functionnormalizer.dtos.FunctionNormalizerDto; +import org.eclipse.osbp.utils.functionnormalizer.dtos.FunctionTypeDto; + +@SuppressWarnings("all") +public class FunctionTypingDto implements IDto, Serializable, PropertyChangeListener { + private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this); + + @Dispose + private boolean disposed; + + @DomainReference + private List<FunctionTypeDto> types; + + @DomainReference + private List<FunctionNormalizerDto> normalizer; + + /** + * @return true, if the object is disposed. + * Disposed means, that it is prepared for garbage collection and may not be used anymore. + * Accessing objects that are already disposed will cause runtime exceptions. + * + */ + public boolean isDisposed() { + return this.disposed; + } + + /** + * @see PropertyChangeSupport#addPropertyChangeListener(PropertyChangeListener) + */ + public void addPropertyChangeListener(final PropertyChangeListener listener) { + propertyChangeSupport.addPropertyChangeListener(listener); + } + + /** + * @see PropertyChangeSupport#addPropertyChangeListener(String, PropertyChangeListener) + */ + public void addPropertyChangeListener(final String propertyName, final PropertyChangeListener listener) { + propertyChangeSupport.addPropertyChangeListener(propertyName, listener); + } + + /** + * @see PropertyChangeSupport#removePropertyChangeListener(PropertyChangeListener) + */ + public void removePropertyChangeListener(final PropertyChangeListener listener) { + propertyChangeSupport.removePropertyChangeListener(listener); + } + + /** + * @see PropertyChangeSupport#removePropertyChangeListener(String, PropertyChangeListener) + */ + public void removePropertyChangeListener(final String propertyName, final PropertyChangeListener listener) { + propertyChangeSupport.removePropertyChangeListener(propertyName, listener); + } + + /** + * @see PropertyChangeSupport#firePropertyChange(String, Object, Object) + */ + public void firePropertyChange(final String propertyName, final Object oldValue, final Object newValue) { + propertyChangeSupport.firePropertyChange(propertyName, oldValue, newValue); + } + + /** + * Checks whether the object is disposed. + * @throws RuntimeException if the object is disposed. + */ + private void checkDisposed() { + if (isDisposed()) { + throw new RuntimeException("Object already disposed: " + this); + } + } + + /** + * Calling dispose will destroy that instance. The internal state will be + * set to 'disposed' and methods of that object must not be used anymore. + * Each call will result in runtime exceptions.<br/> + * If this object keeps composition containments, these will be disposed too. + * So the whole composition containment tree will be disposed on calling this method. + */ + @Dispose + public void dispose() { + if (isDisposed()) { + return; + } + firePropertyChange("disposed", this.disposed, this.disposed = true); + } + + /** + * Installs lazy collection resolving for entity {@link FunctionTyping} to the dto {@link FunctionTypingDto}. + * + */ + protected void installLazyCollections() { + + } + + /** + * Returns an unmodifiable list of types. + */ + public List<FunctionTypeDto> getTypes() { + return Collections.unmodifiableList(internalGetTypes()); + } + + /** + * Returns the list of <code>FunctionTypeDto</code>s thereby lazy initializing it. For internal use only! + * + * @return list - the resulting list + * + */ + private List<FunctionTypeDto> internalGetTypes() { + if (this.types == null) { + this.types = new java.util.ArrayList<FunctionTypeDto>(); + } + return this.types; + } + + /** + * Adds the given functionTypeDto to this object. <p> + * + * @param functionTypeDto - the property + * @throws RuntimeException if instance is <code>disposed</code> + * + */ + public void addToTypes(final FunctionTypeDto functionTypeDto) { + checkDisposed(); + + if(!internalGetTypes().contains(functionTypeDto)){ + internalAddToTypes(functionTypeDto); + } + } + + public void removeFromTypes(final FunctionTypeDto functionTypeDto) { + checkDisposed(); + + internalRemoveFromTypes(functionTypeDto); + } + + /** + * For internal use only! + */ + public void internalAddToTypes(final FunctionTypeDto functionTypeDto) { + // add this as property change listener for embeddable beans + functionTypeDto.addPropertyChangeListener(this); + internalGetTypes().add(functionTypeDto); + } + + /** + * For internal use only! + */ + public void internalRemoveFromTypes(final FunctionTypeDto functionTypeDto) { + // remove this as property change listener from the embeddable bean + functionTypeDto.removePropertyChangeListener(this); + internalGetTypes().remove(functionTypeDto); + } + + /** + * Sets the <code>types</code> property to this instance. + * + * @param types - the property + * @throws RuntimeException if instance is <code>disposed</code> + * + */ + public void setTypes(final List<FunctionTypeDto> types) { + checkDisposed(); + for (FunctionTypeDto dto : internalGetTypes().toArray(new FunctionTypeDto[this.types.size()])) { + removeFromTypes(dto); + } + + if(types == null) { + return; + } + + for (FunctionTypeDto dto : types) { + addToTypes(dto); + } + } + + /** + * Returns an unmodifiable list of normalizer. + */ + public List<FunctionNormalizerDto> getNormalizer() { + return Collections.unmodifiableList(internalGetNormalizer()); + } + + /** + * Returns the list of <code>FunctionNormalizerDto</code>s thereby lazy initializing it. For internal use only! + * + * @return list - the resulting list + * + */ + private List<FunctionNormalizerDto> internalGetNormalizer() { + if (this.normalizer == null) { + this.normalizer = new java.util.ArrayList<FunctionNormalizerDto>(); + } + return this.normalizer; + } + + /** + * Adds the given functionNormalizerDto to this object. <p> + * + * @param functionNormalizerDto - the property + * @throws RuntimeException if instance is <code>disposed</code> + * + */ + public void addToNormalizer(final FunctionNormalizerDto functionNormalizerDto) { + checkDisposed(); + + if(!internalGetNormalizer().contains(functionNormalizerDto)){ + internalAddToNormalizer(functionNormalizerDto); + } + } + + public void removeFromNormalizer(final FunctionNormalizerDto functionNormalizerDto) { + checkDisposed(); + + internalRemoveFromNormalizer(functionNormalizerDto); + } + + /** + * For internal use only! + */ + public void internalAddToNormalizer(final FunctionNormalizerDto functionNormalizerDto) { + // add this as property change listener for embeddable beans + functionNormalizerDto.addPropertyChangeListener(this); + internalGetNormalizer().add(functionNormalizerDto); + } + + /** + * For internal use only! + */ + public void internalRemoveFromNormalizer(final FunctionNormalizerDto functionNormalizerDto) { + // remove this as property change listener from the embeddable bean + functionNormalizerDto.removePropertyChangeListener(this); + internalGetNormalizer().remove(functionNormalizerDto); + } + + /** + * Sets the <code>normalizer</code> property to this instance. + * + * @param normalizer - the property + * @throws RuntimeException if instance is <code>disposed</code> + * + */ + public void setNormalizer(final List<FunctionNormalizerDto> normalizer) { + checkDisposed(); + for (FunctionNormalizerDto dto : internalGetNormalizer().toArray(new FunctionNormalizerDto[this.normalizer.size()])) { + removeFromNormalizer(dto); + } + + if(normalizer == null) { + return; + } + + for (FunctionNormalizerDto dto : normalizer) { + addToNormalizer(dto); + } + } + + public FunctionTypingDto createDto() { + return new FunctionTypingDto(); + } + + public FunctionTypingDto copy(final MappingContext context) { + checkDisposed(); + + if (context == null) { + throw new IllegalArgumentException("Context must not be null!"); + } + + if(context.isMaxLevel()){ + return null; + } + + // if context contains a copied instance of this object + // then return it + FunctionTypingDto newDto = context.get(this); + if(newDto != null){ + return newDto; + } + + try{ + context.increaseLevel(); + + newDto = createDto(); + context.register(this, newDto); + + // first copy the containments and attributes + copyContainments(this, newDto, context); + + // then copy cross references to ensure proper + // opposite references are copied too. + copyCrossReferences(this, newDto, context); + } finally { + context.decreaseLevel(); + } + + return newDto; + } + + public void copyContainments(final FunctionTypingDto dto, final FunctionTypingDto newDto, final MappingContext context) { + checkDisposed(); + + if (context == null) { + throw new IllegalArgumentException("Context must not be null!"); + } + + + // copy attributes and beans (beans if derived from entity model) + + // copy containment references (cascading is true) + } + + public void copyCrossReferences(final FunctionTypingDto dto, final FunctionTypingDto newDto, final org.eclipse.osbp.dsl.dto.lib.MappingContext context) { + checkDisposed(); + + if (context == null) { + throw new IllegalArgumentException("Context must not be null!"); + } + + + // copy cross references (cascading is false) + // copy list of types dtos + for(org.eclipse.osbp.utils.functionnormalizer.dtos.FunctionTypeDto _dto : getTypes()) { + newDto.addToTypes(_dto.copy(context)); + } + // copy list of normalizer dtos + for(org.eclipse.osbp.utils.functionnormalizer.dtos.FunctionNormalizerDto _dto : getNormalizer()) { + newDto.addToNormalizer(_dto.copy(context)); + } + } + + public void propertyChange(final java.beans.PropertyChangeEvent event) { + Object source = event.getSource(); + + // forward the event from embeddable beans to all listeners. So the parent of the embeddable + // bean will become notified and its dirty state can be handled properly + if(source == types){ + firePropertyChange("types" + "_" + event.getPropertyName(), event.getOldValue(), event.getNewValue()); + } else + if(source == normalizer){ + firePropertyChange("normalizer" + "_" + event.getPropertyName(), event.getOldValue(), event.getNewValue()); + } else + { + // no super class available to forward event + } + } +}
diff --git a/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/dtos/FunctionnormalizerDtosTranslator.java b/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/dtos/FunctionnormalizerDtosTranslator.java new file mode 100644 index 0000000..44cbeb3 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/dtos/FunctionnormalizerDtosTranslator.java
@@ -0,0 +1,80 @@ +package org.eclipse.osbp.utils.functionnormalizer.dtos; + +import java.beans.PropertyChangeListener; +import java.beans.PropertyChangeSupport; +import java.util.HashMap; +import java.util.Locale; +import org.eclipse.osbp.runtime.common.i18n.ITranslator; +import org.eclipse.osbp.utils.functionnormalizer.entities.FunctionnormalizerEntitiesTranslator; +import org.slf4j.Logger; + +@SuppressWarnings("all") +public class FunctionnormalizerDtosTranslator implements ITranslator { + private static Logger log = org.slf4j.LoggerFactory.getLogger("translations by translator"); + + private static FunctionnormalizerDtosTranslator instance = null; + + private static Locale lastLocale = null; + + private static FunctionnormalizerEntitiesTranslator functionnormalizerEntitiesTranslator = null; + + private PropertyChangeSupport pcs = new java.beans.PropertyChangeSupport(this); + + private HashMap<String, String> translations = new HashMap<String,String>() {{ + }}; + + public static FunctionnormalizerDtosTranslator getInstance(final Locale locale) { + if(instance == null) { + instance = new org.eclipse.osbp.utils.functionnormalizer.dtos.FunctionnormalizerDtosTranslator(); + if (lastLocale == null) { + instance.changeLocale(locale); + } + } + return instance; + } + + public void addPropertyChangeListener(final PropertyChangeListener listener) { + this.pcs.addPropertyChangeListener(listener); + } + + public void removePropertyChangeListener(final PropertyChangeListener listener) { + this.pcs.removePropertyChangeListener(listener); + } + + public void mergeTranslations() { + functionnormalizerEntitiesTranslator.mergeTranslations(); + translations.putAll(functionnormalizerEntitiesTranslator.getTranslations()); + if (log.isDebugEnabled()) log.debug("merge FunctionnormalizerEntitiesTranslator in org.eclipse.osbp.utils.functionnormalizer.dtos"); + + } + + public HashMap<String, String> getTranslations() { + return translations; + } + + public void changeLocale(final Locale locale) { + // avoid unnecessary settings + if (locale == null) { + if (log.isDebugEnabled()) log.debug("locale for org.eclipse.osbp.utils.functionnormalizer.dtos is null."); + return; + } + if (locale.equals(lastLocale)) { + if (log.isDebugEnabled()) log.debug("locale for org.eclipse.osbp.utils.functionnormalizer.dtos already set to "+locale.getDisplayLanguage()); + return; + } + if (log.isDebugEnabled()) log.debug("locale for org.eclipse.osbp.utils.functionnormalizer.dtos set to "+locale.getDisplayLanguage()); + lastLocale = locale; + // call the imported translators change locale method + if (functionnormalizerEntitiesTranslator == null) { + functionnormalizerEntitiesTranslator = functionnormalizerEntitiesTranslator.getInstance(locale); + } else { + functionnormalizerEntitiesTranslator.changeLocale(locale); + } + try { + java.util.ResourceBundle resource = java.util.ResourceBundle.getBundle("i18n.I18N", locale, getClass().getClassLoader()); + } catch (java.util.MissingResourceException mre) { + System.err.println(getClass().getCanonicalName()+" - "+mre.getLocalizedMessage()); + } + + } +}
diff --git a/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/dtos/mapper/FunctionNormalizerDtoMapper.java b/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/dtos/mapper/FunctionNormalizerDtoMapper.java new file mode 100644 index 0000000..53a95d0 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/dtos/mapper/FunctionNormalizerDtoMapper.java
@@ -0,0 +1,173 @@ +/** + * Copyright (c) 2015 - 2016 - Loetz GmbH&Co.KG, 69115 Heidelberg, Germany + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Loetz GmbH&Co.KG - Initial implementation + */ +package org.eclipse.osbp.utils.functionnormalizer.dtos.mapper; + +import org.eclipse.osbp.dsl.dto.lib.IMapper; +import org.eclipse.osbp.dsl.dto.lib.IMapperAccess; +import org.eclipse.osbp.dsl.dto.lib.MappingContext; +import org.eclipse.osbp.utils.functionnormalizer.dtos.FunctionNormalizerDto; +import org.eclipse.osbp.utils.functionnormalizer.entities.FunctionNormalizer; + +/** + * This class maps the dto {@link FunctionNormalizerDto} to and from the entity {@link FunctionNormalizer}. + * + */ +@SuppressWarnings("all") +public class FunctionNormalizerDtoMapper<DTO extends FunctionNormalizerDto, ENTITY extends FunctionNormalizer> implements IMapper<DTO, ENTITY> { + private IMapperAccess mapperAccess; + + /** + * Returns the mapper instance that may map between the given dto and entity. Or <code>null</code> if no mapper is available. + * + * @param dtoClass - the class of the dto that should be mapped + * @param entityClass - the class of the entity that should be mapped + * @return the mapper instance or <code>null</code> + */ + protected <D, E> IMapper<D, E> getToDtoMapper(final Class<D> dtoClass, final Class<E> entityClass) { + return mapperAccess.getToDtoMapper(dtoClass, entityClass); + } + + /** + * Returns the mapper instance that may map between the given dto and entity. Or <code>null</code> if no mapper is available. + * + * @param dtoClass - the class of the dto that should be mapped + * @param entityClass - the class of the entity that should be mapped + * @return the mapper instance or <code>null</code> + */ + protected <D, E> IMapper<D, E> getToEntityMapper(final Class<D> dtoClass, final Class<E> entityClass) { + return mapperAccess.getToEntityMapper(dtoClass, entityClass); + } + + /** + * Called by OSGi-DS. Binds the mapper access service. + * + * @param service - The mapper access service + * + */ + protected void bindMapperAccess(final IMapperAccess mapperAccess) { + this.mapperAccess = mapperAccess; + } + + /** + * Called by OSGi-DS. Binds the mapper access service. + * + * @param service - The mapper access service + * + */ + protected void unbindMapperAccess(final IMapperAccess mapperAccess) { + this.mapperAccess = null; + } + + /** + * Creates a new instance of the entity + */ + public FunctionNormalizer createEntity() { + return new FunctionNormalizer(); + } + + /** + * Creates a new instance of the dto + */ + public FunctionNormalizerDto createDto() { + return new FunctionNormalizerDto(); + } + + /** + * Maps the entity {@link FunctionNormalizer} to the dto {@link FunctionNormalizerDto}. + * + * @param dto - The target dto + * @param entity - The source entity + * @param context - The context to get information about depth,... + * + */ + public void mapToDTO(final FunctionNormalizerDto dto, final FunctionNormalizer entity, final MappingContext context) { + if(context == null){ + throw new IllegalArgumentException("Please pass a context!"); + } + dto.setName(toDto_name(entity, context)); + dto.setReturnType(toDto_returnType(entity, context)); + } + + /** + * Maps the dto {@link FunctionNormalizerDto} to the entity {@link FunctionNormalizer}. + * + * @param dto - The source dto + * @param entity - The target entity + * @param context - The context to get information about depth,... + * + */ + public void mapToEntity(final FunctionNormalizerDto dto, final FunctionNormalizer entity, final MappingContext context) { + if(context == null){ + throw new IllegalArgumentException("Please pass a context!"); + } + + + entity.setName(toEntity_name(dto, context)); + entity.setReturnType(toEntity_returnType(dto, context)); + } + + /** + * Maps the property name from the given entity to dto property. + * + * @param in - The source entity + * @param context - The context to get information about depth,... + * @return the mapped value + * + */ + protected String toDto_name(final FunctionNormalizer in, final MappingContext context) { + return in.getName(); + } + + /** + * Maps the property name from the given entity to dto property. + * + * @param in - The source entity + * @param context - The context to get information about depth,... + * @return the mapped value + * + */ + protected String toEntity_name(final FunctionNormalizerDto in, final MappingContext context) { + return in.getName(); + } + + /** + * Maps the property returnType from the given entity to dto property. + * + * @param in - The source entity + * @param context - The context to get information about depth,... + * @return the mapped value + * + */ + protected String toDto_returnType(final FunctionNormalizer in, final MappingContext context) { + return in.getReturnType(); + } + + /** + * Maps the property returnType from the given entity to dto property. + * + * @param in - The source entity + * @param context - The context to get information about depth,... + * @return the mapped value + * + */ + protected String toEntity_returnType(final FunctionNormalizerDto in, final MappingContext context) { + return in.getReturnType(); + } + + public String createDtoHash(final Object in) { + throw new UnsupportedOperationException("No id attribute available"); + } + + public String createEntityHash(final Object in) { + throw new UnsupportedOperationException("No id attribute available"); + } +}
diff --git a/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/dtos/mapper/FunctionTypeDtoMapper.java b/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/dtos/mapper/FunctionTypeDtoMapper.java new file mode 100644 index 0000000..37bff82 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/dtos/mapper/FunctionTypeDtoMapper.java
@@ -0,0 +1,147 @@ +/** + * Copyright (c) 2015 - 2016 - Loetz GmbH&Co.KG, 69115 Heidelberg, Germany + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Loetz GmbH&Co.KG - Initial implementation + */ +package org.eclipse.osbp.utils.functionnormalizer.dtos.mapper; + +import org.eclipse.osbp.dsl.dto.lib.IMapper; +import org.eclipse.osbp.dsl.dto.lib.IMapperAccess; +import org.eclipse.osbp.dsl.dto.lib.MappingContext; +import org.eclipse.osbp.utils.functionnormalizer.dtos.FunctionTypeDto; +import org.eclipse.osbp.utils.functionnormalizer.entities.FunctionType; + +/** + * This class maps the dto {@link FunctionTypeDto} to and from the entity {@link FunctionType}. + * + */ +@SuppressWarnings("all") +public class FunctionTypeDtoMapper<DTO extends FunctionTypeDto, ENTITY extends FunctionType> implements IMapper<DTO, ENTITY> { + private IMapperAccess mapperAccess; + + /** + * Returns the mapper instance that may map between the given dto and entity. Or <code>null</code> if no mapper is available. + * + * @param dtoClass - the class of the dto that should be mapped + * @param entityClass - the class of the entity that should be mapped + * @return the mapper instance or <code>null</code> + */ + protected <D, E> IMapper<D, E> getToDtoMapper(final Class<D> dtoClass, final Class<E> entityClass) { + return mapperAccess.getToDtoMapper(dtoClass, entityClass); + } + + /** + * Returns the mapper instance that may map between the given dto and entity. Or <code>null</code> if no mapper is available. + * + * @param dtoClass - the class of the dto that should be mapped + * @param entityClass - the class of the entity that should be mapped + * @return the mapper instance or <code>null</code> + */ + protected <D, E> IMapper<D, E> getToEntityMapper(final Class<D> dtoClass, final Class<E> entityClass) { + return mapperAccess.getToEntityMapper(dtoClass, entityClass); + } + + /** + * Called by OSGi-DS. Binds the mapper access service. + * + * @param service - The mapper access service + * + */ + protected void bindMapperAccess(final IMapperAccess mapperAccess) { + this.mapperAccess = mapperAccess; + } + + /** + * Called by OSGi-DS. Binds the mapper access service. + * + * @param service - The mapper access service + * + */ + protected void unbindMapperAccess(final IMapperAccess mapperAccess) { + this.mapperAccess = null; + } + + /** + * Creates a new instance of the entity + */ + public FunctionType createEntity() { + return new FunctionType(); + } + + /** + * Creates a new instance of the dto + */ + public FunctionTypeDto createDto() { + return new FunctionTypeDto(); + } + + /** + * Maps the entity {@link FunctionType} to the dto {@link FunctionTypeDto}. + * + * @param dto - The target dto + * @param entity - The source entity + * @param context - The context to get information about depth,... + * + */ + public void mapToDTO(final FunctionTypeDto dto, final FunctionType entity, final MappingContext context) { + if(context == null){ + throw new IllegalArgumentException("Please pass a context!"); + } + dto.setName(toDto_name(entity, context)); + } + + /** + * Maps the dto {@link FunctionTypeDto} to the entity {@link FunctionType}. + * + * @param dto - The source dto + * @param entity - The target entity + * @param context - The context to get information about depth,... + * + */ + public void mapToEntity(final FunctionTypeDto dto, final FunctionType entity, final MappingContext context) { + if(context == null){ + throw new IllegalArgumentException("Please pass a context!"); + } + + + entity.setName(toEntity_name(dto, context)); + } + + /** + * Maps the property name from the given entity to dto property. + * + * @param in - The source entity + * @param context - The context to get information about depth,... + * @return the mapped value + * + */ + protected String toDto_name(final FunctionType in, final MappingContext context) { + return in.getName(); + } + + /** + * Maps the property name from the given entity to dto property. + * + * @param in - The source entity + * @param context - The context to get information about depth,... + * @return the mapped value + * + */ + protected String toEntity_name(final FunctionTypeDto in, final MappingContext context) { + return in.getName(); + } + + public String createDtoHash(final Object in) { + throw new UnsupportedOperationException("No id attribute available"); + } + + public String createEntityHash(final Object in) { + throw new UnsupportedOperationException("No id attribute available"); + } +}
diff --git a/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/dtos/mapper/FunctionTypingDtoMapper.java b/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/dtos/mapper/FunctionTypingDtoMapper.java new file mode 100644 index 0000000..b3df7cc --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/dtos/mapper/FunctionTypingDtoMapper.java
@@ -0,0 +1,258 @@ +/** + * Copyright (c) 2015 - 2016 - Loetz GmbH&Co.KG, 69115 Heidelberg, Germany + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Loetz GmbH&Co.KG - Initial implementation + */ +package org.eclipse.osbp.utils.functionnormalizer.dtos.mapper; + +import java.util.List; +import org.eclipse.osbp.dsl.dto.lib.IMapper; +import org.eclipse.osbp.dsl.dto.lib.IMapperAccess; +import org.eclipse.osbp.dsl.dto.lib.MappingContext; +import org.eclipse.osbp.utils.functionnormalizer.dtos.FunctionNormalizerDto; +import org.eclipse.osbp.utils.functionnormalizer.dtos.FunctionTypeDto; +import org.eclipse.osbp.utils.functionnormalizer.dtos.FunctionTypingDto; +import org.eclipse.osbp.utils.functionnormalizer.entities.FunctionNormalizer; +import org.eclipse.osbp.utils.functionnormalizer.entities.FunctionType; +import org.eclipse.osbp.utils.functionnormalizer.entities.FunctionTyping; + +/** + * This class maps the dto {@link FunctionTypingDto} to and from the entity {@link FunctionTyping}. + * + */ +@SuppressWarnings("all") +public class FunctionTypingDtoMapper<DTO extends FunctionTypingDto, ENTITY extends FunctionTyping> implements IMapper<DTO, ENTITY> { + private IMapperAccess mapperAccess; + + /** + * Returns the mapper instance that may map between the given dto and entity. Or <code>null</code> if no mapper is available. + * + * @param dtoClass - the class of the dto that should be mapped + * @param entityClass - the class of the entity that should be mapped + * @return the mapper instance or <code>null</code> + */ + protected <D, E> IMapper<D, E> getToDtoMapper(final Class<D> dtoClass, final Class<E> entityClass) { + return mapperAccess.getToDtoMapper(dtoClass, entityClass); + } + + /** + * Returns the mapper instance that may map between the given dto and entity. Or <code>null</code> if no mapper is available. + * + * @param dtoClass - the class of the dto that should be mapped + * @param entityClass - the class of the entity that should be mapped + * @return the mapper instance or <code>null</code> + */ + protected <D, E> IMapper<D, E> getToEntityMapper(final Class<D> dtoClass, final Class<E> entityClass) { + return mapperAccess.getToEntityMapper(dtoClass, entityClass); + } + + /** + * Called by OSGi-DS. Binds the mapper access service. + * + * @param service - The mapper access service + * + */ + protected void bindMapperAccess(final IMapperAccess mapperAccess) { + this.mapperAccess = mapperAccess; + } + + /** + * Called by OSGi-DS. Binds the mapper access service. + * + * @param service - The mapper access service + * + */ + protected void unbindMapperAccess(final IMapperAccess mapperAccess) { + this.mapperAccess = null; + } + + /** + * Creates a new instance of the entity + */ + public FunctionTyping createEntity() { + return new FunctionTyping(); + } + + /** + * Creates a new instance of the dto + */ + public FunctionTypingDto createDto() { + return new FunctionTypingDto(); + } + + /** + * Maps the entity {@link FunctionTyping} to the dto {@link FunctionTypingDto}. + * + * @param dto - The target dto + * @param entity - The source entity + * @param context - The context to get information about depth,... + * + */ + public void mapToDTO(final FunctionTypingDto dto, final FunctionTyping entity, final MappingContext context) { + if(context == null){ + throw new IllegalArgumentException("Please pass a context!"); + } + } + + /** + * Maps the dto {@link FunctionTypingDto} to the entity {@link FunctionTyping}. + * + * @param dto - The source dto + * @param entity - The target entity + * @param context - The context to get information about depth,... + * + */ + public void mapToEntity(final FunctionTypingDto dto, final FunctionTyping entity, final MappingContext context) { + if(context == null){ + throw new IllegalArgumentException("Please pass a context!"); + } + + + if(entity.getTypes().isEmpty()) { + List<FunctionType> types_entities = new java.util.ArrayList<FunctionType>(); + for(FunctionType _entityValue : toEntity_types(dto, context)) { + types_entities.add(_entityValue); + } + entity.setTypes(types_entities); + } + if(entity.getNormalizer().isEmpty()) { + List<FunctionNormalizer> normalizer_entities = new java.util.ArrayList<FunctionNormalizer>(); + for(FunctionNormalizer _entityValue : toEntity_normalizer(dto, context)) { + normalizer_entities.add(_entityValue); + } + entity.setNormalizer(normalizer_entities); + } + } + + /** + * Maps the property types from the given entity to the dto. + * + * @param in - The source entity + * @param context - The context to get information about depth,... + * @return A list of mapped dtos + * + */ + protected List<FunctionTypeDto> toDto_types(final FunctionTyping in, final MappingContext context) { + org.eclipse.osbp.dsl.dto.lib.IMapper<FunctionTypeDto, FunctionType> mapper = getToDtoMapper(FunctionTypeDto.class, FunctionType.class); + if(mapper == null) { + throw new IllegalStateException("Mapper must not be null!"); + } + + if (context.isDetectRecursion(FunctionTypeDto.class)) { + return java.util.Collections.emptyList(); + } + + context.increaseLevel(); + List<FunctionTypeDto> results = new java.util.ArrayList<FunctionTypeDto>(); + for (FunctionType _entity : in.getTypes()) { + FunctionTypeDto _dto = context.get(mapper.createDtoHash(_entity)); + if (_dto == null) { + _dto = mapper.createDto(); + mapper.mapToDTO(_dto, _entity, context); + } else { + if(context.isRefresh()){ + mapper.mapToDTO(_dto, _entity, context); + } + } + results.add(_dto); + } + context.decreaseLevel(); + return results; + } + + /** + * Maps the property types from the given dto to the entity. + * + * @param in - The source dto + * @param context - The context to get information about depth,... + * @return A list of mapped entities + * + */ + protected List<FunctionType> toEntity_types(final FunctionTypingDto in, final MappingContext context) { + org.eclipse.osbp.dsl.dto.lib.IMapper<FunctionTypeDto, FunctionType> mapper = getToEntityMapper(FunctionTypeDto.class, FunctionType.class); + if(mapper == null) { + throw new IllegalStateException("Mapper must not be null!"); + } + + List<FunctionType> results = new java.util.ArrayList<FunctionType>(); + for (FunctionTypeDto _dto : in.getTypes()) { + FunctionType _entity = mapper.createEntity(); + mapper.mapToEntity(_dto, _entity, context); + results.add(_entity); + } + return results; + } + + /** + * Maps the property normalizer from the given entity to the dto. + * + * @param in - The source entity + * @param context - The context to get information about depth,... + * @return A list of mapped dtos + * + */ + protected List<FunctionNormalizerDto> toDto_normalizer(final FunctionTyping in, final MappingContext context) { + org.eclipse.osbp.dsl.dto.lib.IMapper<FunctionNormalizerDto, FunctionNormalizer> mapper = getToDtoMapper(FunctionNormalizerDto.class, FunctionNormalizer.class); + if(mapper == null) { + throw new IllegalStateException("Mapper must not be null!"); + } + + if (context.isDetectRecursion(FunctionNormalizerDto.class)) { + return java.util.Collections.emptyList(); + } + + context.increaseLevel(); + List<FunctionNormalizerDto> results = new java.util.ArrayList<FunctionNormalizerDto>(); + for (FunctionNormalizer _entity : in.getNormalizer()) { + FunctionNormalizerDto _dto = context.get(mapper.createDtoHash(_entity)); + if (_dto == null) { + _dto = mapper.createDto(); + mapper.mapToDTO(_dto, _entity, context); + } else { + if(context.isRefresh()){ + mapper.mapToDTO(_dto, _entity, context); + } + } + results.add(_dto); + } + context.decreaseLevel(); + return results; + } + + /** + * Maps the property normalizer from the given dto to the entity. + * + * @param in - The source dto + * @param context - The context to get information about depth,... + * @return A list of mapped entities + * + */ + protected List<FunctionNormalizer> toEntity_normalizer(final FunctionTypingDto in, final MappingContext context) { + org.eclipse.osbp.dsl.dto.lib.IMapper<FunctionNormalizerDto, FunctionNormalizer> mapper = getToEntityMapper(FunctionNormalizerDto.class, FunctionNormalizer.class); + if(mapper == null) { + throw new IllegalStateException("Mapper must not be null!"); + } + + List<FunctionNormalizer> results = new java.util.ArrayList<FunctionNormalizer>(); + for (FunctionNormalizerDto _dto : in.getNormalizer()) { + FunctionNormalizer _entity = mapper.createEntity(); + mapper.mapToEntity(_dto, _entity, context); + results.add(_entity); + } + return results; + } + + public String createDtoHash(final Object in) { + throw new UnsupportedOperationException("No id attribute available"); + } + + public String createEntityHash(final Object in) { + throw new UnsupportedOperationException("No id attribute available"); + } +}
diff --git a/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/entities/FunctionNormalizer.java b/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/entities/FunctionNormalizer.java new file mode 100644 index 0000000..1a82c6c --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/entities/FunctionNormalizer.java
@@ -0,0 +1,100 @@ +/** + * @date 08.07.2014 + * @author dominguez + */ +package org.eclipse.osbp.utils.functionnormalizer.entities; + +import java.io.Serializable; +import javax.persistence.Basic; +import javax.persistence.Embeddable; +import javax.persistence.Transient; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import org.eclipse.osbp.dsl.common.datatypes.IBean; +import org.eclipse.osbp.runtime.common.annotations.Dispose; + +@XmlAccessorType(XmlAccessType.FIELD) +@Embeddable +@SuppressWarnings("all") +public class FunctionNormalizer implements Serializable, IBean { + @Transient + @Dispose + private boolean disposed; + + @XmlAttribute + @Basic + private String name; + + @XmlAttribute + @Basic + private String returnType; + + /** + * @return true, if the object is disposed. + * Disposed means, that it is prepared for garbage collection and may not be used anymore. + * Accessing objects that are already disposed will cause runtime exceptions. + * + */ + @Dispose + public boolean isDisposed() { + return this.disposed; + } + + /** + * Checks whether the object is disposed. + * @throws RuntimeException if the object is disposed. + */ + private void checkDisposed() { + if (isDisposed()) { + throw new RuntimeException("Object already disposed: " + this); + } + } + + /** + * Calling dispose will destroy that instance. The internal state will be + * set to 'disposed' and methods of that object must not be used anymore. + * Each call will result in runtime exceptions.<br> + * If this object keeps composition containments, these will be disposed too. + * So the whole composition containment tree will be disposed on calling this method. + */ + @Dispose + public void dispose() { + if (isDisposed()) { + return; + } + disposed = true; + } + + /** + * @return Returns the name property or <code>null</code> if not present. + */ + public String getName() { + checkDisposed(); + return this.name; + } + + /** + * Sets the name property to this instance. + */ + public void setName(final String name) { + checkDisposed(); + this.name = name; + } + + /** + * @return Returns the returnType property or <code>null</code> if not present. + */ + public String getReturnType() { + checkDisposed(); + return this.returnType; + } + + /** + * Sets the returnType property to this instance. + */ + public void setReturnType(final String returnType) { + checkDisposed(); + this.returnType = returnType; + } +}
diff --git a/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/entities/FunctionType.java b/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/entities/FunctionType.java new file mode 100644 index 0000000..babad83 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/entities/FunctionType.java
@@ -0,0 +1,80 @@ +/** + * @date 08.07.2014 + * @author dominguez + */ +package org.eclipse.osbp.utils.functionnormalizer.entities; + +import java.io.Serializable; +import javax.persistence.Basic; +import javax.persistence.Embeddable; +import javax.persistence.Transient; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import org.eclipse.osbp.dsl.common.datatypes.IBean; +import org.eclipse.osbp.runtime.common.annotations.Dispose; + +@XmlAccessorType(XmlAccessType.FIELD) +@Embeddable +@SuppressWarnings("all") +public class FunctionType implements Serializable, IBean { + @Transient + @Dispose + private boolean disposed; + + @XmlAttribute + @Basic + private String name; + + /** + * @return true, if the object is disposed. + * Disposed means, that it is prepared for garbage collection and may not be used anymore. + * Accessing objects that are already disposed will cause runtime exceptions. + * + */ + @Dispose + public boolean isDisposed() { + return this.disposed; + } + + /** + * Checks whether the object is disposed. + * @throws RuntimeException if the object is disposed. + */ + private void checkDisposed() { + if (isDisposed()) { + throw new RuntimeException("Object already disposed: " + this); + } + } + + /** + * Calling dispose will destroy that instance. The internal state will be + * set to 'disposed' and methods of that object must not be used anymore. + * Each call will result in runtime exceptions.<br> + * If this object keeps composition containments, these will be disposed too. + * So the whole composition containment tree will be disposed on calling this method. + */ + @Dispose + public void dispose() { + if (isDisposed()) { + return; + } + disposed = true; + } + + /** + * @return Returns the name property or <code>null</code> if not present. + */ + public String getName() { + checkDisposed(); + return this.name; + } + + /** + * Sets the name property to this instance. + */ + public void setName(final String name) { + checkDisposed(); + this.name = name; + } +}
diff --git a/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/entities/FunctionTyping.java b/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/entities/FunctionTyping.java new file mode 100644 index 0000000..6608119 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/entities/FunctionTyping.java
@@ -0,0 +1,219 @@ +/** + * @date 08.07.2014 + * @author dominguez + */ +package org.eclipse.osbp.utils.functionnormalizer.entities; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import javax.persistence.Basic; +import javax.persistence.ElementCollection; +import javax.persistence.Embeddable; +import javax.persistence.Embedded; +import javax.persistence.Transient; +import javax.validation.Valid; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; +import org.eclipse.osbp.dsl.common.datatypes.IBean; +import org.eclipse.osbp.runtime.common.annotations.Dispose; +import org.eclipse.osbp.utils.functionnormalizer.entities.FunctionNormalizer; +import org.eclipse.osbp.utils.functionnormalizer.entities.FunctionType; + +@XmlRootElement +@XmlAccessorType(XmlAccessType.FIELD) +@Embeddable +@SuppressWarnings("all") +public class FunctionTyping implements Serializable, IBean { + @Transient + @Dispose + private boolean disposed; + + @XmlElementWrapper(name = "functionType") + @XmlElement(name = "key") + @Basic + @Embedded + @ElementCollection + @Valid + private List<FunctionType> types; + + @XmlElementWrapper(name = "normalizer") + @XmlElement(name = "function") + @Basic + @Embedded + @ElementCollection + @Valid + private List<FunctionNormalizer> normalizer; + + /** + * @return true, if the object is disposed. + * Disposed means, that it is prepared for garbage collection and may not be used anymore. + * Accessing objects that are already disposed will cause runtime exceptions. + * + */ + @Dispose + public boolean isDisposed() { + return this.disposed; + } + + /** + * Checks whether the object is disposed. + * @throws RuntimeException if the object is disposed. + */ + private void checkDisposed() { + if (isDisposed()) { + throw new RuntimeException("Object already disposed: " + this); + } + } + + /** + * Calling dispose will destroy that instance. The internal state will be + * set to 'disposed' and methods of that object must not be used anymore. + * Each call will result in runtime exceptions.<br> + * If this object keeps composition containments, these will be disposed too. + * So the whole composition containment tree will be disposed on calling this method. + */ + @Dispose + public void dispose() { + if (isDisposed()) { + return; + } + disposed = true; + } + + /** + * @return Returns an unmodifiable list of types. + */ + public List<FunctionType> getTypes() { + checkDisposed(); + return Collections.unmodifiableList(internalGetTypes()); + } + + /** + * Sets the given types to the object. Currently contained types instances will be removed. + * + * @param types the list of new instances + */ + public void setTypes(final List<FunctionType> types) { + // remove the old functionType + for(FunctionType oldElement : new ArrayList<FunctionType>(this.internalGetTypes())){ + removeFromTypes(oldElement); + } + + // add the new functionType + for(FunctionType newElement : types){ + addToTypes(newElement); + } + } + + /** + * Returns the list of <code>FunctionType</code>s thereby lazy initializing it. + */ + private List<FunctionType> internalGetTypes() { + if (this.types == null) { + this.types = new ArrayList<FunctionType>(); + } + return this.types; + } + + /** + * Adds the given functionType to this object. <p> + * + */ + public void addToTypes(final FunctionType functionType) { + checkDisposed(); + if (!getTypes().contains(functionType)){ + internalAddToTypes(functionType); + } + + } + + public void removeFromTypes(final FunctionType functionType) { + checkDisposed(); + internalGetTypes().remove(functionType); + } + + /** + * For internal use only! + */ + void internalAddToTypes(final FunctionType functionType) { + internalGetTypes().add(functionType); + } + + /** + * For internal use only! + */ + void internalRemoveFromTypes(final FunctionType functionType) { + internalGetTypes().remove(functionType); + } + + /** + * @return Returns an unmodifiable list of normalizer. + */ + public List<FunctionNormalizer> getNormalizer() { + checkDisposed(); + return Collections.unmodifiableList(internalGetNormalizer()); + } + + /** + * Sets the given normalizer to the object. Currently contained normalizer instances will be removed. + * + * @param normalizer the list of new instances + */ + public void setNormalizer(final List<FunctionNormalizer> normalizer) { + // remove the old functionNormalizer + for(FunctionNormalizer oldElement : new ArrayList<FunctionNormalizer>(this.internalGetNormalizer())){ + removeFromNormalizer(oldElement); + } + + // add the new functionNormalizer + for(FunctionNormalizer newElement : normalizer){ + addToNormalizer(newElement); + } + } + + /** + * Returns the list of <code>FunctionNormalizer</code>s thereby lazy initializing it. + */ + private List<FunctionNormalizer> internalGetNormalizer() { + if (this.normalizer == null) { + this.normalizer = new ArrayList<FunctionNormalizer>(); + } + return this.normalizer; + } + + /** + * Adds the given functionNormalizer to this object. <p> + * + */ + public void addToNormalizer(final FunctionNormalizer functionNormalizer) { + checkDisposed(); + if (!getNormalizer().contains(functionNormalizer)){ + internalAddToNormalizer(functionNormalizer); + } + + } + + public void removeFromNormalizer(final FunctionNormalizer functionNormalizer) { + checkDisposed(); + internalGetNormalizer().remove(functionNormalizer); + } + + /** + * For internal use only! + */ + void internalAddToNormalizer(final FunctionNormalizer functionNormalizer) { + internalGetNormalizer().add(functionNormalizer); + } + + /** + * For internal use only! + */ + void internalRemoveFromNormalizer(final FunctionNormalizer functionNormalizer) { + internalGetNormalizer().remove(functionNormalizer); + } +}
diff --git a/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/entities/FunctionnormalizerEntitiesTranslator.java b/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/entities/FunctionnormalizerEntitiesTranslator.java new file mode 100644 index 0000000..b89dc8a --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/src-gen/org/eclipse/osbp/utils/functionnormalizer/entities/FunctionnormalizerEntitiesTranslator.java
@@ -0,0 +1,216 @@ +package org.eclipse.osbp.utils.functionnormalizer.entities; + +import java.beans.PropertyChangeListener; +import java.beans.PropertyChangeSupport; +import java.util.HashMap; +import java.util.Locale; +import org.eclipse.osbp.runtime.common.i18n.ITranslator; +import org.slf4j.Logger; + +@SuppressWarnings("all") +public class FunctionnormalizerEntitiesTranslator implements ITranslator { + private static Logger log = org.slf4j.LoggerFactory.getLogger("translations by translator"); + + private static FunctionnormalizerEntitiesTranslator instance = null; + + private static Locale lastLocale = null; + + private PropertyChangeSupport pcs = new java.beans.PropertyChangeSupport(this); + + private HashMap<String, String> translations = new HashMap<String,String>() {{ + put("org.eclipse.osbp.utils.functionnormalizer.entities.function_normalizer","function_normalizer"); + put("org.eclipse.osbp.utils.functionnormalizer.entities.function_type","function_type"); + put("org.eclipse.osbp.utils.functionnormalizer.entities.function_typing","function_typing"); + put("org.eclipse.osbp.utils.functionnormalizer.entities.name","name"); + put("org.eclipse.osbp.utils.functionnormalizer.entities.normalizer","normalizer"); + put("org.eclipse.osbp.utils.functionnormalizer.entities.return_type","return_type"); + put("org.eclipse.osbp.utils.functionnormalizer.entities.types","types"); + }}; + + private static String function_normalizer; + + private static String function_type; + + private static String function_typing; + + private static String name; + + private static String normalizer; + + private static String return_type; + + private static String types; + + public static FunctionnormalizerEntitiesTranslator getInstance(final Locale locale) { + if(instance == null) { + instance = new org.eclipse.osbp.utils.functionnormalizer.entities.FunctionnormalizerEntitiesTranslator(); + if (lastLocale == null) { + instance.changeLocale(locale); + } + } + return instance; + } + + public void addPropertyChangeListener(final PropertyChangeListener listener) { + this.pcs.addPropertyChangeListener(listener); + } + + public void removePropertyChangeListener(final PropertyChangeListener listener) { + this.pcs.removePropertyChangeListener(listener); + } + + public void mergeTranslations() { + + } + + public HashMap<String, String> getTranslations() { + return translations; + } + + public String getFunction_normalizer() { + if (log.isDebugEnabled()) log.debug("getFunction_normalizer returns:"+this.function_normalizer); + return this.function_normalizer; + } + + public String getFunction_type() { + if (log.isDebugEnabled()) log.debug("getFunction_type returns:"+this.function_type); + return this.function_type; + } + + public String getFunction_typing() { + if (log.isDebugEnabled()) log.debug("getFunction_typing returns:"+this.function_typing); + return this.function_typing; + } + + public String getName() { + if (log.isDebugEnabled()) log.debug("getName returns:"+this.name); + return this.name; + } + + public String getNormalizer() { + if (log.isDebugEnabled()) log.debug("getNormalizer returns:"+this.normalizer); + return this.normalizer; + } + + public String getReturn_type() { + if (log.isDebugEnabled()) log.debug("getReturn_type returns:"+this.return_type); + return this.return_type; + } + + public String getTypes() { + if (log.isDebugEnabled()) log.debug("getTypes returns:"+this.types); + return this.types; + } + + public void setFunction_normalizer(final String newFunction_normalizer) { + if (log.isDebugEnabled()) log.debug("setFunction_normalizer called:"+newFunction_normalizer); + String oldFunction_normalizer = this.function_normalizer; + this.function_normalizer = newFunction_normalizer; + translations.put("org.eclipse.osbp.utils.functionnormalizer.entities.function_normalizer", newFunction_normalizer); + this.pcs.firePropertyChange("function_normalizer", oldFunction_normalizer, newFunction_normalizer); + } + + public void setFunction_type(final String newFunction_type) { + if (log.isDebugEnabled()) log.debug("setFunction_type called:"+newFunction_type); + String oldFunction_type = this.function_type; + this.function_type = newFunction_type; + translations.put("org.eclipse.osbp.utils.functionnormalizer.entities.function_type", newFunction_type); + this.pcs.firePropertyChange("function_type", oldFunction_type, newFunction_type); + } + + public void setFunction_typing(final String newFunction_typing) { + if (log.isDebugEnabled()) log.debug("setFunction_typing called:"+newFunction_typing); + String oldFunction_typing = this.function_typing; + this.function_typing = newFunction_typing; + translations.put("org.eclipse.osbp.utils.functionnormalizer.entities.function_typing", newFunction_typing); + this.pcs.firePropertyChange("function_typing", oldFunction_typing, newFunction_typing); + } + + public void setName(final String newName) { + if (log.isDebugEnabled()) log.debug("setName called:"+newName); + String oldName = this.name; + this.name = newName; + translations.put("org.eclipse.osbp.utils.functionnormalizer.entities.name", newName); + this.pcs.firePropertyChange("name", oldName, newName); + } + + public void setNormalizer(final String newNormalizer) { + if (log.isDebugEnabled()) log.debug("setNormalizer called:"+newNormalizer); + String oldNormalizer = this.normalizer; + this.normalizer = newNormalizer; + translations.put("org.eclipse.osbp.utils.functionnormalizer.entities.normalizer", newNormalizer); + this.pcs.firePropertyChange("normalizer", oldNormalizer, newNormalizer); + } + + public void setReturn_type(final String newReturn_type) { + if (log.isDebugEnabled()) log.debug("setReturn_type called:"+newReturn_type); + String oldReturn_type = this.return_type; + this.return_type = newReturn_type; + translations.put("org.eclipse.osbp.utils.functionnormalizer.entities.return_type", newReturn_type); + this.pcs.firePropertyChange("return_type", oldReturn_type, newReturn_type); + } + + public void setTypes(final String newTypes) { + if (log.isDebugEnabled()) log.debug("setTypes called:"+newTypes); + String oldTypes = this.types; + this.types = newTypes; + translations.put("org.eclipse.osbp.utils.functionnormalizer.entities.types", newTypes); + this.pcs.firePropertyChange("types", oldTypes, newTypes); + } + + public void changeLocale(final Locale locale) { + // avoid unnecessary settings + if (locale == null) { + if (log.isDebugEnabled()) log.debug("locale for org.eclipse.osbp.utils.functionnormalizer.entities is null."); + return; + } + if (locale.equals(lastLocale)) { + if (log.isDebugEnabled()) log.debug("locale for org.eclipse.osbp.utils.functionnormalizer.entities already set to "+locale.getDisplayLanguage()); + return; + } + if (log.isDebugEnabled()) log.debug("locale for org.eclipse.osbp.utils.functionnormalizer.entities set to "+locale.getDisplayLanguage()); + lastLocale = locale; + // call the imported translators change locale method + try { + java.util.ResourceBundle resource = java.util.ResourceBundle.getBundle("i18n.I18N", locale, getClass().getClassLoader()); + try { + setFunction_normalizer(resource.getString("org.eclipse.osbp.utils.functionnormalizer.entities.function_normalizer")); + } catch (Exception e) { + log.error(getClass().getCanonicalName()+" - "+e.getLocalizedMessage()); + } + try { + setFunction_type(resource.getString("org.eclipse.osbp.utils.functionnormalizer.entities.function_type")); + } catch (Exception e) { + log.error(getClass().getCanonicalName()+" - "+e.getLocalizedMessage()); + } + try { + setFunction_typing(resource.getString("org.eclipse.osbp.utils.functionnormalizer.entities.function_typing")); + } catch (Exception e) { + log.error(getClass().getCanonicalName()+" - "+e.getLocalizedMessage()); + } + try { + setName(resource.getString("org.eclipse.osbp.utils.functionnormalizer.entities.name")); + } catch (Exception e) { + log.error(getClass().getCanonicalName()+" - "+e.getLocalizedMessage()); + } + try { + setNormalizer(resource.getString("org.eclipse.osbp.utils.functionnormalizer.entities.normalizer")); + } catch (Exception e) { + log.error(getClass().getCanonicalName()+" - "+e.getLocalizedMessage()); + } + try { + setReturn_type(resource.getString("org.eclipse.osbp.utils.functionnormalizer.entities.return_type")); + } catch (Exception e) { + log.error(getClass().getCanonicalName()+" - "+e.getLocalizedMessage()); + } + try { + setTypes(resource.getString("org.eclipse.osbp.utils.functionnormalizer.entities.types")); + } catch (Exception e) { + log.error(getClass().getCanonicalName()+" - "+e.getLocalizedMessage()); + } + } catch (java.util.MissingResourceException mre) { + System.err.println(getClass().getCanonicalName()+" - "+mre.getLocalizedMessage()); + } + + } +}
diff --git a/org.eclipse.osbp.utils.functionnormalizer/src/org/eclipse/osbp/utils/functionnormalizer/Activator.java b/org.eclipse.osbp.utils.functionnormalizer/src/org/eclipse/osbp/utils/functionnormalizer/Activator.java new file mode 100644 index 0000000..8e1ae18 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/src/org/eclipse/osbp/utils/functionnormalizer/Activator.java
@@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation + * + */ +package org.eclipse.osbp.utils.functionnormalizer; + +import org.eclipse.osbp.gitinfo.Loginfo; +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +// TODO: Auto-generated Javadoc +/** + * The Class Activator. + */ +public class Activator implements BundleActivator { + + /** The context. */ + private static BundleContext context; + + /** + * Gets the context. + * + * @return the context + */ + static BundleContext getContext() { + return context; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext bundleContext) throws Exception { + Loginfo li = new Loginfo(); + li.print( Activator.class.getCanonicalName(), Activator.class.getClassLoader()); + Activator.context = bundleContext; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext bundleContext) throws Exception { + Activator.context = null; + } + +}
diff --git a/org.eclipse.osbp.utils.functionnormalizer/src/org/eclipse/osbp/utils/functionnormalizer/FunctionNormalizer.dto b/org.eclipse.osbp.utils.functionnormalizer/src/org/eclipse/osbp/utils/functionnormalizer/FunctionNormalizer.dto new file mode 100644 index 0000000..d1edc9d --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/src/org/eclipse/osbp/utils/functionnormalizer/FunctionNormalizer.dto
@@ -0,0 +1,32 @@ +/** +* +* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) +* +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +* +* Contributors: +* Christophe Loetz (Loetz GmbH&Co.KG) - Initial implementation +*/ +package org.eclipse.osbp.utils.functionnormalizer.dtos { + import org.eclipse.osbp.utils.functionnormalizer.entities.*; + autoDto FunctionNormalizerDto wraps FunctionNormalizer { + + inherit var name + inherit var returnType + } + + autoDto FunctionTypeDto wraps FunctionType { + + inherit var name + } + + autoDto FunctionTypingDto wraps FunctionTyping { + + inherit ref types mapto FunctionTypeDto + inherit ref normalizer mapto FunctionNormalizerDto + } + +}
diff --git a/org.eclipse.osbp.utils.functionnormalizer/src/org/eclipse/osbp/utils/functionnormalizer/FunctionNormalizer.entity b/org.eclipse.osbp.utils.functionnormalizer/src/org/eclipse/osbp/utils/functionnormalizer/FunctionNormalizer.entity new file mode 100644 index 0000000..04a7099 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/src/org/eclipse/osbp/utils/functionnormalizer/FunctionNormalizer.entity
@@ -0,0 +1,60 @@ +/** + * + * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation + * Jose Dominguez (Compex Systemhaus GmbH) - ongoing development + */ + +/** + * @date 08.07.2014 + * @author dominguez + */ + +package org.eclipse.osbp.utils.functionnormalizer.entities { + + import javax.xml.bind.annotation.*; + import org.eclipse.osbp.utils.blob.datatypes.*; + + @XmlAccessorType(XmlAccessType.FIELD) + bean FunctionNormalizer { + @XmlAttribute + var String name; + @XmlAttribute + var String returnType; + } + + @XmlAccessorType(XmlAccessType.FIELD) + bean FunctionType { + @XmlAttribute + var String name; + } + + @XmlRootElement + @XmlAccessorType(XmlAccessType.FIELD) + bean FunctionTyping { + @XmlElementWrapper(name = "functionType") + @XmlElement(name = "key") + ref FunctionType[*] types; + @XmlElementWrapper(name = "normalizer") + @XmlElement(name = "function") + ref FunctionNormalizer[*] normalizer; + } + +} + + + + + + + + + +
diff --git a/org.eclipse.osbp.utils.functionnormalizer/src/org/eclipse/osbp/utils/functionnormalizer/FunctionNormalizer.service b/org.eclipse.osbp.utils.functionnormalizer/src/org/eclipse/osbp/utils/functionnormalizer/FunctionNormalizer.service new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/src/org/eclipse/osbp/utils/functionnormalizer/FunctionNormalizer.service
diff --git a/org.eclipse.osbp.utils.functionnormalizer/src/org/eclipse/osbp/utils/functionnormalizer/FunctionTypes.xml b/org.eclipse.osbp.utils.functionnormalizer/src/org/eclipse/osbp/utils/functionnormalizer/FunctionTypes.xml new file mode 100644 index 0000000..b12193e --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/src/org/eclipse/osbp/utils/functionnormalizer/FunctionTypes.xml
@@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<functionTyping +xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +xsi:noNamespaceSchemaLocation="FunctionTypes.xsd" +> + <functionType> + <key name="functionCss"/> + <key name="functionConverter"/> + <key name="functionImagePicker"/> + </functionType> + <normalizer> + <function name="booleanFunction" returnType="boolean"/> + <function name="StringFunction" returnType="String"/> + </normalizer> +</functionTyping> \ No newline at end of file
diff --git a/org.eclipse.osbp.utils.functionnormalizer/src/org/eclipse/osbp/utils/functionnormalizer/FunctionTypes.xsd b/org.eclipse.osbp.utils.functionnormalizer/src/org/eclipse/osbp/utils/functionnormalizer/FunctionTypes.xsd new file mode 100644 index 0000000..b19c12c --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/src/org/eclipse/osbp/utils/functionnormalizer/FunctionTypes.xsd
@@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> + <xs:element name="functionTyping"> + <xs:complexType> + <xs:sequence> + <xs:element name="functionType"> + <xs:complexType> + <xs:sequence> + <xs:element name="key" maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="name" type="xs:string"/> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="normalizer"> + <xs:complexType> + <xs:sequence> + <xs:element name="function" maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="returnType" type="xs:string"/> + <xs:attribute name="name" type="xs:string"/> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> +</xs:schema> \ No newline at end of file
diff --git a/org.eclipse.osbp.utils.functionnormalizer/src/org/eclipse/osbp/utils/functionnormalizer/api/FunctionTypingAPI.java b/org.eclipse.osbp.utils.functionnormalizer/src/org/eclipse/osbp/utils/functionnormalizer/api/FunctionTypingAPI.java new file mode 100644 index 0000000..c72a626 --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/src/org/eclipse/osbp/utils/functionnormalizer/api/FunctionTypingAPI.java
@@ -0,0 +1,238 @@ +/* + * + * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation + * + */ + +package org.eclipse.osbp.utils.functionnormalizer.api; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.List; + +//import javax.persistence.Id; +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Unmarshaller; + +import org.eclipse.osbp.utils.functionnormalizer.entities.FunctionNormalizer; +import org.eclipse.osbp.utils.functionnormalizer.entities.FunctionType; +import org.eclipse.osbp.utils.functionnormalizer.entities.FunctionTyping; + +/** + * BlobTypingAPI is a API that provides predefined blob typing data that are + * required to be able to work with Blob objects. + * + * The predefined data stored in a blob typing xml file will be read out and + * will be filled into the corresponding blob typing java objects via JAXB. + * + * @date 08.07.2014 + * @author dominguez + * + */ +public class FunctionTypingAPI { + + private FunctionTyping functionTyping; + private final int FUNCTION_CSS = 0; + private final int FUNCTION_CONVERTER = 1; + private final int FUNCTION_IMAGE_PICKER = 2; + + /** + * Preferred constructor without any required parameter due to best knowing + * path to the input xml file. + */ + public FunctionTypingAPI() { + try { + URL fileURL = new URL( + "platform:/plugin/org.eclipse.osbp.utils.functionnormalizer/org/eclipse/osbp/utils/functionnormalizer/FunctionTypes.xml"); +// File xmlFile = new File(FileLocator.resolve(fileURL).toURI()); +// blobTyping = readBlob(xmlFile); + InputStream inputStream = fileURL.openConnection().getInputStream(); + functionTyping = readFunction(inputStream); + } catch (JAXBException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (MalformedURLException e) { + // TODO Auto-generated catch block + e.printStackTrace(); +// } catch (URISyntaxException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + /** + * Constructor in case of a different path to the input xml file. + * + * !!! This is also the only usable constructor for JUnit test because the + * above OSGI-path to the input xml file is not working for simple JUnit + * tests!!! + * + * @param xmlFile + */ + public FunctionTypingAPI(File xmlFile) { + try { + functionTyping = readFunction(xmlFile); + } catch (JAXBException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + /** + * Method that reads the blob typing xml file and fill the 'BlobTyping' + * object via JAXB with all the receiving data from the xml input file. + * + * @param xmlFile + * @return the {@link BlobTyping} object filled with all the defined data + * from the blob typing xml file. + * @throws JAXBException + */ + private FunctionTyping readFunction(File xmlFile) throws JAXBException { + JAXBContext jaxbContext = JAXBContext.newInstance(FunctionTyping.class); + Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller(); + return (FunctionTyping) jaxbUnmarshaller.unmarshal(xmlFile); + } + + /** + * Method that reads the blob typing xml file and fill the 'BlobTyping' + * object via JAXB with all the receiving data from the xml input file. + * + * @param xmlFile + * @return the {@link BlobTyping} object filled with all the defined data + * from the blob typing xml file. + * @throws JAXBException + */ + private FunctionTyping readFunction(InputStream xmlFile) throws JAXBException { + JAXBContext jaxbContext = JAXBContext.newInstance(FunctionTyping.class); + Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller(); + return (FunctionTyping) jaxbUnmarshaller.unmarshal(xmlFile); + } + + /** + * Provides the defined list of function normalizer objects. + * + * @return list of {@link FunctionNormalizer} + */ + public List<FunctionNormalizer> getNormalizer() { + return functionTyping.getNormalizer(); + } + + /** + * Provides the defined list of function type objects. + * + * @return list of {@link FunctionNormalizer} + */ + public List<FunctionType> getTypes() { + return functionTyping.getTypes(); + } + + /** + * Provides the name of the function type object 'functionCss'. + * + * @return Name of {@link FunctionType} + */ + public String getFunctionCssTypeName() { + return functionTyping.getTypes().get(FUNCTION_CSS).getName(); + } + + /** + * Provides the name of the function type object 'functionConverter'. + * + * @return Name of {@link FunctionType} + */ + public String getFunctionConverterTypeName() { + return functionTyping.getTypes().get(FUNCTION_CONVERTER).getName(); + } + + /** + * Provides the name of the function type object 'functionImagePicker'. + * + * @return Name of {@link FunctionType} + */ + public String getFunctionImagePickerTypeName() { + return functionTyping.getTypes().get(FUNCTION_IMAGE_PICKER).getName(); + } + + /** + * Provides the function normalizer name for an individual position within + * the list of all the defined function objects of the normalizer object. + * + * @param index + * @return the function normalizer name as {@link String} or ""(blank) if + * not found + */ + public String getFunctionNormalizerNameByListIndex(int index) { + int length = functionTyping.getNormalizer().size(); + if (index < length) { + return functionTyping.getNormalizer().get(index).getName(); + } else { + return ""; + } + } + + /** + * Provides the function normalizer return type for an individual position within the + * list of all the defined function objects of the normalizer object. + * + * @param index + * @return the normalizer resolution as {@link String} or ""(blank) if not + * found + */ + public String getFunctionNormalizerReturnTypeByListIndex(int index) { + int length = functionTyping.getNormalizer().size(); + if (index < length) { + return functionTyping.getNormalizer().get(index).getReturnType(); + } else { + return ""; + } + } + + /** + * Provides the function normalizer return type for a specific function name. + * + * @param resolutionStr + * @return the normalizer return type as {@link String} or ""(blank) if not found + */ + public String getFunctionNormalizerReturnTypeByName(String functionName) { + for (FunctionNormalizer functionNormalizer : functionTyping + .getNormalizer()) { + if (functionNormalizer.getName().equals(functionName)) { + return functionNormalizer.getReturnType(); + } + } + return ""; + } + + /** + * Provides the function type name for an individual position within the + * list of all the defined function objects of the functionType object. + * + * @param index + * @return the function type name as {@link String} or ""(blank) if not + * found + */ + public String getFunctionTypeNameByListIndex(int index) { + int length = functionTyping.getTypes().size(); + if (index < length) { + return functionTyping.getTypes().get(index).getName(); + } else { + return ""; + } + } + +}
diff --git a/org.eclipse.osbp.utils.functionnormalizer/src/org/eclipse/osbp/utils/functionnormalizer/functionNormalizer.datatype b/org.eclipse.osbp.utils.functionnormalizer/src/org/eclipse/osbp/utils/functionnormalizer/functionNormalizer.datatype new file mode 100644 index 0000000..a456d6c --- /dev/null +++ b/org.eclipse.osbp.utils.functionnormalizer/src/org/eclipse/osbp/utils/functionnormalizer/functionNormalizer.datatype
@@ -0,0 +1,40 @@ +/* + * + * Copyright (c) 2015 - 2016 - Loetz GmbH&Co.KG, 69115 Heidelberg, Germany + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Loetz GmbH&Co.KG - Initial implementation + * + */ + package org.eclipse.osbp.utils.blob.datatypes { + + datatype boolean jvmType java.lang.Boolean as primitive; + datatype short jvmType java.lang.Short as primitive; + datatype int jvmType java.lang.Integer as primitive; + datatype long jvmType java.lang.Long as primitive; + datatype double jvmType java.lang.Double as primitive; + datatype float jvmType java.lang.Float as primitive; + datatype character jvmType java.lang.Character as primitive; + datatype byte jvmType java.lang.Byte as primitive; + + datatype Boolean jvmType java.lang.Boolean; + datatype Short jvmType java.lang.Short; + datatype Int jvmType java.lang.Integer; + datatype Long jvmType java.lang.Long; + datatype Double jvmType java.lang.Double; + datatype Float jvmType java.lang.Float; + datatype Character jvmType java.lang.Character; + datatype Byte jvmType java.lang.Byte; + datatype BigDecimal jvmType java.math.BigDecimal; + + datatype String jvmType java.lang.String; + datatype Date dateType date; + datatype datetype dateType date; + datatype timetype dateType time; + datatype blobtype as blob; +}
diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..afd75ac --- /dev/null +++ b/pom.xml
@@ -0,0 +1,132 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--#======================================================================= --> +<!--# Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) --> +<!--# All rights reserved. This program and the accompanying materials --> +<!--# are made available under the terms of the Eclipse Public License v1.0 --> +<!--# which accompanies this distribution, and is available at --> +<!--# http://www.eclipse.org/legal/epl-v10.html --> +<!--# --> +<!--# Contributors: --> +<!--# Christophe Loetz (Loetz GmbH&Co.KG) - initial API and implementation --> +<!--#======================================================================= --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.eclipse.osbp.releng.maven</groupId> + <artifactId>org.eclipse.osbp.releng.maven.parent.tycho</artifactId> + <version>0.9.0-SNAPSHOT</version> + </parent> + + <groupId>org.eclipse.osbp.utils.functionnormalizer</groupId> + <artifactId>org.eclipse.osbp.utils.functionnormalizer.aggregator</artifactId> + <version>0.9.0-SNAPSHOT</version> + <packaging>pom</packaging> + + <properties> + <osbp.gitrepo.name>${project.groupId}</osbp.gitrepo.name> + </properties> + + <modules> + <module>org.eclipse.osbp.utils.functionnormalizer</module> + <module>org.eclipse.osbp.utils.functionnormalizer.tests</module> + <module>org.eclipse.osbp.utils.functionnormalizer.feature</module> + </modules> + + <url>${osbp.site.repository.url}</url> + <scm> + <url>${osbp.scm.url}</url> + <connection>${osbp.scm.connection}</connection> + <developerConnection>${osbp.scm.connection.dev}</developerConnection> + <tag>HEAD</tag> + </scm> + + <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.eclipse.xtend</groupId> + <artifactId>xtend-maven-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <executions> + <execution> + <id>add-source</id> + <phase>initialize</phase> + <goals> + <goal>add-source</goal> + </goals> + <configuration> + <sources> + <source>src-gen</source> + <source>xtend-gen</source> + </sources> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.eclipse.tycho</groupId> + <artifactId>tycho-source-plugin</artifactId> + <version>${tycho-version}</version> + <executions> + <execution> + <id>plugin-source</id> + <goals> + <goal>plugin-source</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.eclipse.osbp.tools.maven</groupId> + <artifactId>org.eclipse.osbp.tools.maven.entity</artifactId> + <version>0.9.0-SNAPSHOT</version> + <executions> + <execution> + <goals> + <goal>compile</goal> + <goal>testCompile</goal> + </goals> + </execution> + </executions> + <configuration> + <outputDirectory>src-gen</outputDirectory> + </configuration> + </plugin> + </plugins> + </pluginManagement> + <plugins> + <plugin> + <artifactId>maven-clean-plugin</artifactId> + <configuration> + <filesets> + <fileset> + <directory>xtend-gen</directory> + <includes> + <include>**</include> + </includes> + </fileset> + </filesets> + </configuration> + </plugin> + <plugin> + <groupId>org.eclipse.xtend</groupId> + <artifactId>xtend-maven-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>compile</goal> + <goal>testCompile</goal> + </goals> + <configuration> + <outputDirectory>xtend-gen</outputDirectory> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project>