initial checkin
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..9282123
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,36 @@
+**/target/
+**git.properties
+**.log.properties
+**/target/
+**/.metadata/
+
+**/emf-gen/**/.gitignore
+**/src-gen/**/.gitignore
+**/git.properties
+**/*.java._trace
+**/*.log
+**/*.log.properties
+
+**/bin/
+**/build/
+*.class
+*.ctrl
+**/Debug/
+.DS_Store
+*.ear
+*.war
+
+**/*.actionbin
+**/*.blipbin
+**/*.chartbin
+**/*.cubebin
+**/*.datatypebin
+**/*.dtobin
+**/*.entitybin
+**/*.servicebin
+**/*.tablebin
+**/*.uibin
+**/*.uisemanticbin
+**/*.xtendbin
+**/*.xtextbin
+
diff --git a/.project b/.project
new file mode 100644
index 0000000..d585dfb
--- /dev/null
+++ b/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.blob.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/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/epl-v10.html b/epl-v10.html
new file mode 100644
index 0000000..b398acc
--- /dev/null
+++ b/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/jenkins.build.config.xml b/jenkins.build.config.xml
new file mode 100644
index 0000000..44b4980
--- /dev/null
+++ b/jenkins.build.config.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2017 - 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 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.core.api</jenkins.build.dependency>
+ <jenkins.build.dependency>org.eclipse.osbp.dsl</jenkins.build.dependency>
+ <jenkins.build.dependency>org.eclipse.osbp.jpa.services</jenkins.build.dependency>
+ <jenkins.build.dependency>org.eclipse.osbp.preferences</jenkins.build.dependency>
+ <jenkins.build.dependency>org.eclipse.osbp.runtime</jenkins.build.dependency>
+ <jenkins.build.dependency>org.eclipse.osbp.ui.api</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.blob.feature/.gitignore b/org.eclipse.osbp.blob.feature/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/org.eclipse.osbp.blob.feature/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/org.eclipse.osbp.blob.feature/.project b/org.eclipse.osbp.blob.feature/.project
new file mode 100644
index 0000000..b947354
--- /dev/null
+++ b/org.eclipse.osbp.blob.feature/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.blob.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.sonarlint.eclipse.core.sonarlintBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.osbp.blob.feature/.settings/org.eclipse.core.resources.prefs b/org.eclipse.osbp.blob.feature/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/org.eclipse.osbp.blob.feature/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/org.eclipse.osbp.blob.feature/.settings/org.eclipse.m2e.core.prefs b/org.eclipse.osbp.blob.feature/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/org.eclipse.osbp.blob.feature/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/org.eclipse.osbp.blob.feature/.settings/org.eclipse.xtend.core.Xtend.prefs b/org.eclipse.osbp.blob.feature/.settings/org.eclipse.xtend.core.Xtend.prefs
new file mode 100644
index 0000000..19e3115
--- /dev/null
+++ b/org.eclipse.osbp.blob.feature/.settings/org.eclipse.xtend.core.Xtend.prefs
@@ -0,0 +1,11 @@
+//outlet.DEFAULT_OUTPUT.sourceFolder.src/test/java.directory=src/test/generated-sources/xtend
+BuilderConfiguration.is_project_specific=true
+eclipse.preferences.version=1
+is_project_specific=true
+outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true
+outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=false
+outlet.DEFAULT_OUTPUT.sourceFolder.emf-gen.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.sourceFolder.src-gen.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.sourceFolder.src.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.sourceFolder.xtend-gen.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.userOutputPerSourceFolder=true
diff --git a/org.eclipse.osbp.blob.feature/LICENSE.txt b/org.eclipse.osbp.blob.feature/LICENSE.txt
new file mode 100644
index 0000000..ff42ad4
--- /dev/null
+++ b/org.eclipse.osbp.blob.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.blob.feature/build.properties b/org.eclipse.osbp.blob.feature/build.properties
new file mode 100644
index 0000000..0ea4044
--- /dev/null
+++ b/org.eclipse.osbp.blob.feature/build.properties
@@ -0,0 +1,10 @@
+bin.includes = feature.xml,\
+ feature.properties,\
+ notice.html,\
+ license.html,\
+ LICENSE.txt,\
+ epl-v10.html
+src.includes = license.html,\
+ LICENSE.txt,\
+ notice.html,\
+ epl-v10.html
diff --git a/org.eclipse.osbp.blob.feature/epl-v10.html b/org.eclipse.osbp.blob.feature/epl-v10.html
new file mode 100644
index 0000000..b398acc
--- /dev/null
+++ b/org.eclipse.osbp.blob.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.blob.feature/feature.properties b/org.eclipse.osbp.blob.feature/feature.properties
new file mode 100644
index 0000000..22f0765
--- /dev/null
+++ b/org.eclipse.osbp.blob.feature/feature.properties
@@ -0,0 +1,172 @@
+#=======================================================================
+# Copyright (c) 2017 - 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 API and implementation
+#=======================================================================
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName =OSBP blob
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse OSBP
+
+# "description" property - description of the feature
+description=This feature provides the OSBP blob bundle.
+
+# "updateSiteName" property - label for the update site
+updateSiteName=
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2017 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany). \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\
+ Loetz GmbH&Co.KG - initial API and basis\n\
+
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+February 1, 2011\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+ 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+ the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+ extending or updating the functionality of an Eclipse-based product.\n\
+ 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+ Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+ 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+ govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+ Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+ with the Specification. Such Installable Software Agreement must inform the user of the\n\
+ terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+ the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+ indication of agreement by the user, the provisioning Technology will complete installation\n\
+ of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/org.eclipse.osbp.blob.feature/feature.xml b/org.eclipse.osbp.blob.feature/feature.xml
new file mode 100644
index 0000000..5a1a935
--- /dev/null
+++ b/org.eclipse.osbp.blob.feature/feature.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.osbp.blob.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.blob"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+
+
+</feature>
\ No newline at end of file
diff --git a/org.eclipse.osbp.blob.feature/license.html b/org.eclipse.osbp.blob.feature/license.html
new file mode 100644
index 0000000..6e579a5
--- /dev/null
+++ b/org.eclipse.osbp.blob.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.blob.feature/notice.html b/org.eclipse.osbp.blob.feature/notice.html
new file mode 100644
index 0000000..c3d34c3
--- /dev/null
+++ b/org.eclipse.osbp.blob.feature/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.blob.feature/pom.xml b/org.eclipse.osbp.blob.feature/pom.xml
new file mode 100644
index 0000000..fee2b40
--- /dev/null
+++ b/org.eclipse.osbp.blob.feature/pom.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+#=======================================================================
+# Copyright (c) 2017 - 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 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/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.osbp.blob</groupId>
+ <artifactId>org.eclipse.osbp.blob.aggregator</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.osbp.blob.feature</artifactId>
+ <packaging>eclipse-feature</packaging>
+
+ <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.blob</groupId>
+ <artifactId>org.eclipse.osbp.blob</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/org.eclipse.osbp.blob.feature/src/main/javadoc/README.txt b/org.eclipse.osbp.blob.feature/src/main/javadoc/README.txt
new file mode 100644
index 0000000..831da7e
--- /dev/null
+++ b/org.eclipse.osbp.blob.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.blob.feature/src/overview.html b/org.eclipse.osbp.blob.feature/src/overview.html
new file mode 100644
index 0000000..f9cb87d
--- /dev/null
+++ b/org.eclipse.osbp.blob.feature/src/overview.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+ <title>OSBP blob</title>
+</head>
+<body>
+<p>The <strong>OSBP blob</strong> provides bundles for the OSBP blob functionality.</p>
+</body>
+</html>
diff --git a/org.eclipse.osbp.blob/.classpath b/org.eclipse.osbp.blob/.classpath
new file mode 100644
index 0000000..502f456
--- /dev/null
+++ b/org.eclipse.osbp.blob/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src/"/>
+ <classpathentry kind="src" path="src-gen/"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/org.eclipse.osbp.blob/.gitignore b/org.eclipse.osbp.blob/.gitignore
new file mode 100644
index 0000000..92145bc
--- /dev/null
+++ b/org.eclipse.osbp.blob/.gitignore
@@ -0,0 +1,2 @@
+/bin/
+/target/
\ No newline at end of file
diff --git a/org.eclipse.osbp.blob/.project b/org.eclipse.osbp.blob/.project
new file mode 100644
index 0000000..56eed4e
--- /dev/null
+++ b/org.eclipse.osbp.blob/.project
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.blob</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.pde.ds.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.babel.editor.rbeBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.sonarlint.eclipse.core.sonarlintBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+ <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>
+ <nature>org.eclipse.osbp.ide.core.ui.shared.OSBPNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.osbp.blob/.settings/com.vaadin.integration.eclipse.prefs b/org.eclipse.osbp.blob/.settings/com.vaadin.integration.eclipse.prefs
new file mode 100644
index 0000000..e1173bc
--- /dev/null
+++ b/org.eclipse.osbp.blob/.settings/com.vaadin.integration.eclipse.prefs
@@ -0,0 +1,2 @@
+com.vaadin.integration.eclipse.previousCompileAction=widgetset
+eclipse.preferences.version=1
diff --git a/org.eclipse.osbp.blob/.settings/org.eclipse.bpmn2.modeler.core.prefs b/org.eclipse.osbp.blob/.settings/org.eclipse.bpmn2.modeler.core.prefs
new file mode 100644
index 0000000..4bffcea
--- /dev/null
+++ b/org.eclipse.osbp.blob/.settings/org.eclipse.bpmn2.modeler.core.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+target.runtime=org.jboss.runtime.jbpm5
diff --git a/org.eclipse.osbp.blob/.settings/org.eclipse.core.resources.prefs b/org.eclipse.osbp.blob/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/org.eclipse.osbp.blob/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/org.eclipse.osbp.blob/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.osbp.blob/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..a698e59
--- /dev/null
+++ b/org.eclipse.osbp.blob/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/org.eclipse.osbp.blob/.settings/org.eclipse.m2e.core.prefs b/org.eclipse.osbp.blob/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/org.eclipse.osbp.blob/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/org.eclipse.osbp.blob/.settings/org.eclipse.pde.core.prefs b/org.eclipse.osbp.blob/.settings/org.eclipse.pde.core.prefs
new file mode 100644
index 0000000..f29e940
--- /dev/null
+++ b/org.eclipse.osbp.blob/.settings/org.eclipse.pde.core.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+pluginProject.extensions=false
+resolve.requirebundle=false
diff --git a/org.eclipse.osbp.blob/.settings/org.eclipse.xtend.core.Xtend.prefs b/org.eclipse.osbp.blob/.settings/org.eclipse.xtend.core.Xtend.prefs
new file mode 100644
index 0000000..19e3115
--- /dev/null
+++ b/org.eclipse.osbp.blob/.settings/org.eclipse.xtend.core.Xtend.prefs
@@ -0,0 +1,11 @@
+//outlet.DEFAULT_OUTPUT.sourceFolder.src/test/java.directory=src/test/generated-sources/xtend
+BuilderConfiguration.is_project_specific=true
+eclipse.preferences.version=1
+is_project_specific=true
+outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true
+outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=false
+outlet.DEFAULT_OUTPUT.sourceFolder.emf-gen.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.sourceFolder.src-gen.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.sourceFolder.src.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.sourceFolder.xtend-gen.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.userOutputPerSourceFolder=true
diff --git a/org.eclipse.osbp.blob/LICENSE.txt b/org.eclipse.osbp.blob/LICENSE.txt
new file mode 100644
index 0000000..ff42ad4
--- /dev/null
+++ b/org.eclipse.osbp.blob/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.blob/META-INF/MANIFEST.MF b/org.eclipse.osbp.blob/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..026e517
--- /dev/null
+++ b/org.eclipse.osbp.blob/META-INF/MANIFEST.MF
@@ -0,0 +1,43 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.osbp.blob
+Bundle-SymbolicName: org.eclipse.osbp.blob
+Bundle-Version: 0.9.0.qualifier
+Bundle-Activator: org.eclipse.osbp.blob.Activator
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-ActivationPolicy: lazy
+Require-Bundle: org.slf4j.api;bundle-version="1.7.2",
+ org.eclipse.osgi.services,
+ org.eclipse.osbp.dsl.datatype.lib;bundle-version="0.9.0",
+ org.eclipse.osbp.runtime.common;bundle-version="0.9.0",
+ javax.persistence;bundle-version="2.1.0",
+ javax.validation.api;bundle-version="1.1.0",
+ org.eclipse.xtext.xbase.lib;bundle-version="2.11.0",
+ org.eclipse.osbp.dsl.dto.lib;bundle-version="0.9.0",
+ multifileupload.osgi;bundle-version="1.10.0",
+ com.vaadin.server;bundle-version="7.7.6",
+ com.vaadin.shared;bundle-version="7.7.6",
+ org.eclipse.e4.core.services;bundle-version="2.0.100",
+ org.jsoup;bundle-version="1.8.3",
+ org.eclipse.osbp.jpa.services;bundle-version="0.9.0",
+ org.apache.commons.compress;bundle-version="1.9.0",
+ org.eclipse.osbp.gitinfo;bundle-version="0.9.0",
+ org.eclipse.osgi;bundle-version="3.11.3",
+ org.eclipse.core.runtime;bundle-version="3.12.0",
+ org.eclipse.persistence.core;bundle-version="2.6.1",
+ org.eclipse.persistence.jpa;bundle-version="2.6.1",
+ org.eclipse.osbp.preferences;bundle-version="0.9.0",
+ org.eclipse.osbp.xtext.i18n;bundle-version="0.9.0"
+Bundle-Vendor: Eclipse OSBP
+Import-Package: com.vaadin.ui,
+ org.eclipse.e4.ui.di,
+ org.eclipse.osbp.core.api.persistence;version="0.9.0",
+ org.eclipse.osbp.ui.api.customfields
+Service-Component: OSGI-INF/*.xml
+Factory-Model: datatype,
+ entity,
+ dto
+Export-Package: org.eclipse.osbp.blob.component;version="0.9.0",
+ org.eclipse.osbp.blob.dtos;version="0.9.0",
+ org.eclipse.osbp.blob.entities;version="0.9.0",
+ org.eclipse.osbp.blob.service;version="0.9.0"
diff --git a/org.eclipse.osbp.blob/META-INF/persistence.xml b/org.eclipse.osbp.blob/META-INF/persistence.xml
new file mode 100644
index 0000000..247df05
--- /dev/null
+++ b/org.eclipse.osbp.blob/META-INF/persistence.xml
@@ -0,0 +1,13 @@
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence persistence_1_0.xsd"
+ version="1.0">
+ <persistence-unit name="blob"
+ transaction-type="RESOURCE_LOCAL">
+ <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
+ <class>org.eclipse.osbp.blob.entities.BlobMapping</class>
+ <class>org.eclipse.osbp.blob.entities.Blob</class>
+
+ <exclude-unlisted-classes>true</exclude-unlisted-classes>
+ </persistence-unit>
+</persistence>
diff --git a/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.PersistenceServiceBinder.xml b/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.PersistenceServiceBinder.xml
new file mode 100644
index 0000000..da39e53
--- /dev/null
+++ b/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.PersistenceServiceBinder.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osbp.blob.PersistenceServiceBinder">
+ <reference bind="bindPersistenceService" cardinality="1..1" interface="org.eclipse.osbp.core.api.persistence.IPersistenceService" name="PersistenceService" policy="static" unbind="unbindPersistenceService"/>
+ <implementation class="org.eclipse.osbp.blob.PersistenceServiceBinder"/>
+</scr:component>
\ No newline at end of file
diff --git a/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.dtos.mapper.AttributesDtoMapper.xml b/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.dtos.mapper.AttributesDtoMapper.xml
new file mode 100644
index 0000000..11de66c
--- /dev/null
+++ b/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.dtos.mapper.AttributesDtoMapper.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osbp.blob.dtos.mapper.attributesdtomapper">
+ <implementation class="org.eclipse.osbp.blob.dtos.mapper.AttributesDtoMapper"/>
+ <service>
+ <provide interface="org.eclipse.osbp.dsl.dto.lib.IMapper"/>
+ </service>
+
+ <property name="fordto.from.entity" type="String" value="org.eclipse.osbp.blob.entities.Attributes"/>
+ <property name="fordto.to.dto" type="String" value="org.eclipse.osbp.blob.dtos.AttributesDto"/>
+
+ <property name="forentity.from.dto" type="String" value="org.eclipse.osbp.blob.dtos.AttributesDto"/>
+ <property name="forentity.to.entity" type="String" value="org.eclipse.osbp.blob.entities.Attributes"/>
+
+ <property name="service.pid" type="String" value="org.eclipse.osbp.blob.dtos.mapper.attributesdtomapper"/>
+ <reference name="mapperAccess" interface="org.eclipse.osbp.dsl.dto.lib.IMapperAccess"
+ cardinality="1..1" policy="static" bind="bindMapperAccess" unbind="unbindMapperAccess"/>
+</scr:component>
diff --git a/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.dtos.mapper.BlobDtoMapper.xml b/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.dtos.mapper.BlobDtoMapper.xml
new file mode 100644
index 0000000..e5cb635
--- /dev/null
+++ b/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.dtos.mapper.BlobDtoMapper.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osbp.blob.dtos.mapper.blobdtomapper">
+ <implementation class="org.eclipse.osbp.blob.dtos.mapper.BlobDtoMapper"/>
+ <service>
+ <provide interface="org.eclipse.osbp.dsl.dto.lib.IMapper"/>
+ </service>
+
+ <property name="fordto.from.entity" type="String" value="org.eclipse.osbp.blob.entities.Blob"/>
+ <property name="fordto.to.dto" type="String" value="org.eclipse.osbp.blob.dtos.BlobDto"/>
+
+ <property name="forentity.from.dto" type="String" value="org.eclipse.osbp.blob.dtos.BlobDto"/>
+ <property name="forentity.to.entity" type="String" value="org.eclipse.osbp.blob.entities.Blob"/>
+
+ <property name="service.pid" type="String" value="org.eclipse.osbp.blob.dtos.mapper.blobdtomapper"/>
+ <reference name="mapperAccess" interface="org.eclipse.osbp.dsl.dto.lib.IMapperAccess"
+ cardinality="1..1" policy="static" bind="bindMapperAccess" unbind="unbindMapperAccess"/>
+</scr:component>
diff --git a/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.dtos.mapper.BlobMappingDtoMapper.xml b/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.dtos.mapper.BlobMappingDtoMapper.xml
new file mode 100644
index 0000000..7dc0347
--- /dev/null
+++ b/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.dtos.mapper.BlobMappingDtoMapper.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osbp.blob.dtos.mapper.blobmappingdtomapper">
+ <implementation class="org.eclipse.osbp.blob.dtos.mapper.BlobMappingDtoMapper"/>
+ <service>
+ <provide interface="org.eclipse.osbp.dsl.dto.lib.IMapper"/>
+ </service>
+
+ <property name="fordto.from.entity" type="String" value="org.eclipse.osbp.blob.entities.BlobMapping"/>
+ <property name="fordto.to.dto" type="String" value="org.eclipse.osbp.blob.dtos.BlobMappingDto"/>
+
+ <property name="forentity.from.dto" type="String" value="org.eclipse.osbp.blob.dtos.BlobMappingDto"/>
+ <property name="forentity.to.entity" type="String" value="org.eclipse.osbp.blob.entities.BlobMapping"/>
+
+ <property name="service.pid" type="String" value="org.eclipse.osbp.blob.dtos.mapper.blobmappingdtomapper"/>
+ <reference name="mapperAccess" interface="org.eclipse.osbp.dsl.dto.lib.IMapperAccess"
+ cardinality="1..1" policy="static" bind="bindMapperAccess" unbind="unbindMapperAccess"/>
+</scr:component>
diff --git a/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.dtos.mapper.BlobTypingDtoMapper.xml b/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.dtos.mapper.BlobTypingDtoMapper.xml
new file mode 100644
index 0000000..8dafae4
--- /dev/null
+++ b/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.dtos.mapper.BlobTypingDtoMapper.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osbp.blob.dtos.mapper.blobtypingdtomapper">
+ <implementation class="org.eclipse.osbp.blob.dtos.mapper.BlobTypingDtoMapper"/>
+ <service>
+ <provide interface="org.eclipse.osbp.dsl.dto.lib.IMapper"/>
+ </service>
+
+ <property name="fordto.from.entity" type="String" value="org.eclipse.osbp.blob.entities.BlobTyping"/>
+ <property name="fordto.to.dto" type="String" value="org.eclipse.osbp.blob.dtos.BlobTypingDto"/>
+
+ <property name="forentity.from.dto" type="String" value="org.eclipse.osbp.blob.dtos.BlobTypingDto"/>
+ <property name="forentity.to.entity" type="String" value="org.eclipse.osbp.blob.entities.BlobTyping"/>
+
+ <property name="service.pid" type="String" value="org.eclipse.osbp.blob.dtos.mapper.blobtypingdtomapper"/>
+ <reference name="mapperAccess" interface="org.eclipse.osbp.dsl.dto.lib.IMapperAccess"
+ cardinality="1..1" policy="static" bind="bindMapperAccess" unbind="unbindMapperAccess"/>
+</scr:component>
diff --git a/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.dtos.mapper.ContentTypeDtoMapper.xml b/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.dtos.mapper.ContentTypeDtoMapper.xml
new file mode 100644
index 0000000..2a8a1b3
--- /dev/null
+++ b/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.dtos.mapper.ContentTypeDtoMapper.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osbp.blob.dtos.mapper.contenttypedtomapper">
+ <implementation class="org.eclipse.osbp.blob.dtos.mapper.ContentTypeDtoMapper"/>
+ <service>
+ <provide interface="org.eclipse.osbp.dsl.dto.lib.IMapper"/>
+ </service>
+
+ <property name="fordto.from.entity" type="String" value="org.eclipse.osbp.blob.entities.ContentType"/>
+ <property name="fordto.to.dto" type="String" value="org.eclipse.osbp.blob.dtos.ContentTypeDto"/>
+
+ <property name="forentity.from.dto" type="String" value="org.eclipse.osbp.blob.dtos.ContentTypeDto"/>
+ <property name="forentity.to.entity" type="String" value="org.eclipse.osbp.blob.entities.ContentType"/>
+
+ <property name="service.pid" type="String" value="org.eclipse.osbp.blob.dtos.mapper.contenttypedtomapper"/>
+ <reference name="mapperAccess" interface="org.eclipse.osbp.dsl.dto.lib.IMapperAccess"
+ cardinality="1..1" policy="static" bind="bindMapperAccess" unbind="unbindMapperAccess"/>
+</scr:component>
diff --git a/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.dtos.mapper.MimeTypeDtoMapper.xml b/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.dtos.mapper.MimeTypeDtoMapper.xml
new file mode 100644
index 0000000..ee015f0
--- /dev/null
+++ b/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.dtos.mapper.MimeTypeDtoMapper.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osbp.blob.dtos.mapper.mimetypedtomapper">
+ <implementation class="org.eclipse.osbp.blob.dtos.mapper.MimeTypeDtoMapper"/>
+ <service>
+ <provide interface="org.eclipse.osbp.dsl.dto.lib.IMapper"/>
+ </service>
+
+ <property name="fordto.from.entity" type="String" value="org.eclipse.osbp.blob.entities.MimeType"/>
+ <property name="fordto.to.dto" type="String" value="org.eclipse.osbp.blob.dtos.MimeTypeDto"/>
+
+ <property name="forentity.from.dto" type="String" value="org.eclipse.osbp.blob.dtos.MimeTypeDto"/>
+ <property name="forentity.to.entity" type="String" value="org.eclipse.osbp.blob.entities.MimeType"/>
+
+ <property name="service.pid" type="String" value="org.eclipse.osbp.blob.dtos.mapper.mimetypedtomapper"/>
+ <reference name="mapperAccess" interface="org.eclipse.osbp.dsl.dto.lib.IMapperAccess"
+ cardinality="1..1" policy="static" bind="bindMapperAccess" unbind="unbindMapperAccess"/>
+</scr:component>
diff --git a/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.dtos.mapper.NormalizerResolutionDtoMapper.xml b/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.dtos.mapper.NormalizerResolutionDtoMapper.xml
new file mode 100644
index 0000000..873545e
--- /dev/null
+++ b/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.dtos.mapper.NormalizerResolutionDtoMapper.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osbp.blob.dtos.mapper.normalizerresolutiondtomapper">
+ <implementation class="org.eclipse.osbp.blob.dtos.mapper.NormalizerResolutionDtoMapper"/>
+ <service>
+ <provide interface="org.eclipse.osbp.dsl.dto.lib.IMapper"/>
+ </service>
+
+ <property name="fordto.from.entity" type="String" value="org.eclipse.osbp.blob.entities.NormalizerResolution"/>
+ <property name="fordto.to.dto" type="String" value="org.eclipse.osbp.blob.dtos.NormalizerResolutionDto"/>
+
+ <property name="forentity.from.dto" type="String" value="org.eclipse.osbp.blob.dtos.NormalizerResolutionDto"/>
+ <property name="forentity.to.entity" type="String" value="org.eclipse.osbp.blob.entities.NormalizerResolution"/>
+
+ <property name="service.pid" type="String" value="org.eclipse.osbp.blob.dtos.mapper.normalizerresolutiondtomapper"/>
+ <reference name="mapperAccess" interface="org.eclipse.osbp.dsl.dto.lib.IMapperAccess"
+ cardinality="1..1" policy="static" bind="bindMapperAccess" unbind="unbindMapperAccess"/>
+</scr:component>
diff --git a/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.dtos.service.BlobDtoService.xml b/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.dtos.service.BlobDtoService.xml
new file mode 100644
index 0000000..540e81d
--- /dev/null
+++ b/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.dtos.service.BlobDtoService.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osbp.blob.dtos.service.blobdtoservice">
+ <implementation class="org.eclipse.osbp.blob.dtos.service.BlobDtoService"/>
+ <service>
+ <provide interface="org.eclipse.osbp.runtime.common.filter.IDTOService"/>
+ </service>
+ <property name="dto" type="String" value="org.eclipse.osbp.blob.dtos.BlobDto"/>
+ <property name="service.pid" type="String" value="org.eclipse.osbp.blob.dtos.service.blobdtoservice"/>
+<reference name="mapperAccess" interface="org.eclipse.osbp.dsl.dto.lib.IMapperAccess" cardinality="1..1"
+ policy="dynamic" bind="bindMapperAccess" unbind="unbindMapperAccess"/>
+<reference name="filterEnhancers" interface="org.eclipse.osbp.runtime.common.filter.IFilterEnhancer" cardinality="0..n"
+ policy="dynamic" bind="addFilterEnhancer" unbind="removeFilterEnhancer"/>
+<reference name="sessionManager" interface="org.eclipse.osbp.runtime.common.session.ISessionManager" cardinality="1..1"
+ policy="dynamic" bind="bindSessionManager" unbind="unbindSessionManager"/>
+</scr:component>
diff --git a/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.dtos.service.BlobMappingDtoService.xml b/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.dtos.service.BlobMappingDtoService.xml
new file mode 100644
index 0000000..6e8a324
--- /dev/null
+++ b/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.dtos.service.BlobMappingDtoService.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osbp.blob.dtos.service.blobmappingdtoservice">
+ <implementation class="org.eclipse.osbp.blob.dtos.service.BlobMappingDtoService"/>
+ <service>
+ <provide interface="org.eclipse.osbp.runtime.common.filter.IDTOService"/>
+ </service>
+ <property name="dto" type="String" value="org.eclipse.osbp.blob.dtos.BlobMappingDto"/>
+ <property name="service.pid" type="String" value="org.eclipse.osbp.blob.dtos.service.blobmappingdtoservice"/>
+<reference name="mapperAccess" interface="org.eclipse.osbp.dsl.dto.lib.IMapperAccess" cardinality="1..1"
+ policy="dynamic" bind="bindMapperAccess" unbind="unbindMapperAccess"/>
+<reference name="filterEnhancers" interface="org.eclipse.osbp.runtime.common.filter.IFilterEnhancer" cardinality="0..n"
+ policy="dynamic" bind="addFilterEnhancer" unbind="removeFilterEnhancer"/>
+<reference name="sessionManager" interface="org.eclipse.osbp.runtime.common.session.ISessionManager" cardinality="1..1"
+ policy="dynamic" bind="bindSessionManager" unbind="unbindSessionManager"/>
+</scr:component>
diff --git a/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.service.BlobService.xml b/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.service.BlobService.xml
new file mode 100644
index 0000000..c0f65b5
--- /dev/null
+++ b/org.eclipse.osbp.blob/OSGI-INF/org.eclipse.osbp.blob.service.BlobService.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osbp.blob.service.BlobService">
+ <service>
+ <provide interface="org.eclipse.osbp.ui.api.customfields.IBlobService"/>
+ </service>
+ <implementation class="org.eclipse.osbp.blob.service.BlobService"/>
+</scr:component>
\ No newline at end of file
diff --git a/org.eclipse.osbp.blob/README.txt b/org.eclipse.osbp.blob/README.txt
new file mode 100644
index 0000000..e81ba90
--- /dev/null
+++ b/org.eclipse.osbp.blob/README.txt
@@ -0,0 +1,16 @@
+Your code for blob goes in here.
+
+Add all your sources as you usually do for plugin development.
+
+If you need more bundles to implement the feature, duplicate this folder and ad the new bundle code into the copy
+
+Do not forget to add your new bundle to the
+ - feature pom.xml
+ - feature feature.xml
+ - and the aggregator pom.xml
+as it is done for this bundle.
+
+Have fun!
+
+
+You can delete this file from the final project.
\ No newline at end of file
diff --git a/org.eclipse.osbp.blob/about.html b/org.eclipse.osbp.blob/about.html
new file mode 100644
index 0000000..64c0598
--- /dev/null
+++ b/org.eclipse.osbp.blob/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.blob/about.ini b/org.eclipse.osbp.blob/about.ini
new file mode 100644
index 0000000..7df671f
--- /dev/null
+++ b/org.eclipse.osbp.blob/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.blob/about.mappings b/org.eclipse.osbp.blob/about.mappings
new file mode 100644
index 0000000..4511a0a
--- /dev/null
+++ b/org.eclipse.osbp.blob/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.blob/about.properties b/org.eclipse.osbp.blob/about.properties
new file mode 100644
index 0000000..29cb85f
--- /dev/null
+++ b/org.eclipse.osbp.blob/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.blob
+
+################ 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.blob/about_files/README.txt b/org.eclipse.osbp.blob/about_files/README.txt
new file mode 100644
index 0000000..cc50489
--- /dev/null
+++ b/org.eclipse.osbp.blob/about_files/README.txt
@@ -0,0 +1 @@
+All external licenses referenced in about file go here
\ No newline at end of file
diff --git a/org.eclipse.osbp.blob/build.properties b/org.eclipse.osbp.blob/build.properties
new file mode 100644
index 0000000..06bcff4
--- /dev/null
+++ b/org.eclipse.osbp.blob/build.properties
@@ -0,0 +1,21 @@
+source.. = src/,\
+ src-gen/
+output.. = target/classes/
+bin.includes = about.properties,\
+ about.mappings,\
+ about.ini,\
+ about.html,\
+ META-INF/,\
+ .,\
+ OSGI-INF/,\
+ i18n/,\
+ 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.blob/epl-v10.html b/org.eclipse.osbp.blob/epl-v10.html
new file mode 100644
index 0000000..b398acc
--- /dev/null
+++ b/org.eclipse.osbp.blob/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.blob/i18n/I18N.properties b/org.eclipse.osbp.blob/i18n/I18N.properties
new file mode 100644
index 0000000..d59ac68
--- /dev/null
+++ b/org.eclipse.osbp.blob/i18n/I18N.properties
@@ -0,0 +1,36 @@
+#default
+activation_time=activation_time
+actual_owner=actual_owner
+attributes=attributes
+blob=blob
+blob_mapping=blob_mapping
+blob_typing=blob_typing
+blobs_ref=blobs_ref
+content_transfer_encoding=content_transfer_encoding
+content_type=content_type
+content_type_list=content_type_list
+created_by=created_by
+created_on=created_on
+data=data
+description=description
+expiration_time=expiration_time
+file_name=file_name
+id=id
+mime_type=mime_type
+mime_type_id=mime_type_id
+mime_version=mime_version
+name=name
+normalizer=normalizer
+normalizer_resolution=normalizer_resolution
+priority=priority
+process_id=process_id
+process_instance_id=process_instance_id
+process_session_id=process_session_id
+resolution=resolution
+resolution_id=resolution_id
+size=size
+status=status
+subject=subject
+task_id=task_id
+type=type
+unique_name=unique_name
diff --git a/org.eclipse.osbp.blob/i18n/I18N_de.properties b/org.eclipse.osbp.blob/i18n/I18N_de.properties
new file mode 100644
index 0000000..c0691a2
--- /dev/null
+++ b/org.eclipse.osbp.blob/i18n/I18N_de.properties
@@ -0,0 +1,36 @@
+#de
+activation_time=Activation time
+actual_owner=Actual owner
+attributes=Attributes
+blob=Blob
+blob_mapping=Blob mapping
+blob_typing=Blob typing
+blobs_ref=Blobs reference
+content_transfer_encoding=Content transfer encoding
+content_type=Content type
+content_type_list=Content type list
+created_by=Created by
+created_on=Created on
+data=Data
+description=Description
+expiration_time=Expiration time
+file_name=File name
+id=Identifier
+mime_type=Mime type
+mime_type_id=Mime type identifier
+mime_version=Mime version
+name=Name
+normalizer=Normalizer
+normalizer_resolution=Normalizer resolution
+priority=Priority
+process_id=Process identifier
+process_instance_id=Process instance identifier
+process_session_id=Process session identifier
+resolution=Resolution
+resolution_id=Resolution identifier
+size=Size
+status=Status
+subject=Subject
+task_id=Task identifier
+type=Type
+unique_name=Unique name
diff --git a/org.eclipse.osbp.blob/i18n/I18N_de_AT.properties b/org.eclipse.osbp.blob/i18n/I18N_de_AT.properties
new file mode 100644
index 0000000..6c73e1d
--- /dev/null
+++ b/org.eclipse.osbp.blob/i18n/I18N_de_AT.properties
@@ -0,0 +1 @@
+#de_AT
diff --git a/org.eclipse.osbp.blob/i18n/I18N_en.properties b/org.eclipse.osbp.blob/i18n/I18N_en.properties
new file mode 100644
index 0000000..e80f9b9
--- /dev/null
+++ b/org.eclipse.osbp.blob/i18n/I18N_en.properties
@@ -0,0 +1,36 @@
+#en
+activation_time=Activation time
+actual_owner=Actual owner
+attributes=Attributes
+blob=Blob
+blob_mapping=Blob mapping
+blob_typing=Blob typing
+blobs_ref=Blobs reference
+content_transfer_encoding=Content transfer encoding
+content_type=Content type
+content_type_list=Content type list
+created_by=Created by
+created_on=Created on
+data=Data
+description=Description
+expiration_time=Expiration time
+file_name=File name
+id=Identifier
+mime_type=Mime type
+mime_type_id=Mime type identifier
+mime_version=Mime version
+name=Name
+normalizer=Normalizer
+normalizer_resolution=Normalizer resolution
+priority=Priority
+process_id=Process identifier
+process_instance_id=Process instance identifier
+process_session_id=Process session identifier
+resolution=Resolution
+resolution_id=Resolution identifier
+size=Size
+status=Status
+subject=Subject
+task_id=Task identifier
+type=Type
+unique_name=Unique name
diff --git a/org.eclipse.osbp.blob/i18n/I18N_en_US.properties b/org.eclipse.osbp.blob/i18n/I18N_en_US.properties
new file mode 100644
index 0000000..d89e21c
--- /dev/null
+++ b/org.eclipse.osbp.blob/i18n/I18N_en_US.properties
@@ -0,0 +1 @@
+#en_US
diff --git a/org.eclipse.osbp.blob/i18n/I18N_fr.properties b/org.eclipse.osbp.blob/i18n/I18N_fr.properties
new file mode 100644
index 0000000..a84da83
--- /dev/null
+++ b/org.eclipse.osbp.blob/i18n/I18N_fr.properties
@@ -0,0 +1 @@
+#fr
diff --git a/org.eclipse.osbp.blob/license.html b/org.eclipse.osbp.blob/license.html
new file mode 100644
index 0000000..6e579a5
--- /dev/null
+++ b/org.eclipse.osbp.blob/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.blob/notice.html b/org.eclipse.osbp.blob/notice.html
new file mode 100644
index 0000000..c3d34c3
--- /dev/null
+++ b/org.eclipse.osbp.blob/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.blob/pom.xml b/org.eclipse.osbp.blob/pom.xml
new file mode 100644
index 0000000..9003476
--- /dev/null
+++ b/org.eclipse.osbp.blob/pom.xml
@@ -0,0 +1,65 @@
+<?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.blob</groupId>
+ <artifactId>org.eclipse.osbp.blob.aggregator</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+
+ <artifactId>org.eclipse.osbp.blob</artifactId>
+ <packaging>eclipse-plugin</packaging>
+ <build>
+ <plugins>
+ <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>
+ <source>emf-gen</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>commons-math</groupId>
+ <artifactId>commons-math</artifactId>
+ <version>1.2</version>
+ </dependency>
+<!-- <dependency>
+ <groupId>org.eclipse.osbp.dependencies</groupId>
+ <artifactId>
+ org.eclipse.osbp.dependencies.bundle.jfairy
+ </artifactId>
+ <version>0.3.0-SNAPSHOT</version>
+ </dependency>
+ -->
+ </dependencies>
+
+</project>
diff --git a/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/AttributesDto.java b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/AttributesDto.java
new file mode 100644
index 0000000..1111a39
--- /dev/null
+++ b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/AttributesDto.java
@@ -0,0 +1,167 @@
+package org.eclipse.osbp.blob.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.runtime.common.annotations.Dirty;
+import org.eclipse.osbp.runtime.common.annotations.Dispose;
+
+@SuppressWarnings("all")
+public class AttributesDto implements IDto, Serializable, PropertyChangeListener {
+ private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);
+
+ @Dispose
+ private boolean disposed;
+
+ @Dirty
+ private transient boolean dirty;
+
+ private String size;
+
+ private String resolution;
+
+ public AttributesDto() {
+ installLazyCollections();
+ }
+
+ /**
+ * Installs lazy collection resolving for entity {@link Attributes} to the dto {@link AttributesDto}.
+ *
+ */
+ protected void installLazyCollections() {
+
+ }
+
+ /**
+ * @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);
+ }
+
+ /**
+ * @return true, if the object is dirty.
+ *
+ */
+ public boolean isDirty() {
+ return dirty;
+ }
+
+ /**
+ * Sets the dirty state of this object.
+ *
+ */
+ public void setDirty(final boolean dirty) {
+ firePropertyChange("dirty", this.dirty, this.dirty = dirty );
+ }
+
+ /**
+ * 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);
+ }
+
+ /**
+ * Returns the size property or <code>null</code> if not present.
+ */
+ public String getSize() {
+ return this.size;
+ }
+
+ /**
+ * Sets the <code>size</code> property to this instance.
+ *
+ * @param size - the property
+ * @throws RuntimeException if instance is <code>disposed</code>
+ *
+ */
+ public void setSize(final String size) {
+ firePropertyChange("size", this.size, this.size = size );
+ }
+
+ /**
+ * Returns the resolution property or <code>null</code> if not present.
+ */
+ public String getResolution() {
+ return this.resolution;
+ }
+
+ /**
+ * Sets the <code>resolution</code> property to this instance.
+ *
+ * @param resolution - the property
+ * @throws RuntimeException if instance is <code>disposed</code>
+ *
+ */
+ public void setResolution(final String resolution) {
+ firePropertyChange("resolution", this.resolution, this.resolution = resolution );
+ }
+
+ 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.blob/src-gen/org/eclipse/osbp/blob/dtos/BlobDto.java b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/BlobDto.java
new file mode 100644
index 0000000..0fb659c
--- /dev/null
+++ b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/BlobDto.java
@@ -0,0 +1,253 @@
+package org.eclipse.osbp.blob.dtos;
+
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+import java.io.Serializable;
+import javax.validation.Valid;
+import org.eclipse.osbp.blob.dtos.BlobMappingDto;
+import org.eclipse.osbp.dsl.common.datatypes.IDto;
+import org.eclipse.osbp.runtime.common.annotations.Dirty;
+import org.eclipse.osbp.runtime.common.annotations.Dispose;
+import org.eclipse.osbp.runtime.common.annotations.DomainReference;
+import org.eclipse.osbp.runtime.common.annotations.FilterDepth;
+import org.eclipse.osbp.runtime.common.annotations.Id;
+
+@SuppressWarnings("all")
+public class BlobDto implements IDto, Serializable, PropertyChangeListener {
+ private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);
+
+ @Dispose
+ private boolean disposed;
+
+ @Dirty
+ private transient boolean dirty;
+
+ @Id
+ private String id = java.util.UUID.randomUUID().toString();
+
+ @Valid
+ private byte[] data;
+
+ private int resolutionId;
+
+ @DomainReference
+ @FilterDepth(depth = 0)
+ private BlobMappingDto blobMapping;
+
+ public BlobDto() {
+ installLazyCollections();
+ }
+
+ /**
+ * Installs lazy collection resolving for entity {@link Blob} to the dto {@link BlobDto}.
+ *
+ */
+ protected void installLazyCollections() {
+
+ }
+
+ /**
+ * @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);
+ }
+
+ /**
+ * @return true, if the object is dirty.
+ *
+ */
+ public boolean isDirty() {
+ return dirty;
+ }
+
+ /**
+ * Sets the dirty state of this object.
+ *
+ */
+ public void setDirty(final boolean dirty) {
+ firePropertyChange("dirty", this.dirty, this.dirty = dirty );
+ }
+
+ /**
+ * 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);
+ }
+
+ /**
+ * Returns the id property or <code>null</code> if not present.
+ */
+ public String getId() {
+ return this.id;
+ }
+
+ /**
+ * Sets the <code>id</code> property to this instance.
+ *
+ * @param id - the property
+ * @throws RuntimeException if instance is <code>disposed</code>
+ *
+ */
+ public void setId(final String id) {
+ firePropertyChange("id", this.id, this.id = id );
+ installLazyCollections();
+ }
+
+ /**
+ * Returns the data property or <code>null</code> if not present.
+ */
+ public byte[] getData() {
+ return this.data;
+ }
+
+ /**
+ * Sets the <code>data</code> property to this instance.
+ *
+ * @param data - the property
+ * @throws RuntimeException if instance is <code>disposed</code>
+ *
+ */
+ public void setData(final byte[] data) {
+ firePropertyChange("data", this.data, this.data = data );
+ }
+
+ /**
+ * Returns the resolutionId property or <code>null</code> if not present.
+ */
+ public int getResolutionId() {
+ return this.resolutionId;
+ }
+
+ /**
+ * Sets the <code>resolutionId</code> property to this instance.
+ *
+ * @param resolutionId - the property
+ * @throws RuntimeException if instance is <code>disposed</code>
+ *
+ */
+ public void setResolutionId(final int resolutionId) {
+ firePropertyChange("resolutionId", this.resolutionId, this.resolutionId = resolutionId );
+ }
+
+ /**
+ * Returns the blobMapping property or <code>null</code> if not present.
+ */
+ public BlobMappingDto getBlobMapping() {
+ return this.blobMapping;
+ }
+
+ /**
+ * Sets the <code>blobMapping</code> property to this instance.
+ * Since the reference has an opposite reference, the opposite <code>BlobMappingDto#
+ * blobsRef</code> of the <code>blobMapping</code> will be handled automatically and no
+ * further coding is required to keep them in sync.<p>
+ * See {@link BlobMappingDto#setBlobsRef(BlobMappingDto)
+ *
+ * @param blobMapping - the property
+ * @throws RuntimeException if instance is <code>disposed</code>
+ *
+ */
+ public void setBlobMapping(final BlobMappingDto blobMapping) {
+ checkDisposed();
+ if (this.blobMapping != null) {
+ this.blobMapping.internalRemoveFromBlobsRef(this);
+ }
+
+ internalSetBlobMapping(blobMapping);
+
+ if (this.blobMapping != null) {
+ this.blobMapping.internalAddToBlobsRef(this);
+ }
+ }
+
+ /**
+ * For internal use only!
+ */
+ public void internalSetBlobMapping(final BlobMappingDto blobMapping) {
+ firePropertyChange("blobMapping", this.blobMapping, this.blobMapping = blobMapping);
+ }
+
+ public boolean equalVersions(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ BlobDto other = (BlobDto) obj;
+ if (this.id == null) {
+ if (other.id != null)
+ return false;
+ } else if (!this.id.equals(other.id))
+ return false;
+ return true;
+ }
+
+ 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.blob/src-gen/org/eclipse/osbp/blob/dtos/BlobMappingDto.java b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/BlobMappingDto.java
new file mode 100644
index 0000000..15f9e8a
--- /dev/null
+++ b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/BlobMappingDto.java
@@ -0,0 +1,360 @@
+package org.eclipse.osbp.blob.dtos;
+
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+import java.io.Serializable;
+import java.util.Collections;
+import java.util.List;
+import javax.validation.Valid;
+import org.eclipse.osbp.blob.dtos.BlobDto;
+import org.eclipse.osbp.dsl.common.datatypes.IDto;
+import org.eclipse.osbp.runtime.common.annotations.Dirty;
+import org.eclipse.osbp.runtime.common.annotations.Dispose;
+import org.eclipse.osbp.runtime.common.annotations.DomainReference;
+import org.eclipse.osbp.runtime.common.annotations.FilterDepth;
+import org.eclipse.osbp.runtime.common.annotations.Id;
+
+@SuppressWarnings("all")
+public class BlobMappingDto implements IDto, Serializable, PropertyChangeListener {
+ private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);
+
+ @Dispose
+ private boolean disposed;
+
+ @Dirty
+ private transient boolean dirty;
+
+ @Id
+ private String id = java.util.UUID.randomUUID().toString();
+
+ private String uniqueName;
+
+ private String fileName;
+
+ private int mimeTypeId;
+
+ @DomainReference
+ @Valid
+ @FilterDepth(depth = 0)
+ private List<BlobDto> blobsRef;
+
+ public BlobMappingDto() {
+ installLazyCollections();
+ }
+
+ /**
+ * Installs lazy collection resolving for entity {@link BlobMapping} to the dto {@link BlobMappingDto}.
+ *
+ */
+ protected void installLazyCollections() {
+ blobsRef = new org.eclipse.osbp.dsl.dto.lib.OppositeContainmentDtoList<>(
+ org.eclipse.osbp.dsl.dto.lib.MappingContext.getCurrent(),
+ BlobDto.class, this, "blobMapping.id",
+ (java.util.function.Supplier<Object> & Serializable) () -> this.getId(), this);
+ }
+
+ /**
+ * @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);
+ }
+
+ /**
+ * @return true, if the object is dirty.
+ *
+ */
+ public boolean isDirty() {
+ return dirty;
+ }
+
+ /**
+ * Sets the dirty state of this object.
+ *
+ */
+ public void setDirty(final boolean dirty) {
+ firePropertyChange("dirty", this.dirty, this.dirty = dirty );
+ }
+
+ /**
+ * 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;
+ }
+ try {
+ // Dispose all the composition references.
+ if (this.blobsRef != null) {
+ for (BlobDto blobDto : this.blobsRef) {
+ blobDto.dispose();
+ }
+ this.blobsRef = null;
+ }
+
+ }
+ finally {
+ firePropertyChange("disposed", this.disposed, this.disposed = true);
+ }
+
+ }
+
+ /**
+ * Returns the id property or <code>null</code> if not present.
+ */
+ public String getId() {
+ return this.id;
+ }
+
+ /**
+ * Sets the <code>id</code> property to this instance.
+ *
+ * @param id - the property
+ * @throws RuntimeException if instance is <code>disposed</code>
+ *
+ */
+ public void setId(final String id) {
+ firePropertyChange("id", this.id, this.id = id );
+ installLazyCollections();
+ }
+
+ /**
+ * Returns the uniqueName property or <code>null</code> if not present.
+ */
+ public String getUniqueName() {
+ return this.uniqueName;
+ }
+
+ /**
+ * Sets the <code>uniqueName</code> property to this instance.
+ *
+ * @param uniqueName - the property
+ * @throws RuntimeException if instance is <code>disposed</code>
+ *
+ */
+ public void setUniqueName(final String uniqueName) {
+ firePropertyChange("uniqueName", this.uniqueName, this.uniqueName = uniqueName );
+ }
+
+ /**
+ * Returns the fileName property or <code>null</code> if not present.
+ */
+ public String getFileName() {
+ return this.fileName;
+ }
+
+ /**
+ * Sets the <code>fileName</code> property to this instance.
+ *
+ * @param fileName - the property
+ * @throws RuntimeException if instance is <code>disposed</code>
+ *
+ */
+ public void setFileName(final String fileName) {
+ firePropertyChange("fileName", this.fileName, this.fileName = fileName );
+ }
+
+ /**
+ * Returns the mimeTypeId property or <code>null</code> if not present.
+ */
+ public int getMimeTypeId() {
+ return this.mimeTypeId;
+ }
+
+ /**
+ * Sets the <code>mimeTypeId</code> property to this instance.
+ *
+ * @param mimeTypeId - the property
+ * @throws RuntimeException if instance is <code>disposed</code>
+ *
+ */
+ public void setMimeTypeId(final int mimeTypeId) {
+ firePropertyChange("mimeTypeId", this.mimeTypeId, this.mimeTypeId = mimeTypeId );
+ }
+
+ /**
+ * Returns an unmodifiable list of blobsRef.
+ */
+ public List<BlobDto> getBlobsRef() {
+ return Collections.unmodifiableList(internalGetBlobsRef());
+ }
+
+ /**
+ * Returns the list of <code>BlobDto</code>s thereby lazy initializing it. For internal use only!
+ *
+ * @return list - the resulting list
+ *
+ */
+ public List<BlobDto> internalGetBlobsRef() {
+ if (this.blobsRef == null) {
+ this.blobsRef = new java.util.ArrayList<BlobDto>();
+ }
+ return this.blobsRef;
+ }
+
+ /**
+ * Adds the given blobDto to this object. <p>
+ * Since the reference is a composition reference, the opposite reference <code>BlobDto#blobMapping</code> of the <code>blobDto</code> will be handled automatically and no further coding is required to keep them in sync.<p>
+ * See {@link BlobDto#setBlobMapping(BlobDto)}.
+ *
+ * @param blobDto - the property
+ * @throws RuntimeException if instance is <code>disposed</code>
+ *
+ */
+ public void addToBlobsRef(final BlobDto blobDto) {
+ checkDisposed();
+
+ blobDto.setBlobMapping(this);
+ }
+
+ /**
+ * Removes the given blobDto from this object. <p>
+ *
+ * @param blobDto - the property
+ * @throws RuntimeException if instance is <code>disposed</code>
+ *
+ */
+ public void removeFromBlobsRef(final BlobDto blobDto) {
+ checkDisposed();
+
+ blobDto.setBlobMapping(null);
+ }
+
+ /**
+ * For internal use only!
+ */
+ public void internalAddToBlobsRef(final BlobDto blobDto) {
+
+ if(!internalGetBlobsRef().contains(blobDto)) {
+ if(!org.eclipse.osbp.dsl.dto.lib.MappingContext.isMappingMode()) {
+ // collections will become resolved! We need to send a delta notification.
+ List<BlobDto> oldList = new java.util.ArrayList<>(internalGetBlobsRef());
+ internalGetBlobsRef().add(blobDto);
+ firePropertyChange("blobsRef", oldList, internalGetBlobsRef());
+ } else {
+ // in mapping mode, we do NOT resolve any collection
+ internalGetBlobsRef().add(blobDto);
+ }
+ }
+ }
+
+ /**
+ * For internal use only!
+ */
+ public void internalRemoveFromBlobsRef(final BlobDto blobDto) {
+ if(!org.eclipse.osbp.dsl.dto.lib.MappingContext.isMappingMode()) {
+ // collections will become resolved! We need to send a delta notification.
+ List<BlobDto> oldList = new java.util.ArrayList<>(internalGetBlobsRef());
+ internalGetBlobsRef().remove(blobDto);
+ firePropertyChange("blobsRef", oldList, internalGetBlobsRef());
+ }else{
+ // in mapping mode, we do NOT resolve any collection
+ internalGetBlobsRef().remove(blobDto);
+ }
+ }
+
+ /**
+ * Sets the <code>blobsRef</code> property to this instance.
+ * Since the reference has an opposite reference, the opposite <code>BlobDto#
+ * blobMapping</code> of the <code>blobsRef</code> will be handled automatically and no
+ * further coding is required to keep them in sync.<p>
+ * See {@link BlobDto#setBlobMapping(BlobDto)
+ *
+ * @param blobsRef - the property
+ * @throws RuntimeException if instance is <code>disposed</code>
+ *
+ */
+ public void setBlobsRef(final List<BlobDto> blobsRef) {
+ checkDisposed();
+ for (BlobDto dto : internalGetBlobsRef().toArray(new BlobDto[this.blobsRef.size()])) {
+ removeFromBlobsRef(dto);
+ }
+
+ if(blobsRef == null) {
+ return;
+ }
+
+ for (BlobDto dto : blobsRef) {
+ addToBlobsRef(dto);
+ }
+ }
+
+ public boolean equalVersions(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ BlobMappingDto other = (BlobMappingDto) obj;
+ if (this.id == null) {
+ if (other.id != null)
+ return false;
+ } else if (!this.id.equals(other.id))
+ return false;
+ return true;
+ }
+
+ 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.blob/src-gen/org/eclipse/osbp/blob/dtos/BlobTypingDto.java b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/BlobTypingDto.java
new file mode 100644
index 0000000..3e472f8
--- /dev/null
+++ b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/BlobTypingDto.java
@@ -0,0 +1,311 @@
+package org.eclipse.osbp.blob.dtos;
+
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+import java.io.Serializable;
+import java.util.Collections;
+import java.util.List;
+import javax.validation.Valid;
+import org.eclipse.osbp.blob.dtos.AttributesDto;
+import org.eclipse.osbp.blob.dtos.MimeTypeDto;
+import org.eclipse.osbp.blob.dtos.NormalizerResolutionDto;
+import org.eclipse.osbp.dsl.common.datatypes.IDto;
+import org.eclipse.osbp.runtime.common.annotations.Dirty;
+import org.eclipse.osbp.runtime.common.annotations.Dispose;
+import org.eclipse.osbp.runtime.common.annotations.DomainReference;
+
+@SuppressWarnings("all")
+public class BlobTypingDto implements IDto, Serializable, PropertyChangeListener {
+ private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);
+
+ @Dispose
+ private boolean disposed;
+
+ @Dirty
+ private transient boolean dirty;
+
+ @Valid
+ private MimeTypeDto mimeType;
+
+ @DomainReference
+ private AttributesDto attributes;
+
+ @DomainReference
+ private List<NormalizerResolutionDto> normalizer;
+
+ public BlobTypingDto() {
+ installLazyCollections();
+ }
+
+ /**
+ * Installs lazy collection resolving for entity {@link BlobTyping} to the dto {@link BlobTypingDto}.
+ *
+ */
+ protected void installLazyCollections() {
+
+ }
+
+ /**
+ * @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);
+ }
+
+ /**
+ * @return true, if the object is dirty.
+ *
+ */
+ public boolean isDirty() {
+ return dirty;
+ }
+
+ /**
+ * Sets the dirty state of this object.
+ *
+ */
+ public void setDirty(final boolean dirty) {
+ firePropertyChange("dirty", this.dirty, this.dirty = dirty );
+ }
+
+ /**
+ * 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);
+ }
+
+ /**
+ * Returns the mimeType property.
+ */
+ public MimeTypeDto getMimeType() {
+ if(this.mimeType== null){
+ this.mimeType = new MimeTypeDto();
+ }
+ return this.mimeType;
+ }
+
+ /**
+ * Sets the <code>mimeType</code> property to this instance.
+ *
+ * @param mimeType - the property
+ * @throws RuntimeException if instance is <code>disposed</code>
+ *
+ */
+ public void setMimeType(final MimeTypeDto mimeType) {
+ // ensure that embedded beans will notify their parent about changes
+ // so their dirty state can be handled properly
+ if (this.mimeType != null) {
+ this.mimeType.removePropertyChangeListener(this);
+ }
+
+ firePropertyChange("mimeType", this.mimeType, this.mimeType = mimeType );
+
+ if (this.mimeType != null) {
+ this.mimeType.addPropertyChangeListener(this);
+ }
+ }
+
+ /**
+ * Returns the attributes property.
+ */
+ public AttributesDto getAttributes() {
+ if(this.attributes== null){
+ this.attributes = new AttributesDto();
+ }
+ return this.attributes;
+ }
+
+ /**
+ * Sets the <code>attributes</code> property to this instance.
+ *
+ * @param attributes - the property
+ * @throws RuntimeException if instance is <code>disposed</code>
+ *
+ */
+ public void setAttributes(final AttributesDto attributes) {
+ checkDisposed();
+ firePropertyChange("attributes", this.attributes, this.attributes = attributes);
+ }
+
+ /**
+ * Returns an unmodifiable list of normalizer.
+ */
+ public List<NormalizerResolutionDto> getNormalizer() {
+ return Collections.unmodifiableList(internalGetNormalizer());
+ }
+
+ /**
+ * Returns the list of <code>NormalizerResolutionDto</code>s thereby lazy initializing it. For internal use only!
+ *
+ * @return list - the resulting list
+ *
+ */
+ public List<NormalizerResolutionDto> internalGetNormalizer() {
+ if (this.normalizer == null) {
+ this.normalizer = new java.util.ArrayList<NormalizerResolutionDto>();
+ }
+ return this.normalizer;
+ }
+
+ /**
+ * Adds the given normalizerResolutionDto to this object. <p>
+ *
+ * @param normalizerResolutionDto - the property
+ * @throws RuntimeException if instance is <code>disposed</code>
+ *
+ */
+ public void addToNormalizer(final NormalizerResolutionDto normalizerResolutionDto) {
+ checkDisposed();
+
+ if(!internalGetNormalizer().contains(normalizerResolutionDto)){
+ internalAddToNormalizer(normalizerResolutionDto);
+ }
+ }
+
+ public void removeFromNormalizer(final NormalizerResolutionDto normalizerResolutionDto) {
+ checkDisposed();
+
+ internalRemoveFromNormalizer(normalizerResolutionDto);
+ }
+
+ /**
+ * For internal use only!
+ */
+ public void internalAddToNormalizer(final NormalizerResolutionDto normalizerResolutionDto) {
+ // add this as property change listener for embeddable beans
+ normalizerResolutionDto.addPropertyChangeListener(this);
+
+ if(!internalGetNormalizer().contains(normalizerResolutionDto)) {
+ if(!org.eclipse.osbp.dsl.dto.lib.MappingContext.isMappingMode()) {
+ // collections will become resolved! We need to send a delta notification.
+ List<NormalizerResolutionDto> oldList = new java.util.ArrayList<>(internalGetNormalizer());
+ internalGetNormalizer().add(normalizerResolutionDto);
+ firePropertyChange("normalizer", oldList, internalGetNormalizer());
+ } else {
+ // in mapping mode, we do NOT resolve any collection
+ internalGetNormalizer().add(normalizerResolutionDto);
+ }
+ }
+ }
+
+ /**
+ * For internal use only!
+ */
+ public void internalRemoveFromNormalizer(final NormalizerResolutionDto normalizerResolutionDto) {
+ // remove this as property change listener from the embeddable bean
+ normalizerResolutionDto.removePropertyChangeListener(this);
+ if(!org.eclipse.osbp.dsl.dto.lib.MappingContext.isMappingMode()) {
+ // collections will become resolved! We need to send a delta notification.
+ List<NormalizerResolutionDto> oldList = new java.util.ArrayList<>(internalGetNormalizer());
+ internalGetNormalizer().remove(normalizerResolutionDto);
+ firePropertyChange("normalizer", oldList, internalGetNormalizer());
+ }else{
+ // in mapping mode, we do NOT resolve any collection
+ internalGetNormalizer().remove(normalizerResolutionDto);
+ }
+ }
+
+ /**
+ * 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<NormalizerResolutionDto> normalizer) {
+ checkDisposed();
+ for (NormalizerResolutionDto dto : internalGetNormalizer().toArray(new NormalizerResolutionDto[this.normalizer.size()])) {
+ removeFromNormalizer(dto);
+ }
+
+ if(normalizer == null) {
+ return;
+ }
+
+ for (NormalizerResolutionDto dto : normalizer) {
+ addToNormalizer(dto);
+ }
+ }
+
+ 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 == mimeType){
+ firePropertyChange("mimeType" + "_" + event.getPropertyName(), event.getOldValue(), event.getNewValue());
+ } else
+
+
+ if(source == attributes){
+ firePropertyChange("attributes" + "_" + 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.blob/src-gen/org/eclipse/osbp/blob/dtos/ContentTypeDto.java b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/ContentTypeDto.java
new file mode 100644
index 0000000..c46345b
--- /dev/null
+++ b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/ContentTypeDto.java
@@ -0,0 +1,167 @@
+package org.eclipse.osbp.blob.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.runtime.common.annotations.Dirty;
+import org.eclipse.osbp.runtime.common.annotations.Dispose;
+
+@SuppressWarnings("all")
+public class ContentTypeDto implements IDto, Serializable, PropertyChangeListener {
+ private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);
+
+ @Dispose
+ private boolean disposed;
+
+ @Dirty
+ private transient boolean dirty;
+
+ private int id;
+
+ private String type;
+
+ public ContentTypeDto() {
+ installLazyCollections();
+ }
+
+ /**
+ * Installs lazy collection resolving for entity {@link ContentType} to the dto {@link ContentTypeDto}.
+ *
+ */
+ protected void installLazyCollections() {
+
+ }
+
+ /**
+ * @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);
+ }
+
+ /**
+ * @return true, if the object is dirty.
+ *
+ */
+ public boolean isDirty() {
+ return dirty;
+ }
+
+ /**
+ * Sets the dirty state of this object.
+ *
+ */
+ public void setDirty(final boolean dirty) {
+ firePropertyChange("dirty", this.dirty, this.dirty = dirty );
+ }
+
+ /**
+ * 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);
+ }
+
+ /**
+ * Returns the id property or <code>null</code> if not present.
+ */
+ public int getId() {
+ return this.id;
+ }
+
+ /**
+ * Sets the <code>id</code> property to this instance.
+ *
+ * @param id - the property
+ * @throws RuntimeException if instance is <code>disposed</code>
+ *
+ */
+ public void setId(final int id) {
+ firePropertyChange("id", this.id, this.id = id );
+ }
+
+ /**
+ * Returns the type property or <code>null</code> if not present.
+ */
+ public String getType() {
+ return this.type;
+ }
+
+ /**
+ * Sets the <code>type</code> property to this instance.
+ *
+ * @param type - the property
+ * @throws RuntimeException if instance is <code>disposed</code>
+ *
+ */
+ public void setType(final String type) {
+ firePropertyChange("type", this.type, this.type = type );
+ }
+
+ 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.blob/src-gen/org/eclipse/osbp/blob/dtos/MimeTypeDto.java b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/MimeTypeDto.java
new file mode 100644
index 0000000..3674f26
--- /dev/null
+++ b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/MimeTypeDto.java
@@ -0,0 +1,279 @@
+package org.eclipse.osbp.blob.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.blob.dtos.ContentTypeDto;
+import org.eclipse.osbp.dsl.common.datatypes.IDto;
+import org.eclipse.osbp.runtime.common.annotations.Dirty;
+import org.eclipse.osbp.runtime.common.annotations.Dispose;
+import org.eclipse.osbp.runtime.common.annotations.DomainReference;
+
+@SuppressWarnings("all")
+public class MimeTypeDto implements IDto, Serializable, PropertyChangeListener {
+ private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);
+
+ @Dispose
+ private boolean disposed;
+
+ @Dirty
+ private transient boolean dirty;
+
+ private String mimeVersion;
+
+ private String contentTransferEncoding;
+
+ @DomainReference
+ private List<ContentTypeDto> contentTypeList;
+
+ public MimeTypeDto() {
+ installLazyCollections();
+ }
+
+ /**
+ * Installs lazy collection resolving for entity {@link MimeType} to the dto {@link MimeTypeDto}.
+ *
+ */
+ protected void installLazyCollections() {
+
+ }
+
+ /**
+ * @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);
+ }
+
+ /**
+ * @return true, if the object is dirty.
+ *
+ */
+ public boolean isDirty() {
+ return dirty;
+ }
+
+ /**
+ * Sets the dirty state of this object.
+ *
+ */
+ public void setDirty(final boolean dirty) {
+ firePropertyChange("dirty", this.dirty, this.dirty = dirty );
+ }
+
+ /**
+ * 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);
+ }
+
+ /**
+ * Returns the mimeVersion property or <code>null</code> if not present.
+ */
+ public String getMimeVersion() {
+ return this.mimeVersion;
+ }
+
+ /**
+ * Sets the <code>mimeVersion</code> property to this instance.
+ *
+ * @param mimeVersion - the property
+ * @throws RuntimeException if instance is <code>disposed</code>
+ *
+ */
+ public void setMimeVersion(final String mimeVersion) {
+ firePropertyChange("mimeVersion", this.mimeVersion, this.mimeVersion = mimeVersion );
+ }
+
+ /**
+ * Returns the contentTransferEncoding property or <code>null</code> if not present.
+ */
+ public String getContentTransferEncoding() {
+ return this.contentTransferEncoding;
+ }
+
+ /**
+ * Sets the <code>contentTransferEncoding</code> property to this instance.
+ *
+ * @param contentTransferEncoding - the property
+ * @throws RuntimeException if instance is <code>disposed</code>
+ *
+ */
+ public void setContentTransferEncoding(final String contentTransferEncoding) {
+ firePropertyChange("contentTransferEncoding", this.contentTransferEncoding, this.contentTransferEncoding = contentTransferEncoding );
+ }
+
+ /**
+ * Returns an unmodifiable list of contentTypeList.
+ */
+ public List<ContentTypeDto> getContentTypeList() {
+ return Collections.unmodifiableList(internalGetContentTypeList());
+ }
+
+ /**
+ * Returns the list of <code>ContentTypeDto</code>s thereby lazy initializing it. For internal use only!
+ *
+ * @return list - the resulting list
+ *
+ */
+ public List<ContentTypeDto> internalGetContentTypeList() {
+ if (this.contentTypeList == null) {
+ this.contentTypeList = new java.util.ArrayList<ContentTypeDto>();
+ }
+ return this.contentTypeList;
+ }
+
+ /**
+ * Adds the given contentTypeDto to this object. <p>
+ *
+ * @param contentTypeDto - the property
+ * @throws RuntimeException if instance is <code>disposed</code>
+ *
+ */
+ public void addToContentTypeList(final ContentTypeDto contentTypeDto) {
+ checkDisposed();
+
+ if(!internalGetContentTypeList().contains(contentTypeDto)){
+ internalAddToContentTypeList(contentTypeDto);
+ }
+ }
+
+ public void removeFromContentTypeList(final ContentTypeDto contentTypeDto) {
+ checkDisposed();
+
+ internalRemoveFromContentTypeList(contentTypeDto);
+ }
+
+ /**
+ * For internal use only!
+ */
+ public void internalAddToContentTypeList(final ContentTypeDto contentTypeDto) {
+ // add this as property change listener for embeddable beans
+ contentTypeDto.addPropertyChangeListener(this);
+
+ if(!internalGetContentTypeList().contains(contentTypeDto)) {
+ if(!org.eclipse.osbp.dsl.dto.lib.MappingContext.isMappingMode()) {
+ // collections will become resolved! We need to send a delta notification.
+ List<ContentTypeDto> oldList = new java.util.ArrayList<>(internalGetContentTypeList());
+ internalGetContentTypeList().add(contentTypeDto);
+ firePropertyChange("contentTypeList", oldList, internalGetContentTypeList());
+ } else {
+ // in mapping mode, we do NOT resolve any collection
+ internalGetContentTypeList().add(contentTypeDto);
+ }
+ }
+ }
+
+ /**
+ * For internal use only!
+ */
+ public void internalRemoveFromContentTypeList(final ContentTypeDto contentTypeDto) {
+ // remove this as property change listener from the embeddable bean
+ contentTypeDto.removePropertyChangeListener(this);
+ if(!org.eclipse.osbp.dsl.dto.lib.MappingContext.isMappingMode()) {
+ // collections will become resolved! We need to send a delta notification.
+ List<ContentTypeDto> oldList = new java.util.ArrayList<>(internalGetContentTypeList());
+ internalGetContentTypeList().remove(contentTypeDto);
+ firePropertyChange("contentTypeList", oldList, internalGetContentTypeList());
+ }else{
+ // in mapping mode, we do NOT resolve any collection
+ internalGetContentTypeList().remove(contentTypeDto);
+ }
+ }
+
+ /**
+ * Sets the <code>contentTypeList</code> property to this instance.
+ *
+ * @param contentTypeList - the property
+ * @throws RuntimeException if instance is <code>disposed</code>
+ *
+ */
+ public void setContentTypeList(final List<ContentTypeDto> contentTypeList) {
+ checkDisposed();
+ for (ContentTypeDto dto : internalGetContentTypeList().toArray(new ContentTypeDto[this.contentTypeList.size()])) {
+ removeFromContentTypeList(dto);
+ }
+
+ if(contentTypeList == null) {
+ return;
+ }
+
+ for (ContentTypeDto dto : contentTypeList) {
+ addToContentTypeList(dto);
+ }
+ }
+
+ 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 == contentTypeList){
+ firePropertyChange("contentTypeList" + "_" + event.getPropertyName(), event.getOldValue(), event.getNewValue());
+ } else
+ {
+ // no super class available to forward event
+ }
+ }
+}
diff --git a/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/NormalizerResolutionDto.java b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/NormalizerResolutionDto.java
new file mode 100644
index 0000000..437d62d
--- /dev/null
+++ b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/NormalizerResolutionDto.java
@@ -0,0 +1,187 @@
+package org.eclipse.osbp.blob.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.runtime.common.annotations.Dirty;
+import org.eclipse.osbp.runtime.common.annotations.Dispose;
+
+@SuppressWarnings("all")
+public class NormalizerResolutionDto implements IDto, Serializable, PropertyChangeListener {
+ private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);
+
+ @Dispose
+ private boolean disposed;
+
+ @Dirty
+ private transient boolean dirty;
+
+ private int id;
+
+ private String name;
+
+ private String resolution;
+
+ public NormalizerResolutionDto() {
+ installLazyCollections();
+ }
+
+ /**
+ * Installs lazy collection resolving for entity {@link NormalizerResolution} to the dto {@link NormalizerResolutionDto}.
+ *
+ */
+ protected void installLazyCollections() {
+
+ }
+
+ /**
+ * @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);
+ }
+
+ /**
+ * @return true, if the object is dirty.
+ *
+ */
+ public boolean isDirty() {
+ return dirty;
+ }
+
+ /**
+ * Sets the dirty state of this object.
+ *
+ */
+ public void setDirty(final boolean dirty) {
+ firePropertyChange("dirty", this.dirty, this.dirty = dirty );
+ }
+
+ /**
+ * 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);
+ }
+
+ /**
+ * Returns the id property or <code>null</code> if not present.
+ */
+ public int getId() {
+ return this.id;
+ }
+
+ /**
+ * Sets the <code>id</code> property to this instance.
+ *
+ * @param id - the property
+ * @throws RuntimeException if instance is <code>disposed</code>
+ *
+ */
+ public void setId(final int id) {
+ firePropertyChange("id", this.id, this.id = id );
+ }
+
+ /**
+ * 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 resolution property or <code>null</code> if not present.
+ */
+ public String getResolution() {
+ return this.resolution;
+ }
+
+ /**
+ * Sets the <code>resolution</code> property to this instance.
+ *
+ * @param resolution - the property
+ * @throws RuntimeException if instance is <code>disposed</code>
+ *
+ */
+ public void setResolution(final String resolution) {
+ firePropertyChange("resolution", this.resolution, this.resolution = resolution );
+ }
+
+ 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.blob/src-gen/org/eclipse/osbp/blob/dtos/mapper/AttributesDtoMapper.java b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/mapper/AttributesDtoMapper.java
new file mode 100644
index 0000000..8633acc
--- /dev/null
+++ b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/mapper/AttributesDtoMapper.java
@@ -0,0 +1,164 @@
+package org.eclipse.osbp.blob.dtos.mapper;
+
+import org.eclipse.osbp.blob.dtos.AttributesDto;
+import org.eclipse.osbp.blob.entities.Attributes;
+import org.eclipse.osbp.dsl.dto.lib.IMapper;
+import org.eclipse.osbp.dsl.dto.lib.IMapperAccess;
+import org.eclipse.osbp.dsl.dto.lib.MappingContext;
+
+/**
+ * This class maps the dto {@link AttributesDto} to and from the entity {@link Attributes}.
+ *
+ */
+@SuppressWarnings("all")
+public class AttributesDtoMapper<DTO extends AttributesDto, ENTITY extends Attributes> 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 Attributes createEntity() {
+ return new Attributes();
+ }
+
+ /**
+ * Creates a new instance of the dto
+ */
+ public AttributesDto createDto() {
+ return new AttributesDto();
+ }
+
+ /**
+ * Maps the entity {@link Attributes} to the dto {@link AttributesDto}.
+ *
+ * @param dto - The target dto
+ * @param entity - The source entity
+ * @param context - The context to get information about depth,...
+ *
+ */
+ public void mapToDTO(final AttributesDto dto, final Attributes entity, final MappingContext context) {
+ if(context == null){
+ throw new IllegalArgumentException("Please pass a context!");
+ }
+ dto.setSize(toDto_size(entity, context));
+ dto.setResolution(toDto_resolution(entity, context));
+ }
+
+ /**
+ * Maps the dto {@link AttributesDto} to the entity {@link Attributes}.
+ *
+ * @param dto - The source dto
+ * @param entity - The target entity
+ * @param context - The context to get information about depth,...
+ *
+ */
+ public void mapToEntity(final AttributesDto dto, final Attributes entity, final MappingContext context) {
+ if(context == null){
+ throw new IllegalArgumentException("Please pass a context!");
+ }
+
+
+ entity.setSize(toEntity_size(dto, entity, context));
+ entity.setResolution(toEntity_resolution(dto, entity, context));
+ }
+
+ /**
+ * Maps the property size 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_size(final Attributes in, final MappingContext context) {
+ return in.getSize();
+ }
+
+ /**
+ * Maps the property size from the given entity to dto property.
+ *
+ * @param in - The source entity
+ * @param parentEntity - The parentEntity
+ * @param context - The context to get information about depth,...
+ * @return the mapped value
+ *
+ */
+ protected String toEntity_size(final AttributesDto in, final Attributes parentEntity, final MappingContext context) {
+ return in.getSize();
+ }
+
+ /**
+ * Maps the property resolution 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_resolution(final Attributes in, final MappingContext context) {
+ return in.getResolution();
+ }
+
+ /**
+ * Maps the property resolution from the given entity to dto property.
+ *
+ * @param in - The source entity
+ * @param parentEntity - The parentEntity
+ * @param context - The context to get information about depth,...
+ * @return the mapped value
+ *
+ */
+ protected String toEntity_resolution(final AttributesDto in, final Attributes parentEntity, final MappingContext context) {
+ return in.getResolution();
+ }
+
+ 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.blob/src-gen/org/eclipse/osbp/blob/dtos/mapper/BlobDtoMapper.java b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/mapper/BlobDtoMapper.java
new file mode 100644
index 0000000..cb3cea3
--- /dev/null
+++ b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/mapper/BlobDtoMapper.java
@@ -0,0 +1,271 @@
+package org.eclipse.osbp.blob.dtos.mapper;
+
+import org.eclipse.osbp.blob.dtos.BlobDto;
+import org.eclipse.osbp.blob.dtos.BlobMappingDto;
+import org.eclipse.osbp.blob.entities.Blob;
+import org.eclipse.osbp.blob.entities.BlobMapping;
+import org.eclipse.osbp.dsl.dto.lib.IMapper;
+import org.eclipse.osbp.dsl.dto.lib.IMapperAccess;
+import org.eclipse.osbp.dsl.dto.lib.MappingContext;
+
+/**
+ * This class maps the dto {@link BlobDto} to and from the entity {@link Blob}.
+ *
+ */
+@SuppressWarnings("all")
+public class BlobDtoMapper<DTO extends BlobDto, ENTITY extends Blob> 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 Blob createEntity() {
+ return new Blob();
+ }
+
+ /**
+ * Creates a new instance of the dto
+ */
+ public BlobDto createDto() {
+ return new BlobDto();
+ }
+
+ /**
+ * Maps the entity {@link Blob} to the dto {@link BlobDto}.
+ *
+ * @param dto - The target dto
+ * @param entity - The source entity
+ * @param context - The context to get information about depth,...
+ *
+ */
+ public void mapToDTO(final BlobDto dto, final Blob entity, final MappingContext context) {
+ if(context == null){
+ throw new IllegalArgumentException("Please pass a context!");
+ }
+ context.register(createDtoHash(entity), dto);
+
+ dto.setId(toDto_id(entity, context));
+ dto.setData(toDto_data(entity, context));
+ dto.setResolutionId(toDto_resolutionId(entity, context));
+ dto.setBlobMapping(toDto_blobMapping(entity, context));
+ }
+
+ /**
+ * Maps the dto {@link BlobDto} to the entity {@link Blob}.
+ *
+ * @param dto - The source dto
+ * @param entity - The target entity
+ * @param context - The context to get information about depth,...
+ *
+ */
+ public void mapToEntity(final BlobDto dto, final Blob entity, final MappingContext context) {
+ if(context == null){
+ throw new IllegalArgumentException("Please pass a context!");
+ }
+
+ context.register(createEntityHash(dto), entity);
+ context.registerMappingRoot(createEntityHash(dto), dto);
+
+ entity.setId(toEntity_id(dto, entity, context));
+ entity.setData(toEntity_data(dto, entity, context));
+ entity.setResolutionId(toEntity_resolutionId(dto, entity, context));
+ entity.setBlobMapping(toEntity_blobMapping(dto, entity, context));
+ }
+
+ /**
+ * Maps the property id 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_id(final Blob in, final MappingContext context) {
+ return in.getId();
+ }
+
+ /**
+ * Maps the property id from the given entity to dto property.
+ *
+ * @param in - The source entity
+ * @param parentEntity - The parentEntity
+ * @param context - The context to get information about depth,...
+ * @return the mapped value
+ *
+ */
+ protected String toEntity_id(final BlobDto in, final Blob parentEntity, final MappingContext context) {
+ return in.getId();
+ }
+
+ /**
+ * Maps the property data 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 byte[] toDto_data(final Blob in, final MappingContext context) {
+ return in.getData();
+ }
+
+ /**
+ * Maps the property data from the given entity to dto property.
+ *
+ * @param in - The source entity
+ * @param parentEntity - The parentEntity
+ * @param context - The context to get information about depth,...
+ * @return the mapped value
+ *
+ */
+ protected byte[] toEntity_data(final BlobDto in, final Blob parentEntity, final MappingContext context) {
+ return in.getData();
+ }
+
+ /**
+ * Maps the property resolutionId 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 int toDto_resolutionId(final Blob in, final MappingContext context) {
+ return in.getResolutionId();
+ }
+
+ /**
+ * Maps the property resolutionId from the given entity to dto property.
+ *
+ * @param in - The source entity
+ * @param parentEntity - The parentEntity
+ * @param context - The context to get information about depth,...
+ * @return the mapped value
+ *
+ */
+ protected int toEntity_resolutionId(final BlobDto in, final Blob parentEntity, final MappingContext context) {
+ return in.getResolutionId();
+ }
+
+ /**
+ * Maps the property blobMapping from the given entity to the dto.
+ *
+ * @param in - The source entity
+ * @param context - The context to get information about depth,...
+ * @return the mapped dto
+ *
+ */
+ protected BlobMappingDto toDto_blobMapping(final Blob in, final MappingContext context) {
+ if(in.getBlobMapping() != null) {
+ // find a mapper that knows how to map the concrete input type.
+ org.eclipse.osbp.dsl.dto.lib.IMapper<BlobMappingDto, BlobMapping> mapper = (org.eclipse.osbp.dsl.dto.lib.IMapper<BlobMappingDto, BlobMapping>) getToDtoMapper(BlobMappingDto.class, in.getBlobMapping().getClass());
+ if(mapper == null) {
+ throw new IllegalStateException("Mapper must not be null!");
+ }
+ BlobMappingDto dto = null;
+ dto = context.get(mapper.createDtoHash(in.getBlobMapping()));
+ if(dto != null) {
+ if(context.isRefresh()){
+ mapper.mapToDTO(dto, in.getBlobMapping(), context);
+ }
+ return dto;
+ }
+
+ context.increaseLevel();
+ dto = mapper.createDto();
+ mapper.mapToDTO(dto, in.getBlobMapping(), context);
+ context.decreaseLevel();
+ return dto;
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Maps the property blobMapping from the given dto to the entity.
+ *
+ * @param in - The source dto
+ * @param parentEntity - The parent entity
+ * @param context - The context to get information about depth,...
+ * @return the mapped entity
+ *
+ */
+ protected BlobMapping toEntity_blobMapping(final BlobDto in, final Blob parentEntity, final MappingContext context) {
+ if(in.getBlobMapping() != null) {
+ // find a mapper that knows how to map the concrete input type.
+ org.eclipse.osbp.dsl.dto.lib.IMapper<BlobMappingDto, BlobMapping> mapper = (org.eclipse.osbp.dsl.dto.lib.IMapper<BlobMappingDto, BlobMapping>) getToEntityMapper(in.getBlobMapping().getClass(), BlobMapping.class);
+ if(mapper == null) {
+ throw new IllegalStateException("Mapper must not be null!");
+ }
+
+ BlobMapping entity = null;
+ entity = context.get(mapper.createEntityHash(in.getBlobMapping()));
+ if(entity != null) {
+ return entity;
+ } else {
+ entity = (BlobMapping) context
+ .findEntityByEntityManager(BlobMapping.class, in.getBlobMapping().getId());
+ if (entity != null) {
+ context.register(mapper.createEntityHash(in.getBlobMapping()), entity);
+ return entity;
+ }
+ }
+
+ entity = mapper.createEntity();
+ mapper.mapToEntity(in.getBlobMapping(), entity, context);
+ return entity;
+ } else {
+ return null;
+ }
+ }
+
+ public String createDtoHash(final Object in) {
+ return org.eclipse.osbp.runtime.common.hash.HashUtil.createObjectWithIdHash(BlobDto.class, in);
+ }
+
+ public String createEntityHash(final Object in) {
+ return org.eclipse.osbp.runtime.common.hash.HashUtil.createObjectWithIdHash(Blob.class, in);
+ }
+}
diff --git a/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/mapper/BlobMappingDtoMapper.java b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/mapper/BlobMappingDtoMapper.java
new file mode 100644
index 0000000..5453aa8
--- /dev/null
+++ b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/mapper/BlobMappingDtoMapper.java
@@ -0,0 +1,269 @@
+package org.eclipse.osbp.blob.dtos.mapper;
+
+import java.util.List;
+import org.eclipse.osbp.blob.dtos.BlobDto;
+import org.eclipse.osbp.blob.dtos.BlobMappingDto;
+import org.eclipse.osbp.blob.entities.Blob;
+import org.eclipse.osbp.blob.entities.BlobMapping;
+import org.eclipse.osbp.dsl.dto.lib.IMapper;
+import org.eclipse.osbp.dsl.dto.lib.IMapperAccess;
+import org.eclipse.osbp.dsl.dto.lib.MappingContext;
+
+/**
+ * This class maps the dto {@link BlobMappingDto} to and from the entity {@link BlobMapping}.
+ *
+ */
+@SuppressWarnings("all")
+public class BlobMappingDtoMapper<DTO extends BlobMappingDto, ENTITY extends BlobMapping> 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 BlobMapping createEntity() {
+ return new BlobMapping();
+ }
+
+ /**
+ * Creates a new instance of the dto
+ */
+ public BlobMappingDto createDto() {
+ return new BlobMappingDto();
+ }
+
+ /**
+ * Maps the entity {@link BlobMapping} to the dto {@link BlobMappingDto}.
+ *
+ * @param dto - The target dto
+ * @param entity - The source entity
+ * @param context - The context to get information about depth,...
+ *
+ */
+ public void mapToDTO(final BlobMappingDto dto, final BlobMapping entity, final MappingContext context) {
+ if(context == null){
+ throw new IllegalArgumentException("Please pass a context!");
+ }
+ context.register(createDtoHash(entity), dto);
+
+ dto.setId(toDto_id(entity, context));
+ dto.setUniqueName(toDto_uniqueName(entity, context));
+ dto.setFileName(toDto_fileName(entity, context));
+ dto.setMimeTypeId(toDto_mimeTypeId(entity, context));
+ }
+
+ /**
+ * Maps the dto {@link BlobMappingDto} to the entity {@link BlobMapping}.
+ *
+ * @param dto - The source dto
+ * @param entity - The target entity
+ * @param context - The context to get information about depth,...
+ *
+ */
+ public void mapToEntity(final BlobMappingDto dto, final BlobMapping entity, final MappingContext context) {
+ if(context == null){
+ throw new IllegalArgumentException("Please pass a context!");
+ }
+
+ context.register(createEntityHash(dto), entity);
+ context.registerMappingRoot(createEntityHash(dto), dto);
+
+ entity.setId(toEntity_id(dto, entity, context));
+ entity.setUniqueName(toEntity_uniqueName(dto, entity, context));
+ entity.setFileName(toEntity_fileName(dto, entity, context));
+ entity.setMimeTypeId(toEntity_mimeTypeId(dto, entity, context));
+ toEntity_blobsRef(dto, entity, context);
+ }
+
+ /**
+ * Maps the property id 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_id(final BlobMapping in, final MappingContext context) {
+ return in.getId();
+ }
+
+ /**
+ * Maps the property id from the given entity to dto property.
+ *
+ * @param in - The source entity
+ * @param parentEntity - The parentEntity
+ * @param context - The context to get information about depth,...
+ * @return the mapped value
+ *
+ */
+ protected String toEntity_id(final BlobMappingDto in, final BlobMapping parentEntity, final MappingContext context) {
+ return in.getId();
+ }
+
+ /**
+ * Maps the property uniqueName 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_uniqueName(final BlobMapping in, final MappingContext context) {
+ return in.getUniqueName();
+ }
+
+ /**
+ * Maps the property uniqueName from the given entity to dto property.
+ *
+ * @param in - The source entity
+ * @param parentEntity - The parentEntity
+ * @param context - The context to get information about depth,...
+ * @return the mapped value
+ *
+ */
+ protected String toEntity_uniqueName(final BlobMappingDto in, final BlobMapping parentEntity, final MappingContext context) {
+ return in.getUniqueName();
+ }
+
+ /**
+ * Maps the property fileName 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_fileName(final BlobMapping in, final MappingContext context) {
+ return in.getFileName();
+ }
+
+ /**
+ * Maps the property fileName from the given entity to dto property.
+ *
+ * @param in - The source entity
+ * @param parentEntity - The parentEntity
+ * @param context - The context to get information about depth,...
+ * @return the mapped value
+ *
+ */
+ protected String toEntity_fileName(final BlobMappingDto in, final BlobMapping parentEntity, final MappingContext context) {
+ return in.getFileName();
+ }
+
+ /**
+ * Maps the property mimeTypeId 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 int toDto_mimeTypeId(final BlobMapping in, final MappingContext context) {
+ return in.getMimeTypeId();
+ }
+
+ /**
+ * Maps the property mimeTypeId from the given entity to dto property.
+ *
+ * @param in - The source entity
+ * @param parentEntity - The parentEntity
+ * @param context - The context to get information about depth,...
+ * @return the mapped value
+ *
+ */
+ protected int toEntity_mimeTypeId(final BlobMappingDto in, final BlobMapping parentEntity, final MappingContext context) {
+ return in.getMimeTypeId();
+ }
+
+ /**
+ * Maps the property blobsRef 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<BlobDto> toDto_blobsRef(final BlobMapping in, final MappingContext context) {
+ // nothing to do here. Mapping is done by OppositeLists
+ return null;
+ }
+
+ /**
+ * Maps the property blobsRef from the given dto to the entity.
+ *
+ * @param in - The source dto
+ * @param parentEntity - The parent entity
+ * @param context - The context to get information about depth,...
+ * @return A list of mapped entities
+ *
+ */
+ protected List<Blob> toEntity_blobsRef(final BlobMappingDto in, final BlobMapping parentEntity, final MappingContext context) {
+ org.eclipse.osbp.dsl.dto.lib.IMapper<BlobDto, Blob> mapper = getToEntityMapper(BlobDto.class, Blob.class);
+ if(mapper == null) {
+ throw new IllegalStateException("Mapper must not be null!");
+ }
+
+ org.eclipse.osbp.dsl.dto.lib.IEntityMappingList<BlobDto> childsList =
+ (org.eclipse.osbp.dsl.dto.lib.IEntityMappingList<BlobDto>) in.internalGetBlobsRef();
+
+ // if entities are being added, then they are passed to
+ // #addToContainerChilds of the parent entity. So the container ref is setup
+ // properly!
+ // if entities are being removed, then they are passed to the
+ // #internalRemoveFromChilds method of the parent entity. So they are
+ // removed directly from the list of entities.
+ childsList.mapToEntity(mapper,
+ parentEntity::addToBlobsRef,
+ parentEntity::internalRemoveFromBlobsRef);
+ return null;
+ }
+
+ public String createDtoHash(final Object in) {
+ return org.eclipse.osbp.runtime.common.hash.HashUtil.createObjectWithIdHash(BlobMappingDto.class, in);
+ }
+
+ public String createEntityHash(final Object in) {
+ return org.eclipse.osbp.runtime.common.hash.HashUtil.createObjectWithIdHash(BlobMapping.class, in);
+ }
+}
diff --git a/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/mapper/BlobTypingDtoMapper.java b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/mapper/BlobTypingDtoMapper.java
new file mode 100644
index 0000000..bf00329
--- /dev/null
+++ b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/mapper/BlobTypingDtoMapper.java
@@ -0,0 +1,269 @@
+package org.eclipse.osbp.blob.dtos.mapper;
+
+import java.util.List;
+import org.eclipse.osbp.blob.dtos.AttributesDto;
+import org.eclipse.osbp.blob.dtos.BlobTypingDto;
+import org.eclipse.osbp.blob.dtos.MimeTypeDto;
+import org.eclipse.osbp.blob.dtos.NormalizerResolutionDto;
+import org.eclipse.osbp.blob.entities.Attributes;
+import org.eclipse.osbp.blob.entities.BlobTyping;
+import org.eclipse.osbp.blob.entities.MimeType;
+import org.eclipse.osbp.blob.entities.NormalizerResolution;
+import org.eclipse.osbp.dsl.dto.lib.IMapper;
+import org.eclipse.osbp.dsl.dto.lib.IMapperAccess;
+import org.eclipse.osbp.dsl.dto.lib.MappingContext;
+
+/**
+ * This class maps the dto {@link BlobTypingDto} to and from the entity {@link BlobTyping}.
+ *
+ */
+@SuppressWarnings("all")
+public class BlobTypingDtoMapper<DTO extends BlobTypingDto, ENTITY extends BlobTyping> 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 BlobTyping createEntity() {
+ return new BlobTyping();
+ }
+
+ /**
+ * Creates a new instance of the dto
+ */
+ public BlobTypingDto createDto() {
+ return new BlobTypingDto();
+ }
+
+ /**
+ * Maps the entity {@link BlobTyping} to the dto {@link BlobTypingDto}.
+ *
+ * @param dto - The target dto
+ * @param entity - The source entity
+ * @param context - The context to get information about depth,...
+ *
+ */
+ public void mapToDTO(final BlobTypingDto dto, final BlobTyping entity, final MappingContext context) {
+ if(context == null){
+ throw new IllegalArgumentException("Please pass a context!");
+ }
+ dto.setMimeType(toDto_mimeType(entity, context));
+ dto.setAttributes(toDto_attributes(entity, context));
+ }
+
+ /**
+ * Maps the dto {@link BlobTypingDto} to the entity {@link BlobTyping}.
+ *
+ * @param dto - The source dto
+ * @param entity - The target entity
+ * @param context - The context to get information about depth,...
+ *
+ */
+ public void mapToEntity(final BlobTypingDto dto, final BlobTyping entity, final MappingContext context) {
+ if(context == null){
+ throw new IllegalArgumentException("Please pass a context!");
+ }
+
+
+ entity.setMimeType(toEntity_mimeType(dto, entity, context));
+ entity.setAttributes(toEntity_attributes(dto, entity, context));
+ toEntity_normalizer(dto, entity, context);
+ }
+
+ /**
+ * Maps the property mimeType 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 MimeTypeDto toDto_mimeType(final BlobTyping in, final MappingContext context) {
+ if(in.getMimeType() != null) {
+ // find a mapper that knows how to map the concrete input type.
+ org.eclipse.osbp.dsl.dto.lib.IMapper<MimeTypeDto, MimeType> mapper = (org.eclipse.osbp.dsl.dto.lib.IMapper<MimeTypeDto, MimeType>) getToDtoMapper(MimeTypeDto.class, in.getMimeType().getClass());
+ if(mapper == null) {
+ throw new IllegalStateException("Mapper must not be null!");
+ }
+
+ MimeTypeDto dto = null;
+ context.increaseLevel();
+ dto = mapper.createDto();
+ mapper.mapToDTO(dto, in.getMimeType(), context);
+ context.decreaseLevel();
+ return dto;
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Maps the property mimeType from the given entity to dto property.
+ *
+ * @param in - The source entity
+ * @param parentEntity - The parentEntity
+ * @param context - The context to get information about depth,...
+ * @return the mapped value
+ *
+ */
+ protected MimeType toEntity_mimeType(final BlobTypingDto in, final BlobTyping parentEntity, final MappingContext context) {
+ if(in.getMimeType() != null) {
+ // find a mapper that knows how to map the concrete input type.
+ org.eclipse.osbp.dsl.dto.lib.IMapper<MimeTypeDto, MimeType> mapper = (org.eclipse.osbp.dsl.dto.lib.IMapper<MimeTypeDto, MimeType>) getToEntityMapper(in.getMimeType().getClass(), MimeType.class);
+ if(mapper == null) {
+ throw new IllegalStateException("Mapper must not be null!");
+ }
+
+ MimeType entity = mapper.createEntity();
+ mapper.mapToEntity(in.getMimeType(), entity, context);
+ return entity;
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Maps the property attributes from the given entity to the dto.
+ *
+ * @param in - The source entity
+ * @param context - The context to get information about depth,...
+ * @return the mapped dto
+ *
+ */
+ protected AttributesDto toDto_attributes(final BlobTyping in, final MappingContext context) {
+ if(in.getAttributes() != null) {
+ // find a mapper that knows how to map the concrete input type.
+ org.eclipse.osbp.dsl.dto.lib.IMapper<AttributesDto, Attributes> mapper = (org.eclipse.osbp.dsl.dto.lib.IMapper<AttributesDto, Attributes>) getToDtoMapper(AttributesDto.class, in.getAttributes().getClass());
+ if(mapper == null) {
+ throw new IllegalStateException("Mapper must not be null!");
+ }
+ AttributesDto dto = null;
+ context.increaseLevel();
+ dto = mapper.createDto();
+ mapper.mapToDTO(dto, in.getAttributes(), context);
+ context.decreaseLevel();
+ return dto;
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Maps the property attributes from the given dto to the entity.
+ *
+ * @param in - The source dto
+ * @param parentEntity - The parent entity
+ * @param context - The context to get information about depth,...
+ * @return the mapped entity
+ *
+ */
+ protected Attributes toEntity_attributes(final BlobTypingDto in, final BlobTyping parentEntity, final MappingContext context) {
+ if(in.getAttributes() != null) {
+ // find a mapper that knows how to map the concrete input type.
+ org.eclipse.osbp.dsl.dto.lib.IMapper<AttributesDto, Attributes> mapper = (org.eclipse.osbp.dsl.dto.lib.IMapper<AttributesDto, Attributes>) getToEntityMapper(in.getAttributes().getClass(), Attributes.class);
+ if(mapper == null) {
+ throw new IllegalStateException("Mapper must not be null!");
+ }
+
+ Attributes entity = null;
+ entity = mapper.createEntity();
+ mapper.mapToEntity(in.getAttributes(), entity, context);
+ return entity;
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * 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<NormalizerResolutionDto> toDto_normalizer(final BlobTyping in, final MappingContext context) {
+ // nothing to do here. Mapping is done by OppositeLists
+ return null;
+ }
+
+ /**
+ * Maps the property normalizer from the given dto to the entity.
+ *
+ * @param in - The source dto
+ * @param parentEntity - The parent entity
+ * @param context - The context to get information about depth,...
+ * @return A list of mapped entities
+ *
+ */
+ protected List<NormalizerResolution> toEntity_normalizer(final BlobTypingDto in, final BlobTyping parentEntity, final MappingContext context) {
+ org.eclipse.osbp.dsl.dto.lib.IMapper<NormalizerResolutionDto, NormalizerResolution> mapper = getToEntityMapper(NormalizerResolutionDto.class, NormalizerResolution.class);
+ if(mapper == null) {
+ throw new IllegalStateException("Mapper must not be null!");
+ }
+
+ org.eclipse.osbp.dsl.dto.lib.IEntityMappingList<NormalizerResolutionDto> childsList =
+ (org.eclipse.osbp.dsl.dto.lib.IEntityMappingList<NormalizerResolutionDto>) in.internalGetNormalizer();
+
+ // if entities are being added, then they are passed to
+ // #addToContainerChilds of the parent entity. So the container ref is setup
+ // properly!
+ // if entities are being removed, then they are passed to the
+ // #internalRemoveFromChilds method of the parent entity. So they are
+ // removed directly from the list of entities.
+ childsList.mapToEntity(mapper,
+ parentEntity::addToNormalizer,
+ parentEntity::internalRemoveFromNormalizer);
+ return null;
+ }
+
+ 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.blob/src-gen/org/eclipse/osbp/blob/dtos/mapper/ContentTypeDtoMapper.java b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/mapper/ContentTypeDtoMapper.java
new file mode 100644
index 0000000..9e45fac
--- /dev/null
+++ b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/mapper/ContentTypeDtoMapper.java
@@ -0,0 +1,164 @@
+package org.eclipse.osbp.blob.dtos.mapper;
+
+import org.eclipse.osbp.blob.dtos.ContentTypeDto;
+import org.eclipse.osbp.blob.entities.ContentType;
+import org.eclipse.osbp.dsl.dto.lib.IMapper;
+import org.eclipse.osbp.dsl.dto.lib.IMapperAccess;
+import org.eclipse.osbp.dsl.dto.lib.MappingContext;
+
+/**
+ * This class maps the dto {@link ContentTypeDto} to and from the entity {@link ContentType}.
+ *
+ */
+@SuppressWarnings("all")
+public class ContentTypeDtoMapper<DTO extends ContentTypeDto, ENTITY extends ContentType> 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 ContentType createEntity() {
+ return new ContentType();
+ }
+
+ /**
+ * Creates a new instance of the dto
+ */
+ public ContentTypeDto createDto() {
+ return new ContentTypeDto();
+ }
+
+ /**
+ * Maps the entity {@link ContentType} to the dto {@link ContentTypeDto}.
+ *
+ * @param dto - The target dto
+ * @param entity - The source entity
+ * @param context - The context to get information about depth,...
+ *
+ */
+ public void mapToDTO(final ContentTypeDto dto, final ContentType entity, final MappingContext context) {
+ if(context == null){
+ throw new IllegalArgumentException("Please pass a context!");
+ }
+ dto.setId(toDto_id(entity, context));
+ dto.setType(toDto_type(entity, context));
+ }
+
+ /**
+ * Maps the dto {@link ContentTypeDto} to the entity {@link ContentType}.
+ *
+ * @param dto - The source dto
+ * @param entity - The target entity
+ * @param context - The context to get information about depth,...
+ *
+ */
+ public void mapToEntity(final ContentTypeDto dto, final ContentType entity, final MappingContext context) {
+ if(context == null){
+ throw new IllegalArgumentException("Please pass a context!");
+ }
+
+
+ entity.setId(toEntity_id(dto, entity, context));
+ entity.setType(toEntity_type(dto, entity, context));
+ }
+
+ /**
+ * Maps the property id 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 int toDto_id(final ContentType in, final MappingContext context) {
+ return in.getId();
+ }
+
+ /**
+ * Maps the property id from the given entity to dto property.
+ *
+ * @param in - The source entity
+ * @param parentEntity - The parentEntity
+ * @param context - The context to get information about depth,...
+ * @return the mapped value
+ *
+ */
+ protected int toEntity_id(final ContentTypeDto in, final ContentType parentEntity, final MappingContext context) {
+ return in.getId();
+ }
+
+ /**
+ * Maps the property type 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_type(final ContentType in, final MappingContext context) {
+ return in.getType();
+ }
+
+ /**
+ * Maps the property type from the given entity to dto property.
+ *
+ * @param in - The source entity
+ * @param parentEntity - The parentEntity
+ * @param context - The context to get information about depth,...
+ * @return the mapped value
+ *
+ */
+ protected String toEntity_type(final ContentTypeDto in, final ContentType parentEntity, final MappingContext context) {
+ return in.getType();
+ }
+
+ 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.blob/src-gen/org/eclipse/osbp/blob/dtos/mapper/MimeTypeDtoMapper.java b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/mapper/MimeTypeDtoMapper.java
new file mode 100644
index 0000000..f9c9277
--- /dev/null
+++ b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/mapper/MimeTypeDtoMapper.java
@@ -0,0 +1,211 @@
+package org.eclipse.osbp.blob.dtos.mapper;
+
+import java.util.List;
+import org.eclipse.osbp.blob.dtos.ContentTypeDto;
+import org.eclipse.osbp.blob.dtos.MimeTypeDto;
+import org.eclipse.osbp.blob.entities.ContentType;
+import org.eclipse.osbp.blob.entities.MimeType;
+import org.eclipse.osbp.dsl.dto.lib.IMapper;
+import org.eclipse.osbp.dsl.dto.lib.IMapperAccess;
+import org.eclipse.osbp.dsl.dto.lib.MappingContext;
+
+/**
+ * This class maps the dto {@link MimeTypeDto} to and from the entity {@link MimeType}.
+ *
+ */
+@SuppressWarnings("all")
+public class MimeTypeDtoMapper<DTO extends MimeTypeDto, ENTITY extends MimeType> 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 MimeType createEntity() {
+ return new MimeType();
+ }
+
+ /**
+ * Creates a new instance of the dto
+ */
+ public MimeTypeDto createDto() {
+ return new MimeTypeDto();
+ }
+
+ /**
+ * Maps the entity {@link MimeType} to the dto {@link MimeTypeDto}.
+ *
+ * @param dto - The target dto
+ * @param entity - The source entity
+ * @param context - The context to get information about depth,...
+ *
+ */
+ public void mapToDTO(final MimeTypeDto dto, final MimeType entity, final MappingContext context) {
+ if(context == null){
+ throw new IllegalArgumentException("Please pass a context!");
+ }
+ dto.setMimeVersion(toDto_mimeVersion(entity, context));
+ dto.setContentTransferEncoding(toDto_contentTransferEncoding(entity, context));
+ }
+
+ /**
+ * Maps the dto {@link MimeTypeDto} to the entity {@link MimeType}.
+ *
+ * @param dto - The source dto
+ * @param entity - The target entity
+ * @param context - The context to get information about depth,...
+ *
+ */
+ public void mapToEntity(final MimeTypeDto dto, final MimeType entity, final MappingContext context) {
+ if(context == null){
+ throw new IllegalArgumentException("Please pass a context!");
+ }
+
+
+ entity.setMimeVersion(toEntity_mimeVersion(dto, entity, context));
+ entity.setContentTransferEncoding(toEntity_contentTransferEncoding(dto, entity, context));
+ toEntity_contentTypeList(dto, entity, context);
+ }
+
+ /**
+ * Maps the property mimeVersion 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_mimeVersion(final MimeType in, final MappingContext context) {
+ return in.getMimeVersion();
+ }
+
+ /**
+ * Maps the property mimeVersion from the given entity to dto property.
+ *
+ * @param in - The source entity
+ * @param parentEntity - The parentEntity
+ * @param context - The context to get information about depth,...
+ * @return the mapped value
+ *
+ */
+ protected String toEntity_mimeVersion(final MimeTypeDto in, final MimeType parentEntity, final MappingContext context) {
+ return in.getMimeVersion();
+ }
+
+ /**
+ * Maps the property contentTransferEncoding 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_contentTransferEncoding(final MimeType in, final MappingContext context) {
+ return in.getContentTransferEncoding();
+ }
+
+ /**
+ * Maps the property contentTransferEncoding from the given entity to dto property.
+ *
+ * @param in - The source entity
+ * @param parentEntity - The parentEntity
+ * @param context - The context to get information about depth,...
+ * @return the mapped value
+ *
+ */
+ protected String toEntity_contentTransferEncoding(final MimeTypeDto in, final MimeType parentEntity, final MappingContext context) {
+ return in.getContentTransferEncoding();
+ }
+
+ /**
+ * Maps the property contentTypeList 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<ContentTypeDto> toDto_contentTypeList(final MimeType in, final MappingContext context) {
+ // nothing to do here. Mapping is done by OppositeLists
+ return null;
+ }
+
+ /**
+ * Maps the property contentTypeList from the given dto to the entity.
+ *
+ * @param in - The source dto
+ * @param parentEntity - The parent entity
+ * @param context - The context to get information about depth,...
+ * @return A list of mapped entities
+ *
+ */
+ protected List<ContentType> toEntity_contentTypeList(final MimeTypeDto in, final MimeType parentEntity, final MappingContext context) {
+ org.eclipse.osbp.dsl.dto.lib.IMapper<ContentTypeDto, ContentType> mapper = getToEntityMapper(ContentTypeDto.class, ContentType.class);
+ if(mapper == null) {
+ throw new IllegalStateException("Mapper must not be null!");
+ }
+
+ org.eclipse.osbp.dsl.dto.lib.IEntityMappingList<ContentTypeDto> childsList =
+ (org.eclipse.osbp.dsl.dto.lib.IEntityMappingList<ContentTypeDto>) in.internalGetContentTypeList();
+
+ // if entities are being added, then they are passed to
+ // #addToContainerChilds of the parent entity. So the container ref is setup
+ // properly!
+ // if entities are being removed, then they are passed to the
+ // #internalRemoveFromChilds method of the parent entity. So they are
+ // removed directly from the list of entities.
+ childsList.mapToEntity(mapper,
+ parentEntity::addToContentTypeList,
+ parentEntity::internalRemoveFromContentTypeList);
+ return null;
+ }
+
+ 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.blob/src-gen/org/eclipse/osbp/blob/dtos/mapper/NormalizerResolutionDtoMapper.java b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/mapper/NormalizerResolutionDtoMapper.java
new file mode 100644
index 0000000..303e890
--- /dev/null
+++ b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/mapper/NormalizerResolutionDtoMapper.java
@@ -0,0 +1,191 @@
+package org.eclipse.osbp.blob.dtos.mapper;
+
+import org.eclipse.osbp.blob.dtos.NormalizerResolutionDto;
+import org.eclipse.osbp.blob.entities.NormalizerResolution;
+import org.eclipse.osbp.dsl.dto.lib.IMapper;
+import org.eclipse.osbp.dsl.dto.lib.IMapperAccess;
+import org.eclipse.osbp.dsl.dto.lib.MappingContext;
+
+/**
+ * This class maps the dto {@link NormalizerResolutionDto} to and from the entity {@link NormalizerResolution}.
+ *
+ */
+@SuppressWarnings("all")
+public class NormalizerResolutionDtoMapper<DTO extends NormalizerResolutionDto, ENTITY extends NormalizerResolution> 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 NormalizerResolution createEntity() {
+ return new NormalizerResolution();
+ }
+
+ /**
+ * Creates a new instance of the dto
+ */
+ public NormalizerResolutionDto createDto() {
+ return new NormalizerResolutionDto();
+ }
+
+ /**
+ * Maps the entity {@link NormalizerResolution} to the dto {@link NormalizerResolutionDto}.
+ *
+ * @param dto - The target dto
+ * @param entity - The source entity
+ * @param context - The context to get information about depth,...
+ *
+ */
+ public void mapToDTO(final NormalizerResolutionDto dto, final NormalizerResolution entity, final MappingContext context) {
+ if(context == null){
+ throw new IllegalArgumentException("Please pass a context!");
+ }
+ dto.setId(toDto_id(entity, context));
+ dto.setName(toDto_name(entity, context));
+ dto.setResolution(toDto_resolution(entity, context));
+ }
+
+ /**
+ * Maps the dto {@link NormalizerResolutionDto} to the entity {@link NormalizerResolution}.
+ *
+ * @param dto - The source dto
+ * @param entity - The target entity
+ * @param context - The context to get information about depth,...
+ *
+ */
+ public void mapToEntity(final NormalizerResolutionDto dto, final NormalizerResolution entity, final MappingContext context) {
+ if(context == null){
+ throw new IllegalArgumentException("Please pass a context!");
+ }
+
+
+ entity.setId(toEntity_id(dto, entity, context));
+ entity.setName(toEntity_name(dto, entity, context));
+ entity.setResolution(toEntity_resolution(dto, entity, context));
+ }
+
+ /**
+ * Maps the property id 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 int toDto_id(final NormalizerResolution in, final MappingContext context) {
+ return in.getId();
+ }
+
+ /**
+ * Maps the property id from the given entity to dto property.
+ *
+ * @param in - The source entity
+ * @param parentEntity - The parentEntity
+ * @param context - The context to get information about depth,...
+ * @return the mapped value
+ *
+ */
+ protected int toEntity_id(final NormalizerResolutionDto in, final NormalizerResolution parentEntity, final MappingContext context) {
+ return in.getId();
+ }
+
+ /**
+ * 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 NormalizerResolution in, final MappingContext context) {
+ return in.getName();
+ }
+
+ /**
+ * Maps the property name from the given entity to dto property.
+ *
+ * @param in - The source entity
+ * @param parentEntity - The parentEntity
+ * @param context - The context to get information about depth,...
+ * @return the mapped value
+ *
+ */
+ protected String toEntity_name(final NormalizerResolutionDto in, final NormalizerResolution parentEntity, final MappingContext context) {
+ return in.getName();
+ }
+
+ /**
+ * Maps the property resolution 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_resolution(final NormalizerResolution in, final MappingContext context) {
+ return in.getResolution();
+ }
+
+ /**
+ * Maps the property resolution from the given entity to dto property.
+ *
+ * @param in - The source entity
+ * @param parentEntity - The parentEntity
+ * @param context - The context to get information about depth,...
+ * @return the mapped value
+ *
+ */
+ protected String toEntity_resolution(final NormalizerResolutionDto in, final NormalizerResolution parentEntity, final MappingContext context) {
+ return in.getResolution();
+ }
+
+ 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.blob/src-gen/org/eclipse/osbp/blob/dtos/service/BlobDtoService.java b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/service/BlobDtoService.java
new file mode 100644
index 0000000..48b64df
--- /dev/null
+++ b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/service/BlobDtoService.java
@@ -0,0 +1,25 @@
+package org.eclipse.osbp.blob.dtos.service;
+
+import org.eclipse.osbp.blob.dtos.BlobDto;
+import org.eclipse.osbp.blob.entities.Blob;
+import org.eclipse.osbp.dsl.dto.lib.services.impl.AbstractDTOServiceWithMutablePersistence;
+
+@SuppressWarnings("all")
+public class BlobDtoService extends AbstractDTOServiceWithMutablePersistence<BlobDto, Blob> {
+ public BlobDtoService() {
+ // set the default persistence ID
+ setPersistenceId("blob");
+ }
+
+ public Class<BlobDto> getDtoClass() {
+ return BlobDto.class;
+ }
+
+ public Class<Blob> getEntityClass() {
+ return Blob.class;
+ }
+
+ public Object getId(final BlobDto dto) {
+ return dto.getId();
+ }
+}
diff --git a/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/service/BlobMappingDtoService.java b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/service/BlobMappingDtoService.java
new file mode 100644
index 0000000..7e29362
--- /dev/null
+++ b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/dtos/service/BlobMappingDtoService.java
@@ -0,0 +1,25 @@
+package org.eclipse.osbp.blob.dtos.service;
+
+import org.eclipse.osbp.blob.dtos.BlobMappingDto;
+import org.eclipse.osbp.blob.entities.BlobMapping;
+import org.eclipse.osbp.dsl.dto.lib.services.impl.AbstractDTOServiceWithMutablePersistence;
+
+@SuppressWarnings("all")
+public class BlobMappingDtoService extends AbstractDTOServiceWithMutablePersistence<BlobMappingDto, BlobMapping> {
+ public BlobMappingDtoService() {
+ // set the default persistence ID
+ setPersistenceId("blob");
+ }
+
+ public Class<BlobMappingDto> getDtoClass() {
+ return BlobMappingDto.class;
+ }
+
+ public Class<BlobMapping> getEntityClass() {
+ return BlobMapping.class;
+ }
+
+ public Object getId(final BlobMappingDto dto) {
+ return dto.getId();
+ }
+}
diff --git a/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/entities/Attributes.java b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/entities/Attributes.java
new file mode 100644
index 0000000..9dad6aa
--- /dev/null
+++ b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/entities/Attributes.java
@@ -0,0 +1,116 @@
+package org.eclipse.osbp.blob.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.XmlElement;
+import org.eclipse.osbp.dsl.common.datatypes.IBean;
+import org.eclipse.osbp.runtime.common.annotations.Dirty;
+import org.eclipse.osbp.runtime.common.annotations.Dispose;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@Embeddable
+@SuppressWarnings("all")
+public class Attributes implements Serializable, IBean {
+ @Transient
+ @Dispose
+ private boolean disposed;
+
+ @Dirty
+ private transient boolean dirty;
+
+ @XmlElement
+ @Basic
+ private String size;
+
+ @XmlElement
+ @Basic
+ private String resolution;
+
+ /**
+ * @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;
+ }
+
+ /**
+ * @return true, if the object is dirty.
+ *
+ */
+ public boolean isDirty() {
+ return dirty;
+ }
+
+ /**
+ * Sets the dirty state of this object.
+ *
+ */
+ public void setDirty(final boolean dirty) {
+ this.dirty = dirty;
+ }
+
+ /**
+ * 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 size property or <code>null</code> if not present.
+ */
+ public String getSize() {
+ checkDisposed();
+ return this.size;
+ }
+
+ /**
+ * Sets the size property to this instance.
+ */
+ public void setSize(final String size) {
+ checkDisposed();
+ this.size = size;
+ }
+
+ /**
+ * @return Returns the resolution property or <code>null</code> if not present.
+ */
+ public String getResolution() {
+ checkDisposed();
+ return this.resolution;
+ }
+
+ /**
+ * Sets the resolution property to this instance.
+ */
+ public void setResolution(final String resolution) {
+ checkDisposed();
+ this.resolution = resolution;
+ }
+}
diff --git a/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/entities/Blob.java b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/entities/Blob.java
new file mode 100644
index 0000000..8719a71
--- /dev/null
+++ b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/entities/Blob.java
@@ -0,0 +1,210 @@
+package org.eclipse.osbp.blob.entities;
+
+import javax.persistence.Basic;
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.DiscriminatorValue;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.Lob;
+import javax.persistence.ManyToOne;
+import javax.persistence.PreRemove;
+import javax.persistence.Table;
+import javax.persistence.Transient;
+import javax.validation.Valid;
+import org.eclipse.osbp.blob.entities.BlobMapping;
+import org.eclipse.osbp.dsl.common.datatypes.IEntity;
+import org.eclipse.osbp.runtime.common.annotations.Dispose;
+
+@Entity
+@Table(name = "BLOB_DATA")
+@DiscriminatorValue(value = "BLOB_DATA")
+@SuppressWarnings("all")
+public class Blob implements IEntity {
+ @Transient
+ @Dispose
+ private boolean disposed;
+
+ @Id
+ private String id = java.util.UUID.randomUUID().toString();
+
+ @Column(name = "DATA")
+ @Lob
+ @Basic(fetch = FetchType.LAZY)
+ @Valid
+ private byte[] data;
+
+ @Column(name = "RESOLUTION_ID")
+ private int resolutionId;
+
+ @ManyToOne(fetch = FetchType.LAZY, cascade = { CascadeType.DETACH, CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH })
+ @JoinColumn(name = "BLOB_MAPPING_ID")
+ private BlobMapping blobMapping;
+
+ /**
+ * @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;
+ }
+ try {
+ // Dispose all the composition references.
+ if (this.blobMapping != null) {
+ this.blobMapping.dispose();
+ this.blobMapping = null;
+ }
+
+ }
+ finally {
+ disposed = true;
+ }
+
+ }
+
+ /**
+ * @return Returns the id property or <code>null</code> if not present.
+ */
+ public String getId() {
+ checkDisposed();
+ return this.id;
+ }
+
+ /**
+ * Sets the id property to this instance.
+ */
+ public void setId(final String id) {
+ checkDisposed();
+ this.id = id;
+ }
+
+ /**
+ * @return Returns the data property or <code>null</code> if not present.
+ */
+ public byte[] getData() {
+ checkDisposed();
+ return this.data;
+ }
+
+ /**
+ * Sets the data property to this instance.
+ */
+ public void setData(final byte[] data) {
+ checkDisposed();
+ this.data = data;
+ }
+
+ /**
+ * @return Returns the resolutionId property or <code>null</code> if not present.
+ */
+ public int getResolutionId() {
+ checkDisposed();
+ return this.resolutionId;
+ }
+
+ /**
+ * Sets the resolutionId property to this instance.
+ */
+ public void setResolutionId(final int resolutionId) {
+ checkDisposed();
+ this.resolutionId = resolutionId;
+ }
+
+ /**
+ * @return Returns the blobMapping property or <code>null</code> if not present.
+ */
+ public BlobMapping getBlobMapping() {
+ checkDisposed();
+ return this.blobMapping;
+ }
+
+ /**
+ * Sets the blobMapping property to this instance.
+ * Since the reference is a container reference, the opposite reference (BlobMapping.blobsRef)
+ * of the blobMapping will be handled automatically and no further coding is required to keep them in sync.
+ * See {@link BlobMapping#setBlobsRef(BlobMapping)}.
+ */
+ public void setBlobMapping(final BlobMapping blobMapping) {
+ checkDisposed();
+ if (this.blobMapping != null) {
+ this.blobMapping.internalRemoveFromBlobsRef(this);
+ }
+ internalSetBlobMapping(blobMapping);
+ if (this.blobMapping != null) {
+ this.blobMapping.internalAddToBlobsRef(this);
+ }
+
+ }
+
+ /**
+ * For internal use only!
+ */
+ public void internalSetBlobMapping(final BlobMapping blobMapping) {
+ this.blobMapping = blobMapping;
+ }
+
+ public boolean equalVersions(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Blob other = (Blob) obj;
+ if (this.id == null) {
+ if (other.id != null)
+ return false;
+ } else if (!this.id.equals(other.id))
+ return false;
+ return true;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ return equalVersions(obj);
+ }
+
+ @Override
+ public int hashCode() {
+ int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.id== null) ? 0 : this.id.hashCode());
+ return result;
+ }
+
+ /**
+ * Iterates all cross references and removes them from the parent to avoid ConstraintViolationException
+ */
+ @PreRemove
+ protected void preRemove() {
+
+ }
+}
diff --git a/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/entities/BlobMapping.java b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/entities/BlobMapping.java
new file mode 100644
index 0000000..4d9dea4
--- /dev/null
+++ b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/entities/BlobMapping.java
@@ -0,0 +1,275 @@
+package org.eclipse.osbp.blob.entities;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.DiscriminatorValue;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.OneToMany;
+import javax.persistence.PreRemove;
+import javax.persistence.Table;
+import javax.persistence.Transient;
+import org.eclipse.osbp.blob.entities.Blob;
+import org.eclipse.osbp.dsl.common.datatypes.IEntity;
+import org.eclipse.osbp.runtime.common.annotations.Dispose;
+import org.eclipse.persistence.annotations.Noncacheable;
+
+@Entity
+@Table(name = "BLOB_MAPPING")
+@DiscriminatorValue(value = "BLOB_MAPPING")
+@SuppressWarnings("all")
+public class BlobMapping implements IEntity {
+ @Transient
+ @Dispose
+ private boolean disposed;
+
+ @Id
+ private String id = java.util.UUID.randomUUID().toString();
+
+ @Column(name = "UNIQUE_NAME")
+ private String uniqueName;
+
+ @Column(name = "FILE_NAME")
+ private String fileName;
+
+ @Column(name = "MIME_TYPE_ID")
+ private int mimeTypeId;
+
+ @JoinColumn(name = "BLOBS_REF_ID")
+ @OneToMany(mappedBy = "blobMapping", cascade = CascadeType.ALL, orphanRemoval = true)
+ @Noncacheable
+ private List<Blob> blobsRef;
+
+ /**
+ * @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;
+ }
+ try {
+ // Dispose all the composition references.
+ if (this.blobsRef != null) {
+ for (Blob blob : this.blobsRef) {
+ blob.dispose();
+ }
+ this.blobsRef = null;
+ }
+
+ }
+ finally {
+ disposed = true;
+ }
+
+ }
+
+ /**
+ * @return Returns the id property or <code>null</code> if not present.
+ */
+ public String getId() {
+ checkDisposed();
+ return this.id;
+ }
+
+ /**
+ * Sets the id property to this instance.
+ */
+ public void setId(final String id) {
+ checkDisposed();
+ this.id = id;
+ }
+
+ /**
+ * @return Returns the uniqueName property or <code>null</code> if not present.
+ */
+ public String getUniqueName() {
+ checkDisposed();
+ return this.uniqueName;
+ }
+
+ /**
+ * Sets the uniqueName property to this instance.
+ */
+ public void setUniqueName(final String uniqueName) {
+ checkDisposed();
+ this.uniqueName = uniqueName;
+ }
+
+ /**
+ * @return Returns the fileName property or <code>null</code> if not present.
+ */
+ public String getFileName() {
+ checkDisposed();
+ return this.fileName;
+ }
+
+ /**
+ * Sets the fileName property to this instance.
+ */
+ public void setFileName(final String fileName) {
+ checkDisposed();
+ this.fileName = fileName;
+ }
+
+ /**
+ * @return Returns the mimeTypeId property or <code>null</code> if not present.
+ */
+ public int getMimeTypeId() {
+ checkDisposed();
+ return this.mimeTypeId;
+ }
+
+ /**
+ * Sets the mimeTypeId property to this instance.
+ */
+ public void setMimeTypeId(final int mimeTypeId) {
+ checkDisposed();
+ this.mimeTypeId = mimeTypeId;
+ }
+
+ /**
+ * @return Returns an unmodifiable list of blobsRef.
+ */
+ public List<Blob> getBlobsRef() {
+ checkDisposed();
+ return Collections.unmodifiableList(internalGetBlobsRef());
+ }
+
+ /**
+ * Sets the given blobsRef to the object. Currently contained blobsRef instances will be removed.
+ *
+ * @param blobsRef the list of new instances
+ */
+ public void setBlobsRef(final List<Blob> blobsRef) {
+ // remove the old blob
+ for(Blob oldElement : new ArrayList<Blob>(this.internalGetBlobsRef())){
+ removeFromBlobsRef(oldElement);
+ }
+
+ // add the new blob
+ for(Blob newElement : blobsRef){
+ addToBlobsRef(newElement);
+ }
+ }
+
+ /**
+ * For internal use only! Returns the list of <code>Blob</code>s thereby lazy initializing it.
+ */
+ public List<Blob> internalGetBlobsRef() {
+ if (this.blobsRef == null) {
+ this.blobsRef = new ArrayList<Blob>();
+ }
+ return this.blobsRef;
+ }
+
+ /**
+ * Adds the given blob to this object. <p>
+ * Since the reference is a composition reference, the opposite reference (Blob.blobMapping)
+ * of the blob will be handled automatically and no further coding is required to keep them in sync.
+ * See {@link Blob#setBlobMapping(Blob)}.
+ *
+ */
+ public void addToBlobsRef(final Blob blob) {
+ checkDisposed();
+ blob.setBlobMapping(this);
+ }
+
+ /**
+ * Removes the given blob from this object. <p>
+ * Since the reference is a cascading reference, the opposite reference (Blob.blobMapping)
+ * of the blob will be handled automatically and no further coding is required to keep them in sync.
+ * See {@link Blob#setBlobMapping(Blob)}.
+ *
+ */
+ public void removeFromBlobsRef(final Blob blob) {
+ checkDisposed();
+ blob.setBlobMapping(null);
+ }
+
+ /**
+ * For internal use only!
+ */
+ public void internalAddToBlobsRef(final Blob blob) {
+ if(blob == null) {
+ return;
+ }
+
+ if(!internalGetBlobsRef().contains(blob)) {
+ internalGetBlobsRef().add(blob);
+ }
+ }
+
+ /**
+ * For internal use only!
+ */
+ public void internalRemoveFromBlobsRef(final Blob blob) {
+ internalGetBlobsRef().remove(blob);
+ }
+
+ public boolean equalVersions(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ BlobMapping other = (BlobMapping) obj;
+ if (this.id == null) {
+ if (other.id != null)
+ return false;
+ } else if (!this.id.equals(other.id))
+ return false;
+ return true;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ return equalVersions(obj);
+ }
+
+ @Override
+ public int hashCode() {
+ int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.id== null) ? 0 : this.id.hashCode());
+ return result;
+ }
+
+ /**
+ * Iterates all cross references and removes them from the parent to avoid ConstraintViolationException
+ */
+ @PreRemove
+ protected void preRemove() {
+
+ }
+}
diff --git a/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/entities/BlobTyping.java b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/entities/BlobTyping.java
new file mode 100644
index 0000000..a0f48cd
--- /dev/null
+++ b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/entities/BlobTyping.java
@@ -0,0 +1,210 @@
+package org.eclipse.osbp.blob.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.blob.entities.Attributes;
+import org.eclipse.osbp.blob.entities.MimeType;
+import org.eclipse.osbp.blob.entities.NormalizerResolution;
+import org.eclipse.osbp.dsl.common.datatypes.IBean;
+import org.eclipse.osbp.runtime.common.annotations.Dirty;
+import org.eclipse.osbp.runtime.common.annotations.Dispose;
+
+@XmlRootElement
+@XmlAccessorType(XmlAccessType.FIELD)
+@Embeddable
+@SuppressWarnings("all")
+public class BlobTyping implements Serializable, IBean {
+ @Transient
+ @Dispose
+ private boolean disposed;
+
+ @Dirty
+ private transient boolean dirty;
+
+ @XmlElement
+ @Basic
+ @Valid
+ private MimeType mimeType;
+
+ @XmlElement
+ @Basic
+ @Embedded
+ @Valid
+ private Attributes attributes;
+
+ @XmlElementWrapper(name = "normalizer")
+ @XmlElement(name = "resolution")
+ @Basic
+ @Embedded
+ @ElementCollection
+ private List<NormalizerResolution> 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;
+ }
+
+ /**
+ * @return true, if the object is dirty.
+ *
+ */
+ public boolean isDirty() {
+ return dirty;
+ }
+
+ /**
+ * Sets the dirty state of this object.
+ *
+ */
+ public void setDirty(final boolean dirty) {
+ this.dirty = dirty;
+ }
+
+ /**
+ * 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 mimeType property or <code>null</code> if not present.
+ */
+ public MimeType getMimeType() {
+ checkDisposed();
+ return this.mimeType;
+ }
+
+ /**
+ * Sets the mimeType property to this instance.
+ */
+ public void setMimeType(final MimeType mimeType) {
+ checkDisposed();
+ this.mimeType = mimeType;
+ }
+
+ /**
+ * @return Returns the attributes property or <code>null</code> if not present.
+ */
+ public Attributes getAttributes() {
+ checkDisposed();
+ return this.attributes;
+ }
+
+ /**
+ * Sets the attributes property to this instance.
+ */
+ public void setAttributes(final Attributes attributes) {
+ checkDisposed();
+ this.attributes = attributes;
+ }
+
+ /**
+ * @return Returns an unmodifiable list of normalizer.
+ */
+ public List<NormalizerResolution> 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<NormalizerResolution> normalizer) {
+ // remove the old normalizerResolution
+ for(NormalizerResolution oldElement : new ArrayList<NormalizerResolution>(this.internalGetNormalizer())){
+ removeFromNormalizer(oldElement);
+ }
+
+ // add the new normalizerResolution
+ for(NormalizerResolution newElement : normalizer){
+ addToNormalizer(newElement);
+ }
+ }
+
+ /**
+ * For internal use only! Returns the list of <code>NormalizerResolution</code>s thereby lazy initializing it.
+ */
+ public List<NormalizerResolution> internalGetNormalizer() {
+ if (this.normalizer == null) {
+ this.normalizer = new ArrayList<NormalizerResolution>();
+ }
+ return this.normalizer;
+ }
+
+ /**
+ * Adds the given normalizerResolution to this object. <p>
+ *
+ */
+ public void addToNormalizer(final NormalizerResolution normalizerResolution) {
+ checkDisposed();
+ if (!getNormalizer().contains(normalizerResolution)){
+ internalAddToNormalizer(normalizerResolution);
+ }
+
+ }
+
+ public void removeFromNormalizer(final NormalizerResolution normalizerResolution) {
+ checkDisposed();
+ internalGetNormalizer().remove(normalizerResolution);
+ }
+
+ /**
+ * For internal use only!
+ */
+ public void internalAddToNormalizer(final NormalizerResolution normalizerResolution) {
+ if(normalizerResolution == null) {
+ return;
+ }
+
+ if(!internalGetNormalizer().contains(normalizerResolution)) {
+ internalGetNormalizer().add(normalizerResolution);
+ }
+ }
+
+ /**
+ * For internal use only!
+ */
+ public void internalRemoveFromNormalizer(final NormalizerResolution normalizerResolution) {
+ internalGetNormalizer().remove(normalizerResolution);
+ }
+}
diff --git a/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/entities/ContentType.java b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/entities/ContentType.java
new file mode 100644
index 0000000..532c526
--- /dev/null
+++ b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/entities/ContentType.java
@@ -0,0 +1,116 @@
+package org.eclipse.osbp.blob.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.Dirty;
+import org.eclipse.osbp.runtime.common.annotations.Dispose;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@Embeddable
+@SuppressWarnings("all")
+public class ContentType implements Serializable, IBean {
+ @Transient
+ @Dispose
+ private boolean disposed;
+
+ @Dirty
+ private transient boolean dirty;
+
+ @XmlAttribute
+ @Basic
+ private int id;
+
+ @XmlAttribute
+ @Basic
+ private String type;
+
+ /**
+ * @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;
+ }
+
+ /**
+ * @return true, if the object is dirty.
+ *
+ */
+ public boolean isDirty() {
+ return dirty;
+ }
+
+ /**
+ * Sets the dirty state of this object.
+ *
+ */
+ public void setDirty(final boolean dirty) {
+ this.dirty = dirty;
+ }
+
+ /**
+ * 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 id property or <code>null</code> if not present.
+ */
+ public int getId() {
+ checkDisposed();
+ return this.id;
+ }
+
+ /**
+ * Sets the id property to this instance.
+ */
+ public void setId(final int id) {
+ checkDisposed();
+ this.id = id;
+ }
+
+ /**
+ * @return Returns the type property or <code>null</code> if not present.
+ */
+ public String getType() {
+ checkDisposed();
+ return this.type;
+ }
+
+ /**
+ * Sets the type property to this instance.
+ */
+ public void setType(final String type) {
+ checkDisposed();
+ this.type = type;
+ }
+}
diff --git a/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/entities/MimeType.java b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/entities/MimeType.java
new file mode 100644
index 0000000..615465f
--- /dev/null
+++ b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/entities/MimeType.java
@@ -0,0 +1,201 @@
+package org.eclipse.osbp.blob.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.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import org.eclipse.osbp.blob.entities.ContentType;
+import org.eclipse.osbp.dsl.common.datatypes.IBean;
+import org.eclipse.osbp.runtime.common.annotations.Dirty;
+import org.eclipse.osbp.runtime.common.annotations.Dispose;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@Embeddable
+@SuppressWarnings("all")
+public class MimeType implements Serializable, IBean {
+ @Transient
+ @Dispose
+ private boolean disposed;
+
+ @Dirty
+ private transient boolean dirty;
+
+ @XmlAttribute
+ @Basic
+ private String mimeVersion;
+
+ @XmlAttribute
+ @Basic
+ private String contentTransferEncoding;
+
+ @XmlElement(name = "contentType")
+ @Basic
+ @Embedded
+ @ElementCollection
+ private List<ContentType> contentTypeList;
+
+ /**
+ * @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;
+ }
+
+ /**
+ * @return true, if the object is dirty.
+ *
+ */
+ public boolean isDirty() {
+ return dirty;
+ }
+
+ /**
+ * Sets the dirty state of this object.
+ *
+ */
+ public void setDirty(final boolean dirty) {
+ this.dirty = dirty;
+ }
+
+ /**
+ * 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 mimeVersion property or <code>null</code> if not present.
+ */
+ public String getMimeVersion() {
+ checkDisposed();
+ return this.mimeVersion;
+ }
+
+ /**
+ * Sets the mimeVersion property to this instance.
+ */
+ public void setMimeVersion(final String mimeVersion) {
+ checkDisposed();
+ this.mimeVersion = mimeVersion;
+ }
+
+ /**
+ * @return Returns the contentTransferEncoding property or <code>null</code> if not present.
+ */
+ public String getContentTransferEncoding() {
+ checkDisposed();
+ return this.contentTransferEncoding;
+ }
+
+ /**
+ * Sets the contentTransferEncoding property to this instance.
+ */
+ public void setContentTransferEncoding(final String contentTransferEncoding) {
+ checkDisposed();
+ this.contentTransferEncoding = contentTransferEncoding;
+ }
+
+ /**
+ * @return Returns an unmodifiable list of contentTypeList.
+ */
+ public List<ContentType> getContentTypeList() {
+ checkDisposed();
+ return Collections.unmodifiableList(internalGetContentTypeList());
+ }
+
+ /**
+ * Sets the given contentTypeList to the object. Currently contained contentTypeList instances will be removed.
+ *
+ * @param contentTypeList the list of new instances
+ */
+ public void setContentTypeList(final List<ContentType> contentTypeList) {
+ // remove the old contentType
+ for(ContentType oldElement : new ArrayList<ContentType>(this.internalGetContentTypeList())){
+ removeFromContentTypeList(oldElement);
+ }
+
+ // add the new contentType
+ for(ContentType newElement : contentTypeList){
+ addToContentTypeList(newElement);
+ }
+ }
+
+ /**
+ * For internal use only! Returns the list of <code>ContentType</code>s thereby lazy initializing it.
+ */
+ public List<ContentType> internalGetContentTypeList() {
+ if (this.contentTypeList == null) {
+ this.contentTypeList = new ArrayList<ContentType>();
+ }
+ return this.contentTypeList;
+ }
+
+ /**
+ * Adds the given contentType to this object. <p>
+ *
+ */
+ public void addToContentTypeList(final ContentType contentType) {
+ checkDisposed();
+ if (!getContentTypeList().contains(contentType)){
+ internalAddToContentTypeList(contentType);
+ }
+
+ }
+
+ public void removeFromContentTypeList(final ContentType contentType) {
+ checkDisposed();
+ internalGetContentTypeList().remove(contentType);
+ }
+
+ /**
+ * For internal use only!
+ */
+ public void internalAddToContentTypeList(final ContentType contentType) {
+ if(contentType == null) {
+ return;
+ }
+
+ if(!internalGetContentTypeList().contains(contentType)) {
+ internalGetContentTypeList().add(contentType);
+ }
+ }
+
+ /**
+ * For internal use only!
+ */
+ public void internalRemoveFromContentTypeList(final ContentType contentType) {
+ internalGetContentTypeList().remove(contentType);
+ }
+}
diff --git a/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/entities/NormalizerResolution.java b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/entities/NormalizerResolution.java
new file mode 100644
index 0000000..7340b92
--- /dev/null
+++ b/org.eclipse.osbp.blob/src-gen/org/eclipse/osbp/blob/entities/NormalizerResolution.java
@@ -0,0 +1,136 @@
+package org.eclipse.osbp.blob.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.Dirty;
+import org.eclipse.osbp.runtime.common.annotations.Dispose;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@Embeddable
+@SuppressWarnings("all")
+public class NormalizerResolution implements Serializable, IBean {
+ @Transient
+ @Dispose
+ private boolean disposed;
+
+ @Dirty
+ private transient boolean dirty;
+
+ @XmlAttribute
+ @Basic
+ private int id;
+
+ @XmlAttribute
+ @Basic
+ private String name;
+
+ @XmlAttribute
+ @Basic
+ private String resolution;
+
+ /**
+ * @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;
+ }
+
+ /**
+ * @return true, if the object is dirty.
+ *
+ */
+ public boolean isDirty() {
+ return dirty;
+ }
+
+ /**
+ * Sets the dirty state of this object.
+ *
+ */
+ public void setDirty(final boolean dirty) {
+ this.dirty = dirty;
+ }
+
+ /**
+ * 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 id property or <code>null</code> if not present.
+ */
+ public int getId() {
+ checkDisposed();
+ return this.id;
+ }
+
+ /**
+ * Sets the id property to this instance.
+ */
+ public void setId(final int id) {
+ checkDisposed();
+ this.id = id;
+ }
+
+ /**
+ * @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 resolution property or <code>null</code> if not present.
+ */
+ public String getResolution() {
+ checkDisposed();
+ return this.resolution;
+ }
+
+ /**
+ * Sets the resolution property to this instance.
+ */
+ public void setResolution(final String resolution) {
+ checkDisposed();
+ this.resolution = resolution;
+ }
+}
diff --git a/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/Activator.java b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/Activator.java
new file mode 100644
index 0000000..b7e9983
--- /dev/null
+++ b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/Activator.java
@@ -0,0 +1,47 @@
+/**
+ *
+ * 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.blob;
+
+import org.eclipse.osbp.gitinfo.Loginfo;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+
+public class Activator implements BundleActivator {
+
+ private static BundleContext 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.blob/src/org/eclipse/osbp/blob/Blob.dto b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/Blob.dto
new file mode 100644
index 0000000..390ae6d
--- /dev/null
+++ b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/Blob.dto
@@ -0,0 +1,73 @@
+/**
+*
+* 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
+*/
+
+import ns org.eclipse.osbp.blob.entities.Attributes
+import ns org.eclipse.osbp.blob.entities.Blob
+import ns org.eclipse.osbp.blob.entities.BlobMapping
+import ns org.eclipse.osbp.blob.entities.BlobTyping
+import ns org.eclipse.osbp.blob.entities.ContentType
+import ns org.eclipse.osbp.blob.entities.MimeType
+import ns org.eclipse.osbp.blob.entities.NormalizerResolution
+
+package org.eclipse.osbp.blob.dtos {
+
+ autoDto BlobTypingDto wraps BlobTyping {
+
+ inheritVar mimeType mapto MimeTypeDto
+ inheritRef attributes mapto AttributesDto
+ inheritRef normalizer mapto NormalizerResolutionDto
+ }
+
+ autoDto MimeTypeDto wraps MimeType {
+
+ inheritVar mimeVersion
+ inheritVar contentTransferEncoding
+ inheritRef contentTypeList mapto ContentTypeDto
+ }
+
+ autoDto ContentTypeDto wraps ContentType {
+
+ inheritVar id
+ inheritVar type
+ }
+
+ autoDto AttributesDto wraps Attributes {
+
+ inheritVar size
+ inheritVar resolution
+ }
+
+ autoDto NormalizerResolutionDto wraps NormalizerResolution {
+
+ inheritVar id
+ inheritVar name
+ inheritVar resolution
+ }
+
+ autoDto BlobMappingDto wraps BlobMapping {
+
+ inheritVar id
+ inheritVar uniqueName
+ inheritVar fileName
+ inheritVar mimeTypeId
+ inheritRef blobsRef mapto BlobDto
+ }
+
+ autoDto BlobDto wraps Blob {
+
+ inheritVar id
+ inheritVar data
+ inheritVar resolutionId
+ inheritRef blobMapping mapto BlobMappingDto
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/Blob.entity b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/Blob.entity
new file mode 100644
index 0000000..87d7703
--- /dev/null
+++ b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/Blob.entity
@@ -0,0 +1,102 @@
+/**
+*
+* 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
+*/
+
+import javax.xml.bind.annotation.XmlAccessType
+import javax.xml.bind.annotation.XmlAccessorType
+import javax.xml.bind.annotation.XmlAttribute
+import javax.xml.bind.annotation.XmlElement
+import javax.xml.bind.annotation.XmlElementWrapper
+import javax.xml.bind.annotation.XmlRootElement
+import ns org.eclipse.osbp.blob.datatypes.String
+import ns org.eclipse.osbp.blob.datatypes.blobtype
+import ns org.eclipse.osbp.blob.datatypes.int
+
+package org.eclipse.osbp.blob.entities {
+
+ @XmlRootElement
+ @XmlAccessorType(XmlAccessType.FIELD)
+ bean BlobTyping {
+ @XmlElement
+ var MimeType mimeType
+ @XmlElement
+ ref Attributes attributes
+ @XmlElementWrapper(name = "normalizer")
+ @XmlElement(name = "resolution")
+ ref NormalizerResolution[*] normalizer
+ }
+
+
+ @XmlAccessorType(XmlAccessType.FIELD)
+ bean MimeType {
+ @XmlAttribute
+ var String mimeVersion
+ @XmlAttribute
+ var String contentTransferEncoding
+ @XmlElement(name = "contentType")
+ ref ContentType[*] contentTypeList
+ }
+
+ @XmlAccessorType(XmlAccessType.FIELD)
+ bean ContentType {
+ @XmlAttribute
+ var int id
+ @XmlAttribute
+ var String type
+ }
+
+ @XmlAccessorType(XmlAccessType.FIELD)
+ bean Attributes {
+ @XmlElement
+ var String size
+ @XmlElement
+ var String resolution
+ }
+
+ @XmlAccessorType(XmlAccessType.FIELD)
+ bean NormalizerResolution {
+ @XmlAttribute
+ var int id
+ @XmlAttribute
+ var String name
+ @XmlAttribute
+ var String resolution
+ }
+
+ entity BlobMapping {
+ persistenceUnit "blob"
+ uuid String id
+ var String uniqueName
+ var String fileName
+ var int mimeTypeId
+ ref cascade Blob[*] blobsRef opposite blobMapping
+ }
+
+ entity Blob {
+ tableName BlobData
+ persistenceUnit "blob"
+ uuid String id
+ var blobtype data
+ var int resolutionId
+ ref BlobMapping blobMapping opposite blobsRef
+ }
+}
+
+
+
+
+
+
+
+
+
+
diff --git a/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/Blob.service b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/Blob.service
new file mode 100644
index 0000000..9e63521
--- /dev/null
+++ b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/Blob.service
@@ -0,0 +1,27 @@
+/**
+*
+* 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
+*/
+
+import ns javax.persistence.EntityManagerFactory
+import ns org.eclipse.osbp.blob.dtos.BlobDto
+import ns org.eclipse.osbp.blob.dtos.BlobMappingDto
+
+package org.eclipse.osbp.blob.dtos.service {
+
+ dtoservice BlobMappingDtoService provides BlobMappingDto {
+ mutable persistenceUnit blob
+ }
+
+ dtoservice BlobDtoService provides BlobDto {
+ mutable persistenceUnit blob
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/BlobTyping.xml b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/BlobTyping.xml
new file mode 100644
index 0000000..308479f
--- /dev/null
+++ b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/BlobTyping.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<blobTyping
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:noNamespaceSchemaLocation="BlobTyping.xsd"
+>
+ <mimeType mimeVersion="1.0" contentTransferEncoding="8bit">
+ <contentType id="0" type="text/plain"/>
+ <contentType id="1" type="image/jpeg"/>
+ <contentType id="2" type="image/png"/>
+ <contentType id="3" type="audio/basic"/>
+ <contentType id="4" type="video/mpeg"/>
+ <contentType id="5" type="application/json"/>
+ <contentType id="6" type="application/octet-stream"/>
+ <contentType id="7" type="application/pdf"/>
+ <!-- MS Word: doc -->
+ <contentType id="8" type="application/msword"/>
+ <!-- MS Word: docx -->
+ <contentType id="9" type="application/vnd.openxmlformats-officedocument.wordprocessingml.document"/>
+ <!-- MS Excel (97-2003): xls -->
+ <contentType id="10" type="application/vnd.ms-excel"/>
+ <!-- MS Excel: xlsx -->
+ <contentType id="11" type="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"/>
+ </mimeType>
+ <attributes>
+ <size/>
+ <resolution/>
+ </attributes>
+ <normalizer>
+ <resolution id="0" name="unnormalized" resolution="unknown"/>
+ <resolution id="1" name="small" resolution="16x16"/>
+ <resolution id="2" name="mid" resolution="64x64"/>
+ <resolution id="3" name="portrait" resolution="64x128"/>
+ <resolution id="4" name="landscape" resolution="128x64"/>
+ <resolution id="5" name="big" resolution="200x-1"/>
+ </normalizer>
+</blobTyping>
\ No newline at end of file
diff --git a/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/BlobTyping.xsd b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/BlobTyping.xsd
new file mode 100644
index 0000000..b7d744c
--- /dev/null
+++ b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/BlobTyping.xsd
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+ <xs:element name="blobTyping">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="mimeType">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="contentType" maxOccurs="unbounded"/>
+ <xs:complexType>
+ <xs:attribute name="id" type="xs:int"/>
+ <xs:attribute name="type" type="xs:string"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="mimeVersion" type="xs:string"/>
+ <xs:attribute name="contentTransferEncoding" type="xs:string"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="attributes">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="size" type="xs:string" />
+ <xs:element name="resolution" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="normalizer">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="resolution" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:attribute name="id" type="xs:int"/>
+ <xs:attribute name="name" type="xs:string"/>
+ <xs:attribute name="resolution" 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.blob/src/org/eclipse/osbp/blob/PersistenceServiceBinder.java b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/PersistenceServiceBinder.java
new file mode 100644
index 0000000..e9703b2
--- /dev/null
+++ b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/PersistenceServiceBinder.java
@@ -0,0 +1,51 @@
+/*
+ *
+ * Copyright (c) 2011 - 2017 - 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
+ *
+ * Initial contribution:
+ * Loetz GmbH & Co. KG
+ *
+ */
+package org.eclipse.osbp.blob;
+
+import org.eclipse.osbp.core.api.persistence.IPersistenceService;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Reference;
+import org.osgi.service.component.annotations.ReferenceCardinality;
+import org.osgi.service.component.annotations.ReferencePolicy;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The Class PersistenceServiceBinder.
+ */
+@Component
+public class PersistenceServiceBinder {
+ /** The Constant LOGGER. */
+ private static final Logger LOGGER = LoggerFactory.getLogger("servicebinder");
+ private static String persistenceId = "blob";
+
+ private static IPersistenceService persistenceService;
+
+ @Reference(cardinality = ReferenceCardinality.MANDATORY, policy = ReferencePolicy.STATIC)
+ public synchronized void bindPersistenceService(final IPersistenceService persistenceService) {
+ PersistenceServiceBinder.persistenceService = persistenceService;
+ PersistenceServiceBinder.persistenceService.registerPersistenceUnit(persistenceId, getClass());
+ LOGGER.debug("PersistenceService bound");
+ }
+
+ public synchronized void unbindPersistenceService(final IPersistenceService persistenceService) {
+ PersistenceServiceBinder.persistenceService = null;
+ LOGGER.debug("PersistenceService unbound");
+ }
+
+ public static IPersistenceService getPersistenceService() {
+ return persistenceService;
+ }
+
+}
diff --git a/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/blob.datatype b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/blob.datatype
new file mode 100644
index 0000000..453067d
--- /dev/null
+++ b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/blob.datatype
@@ -0,0 +1,18 @@
+/**
+*
+* 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.blob.datatypes {
+
+ datatype int jvmType java.lang.Integer asPrimitive
+ datatype String jvmType java.lang.String
+ datatype blobtype asBlob
+}
diff --git a/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/component/BlobComponent.java b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/component/BlobComponent.java
new file mode 100644
index 0000000..85eeaf3
--- /dev/null
+++ b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/component/BlobComponent.java
@@ -0,0 +1,38 @@
+/**
+ *
+ * Copyright (c) 2011, 2017 - 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.blob.component;
+
+import org.eclipse.osbp.ui.api.customfields.IBlobService;
+
+import com.vaadin.shared.ui.label.ContentMode;
+import com.vaadin.ui.Label;
+
+@SuppressWarnings("serial")
+public class BlobComponent extends Label {
+
+ public BlobComponent(IBlobService blobService, String value, int displayResolutionId) {
+ super(blobService.getImage(value, displayResolutionId), ContentMode.HTML);
+ }
+
+ @Override
+ public String getValue() {
+ return "";
+ }
+
+ @Override
+ public String getDescription() {
+ return "";
+ }
+
+}
diff --git a/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/component/BlobConverter.java b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/component/BlobConverter.java
new file mode 100644
index 0000000..9ca479a
--- /dev/null
+++ b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/component/BlobConverter.java
@@ -0,0 +1,101 @@
+package org.eclipse.osbp.blob.component;
+
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+
+import org.eclipse.osbp.ui.api.customfields.IBlobConverter;
+import org.eclipse.osbp.ui.api.customfields.IBlobService;
+
+import com.vaadin.server.StreamResource;
+
+public class BlobConverter implements IBlobConverter {
+ private String input;
+ private StreamResource output;
+ private IBlobService blobService;
+ private int resolutionId;
+ private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);
+
+ public BlobConverter(IBlobService blobService) {
+ this.blobService = blobService;
+ }
+
+ /**
+ * @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);
+ }
+
+ @Override
+ public void setInput(String input) {
+ this.input = input;
+ if (blobService != null) {
+ setOutput(blobService.getResource(input, resolutionId));
+ }
+ }
+
+ @Override
+ public void setOutput(StreamResource output) {
+ firePropertyChange("output", this.output, this.output = output );
+ }
+
+ @Override
+ public String getInput() {
+ return input;
+ }
+
+ @Override
+ public StreamResource getOutput() {
+ return output;
+ }
+
+ @Override
+ public void setBlobService(IBlobService blobService) {
+ this.blobService = blobService;
+ }
+
+ @Override
+ public void setResolution(int resolutionId) {
+ this.resolutionId = resolutionId;
+ }
+
+ @Override
+ public IBlobService getBlobService() {
+ return blobService;
+ }
+
+ @Override
+ public int getResolution() {
+ return resolutionId;
+ }
+}
diff --git a/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/component/BlobEvent.java b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/component/BlobEvent.java
new file mode 100644
index 0000000..da6c0b1
--- /dev/null
+++ b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/component/BlobEvent.java
@@ -0,0 +1,96 @@
+/**
+ *
+
+ * 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.blob.component;
+
+import java.util.EventObject;
+
+import org.eclipse.osbp.ui.api.customfields.IBlobEvent;
+
+/**
+ * Event object that provides all the required data to inform about a realized
+ * upload and persistence into the database.
+ *
+ * - {@code uploadSuccessful}: boolean that indicates if a blob was successfully
+ * uploaded and persisted into the database.
+ *
+ * - {@code uploadedBlobId}: the uuid of the successfully uploaded and persisted
+ * blob into the database or {@code null} otherwise.
+ *
+ * - {@code errorMessage}: error message that indicates the reason of an
+ * unsuccessfully attempt of uploading and persisting a blob into the database.
+ *
+ * @author dominguez
+ *
+ */
+public class BlobEvent extends EventObject implements IBlobEvent {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 2935848211519428017L;
+
+ private boolean uploadSuccessful;
+ private String uploadedBlobId;
+ private String errorMessage;
+ private String uploadedFile;
+
+ /**
+ * Instantiates a new blob event.
+ *
+ * @param source the source
+ * @param uploadSuccessful the upload successful
+ * @param uploadedBlobId the uploaded blob id
+ * @param errorMessage the error message
+ * @param uploadedFile the uploaded file
+ */
+ public BlobEvent(Object source, boolean uploadSuccessful,
+ String uploadedBlobId, String errorMessage, String uploadedFile) {
+ super(source);
+ this.uploadSuccessful = uploadSuccessful;
+ this.uploadedBlobId = uploadedBlobId;
+ this.errorMessage = errorMessage;
+ this.uploadedFile = uploadedFile;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.ui.api.customfields.IBlobEvent#isUploadSuccessful()
+ */
+ @Override
+ public boolean isUploadSuccessful() {
+ return uploadSuccessful;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.ui.api.customfields.IBlobEvent#getUploadedBlobId()
+ */
+ @Override
+ public String getUploadedBlobId() {
+ return uploadedBlobId;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.ui.api.customfields.IBlobEvent#getErrorMessage()
+ */
+ @Override
+ public String getErrorMessage() {
+ return errorMessage;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.ui.api.customfields.IBlobEvent#getUploadedFile()
+ */
+ @Override
+ public String getUploadedFile() {
+ return uploadedFile;
+ }
+}
diff --git a/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/component/BlobUploadButton.java b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/component/BlobUploadButton.java
new file mode 100644
index 0000000..c465bc0
--- /dev/null
+++ b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/component/BlobUploadButton.java
@@ -0,0 +1,62 @@
+/**
+ *
+ * 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.blob.component;
+
+import java.util.List;
+
+import com.vaadin.server.Resource;
+import com.vaadin.ui.CustomComponent;
+import com.wcs.wcslib.vaadin.widget.multifileupload.component.SmartMultiUpload;
+import com.wcs.wcslib.vaadin.widget.multifileupload.ui.MultiFileUpload;
+import com.wcs.wcslib.vaadin.widget.multifileupload.ui.UploadFinishedHandler;
+import com.wcs.wcslib.vaadin.widget.multifileupload.ui.UploadStateWindow;
+
+@SuppressWarnings("serial")
+public class BlobUploadButton extends CustomComponent {
+ private MultiFileUpload singleUpload;
+
+ public BlobUploadButton(UploadFinishedHandler handler) {
+ UploadStateWindow uploadStateWindow = new UploadStateWindow();
+ singleUpload = new MultiFileUpload(handler, uploadStateWindow, false);
+ singleUpload.setSizeFull();
+ setCompositionRoot(singleUpload);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ return super.equals(obj);
+ }
+
+ @Override
+ public int hashCode() {
+ return super.hashCode();
+ }
+
+ void setUploadButtonCaption(String buttonCaption) {
+ singleUpload.setUploadButtonCaptions(buttonCaption, "");
+ }
+
+ public void setUploadAcceptedMimeTypes(List<String> mimeTypes) {
+ singleUpload.setAcceptedMimeTypes(mimeTypes);
+ }
+
+ public void setUploadButtonIcon(Resource uploadIcon) {
+ if (uploadIcon != null)
+ singleUpload.setUploadButtonIcon(uploadIcon);
+ }
+
+ public SmartMultiUpload getSmartUpload() {
+ return singleUpload.getSmartUpload();
+ }
+}
diff --git a/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/component/BlobUploadComponent.java b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/component/BlobUploadComponent.java
new file mode 100644
index 0000000..d003b91
--- /dev/null
+++ b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/component/BlobUploadComponent.java
@@ -0,0 +1,334 @@
+/**
+ *
+ * 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
+ */
+package org.eclipse.osbp.blob.component;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.e4.core.services.events.IEventBroker;
+import org.eclipse.osbp.blob.service.BlobService;
+import org.eclipse.osbp.ui.api.customfields.IBlobEvent;
+import org.eclipse.osbp.ui.api.customfields.IBlobService;
+import org.eclipse.osbp.ui.api.customfields.IBlobUploadEventListener;
+
+import com.vaadin.server.Extension;
+import com.vaadin.server.FileDownloader;
+import com.vaadin.server.Resource;
+import com.vaadin.server.StreamResource;
+import com.vaadin.ui.AbstractLayout;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Component;
+import com.vaadin.ui.CustomField;
+import com.vaadin.ui.GridLayout;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.Notification;
+import com.vaadin.ui.Notification.Type;
+import com.wcs.wcslib.vaadin.widget.multifileupload.ui.MultiFileUpload;
+import com.wcs.wcslib.vaadin.widget.multifileupload.ui.UploadFinishedHandler;
+
+/**
+ * This custom vaadin ui component unifies the {@link Label} that represents the
+ * blob with the optional available {@link MultiFileUpload}-Button that persist
+ * the uploaded blob base64 encoded into the database via JPA.
+ *
+ * The blob representation within the {@link Label} is in case of an image mime
+ * type the base64 encoded string of the image and otherwise a defined image for
+ * each mime type representing them.
+ *
+ * To visualize the stored base64 encoded blob data it will be read from
+ * database via JPA and included in a HTML-IMG-Tag-String as input for the
+ * {@link Label}. {@code <img src="data:...;base64,...">}.
+ *
+ * The optional available Upload-Button is from the Vaadin Add-on
+ * 'MultiFileUpload' by 'Webstar Csoport'
+ * ('https://vaadin.com/directory#addon/multifileupload').
+ *
+ * It is optionally firmly linked with the first uploaded blob, which means that
+ * every further blob upload only replaced the blob content (data) of the first
+ * created blob. Otherwise every blob upload creates a new blob and the
+ * corresponding persistence on the database.
+ *
+ * @author dominguez
+ *
+ */
+public class BlobUploadComponent extends CustomField<String> implements IBlobUploadEventListener {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -3890298210810421764L;
+
+ public enum BUTTON_ALIGNMENT {
+ TOP, BUTTOM, LEFT, RIGHT, DEFAULT
+ }
+ private transient IEventBroker eventBroker = null;
+
+ private static final int DEFAULT_RESOLUTION_ID = 0;
+ private transient IBlobService blobService;
+ private BlobUploadButton singleUpload;
+ private Button downloadButton;
+ private Label displayImageLabel;
+ private Label blobUploadCompLabel = null;
+ private AbstractLayout layout = null;
+
+ private int displayResolutionId = DEFAULT_RESOLUTION_ID;
+ private BUTTON_ALIGNMENT buttonAlignment = BUTTON_ALIGNMENT.RIGHT;
+
+ private Resource uploadIcon;
+ private Resource downloadIcon;
+ private String lastUploadedFilename;
+
+ public BlobUploadComponent(IBlobService blobService) {
+ this.blobService = blobService;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ return super.equals(obj);
+ }
+
+ @Override
+ public int hashCode() {
+ return super.hashCode();
+ }
+
+ /**
+ * Creates the custom vaadin ui component consisting of a {@link Label}, an
+ * optional {@link MultiFileUpload} and a corresponding
+ * {@link UploadFinishedHandler}.
+ *
+ * The {@link UploadFinishedHandler} when called after an upload sent via
+ * {@link IEventBroker} the message of an started upload and called the
+ * {@link BlobService} to persist the uploaded blob into the database via
+ * JPA.
+ */
+
+ public void createSingleUpload() {
+ UploadFinishedHandler handler = new UploadFinishedHandler() {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public void handleFile(InputStream stream, String fileName, String mimeType, long length) {
+ if (eventBroker != null) {
+ eventBroker.send(IBlobEvent.STARTED_BLOB_UPLOAD, true);
+ }
+ BlobUploadComponent.this.lastUploadedFilename = fileName;
+ blobService.createBlobMapping(stream, fileName, mimeType);
+ }
+
+ };
+
+ singleUpload = new BlobUploadButton(handler);
+ if (uploadIcon != null) {
+ singleUpload.setUploadButtonIcon(uploadIcon);
+ } else {
+ singleUpload.setUploadButtonCaption("upload");
+ }
+ // a Button is still active if the component is read only.
+ if (isReadOnly()) {
+ singleUpload.setEnabled(false);
+ }
+ if (downloadIcon != null) {
+ downloadButton = new Button(downloadIcon);
+ } else {
+ downloadButton = new Button("download");
+ }
+ downloadButton.setVisible(false);
+ downloadButton.setEnabled(false);
+ }
+
+ @Override
+ protected Component initContent() {
+ // Initialization of BlobUpload required before the
+ // 'getImageLabel'-Method
+ displayImageLabel = new BlobComponent(blobService, getValue(), displayResolutionId);
+ createSingleUpload();
+ int columns = 3;
+ int rows = 3;
+ switch (buttonAlignment) {
+ case LEFT:
+ layout = new GridLayout(columns, 1);
+ layout.addComponent(singleUpload);
+ layout.addComponent(downloadButton);
+ layout.addComponent(displayImageLabel);
+ break;
+ case RIGHT:
+ case DEFAULT:
+ layout = new GridLayout(columns, 1);
+ layout.addComponent(displayImageLabel);
+ layout.addComponent(singleUpload);
+ layout.addComponent(downloadButton);
+ break;
+ case BUTTOM:
+ layout = new GridLayout(1, rows);
+ layout.addComponent(displayImageLabel);
+ layout.addComponent(singleUpload);
+ layout.addComponent(downloadButton);
+ break;
+ case TOP:
+ layout = new GridLayout(1, rows);
+ layout.addComponent(singleUpload);
+ layout.addComponent(downloadButton);
+ layout.addComponent(displayImageLabel);
+ break;
+ }
+ return layout;
+ }
+
+ @Override
+ public Class<String> getType() {
+ return String.class;
+ }
+
+ public String getValue() { // NOSONAR
+ return super.getValue();
+ }
+
+ public Label getBlobUploadCompLabel() {
+ return blobUploadCompLabel;
+ }
+
+ /**
+ * Sets the uuid for the blob to be displayed, obtained the corresponding
+ * blob data for the already defined resolution and put them into the
+ * {@link Label} part of this ui component.
+ *
+ * @param uploadedBlobUuid
+ */
+ public void setUploadedBlobUuid(String uploadedBlobUuid) {
+ setValue(uploadedBlobUuid);
+ }
+
+ public void showImage() {
+ if (displayImageLabel != null) {
+ displayImageLabel.setValue(blobService.getImage(getValue(), displayResolutionId));
+ }
+ }
+
+ public void showDownloadButton() {
+ if (downloadButton != null && getValue() != null) {
+ // a Button is still active if the component is read only, so the
+ // downloadButton only went enabled when the component is editable.
+ downloadButton.setEnabled(!isReadOnly());
+ downloadButton.setVisible(true);
+ // the description is shown as tooltip on the screen.
+ Collection<Extension> fileDownloaderExtensions = new ArrayList<>();
+ for (Extension extension : downloadButton.getExtensions()) {
+ if (extension instanceof FileDownloader) {
+ fileDownloaderExtensions.add(extension);
+ }
+ }
+ for (Extension extension : fileDownloaderExtensions) {
+ if (extension instanceof FileDownloader) {
+ downloadButton.removeExtension(extension);
+ }
+ }
+ StreamResource resource = blobService.getResource(getValue(), 0);
+ if (resource != null) {
+ FileDownloader fileDownloader = new FileDownloader(resource);
+ fileDownloader.extend(downloadButton);
+ }
+ }
+ }
+
+ public void setValue(String value) { // NOSONAR
+ super.setValue(value);
+ }
+
+ @Override
+ protected void setInternalValue(String newValue) { // NOSONAR
+ super.setInternalValue(newValue);
+ }
+
+ @Override
+ public void valueChange(com.vaadin.data.Property.ValueChangeEvent event) {
+ showImage();
+ showDownloadButton();
+ super.valueChange(event);
+ }
+
+ public void setDisplayResolutionId(int resolutionId) {
+ this.displayResolutionId = resolutionId;
+ }
+
+ public void setEventBroker(IEventBroker eventBroker) {
+ this.eventBroker = eventBroker;
+ }
+
+ public void setDisplayImageLabel(Label displayImageLabel) {
+ this.displayImageLabel = displayImageLabel;
+ }
+
+ public void setBlobUploadCompLabel(Label blobUploadCompLabel) {
+ this.blobUploadCompLabel = blobUploadCompLabel;
+ setCaption(blobUploadCompLabel.getCaption());
+ }
+
+ public void setUploadButtonCaption(String buttonCaption) {
+ singleUpload.setUploadButtonCaption(buttonCaption);
+ }
+
+ public void setUploadIcon(Resource uploadIcon) {
+ this.uploadIcon = uploadIcon;
+ }
+
+ public void setDownloadIcon(Resource downloadIcon) {
+ this.downloadIcon = downloadIcon;
+ }
+
+ public void setUploadAcceptedMimeTypes(List<String> mimeTypes) {
+ singleUpload.setUploadAcceptedMimeTypes(mimeTypes);
+ }
+
+ public void setUploadButtonAlignment(BUTTON_ALIGNMENT buttonAlignment) {
+ this.buttonAlignment = buttonAlignment;
+ }
+
+ public void setDisplayResolution(String displayResolution) {
+ this.displayResolutionId = blobService.getNormalizerResolutionIdByName(displayResolution);
+ }
+
+ @Override
+ public void attach() {
+ super.attach();
+ blobService.addBlobUploadListener(this);
+ }
+
+ @Override
+ public void detach() {
+ blobService.removeBlobUploadListener((IBlobUploadEventListener) this);
+ super.detach();
+ }
+
+ @Override
+ public void blobUploaded(IBlobEvent e) {
+ if (e.isUploadSuccessful() && e.getUploadedFile().equals(lastUploadedFilename)) {
+ setValue(e.getUploadedBlobId());
+ showImage();
+ if (eventBroker != null) {
+ eventBroker.send(IBlobEvent.STOPPED_BLOB_UPLOAD, getValue());
+ }
+// } else {
+// Notification.show("Blob NOT successfully uploaded. Error: " + e.getErrorMessage(), Type.ERROR_MESSAGE);
+ }
+ }
+
+ @Override
+ public void focus() {
+ super.focus();
+ }
+}
diff --git a/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/service/BlobService.java b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/service/BlobService.java
new file mode 100644
index 0000000..23df1f8
--- /dev/null
+++ b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/service/BlobService.java
@@ -0,0 +1,592 @@
+/**
+ *
+ * Copyright (c) 2011, 2017 - 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
+ */
+package org.eclipse.osbp.blob.service;
+
+import java.awt.Image;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.sql.Blob;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.imageio.ImageIO;
+import javax.xml.bind.DatatypeConverter;
+
+import org.apache.commons.compress.utils.IOUtils;
+import org.eclipse.osbp.blob.component.BlobEvent;
+import org.eclipse.osbp.blob.component.BlobUploadComponent;
+import org.eclipse.osbp.blob.dtos.BlobDto;
+import org.eclipse.osbp.blob.dtos.BlobMappingDto;
+import org.eclipse.osbp.dsl.dto.lib.impl.DtoServiceAccess;
+import org.eclipse.osbp.runtime.common.filter.IDTOServiceWithMutablePersistence;
+import org.eclipse.osbp.ui.api.customfields.IBlobEvent;
+import org.eclipse.osbp.ui.api.customfields.IBlobService;
+import org.eclipse.osbp.ui.api.customfields.IBlobTyping;
+import org.eclipse.osbp.ui.api.customfields.IBlobUploadEventListener;
+import org.osgi.service.component.annotations.Component;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.vaadin.server.StreamResource;
+import com.vaadin.server.StreamResource.StreamSource;
+import com.vaadin.shared.ui.label.ContentMode;
+import com.vaadin.ui.Label;
+
+/**
+ * Provides and persist blob data from and into a database via JPA.
+ * For images different sizes are calculated and stored that can be retrieved
+ * later to get better performance
+ *
+ * @author dominguez
+ *
+ */
+@Component
+public class BlobService implements IBlobService {
+ private IDTOServiceWithMutablePersistence<BlobMappingDto> dtoBlobMappingDtoService;
+ private Logger log = LoggerFactory.getLogger(BlobService.class);
+ private List<IBlobUploadEventListener> listeners = new ArrayList<>();
+ private BlobTypingAPI blobAPI;
+
+ private static final String DEFAULT_EXCEL_ICON = "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAAAyAAAAMgBFP3XOwAAAAd0SU1FB94LGQw6Bwz2TEUAABArSURBVFgJASAQ3+8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACSkpIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJ6wjQCAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAABBVzIATDhYFvz8/HYAAAABAf8AAP8CAAAA/wAAAQAAAAAAAAD/AAAAAP8AAP8A/wABAP8A/gAAAAIAAAH7/gDwAQH9vHt3f8YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAmJqWmjo4OWUJCAoA/wD/AAEBAQACAgIAAgMDAAMCAgABAQIAAwMCAAAAAQD6+/oA+fr4APr7+gDd3NsA4uTlAPb19dkqKStaTUtO+P////ACAgLmAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHx4fMxQUFQALCwwA///+AP///wAAAAAAAgICAAICBAAEBAMAAgICAAMDAwABAQIAAAD/APX29f8FBAUBDw4TAPDv8Cfh4N/Nys3KnDYzNvYAAABvAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAACUuKAYGBAYJAAAAAAAAAADVztL09vf3BPb29gAAAAEA/wD+AP/+AAD/AP4A//7/AAICAgACAgMAAgMCAAMDAwANDA0ABAMEAAsLDAEMCg0A///nAAkJCf8aGh4BxcPDVh8dHqoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAFiQJX4AE+xm//4A/AAAAAD/AP/+CwMSGwgGCQYBAQEAAAAAAAAAAAAAAAAA/wAAAAD/AAABAQAAAAABAAcDDABxO6MAFg8bAAICAwDs7esA0dLSAAIBAgD5+Pj/7/DwAQQEAuRbWl0dAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAMEARLz9/UbGxElAAQCBQAAAAAA/wD/AAAAAAAAAAAAAP8AAP8AAAAAAAAAAQAAAAEC/wD//wAA8ffqAPn45gD7/PkA+/v7AAMD/gAIBwkABAUDAAYFBgAMDQsB/wL+/9nb2hwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAADAAcAbzelABkPIgAAAAAAAAEAAAAAAAAAAAAAAAAAAAD/AAAAAAAAAAAAAAABAAADAQQAkL5oANH5tAD9/f0A/f38AP///wAHBwYAPjs/AAMCAQACAgMAAQICAa6wqwCDhX9HfXuBuQAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAP8ACgoKAA4ODQAAAAAAAAAAAAAAAAD///8AAAAAAAEBAQAAAAAAAAAAAAAAAAAAAAAAAwMCAAAAAAABAQEA/v7+AP///gD+/v4A/v7+AAICAgADAwMABQUFAAgHCQD28vPVAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAD/AAAAAAAAAO7z6gCzzZsAAgIAAAD7BgBdQ3UAAAAAALnKqgDs+eEAAgEAADkjUAAgGSUAAAAAAAAAAAACAgMAAwMDAP///wD///4A/f0AAP///gD///8AAQEBAP7+/gACAwIDAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAP8AAAD/APn89gC64JYA9PzrAPwA+wDqs+EAIhMvAKDZbAD7+foABwUKAB4QKwAgGSUAAAAAAP///wDs7OwA/fUCAP7+AAAAAP4AAQECABYWFQD+/v4AAQEAAP7//gAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAA/wAAAAAAABkQIAB4PrAAp9N7AOXz2ADD6ZwAxeoEAP/9/gAHBQcAYiyWADssSgAAAAAAAAAAAAAAAAD+/f0A/f39AP7+AAAAAP4AAwMAAAEBAQD+/v4A+/v7AAD//wAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAP8AAP8AAAAAAAAAAP8A/wAtIjUABAKJANryxACz1ZIA6fPgAAQCBgBSHoMATTZfAP///wABAQEAAAAAAAEBAQAWFhYAFA0bAP7+/gAAAP8AAwMDAP7+/wACAgIAAAAAAP7+/gABAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAD/AP8A/wD/AAAAAAAAAAAA4ezaAKPMfQAnFjYAGxAnAAAA/gDL8aUAb643AMnXvgAAAAAAAAAAAP7//gDg4OEA29vcANzc3ADd3d4A+/v7AAICAQABAQIAAgICAAEBAgAAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAC6zasAmNBgAP7+/ADC3KkAMh1HAObw2wDg7tMABQEJABANEQAAAAAAAAAAAAIBAgAhISEAFA0aAP///wD+/v4ABQUEAP//AQABAf4AAAABAP8A/wAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAP8AAObw3QCd1WUA/wb5AAIH/wADCAAA0Om4AAUGAgD/Af4A/QH4AMHWrgAAAAAAAAAAAP8A/wDv8PAA7e3tAO3t7QAKCgoAAgIDAAICAQABAQEAAgICAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAP8AAAD/ABQKHgCDOcwAAwEDAAECAgACAQMAAwIDAPD26gC+4Z0A/wH9APH57gAAAAAAAAAAAAD/AAD7+/kA+Pj4AAAAAAACAgIA////AP7+/gABAQMAAAAAAAEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAD/AAAA/wAAAAcHBgAmJSQAAAAAAAAAAAAAAAAAAAAAAB0AGQAtKZIAAAAAAAAAAAAAAAAAAAAAAAICAgAiISIAFA0cAP///wD///8AAwMBAAAA/AD///8AAQEBAP8AAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAABAAAA8fbtAOzy6AAAAP8AAAAAAAAA/wD/AAAAAAD/AAAAAAD//wAAAAD/AAAAAAADAgQA/P75AP7+/gDd3t4A7Af0AAAA/wD//wAAAgICACUlJAD9/f0AAAABAAEAAQAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAABAAD+AvsAib9TAAD/AwAAAf8A////AP8A/v8A/wAB////AAAAAAAAAP8A/wAAAAAAAAAAAP8A/P/5AAMBBgAVFBUAEwwZAAAAAAD///8AAAAAAAAAAQABAQEAAQECAAEBAAD/AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAPbqA+EKFRrB/fgB+wAAAAD+//78FgkiOBYSGRAEBAQAAAAAAAAAAQAAAQAAAQABAAEBAAAAAAEAAAAAAAUBCAARDxUAEA0QAAAAAAAAAAAA////AP7+/gACAgIAAQECAP//AQABAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAUoMoAAAAAAAAAAAAAAAAAAAAAAAAAAAAtrW2vvX09v////////////////////////////////////////////////////////////////////////////7+/v/9/f3//v7+/7K0sP99fHYfAAAAAAAAAAAAAAAAAAAAAAAAAAACrn3YAAAAAAAAAAAAAAAAAAAAAAAAAAAA+v34+vz++wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQACAgIAAQEBAAEAAP//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/v7++wEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAAAAAAAAAAAAAAAAAf8BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/f397+Lj4QAKCgsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/AAAAAQAAAAAAAAD/AAAAAAAAAAAAAgECAPPz8/0BAQL4AAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0tPQG8vMyh/8/Pz+//7///8A/gD8/P3+AAAAAP39/P7///8A/f7+//79/v/+//3//f3+//79/v8AAP8AAAD/AAAAAAAAAAAA/wAAAAoJC/p0cnfYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACyEsPHDCoiewAAAABJRU5ErkJggg==";
+ private static final String DEFAULT_WORD_ICON = "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAFT0lEQVR4XrVXa2wUVRg9Mzv7brftVra1UEBAoIAWKsaCyMOiEqKoCVrDHxORhKg/sFGh/kETLSn+ITbRX0pEiaGQ+CAxCKlWJaiFEjEGFSoYhT720W132+7O497rN7PLpkuGsBvLSU7ud2d2cs539rv7kIQQMCFJEq5hx44d79fW1m5HgRBEiLwr1nY4lsCmTRufW7Gi8QDpMFyHlpYWKLABmdlON/NFhMgJUUX7vDp3n9bcvu2tNvT0nO3Yt+/dCQCHYAMZ9vi/4hZNLFh4p39iIv1xW9uep2EDZff+wXcMnbGWjr9hGAy6YUAd7UVn1xAYZ+CcgzFBNc9RCAc8jnHMq5Zw79L5tuJZfUyfUYNgsMJ54vg3n+zZ0y5aW3cezjPQWFfyynA8Dk0XUE1qgBqqx4XLYdpz2jOigTStup4xKBw+TIzHUVfZj+VkwEY8l4Db6UZwegWaHlrr7DrRfZBMYLIJxRSfFdIwpzZoCUiSoCS41bksA+DCMudwCEgAkeP0+Qg+/DIKNWDcUFzkxlOiZxVUV1VhzYOrnd1d3Qfb2/eKnTtfO2IZMEWrKsvg9QSIZgIclUEFfo+MeMIA5wJer4KJFKOakQCHz6eCGxqAG4vTaj27f/9H5lBb+yycVH/a3Nz8a2dnZ5+ikoFTv0SRMlLQDIbByDjWNgRQXurD1z9HMZJIY/P6Gpz4MYL4mIqhcBRQY/C6ZeDG4hZf3bUrYyQvJWBv226FxOOmGVkn0TtqvPB5JJzrS6K8BCjxyCQeQe/FEbo2CocEDMWSOH1hFLHYCJbWBaHqBrjg9uIWYSc+OYkQ0a2YwzV/dgn8ASeO/tCPitIy/BthOHcpQbHrcDmB3/6M4EosjfDgAF7fMhOLFs3E599dBOcoVnyygQDRab0FGlGCC5IE9P6ehMoTiCdVy3E6NY7DXQkMJAUWVKWxYe0i9P4RIXEDgjuKFhfIwU2UFU3LDJrBMkb+iWpIqQzgAJc40rpG5EhGB9G8rR6Vt1UgrV6xTgkJFCturZOhqJqA4AKcSTDTiCV1VHg5KgPA1ViKhHQ6ASksni6wbtUSJMd06/UpXcelfgOfdfejGDQtD+Yb0HQj5zpN9WhiDA/XV8KlMPRdjUCnaxPxq3h2axP8Pj+sxASHInHMrvbi8dXVhXZOtEnAHEIBAZ1xDITjqC4T2Nw0E8dO9iE2PIxEcgzrlpTivnsWUvQMEjKJpbVMAl98P4hisK6hPG9vDSHjAtVBF55aE8Jdc8sxb87tmH05jA0NQeiaB888sQIet8eaEYcsgfQhSwKzqrx4bFVVoZ1niTwoOnXCdB11C/x486WV0A2OVJrj0fVL8eQjy6wHUhqDqhqWuCLLkMEpDQ2XB4CjJ4dQDNYsK8s3wB1enDkfxmAcNGwqTN9McAgmwDknZlfzGjc75zh3YQhObylmTBPYuDJUcOcCNglEY9Hh946EZV07Y0XJmQFJaOUutyvzdcwYmElugHNaDQNw+uFycFwZGsdXp8IoBg/UB/INXOw5dMhg3MU4AZwEOebV+LY1LF4OLiQIIRMVEndmO+Gg18MlCyycOxcbGqcV2rn9DPzVc+CF638Tbln/8rY3Wp+HAG56zo/9FEExuP/u0nwDsEeumyLPuX3n+ftCDOQitM75VGLlktJiDMA851PXeaYu1EDxsX97dgQ3Q+PikoITKLpz+pCx7zxXF/6/YMpjFyLXWEEGbqV4gQZuvbhK5LYzYBjGB+1v796KW4RIJHIcQIKo2xro6Oh4EUArMUQMEN2YOqhZ8bBZK7CHnnWoEp1EGVMHTtSzRvT/AHfRlTXQaR7HAAAAAElFTkSuQmCC";
+ private static final String DEFAULT_PDF_ICON = "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB94LGQw5BlDcLxAAABArSURBVFgJASAQ3+8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKioqAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATR0dFO+/v7BAMDAxwCAgIp/////f///xP9/f0WAAAA//j4+Ar+/v7bPj4+XgAAAP4AAAD/AAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAALq6ujgMDAw8BgYGKP39/f0FBQUwAQEBFQAAAAH///8f////AQEBAQD4+PgAAQEBAAEBAQAAAAAAAwMDAAICAgAEBAQAAQEBAAUFBQAFBQUABgYGAAoKCgDX19fr3d3dbGBgYK0AAAD9AAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAM/Pz/8hISEA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wACAgIA4ODgADAwMAEAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAICAgAKCgoA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEAAgICAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEAAAAAAAAAAAEAAAD/AAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAD+AAAA/wAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//wAABwcAAAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAACAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD//v4A//7+AP/+/gD//v4A//7+AP8HBwD/d3cA/7W1AP8DAwD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8AAAAAAAAAAAYAAAACAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAAEAAAAAAAAAAAAAAAEBAQABAQEAAAEBAAD6+gD9vLwA/xkZAAEAAAABAQEAAAAAAAAAAAABAQEAAQEBAAAAAAAAAAAAAQEBAAEBAQAAAAAAAQEBAAAAAAUAAAACAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAP///wAAAAAA/v7+AAAAAAAA//8AAAAAAP///wAAAAAAAAEBAAEGBgD7/PwABysrAP78/AAA//8AAAAAAAAAAAD///8AAAAAAAAAAAAAAAAA////AAAAAAACAgIAAAAAAAAAAAQAAAACAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8DAwD9FRUA/L+/AAEEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8AAAAAAAAAAAQAAAABAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQAAAQEAAAAAAAH+/gD/JycA+9bWAAABAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAABAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AAAAAAAAAAAAAAAAAAD//wAAAAAAAAAAAAD5+QADQUEA/u7uAP/9/QD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP0CAgIB/v7+AAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8FBQD50NAA8ZOTAAAFBQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A/v7+AJGRkUv+/v4AAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP7w8AD1y8sABUZGAO6GhgAABAQA////AP///wD///8A////AP///wD///8A////AP///wAAAAAAAAAAAAEBAQgAAAAFAAAAAQAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQMDAOlzcwARfn4AFY6OAPXIyAD3y8sAAQUFAAECAgABAwMAAQMDAAEDAwAAAQEAAAAAAAAAAAAAAAAA////ACsrKz0AAAABAAAAAQAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AAAAAAAAAAAAAAAAAAAAAAAAAAAA+uTkAP4KCgAIODgA/PT0ABqlpQDmbm4ABLe3AA9SUgD409MA//z8AAINDQAOR0cAAAMDAAAAAAAAAAAAAAAAAAICAgwAAAAEAAAAAQAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACBwcA8K+vABBeXgD53t4A9tDQAOucnAAAFBQA+efnANtNTQD11NQABBwcAAIJCQDrlpYAAggIAAEAAAAAAAAAAAAAAAQEBBQAAAACAAAAAQAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//AAADAwD54uIA6aSkAAgxMQADDw8ABBUVABNeXgACCwsAAAEBABru7gD319cA88rKAPrn5wAPPj4A+ujoAAQQEAABAAAAAAAAAP7+/ggAAAABAAAAAQAAAAAEAAAAAAAAAAAAAAAAAAAAAP///wD///8A////AAAAAAAAAQEA/fX1APzv7wDbaGgAKbq6AAQPDwD//PwAAP//AAAAAAD//PwAAAAAAAINDQAMNzcADT09AAADAwD//PwA//v7AP///wAAAAAAAAAA//z8/AQAAAACAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAEBAQAAAAAAAAAAAAAAAAD87+8A6qysAPPS0gAXY2MABA4OAP/7+wAA//8AAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A/vn5AP729gD/+voAAP//AAAAAAAAAAAAAAAAAQgICBBHR0cUAAAAAgAAAAACAAAAAAAAAAAAAAAAAAAAAP///wD///8A/wAAAAACAgDXdnYADDU1AOKdnQATTEwA/vv7AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAQEBAUICAgJAAAAAwAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAPno6AD9AgIA4qKiAC6jowACBQUAAAAAAAAAAAABAQEAAAAAAAEBAQABAQEAAAAAAAAAAAABAQEAAQEBAAAAAAAAAAAAAQEBAAEBAQAAAAAAAAAAAAcHBwsYGBgRAAAAAwAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AAYWFgAxoKAAAP//AP339wD+/v4AAAAAAAAAAAD///8AAAAAAP///wAAAAAAAAAAAAAAAAD///8AAAAAAAAAAAAAAAAA////AAAAAAABAQEA////AAcHBwMBAQEFAAAAAwAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/+/gD99vYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8AAAAAAAcHBwUHBwcKAAAAAQAAAAECAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEAAAAA/wICAgACAgIEAAAAAgAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAACAgIA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEABAQEAXh4eFfT09PbAAAA+wAAAP8BAAAAAAAAAAAAAAAAAAAAAMfHx9n6+vr1/Pz8Bf39/QIAAAAAAAAAAAEBAQAAAAD/AAAAAAEBAf8AAAAAAQEB/wEBAf8AAAAAAQEB/wAAAAAAAAAAAAAAAAAAAAABAQH/AAAAAAAAAAAAAAD/BQUFDTs7OzIAAAADAAAA9QAAAPsAAAAAAAAAAAAAAAAAyMjIAAAAAAAAAAACAAAAEQAAABgAAAAZAAAAGAAAABYAAAAVAAAAFAAAABEAAAAPAAAADQAAAAsAAAAHAAAABQAAAAYAAAAGAAAABQAAAAQAAAADAAAAAwAAAAIAAAAAAAAAABUVFQMAAAABAAAAAAAAAACyU1AG+CMCBAAAAABJRU5ErkJggg==";
+ private static final String DEFAULT_IMAGE = "iVBORw0KGgoAAAANSUhEUgAAACQAAAAhCAYAAACxzQkrAAAABmJLR0QA/wD/AP+gvaeTAAAACXBI WXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gECDykfwiMkMQAACalJREFUWMOtl2l0k1Uax//vmoQm pQulm21KC7ZlRDZBdtQKuA0yjsczI8czeJwPjjNqadOkSbovSZqkLYjiNq7jYVDEGY8OOgKi7Eu1 gmKhtJQuNCUpbbO/Td5lPrRlwr7oPeeee89773Of33vv/7kLgV+Y6hutKFyrha3eQoVCoSkymewv NEOvJECoAQzwPP9lOBS2Rymjjj3/13zRVm9GUaH+quPRN+M8cjB7Qx0IgkDhWi0+3LKJaG9v35Ca mvpsmjqNEHgBgsCDJMl4mqZXd3Z2rT7bc7ahf+CYZkLcndK1fNA3DmNBUWEx6mymPIIgKE2B7qux tjNnzhyYOjX37sSkJDQdaQLHca0AdgOYLJfL75m/cB5kDJv/6quf9ABovJYf4kZgrHYLtJpiWO3m e1Qq1S5BEBAMctlFhbrWWnPVhqysrL+p1Wrs2bOnQ5KkP+uKDF+P2daaq/LkcsXW+5ffN373N3va PR7PXZJEDJUYSm8dCADWb3hJ4fe7O5YvX57Y3NyMoSF3YjAQSE5KTtqzePFi1bYvtrUHg8FlJfry jhpTJZRKJfJfKAQA1JgqLblTc3UA0HqydZ5eV3LoFy+ZxzNQPXPmzImBQBBOp7OcIAinTCF/Zc6c uaqDBw+KwUCwtsRQ3gEAJYbyi2wZhnmvr69Pl5OTA4Zh5gC4KhB5IzBVNeVTJkyY8NS0O6YTTU1H zgiCsJGiqGW3pd72uNfnRW9v75ESQ/k7V7NnGMYrCiJoioYkSYpr+SKvrR0zAECuUBjn3T1/4t69 u+H3+xvnzM0ZFEVx87Rp03CipQUMwzw2FnmRqWGdDQDAcdzsmJgYcNwwRFE8dUtAdTYTtBo9rHbT 3IT4hD+JkoSesz2nSo0VLzUdOdk4c+asOK/HC5fLZdBq9L31jXXQFOguGqMgvwgAIEnii1lZkzE4 OIBQKHTolqNs/YZ61u8Pnlr16O/SjzQdxrlzfVMDgYCQkpyyf+VvV8Vv2vxBm9/vWyiTyZ1azZU3 u4rq0uXq9IxPlyxZKt+6dcs2nud/rxyn5F54Ye3Ni3pgYFC/cMGitHAojJ6ebqtRX9ZitZs/WLrk 3vidu3bC7/c1lhornVfbREOhMMuyrO7+vGXyr7Z/OcwNc6+WGSu5W1qyGlNFRkLCxGdmz5pDfP3N jh5RFF+x2s3zU5JTVnMch87OjpZSY+XGS+1qTVWw2kd2dJqmH8nJzr2vq6sTvb29e8qMlZ9fL4Au A7KNClnGyovmzJ6btnPXDni9no0lhvIuXuC3zJgxC981N4FhmJWR/WvMlWtMlupnjIYyaDV61Dda YxiGeT8nOxfNzd+HFQrFk1cS/nUOypGosNvNs19/c6N0uOmwZKu3dIyGvvk/2z6TDhzcL9VaqqvG hD8KteL9f7wjvfnW61KdzTQfAKpNFVu/+XaXtH3HV5LFWrsGACx1NddlIC6fIRvBC8Nt9yzNyzzZ 2gKns2/G8PCwJzY2bu8jDz2a8q9PP+70+/1LWJmsS1tYjDq7iaVIqn9Z3grVwcP74fV6UwIBf1ZS UvIXDz3wsHLzR/88wnHcfTKZzFdUWHxdoMtEHQh68nNz75gkCDwcjt7X9LqSo1a7+Y0Zd85K2bd/ N7xe78tlJZVdY/25YHDd7FlzVa5+FwYHB7XFWqPDVm95a9H8JcodO7cLfr/fVl5a5bvRVbpohkyW qqRx45T78u5dlrl955fngsHgEpZl6WhV9PHs23NxuOlgh1ajz7wgfHPljNjxcTuW3b8i/tPPPjke CoWWMgwzNz1NvS1hYiIOHdp/wFBcuuBmrjjkiBZGhEnTTH5W5uTMYz/+gEDQ/65RX9Ya5sNvZWRk ov10GwCsAoA664h2WIbV3DltevyBQ/vAcdz6uNg4N0mSm9PTM3D8+DGRZdnHAaDxpfobB7I3WqEr 0sNWb5mhkCt0LMOi13G2q0RfUWy21mQrZIrZCsU4DAye/1ir0R+z2s3QaQ2w2Sx5E+ITVvsDATgc Z78vNVa82X++/42sSZOjXS4nAoFAvqZA12u1m7F29NS/ISDNWi0AIBwOb1KrJ6GruxOiKD4GAALP 35uYmEy6XOcQDAY/AgCtRo+XN66jRYhb09LS0dbeCppmHq01V90VMz5mVXp6BlpPnTgqiuImW70F V9vBr7lkJkv1w7ExcVkURaN/wPUBz/PNI2cQsqKioki32+0mSaILAOob6mi32/PhpIys8R6PBz6f t1pToOuhGVqXkz01tvnodxLHcesMxaXnbySqrggkCMKC5KQU1uHo8Qu88L5RXyYCAEEQlCiKhCAI kiQhCADD4dBWdfqkx6LGKXGq7eSPgGiz2s3L4mLjH/f6vejvd31faqx491YfDWTDehsNIEWpVMLj 9XopirxwPSAI4sTQ0JAYGxsbI5fL36tvtPLpqeqV0apoHPupeYCiqD8Wa0u9ALFl4oREdHd1gmGY VZFXj5sGokhKIghAkiQQxAjGWCPLspucrr5uPswjK3PKjIz0TEoQRZw81bKPIslFRYXFx2tMFesS JyaND3JBBLlgSeFabY+t3nLh6nHTQC8+XyAA6PH5fFCposcLopANANW1VSgqLPZRFDW9+2znlvbT pwKnz7T9fM7pWCNBytMWGVpMluo7lMroJ1NTbkN3d+cJSZLeBoBb0c5FOzVJkHsdTsdwemq6or/f 9bTVbt6h1ej5hnVWFORr3QCeiDQqqzACACiKKshQT0o4faYdIT600Vhc5vilD08SAAz6sv+6hwZ/ CnIBJCUlPyEIwmuSJBEF+SNbwnOG5y56n1VV1KLOZloRHR3zNM/zOH/eddRYXLYBv0Ii/n/S102Q JKIv5/Zc6vxAP846epw0Rf+BYZhda1/UXGRkb6hbKAjC7t/kTiNPd7QhFA5laAp0nb8a0Odf/BuP PLgKdbba6RRFb1GnTZrCsiz6nA54PO7POY77EJCckkSoWJZ5UKlUPaNOy4DrvBMOR6/eqC+zKFVK0ue9cIZGPpelW5ohmqYpnuex5umnUtLV6mejo1WG+LgEKKOU8Pl8GA5xIknSZNS4cQiFQ+jr64Wrv7/x7b+/0zA05OYjnIsRpXBJXRitj/WRrgTEAJCNCpwiCIKWJElasGBe6rz5d69nWPauaGU0TdM0 GQqHJbd7SPT7/d0/t7RUfbtr9w8A2NGBIx0KAPiIb/xVvo1lKRKIGoVhIurUaFto8dJF2SnJyVMpiooJhUOco9fRsW/vgTYAzCg8Iv5avAKYcA1AIWK2LrsPERHlWCYj6mNRSUa0Rerk0ixeUkqXLNMVtfU/m12KYvwikVEAAAAASUVORK5CYII=";
+
+ private static final String DEFAULTBLOBFILENAME = "osbee.png";
+ private static final String DEFAULTBLOBMIMETYPE = "image/png";
+ /**
+ * Inner class that extract the width and height values from the specified
+ * resolution string and provides them.
+ *
+ * @author dominguez
+ *
+ */
+ class ImageBlobResolution {
+ int width;
+ int height;
+
+ public ImageBlobResolution(String normResolution) {
+ super();
+ this.width = 0;
+ this.height = 0;
+ String[] resArr = normResolution.split("x");
+ if (resArr.length == 2) {
+ try {
+ this.width = Integer.parseInt(resArr[0]);
+ this.height = Integer.parseInt(resArr[1]);
+ } catch (NumberFormatException e) {
+ log.error(e.getLocalizedMessage());
+ }
+ }
+ }
+
+ }
+
+ // ***************** Constructor ************
+
+ public BlobService() {
+ if (DtoServiceAccess.getService(BlobMappingDto.class) instanceof IDTOServiceWithMutablePersistence<?>) {
+ dtoBlobMappingDtoService = (IDTOServiceWithMutablePersistence<BlobMappingDto>) DtoServiceAccess.getService(BlobMappingDto.class);
+ }
+ this.blobAPI = new BlobTypingAPI();
+ }
+
+ @Override
+ public void addBlobUploadListener(IBlobUploadEventListener listener) {
+ listeners.add(listener);
+ }
+
+ @Override
+ public void removeBlobUploadListener(IBlobUploadEventListener listener) {
+ listeners.remove(listener);
+ }
+
+ protected synchronized void notifyBlobUploadEvent(IBlobEvent event) {
+ for (IBlobUploadEventListener listener : listeners){
+ listener.blobUploaded(event);
+ }
+ }
+
+ /**
+ * Encodes the byte array representation of the blob into a base64 string
+ * representation.
+ *
+ * @param data
+ * @return base64 encoded string
+ */
+ private String encodeBase64(byte[] data) {
+ return DatatypeConverter.printBase64Binary(data);
+ }
+
+ /**
+ * Decodes the base 64String into a byte array
+ *
+ * @param data
+ * @return base64 encoded string
+ */
+ private byte[] decodeBase64(byte[] data) {
+ return DatatypeConverter.parseBase64Binary(new String(data));
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.ui.api.customfields.IBlobService#createBlobMappingBlobs(java.io.InputStream, int)
+ */
+ @Override
+ public List<Object> createBlobMappingBlobs(InputStream stream, int mimeType) throws IOException {
+ return createBlobMappingBlobs(stream, blobAPI.getMimeTypeContentTypeById(mimeType));
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.ui.api.customfields.IBlobService#createBlobMappingBlobs(java.io.InputStream, java.lang.String)
+ */
+ @Override
+ public List<Object> createBlobMappingBlobs(InputStream stream, String mimeType) throws IOException {
+ List<Object> blobList = null;
+ byte[] bytes = IOUtils.toByteArray(stream);
+ // In case of a image blob
+ if (isImage(mimeType)) {
+ blobList = createImages(bytes, blobAPI, mimeType);
+ }
+ else {
+ // Otherwise
+ blobList = createBlobList(bytes);
+ }
+ return blobList;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osbp.ui.api.customfields.IBlobService#createBlobMapping(java.io.InputStream, java.lang.String, java.lang.String)
+ */
+ @Override
+ public String createBlobMapping(InputStream stream, String fileName, String mimeType) {
+ BlobMappingDto blobMapping = new BlobMappingDto();
+ blobMapping.setFileName(fileName);
+ blobMapping.setMimeTypeId(blobAPI.getMimeTypeContentTypeId(mimeType));
+ try {
+ List<Object> blobList = createBlobMappingBlobs(stream, mimeType);
+ for(Object obj:blobList) {
+ blobMapping.addToBlobsRef((BlobDto)obj);
+ }
+ dtoBlobMappingDtoService.update(blobMapping);
+ IBlobEvent event = new BlobEvent(this, true, blobMapping.getId(), "", fileName);
+ notifyBlobUploadEvent(event);
+ return blobMapping.getId();
+ } catch (IOException e) {
+ log.error(e.getLocalizedMessage());
+ return null;
+ }
+ }
+
+/**
+ * Creates for the specified image blob data by {@code byte[]} the base64
+ * encoded image representation and a resized copy for each of the
+ * predefined resolutions and send them back as a blob list ({@code List<
+ *
+ * @link Blob}>}).
+ *
+ * @param bytes
+ * @param blobAPI
+ * @param mimeType
+ * @throws IOException
+ *
+ */
+ private List<Object> createImages(byte[] bytes, BlobTypingAPI blobAPI,
+ String mimeType) throws IOException {
+ List<Object> blobList = new ArrayList<>();
+ for (int i = 0; i < blobAPI.getNormalizer().size(); i++) {
+ ImageBlobResolution imgBlobRes = new ImageBlobResolution(
+ blobAPI.getNormalizerResolutionByListIndex(i));
+ if (imgBlobRes.height == 0) {
+ blobList.add(createImageBlob(bytes,
+ blobAPI.getNormalizerResolutionIdByListIndex(i)));
+ } else {
+ BufferedImage img = resizeImage(bytes, imgBlobRes.width,
+ imgBlobRes.height);
+ byte[] imageBytes = imageToByteArray(img, mimeType);
+ blobList.add(createImageBlob(imageBytes,
+ blobAPI.getNormalizerResolutionIdByListIndex(i)));
+ }
+ }
+ return blobList;
+ }
+
+ /**
+ * Converts a {@link BufferedImage} into a byte array of a image.
+ *
+ * @param image
+ * @param mimeType
+ * @return a converted {@link BufferedImage} to a byte array.
+ * @throws IOException
+ */
+ private byte[] imageToByteArray(BufferedImage image, String mimeType)
+ throws IOException {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ String type = getFormatNameFromMimeType(mimeType);
+ ImageIO.write(image, type, bos);
+ bos.close();
+ return bos.toByteArray();
+ }
+
+ /**1
+ * Extracts the format name from the mime type definition.
+ *
+ * @param mimeType
+ * @return format name of the mime type definition
+ */
+ private String getFormatNameFromMimeType(String mimeType) {
+ String[] mimeTypeSplit = mimeType.split("/");
+ return mimeTypeSplit[mimeTypeSplit.length - 1];
+ }
+
+ /**
+ * Resizes an image into the specified new width and height and convert them
+ * from the incoming byte array to a {@link BufferedImage}.
+ *
+ * @param bytes
+ * @param newWidth
+ * @param newHeight
+ * @return a resized {@link BufferedImage} corresponding to the specified
+ * new width and height
+ * @throws IOException
+ */
+ private BufferedImage resizeImage(byte[] bytes, int newWidth, int newHeight)
+ throws IOException {
+ ByteArrayInputStream bis = new ByteArrayInputStream(bytes);
+ Image image = ImageIO.read(bis);
+ bis.close();
+ image = image.getScaledInstance(newWidth, newHeight,
+ Image.SCALE_AREA_AVERAGING);
+ BufferedImage buffered = new BufferedImage(image.getWidth(null),
+ image.getHeight(null), BufferedImage.TYPE_INT_RGB);
+ buffered.getGraphics().drawImage(image, 0, 0, null);
+ return buffered;
+ }
+
+ /**
+ * Creates a new {@link Blob} filled with the specified parameters.
+ *
+ * @param imageBytes
+ * @param fileName
+ * @param resolutionId
+ * @param mimeTypeId
+ * @return
+ */
+ private BlobDto createImageBlob(byte[] imageBytes, int resolutionId) {
+ BlobDto blobElement = new BlobDto();
+ blobElement.setData(encodeBase64(imageBytes).getBytes());
+ blobElement.setResolutionId(resolutionId);
+ return blobElement;
+ }
+
+ /**
+ * Creates a new {@code List <{@link Blob}>} filled with the specified
+ * parameters.
+ *
+ * @param dataBytes
+ * @return List<Blob>: List of blob objects
+ */
+ private List<Object> createBlobList(byte[] dataBytes) {
+ List<Object> blobList = new ArrayList<>();
+ BlobDto blobElement = new BlobDto();
+ blobElement.setData(dataBytes);
+ blobList.add(blobElement);
+ return blobList;
+ }
+
+ /**
+ * Provides the existing blob ({@link Blob}) from the database for a
+ * specified blob mapping id and a specified resolution id via JPA or
+ * {@code null} if no blob found.
+ *
+ * @param blobMappingId
+ * @param resolutionId
+ * @return a blob ({@link Blob}) for the specified {@code blobMappingId} and
+ * {@code resolutionId} or {@code null} if no blob found
+ */
+ private BlobDto getBlobById(String blobMappingId, int resolutionId) {
+ if(blobMappingId != null && resolutionId >= 0) {
+ BlobMappingDto blobMapping = dtoBlobMappingDtoService.get(blobMappingId);
+ if (blobMapping != null) {
+ return getBlobByResolution(resolutionId, blobMapping);
+ }
+ }
+ return null;
+ }
+
+ private BlobDto getBlobByResolution(int resolutionId, BlobMappingDto blobMapping) {
+ for (BlobDto blob : blobMapping.getBlobsRef()) {
+ if (isImage(blobMapping.getMimeTypeId())){
+ if (blob.getResolutionId() == resolutionId) {
+ return blob;
+ }
+ } else {
+ return blob;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Checks if the mime type by the specified mime type id {@code mimeTypeId}
+ * corresponds to an image.
+ *
+ * @param mimeTypeId
+ * @return boolean indicating if it is an image
+ */
+ @Override
+ public boolean isImage(int mimeTypeId) {
+ String mimeType = blobAPI.getMimeTypeContentTypeById(mimeTypeId);
+ return mimeType.startsWith(IBlobTyping.IMAGE_MIME_TYPE_PREFIX);
+ }
+
+ /**
+ * Checks if the mime type by the specified mime type id {@code mimeTypeId}
+ * corresponds to a pdf file.
+ *
+ * @param mimeTypeId
+ * @return boolean indicating if it is a pdf file
+ */
+ @Override
+ public boolean isPdf(int mimeTypeId) {
+ return mimeTypeId == IBlobTyping.PDF_MIME_TYPE_ID;
+ }
+
+ /**
+ * Checks if the mime type by the specified mime type id {@code mimeTypeId}
+ * corresponds to a word file.
+ *
+ * @param mimeTypeId
+ * @return boolean indicating if it is a word file
+ */
+ @Override
+ public boolean isWord(int mimeTypeId) {
+ return mimeTypeId == IBlobTyping.WORD_DOC_MIME_TYPE_ID||mimeTypeId == IBlobTyping.WORD_DOCX_MIME_TYPE_ID;
+ }
+
+ /**
+ * Checks if the mime type by the specified mime type id {@code mimeTypeId}
+ * corresponds to a excel file.
+ *
+ * @param mimeTypeId
+ * @return boolean indicating if it is a excel file
+ */
+ @Override
+ public boolean isExcel(int mimeTypeId) {
+ return mimeTypeId == IBlobTyping.EXCEL_XLS_MIME_TYPE_ID||mimeTypeId == IBlobTyping.EXCEL_XLSX_MIME_TYPE_ID;
+ }
+
+ /**
+ * Checks if the mime type corresponds to an image.
+ *
+ * @param mimeTypeId
+ * @return boolean indicating if it is an image
+ */
+ @Override
+ public boolean isImage(String mimeType) {
+ return mimeType.startsWith(IBlobTyping.IMAGE_MIME_TYPE_PREFIX);
+ }
+ /**
+ * Provides the base 64 encoded string representation of a specific blob in
+ * a specific resolution.
+ *
+ * In case of an image mime type it is the base 64 encoded string of the
+ * image and otherwise a defined image for each mime type representing them.
+ *
+ * @param blob
+ * @return
+ */
+
+ private String getBase64ValueFromBlob(BlobDto blob) {
+ assert blob != null : "blobDto must not be null";
+
+ if (isImage(blob.getBlobMapping().getMimeTypeId())) {
+ return getImageHTMLWithBase64EndodedData(blob.getData(), "",
+ blobAPI.getMimeTypeContentTypeById(blob.getBlobMapping().getMimeTypeId()));
+ } else if (isPdf(blob.getBlobMapping().getMimeTypeId())) {
+ return getImageHTMLWithBase64EndodedData(getDefaultPdfIconBase64String(),
+ blob.getBlobMapping().getFileName(),
+ blobAPI.getMimeTypeContentTypeById(blob.getBlobMapping().getMimeTypeId()));
+ } else if (isExcel(blob.getBlobMapping().getMimeTypeId())) {
+ return getImageHTMLWithBase64EndodedData(getDefaultExcelIconBase64String(),
+ blob.getBlobMapping().getFileName(),
+ blobAPI.getMimeTypeContentTypeById(blob.getBlobMapping().getMimeTypeId()));
+ } else if (isWord(blob.getBlobMapping().getMimeTypeId())) {
+ return getImageHTMLWithBase64EndodedData(getDefaultWordIconBase64String(),
+ blob.getBlobMapping().getFileName(),
+ blobAPI.getMimeTypeContentTypeById(blob.getBlobMapping().getMimeTypeId()));
+ } else {
+ return getImageHTMLWithBase64EndodedData(getDefaultImageBase64String(),
+ blob.getBlobMapping().getFileName(),
+ blobAPI.getMimeTypeContentTypeById(blob.getBlobMapping().getMimeTypeId()));
+ }
+ }
+
+ /**
+ * Creates a {@link Label} including the representation of a default image
+ * (base64 encoded) as placeholder for a not yet existing blob that could be
+ * visualize. It is primary used when this {@link BlobUploadComponent} is
+ * newly created to upload a blob. Than no blob is available to be
+ * visualized.
+ *
+ * @return a default placeholder image within a Label
+ */
+ @SuppressWarnings("unused")
+ private Label getDefaultImageLabel() {
+ return new Label(getImageHTMLWithBase64EndodedData(getDefaultImageBase64String(), DEFAULTBLOBFILENAME,
+ DEFAULTBLOBMIMETYPE), ContentMode.HTML);
+ }
+
+ /**
+ * Provides the HTML-Image-Tag used as input for the {@link Label} of this
+ * ui component based on an specified base64 encoded byte array, the
+ * filename of the blob and it´s mime type.
+ *
+ * @param encodeBase64Bytes
+ * @param fileName
+ * @param mimeType
+ * @return
+ */
+ private String getImageHTMLWithBase64EndodedData(byte[] encodeBase64Bytes, String fileName, String mimeType) {
+ String encodeBase64 = new String(encodeBase64Bytes);
+ return getImageHTMLWithBase64EndodedData(encodeBase64, fileName, mimeType);
+ }
+
+ /**
+ * Provides the HTML-Image-Tag used as input for the {@link Label} of this
+ * ui component based on an specified base64 encoded string, the filename of
+ * the blob and it´s mime type.
+ *
+ * @param base64Str
+ * @param fileName
+ * @param mimeType
+ * @return
+ */
+ private String getImageHTMLWithBase64EndodedData(String base64Str, String fileName, String mimeType) {
+ return "data:" + mimeType + ";base64," + base64Str;
+ }
+
+ /**
+ * Provides the base64 encoded string representation of the default
+ * placeholder image (Compex-Logo)
+ *
+ * @return the base64 encoded string representation of the default
+ * placeholder image
+ */
+ private String getDefaultImageBase64String() {
+ return DEFAULT_IMAGE;
+ }
+
+ /**
+ * Provides the base64 encoded string representation of the default
+ * placeholder pdf icon
+ *
+ * @return the base64 encoded string representation of the default
+ * placeholder pdf icon
+ */
+ private String getDefaultPdfIconBase64String() {
+ return DEFAULT_PDF_ICON;
+ }
+
+ /**
+ * Provides the base64 encoded string representation of the default
+ * placeholder word icon
+ *
+ * @return the base64 encoded string representation of the default
+ * placeholder word icon
+ */
+ private String getDefaultWordIconBase64String() {
+ return DEFAULT_WORD_ICON;
+ }
+
+ /**
+ * Provides the base64 encoded string representation of the default
+ * placeholder excel icon
+ *
+ * @return the base64 encoded string representation of the default
+ * placeholder excel icon
+ */
+ private String getDefaultExcelIconBase64String() {
+ return DEFAULT_EXCEL_ICON;
+ }
+
+ @Override
+ public String getImage(String uuid, int resolutionId) {
+ BlobDto blob = getBlobById(uuid, resolutionId);
+ if(blob != null) {
+ return "<img src=\""+ getBase64ValueFromBlob(getBlobById(uuid, resolutionId)) + "\" alt=\"Encoded image in Base64\">";
+ }
+ return null;
+ }
+
+ @Override
+ public String getBirtImage(String uuid, int resolutionId) {
+ BlobDto blob = getBlobById(uuid, resolutionId);
+ if(blob != null) {
+ return getBase64ValueFromBlob(getBlobById(uuid, resolutionId));
+ }
+ return null;
+ }
+
+ @Override
+ public StreamResource getResource(String uuid, int resolutionId) {
+ BlobDto blob = getBlobById(uuid, resolutionId);
+ if(blob != null) {
+ return new StreamResource(new StreamSource() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public InputStream getStream() {
+ if(isImage(blob.getBlobMapping().getMimeTypeId())) {
+ return new ByteArrayInputStream(decodeBase64(blob.getData()));
+ } else {
+ return new ByteArrayInputStream(blob.getData());
+ }
+ }
+ }, blob.getBlobMapping().getFileName());
+ }
+ return null;
+ }
+
+ @Override
+ public int getNormalizerResolutionIdByName(String displayResolution) {
+ return blobAPI.getNormalizerResolutionIdByName(displayResolution);
+ }
+
+ @Override
+ public BufferedImage getBufferedImage(String uuid, int resolutionId) {
+ BlobDto blob = getBlobById(uuid, resolutionId);
+ if(blob != null) {
+ InputStream in = new ByteArrayInputStream(decodeBase64(blob.getData()));
+ try {
+ return ImageIO.read(in);
+ } catch (IOException e) {
+ // bad luck
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public byte[] getByteArrayImage(String uuid, int resolutionId) {
+ BlobDto blob = getBlobById(uuid, resolutionId);
+ if(blob != null) {
+ return decodeBase64(blob.getData());
+ }
+ return null;
+ }
+}
diff --git a/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/service/BlobTypingAPI.java b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/service/BlobTypingAPI.java
new file mode 100644
index 0000000..41e28dd
--- /dev/null
+++ b/org.eclipse.osbp.blob/src/org/eclipse/osbp/blob/service/BlobTypingAPI.java
@@ -0,0 +1,389 @@
+/**
+ *
+ * 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
+ */
+package org.eclipse.osbp.blob.service;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Unmarshaller;
+
+import org.eclipse.osbp.blob.entities.BlobTyping;
+import org.eclipse.osbp.blob.entities.ContentType;
+import org.eclipse.osbp.blob.entities.MimeType;
+import org.eclipse.osbp.blob.entities.NormalizerResolution;
+import org.eclipse.osbp.ui.api.customfields.IBlobTyping;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * 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.
+ *
+ * @author dominguez
+ *
+ */
+public class BlobTypingAPI implements IBlobTyping {
+
+ private static final String DEFAULT_BLOBTYPING = "platform:/plugin/org.eclipse.osbp.blob/org/eclipse/osbp/blob/BlobTyping.xml";
+ /** The Constant LOGGER. */
+ private static final Logger LOGGER = LoggerFactory.getLogger(BlobTypingAPI.class);
+ private BlobTyping blobTyping;
+
+ public BlobTypingAPI() {
+ }
+
+ /**
+ * 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 BlobTypingAPI(File xmlFile) {
+ try {
+ blobTyping = readBlob(xmlFile);
+ } catch (JAXBException e) {
+ StringWriter sw = new StringWriter();
+ e.printStackTrace(new PrintWriter(sw));
+ String exceptionDetails = sw.toString();
+ LOGGER.error("{}", exceptionDetails);
+ }
+ }
+
+ /**
+ * 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 BlobTyping readBlob(File xmlFile) throws JAXBException {
+ JAXBContext jaxbContext = JAXBContext.newInstance(BlobTyping.class);
+ Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
+ return (BlobTyping) 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 BlobTyping readBlob(InputStream xmlFile) throws JAXBException {
+ JAXBContext jaxbContext = JAXBContext.newInstance(BlobTyping.class);
+ Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
+ return (BlobTyping) jaxbUnmarshaller.unmarshal(xmlFile);
+ }
+
+ /**
+ * Provides the defined mime type version.
+ *
+ * @return the defined mime type version
+ * @see MimeType
+ */
+ @Override
+ public String getMimeTypeVersion() {
+ BlobTyping lblobTyping = getBlobTyping();
+ if (lblobTyping != null)
+ return lblobTyping.getMimeType().getMimeVersion();
+ else
+ return null;
+ }
+
+ /**
+ * Provides the defined content transfer encoding of the mime type.
+ *
+ * @return the defined content transfer encoding
+ * @see MimeType
+ */
+ @Override
+ public String getMimeTypeContentTransferEncoding() {
+ BlobTyping lblobTyping = getBlobTyping();
+ if (lblobTyping != null)
+ return lblobTyping.getMimeType().getContentTransferEncoding();
+ else
+ return null;
+ }
+
+ /**
+ * Provides a list of all the defined content type objects of the mime type
+ * object.
+ *
+ * @return a list of all the defined {@link ContentType}
+ */
+ public List<ContentType> getMimeTypeContentTypeList() {
+ BlobTyping lblobTyping = getBlobTyping();
+ if (lblobTyping != null)
+ return lblobTyping.getMimeType().getContentTypeList();
+ else
+ return new ArrayList<>(); // SONAR says "return an empty list
+ // instead of null"
+ }
+
+ /**
+ * Provides a list of all the defined content type names of the mime type
+ * object.
+ *
+ * @return a list of all the defined content type names
+ * @see ContentType
+ */
+ @Override
+ public List<String> getMimeTypeContentTypeNames() {
+ List<String> mimeTypes = new ArrayList<>();
+ BlobTyping lblobTyping = getBlobTyping();
+ if (lblobTyping != null) {
+ for (ContentType contentType : lblobTyping.getMimeType().getContentTypeList()) {
+ mimeTypes.add(contentType.getType());
+ }
+ }
+ return mimeTypes;
+ }
+
+ /**
+ * Provides the content type id for an individual position within the list
+ * of all the defined content type objects of the mime type object.
+ *
+ * @param index
+ * @return the content type id or '-1' if not found
+ * @see ContentType
+ */
+ @Override
+ public int getMimeTypeContentTypeIdByListIndex(int index) {
+ BlobTyping lblobTyping = getBlobTyping();
+ if (lblobTyping != null) {
+ int length = lblobTyping.getMimeType().getContentTypeList().size();
+ if (index < length) {
+ return lblobTyping.getMimeType().getContentTypeList().get(index).getId();
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * Provides the content type name for an individual position within the list
+ * of all the defined content type objects of the mime type object.
+ *
+ * @param index
+ * @return the content type name as {@link String} or ""(blank) if not found
+ * @see ContentType
+ */
+ @Override
+ public String getMimeTypeContentTypeByListIndex(int index) {
+ BlobTyping lblobTyping = getBlobTyping();
+ if (lblobTyping != null) {
+ int length = lblobTyping.getMimeType().getContentTypeList().size();
+ if (index < length) {
+ return lblobTyping.getMimeType().getContentTypeList().get(index).getType();
+ }
+ }
+ return "";
+ }
+
+ /**
+ * Provides the content type name for a specific content type id.
+ *
+ * @param contentTypeId
+ * @return the content type name as {@link String} or ""(blank) if not found
+ * @see ContentType
+ */
+ @Override
+ public String getMimeTypeContentTypeById(int contentTypeId) {
+ BlobTyping lblobTyping = getBlobTyping();
+ if (lblobTyping != null) {
+ for (ContentType contentType : lblobTyping.getMimeType().getContentTypeList()) {
+ if (contentTypeId == contentType.getId()) {
+ return contentType.getType();
+ }
+ }
+ }
+ return "";
+ }
+
+ /**
+ * Provides the content type id for a specific content type name.
+ *
+ * @param contentTypeStr
+ * @return the content type id or '-1' if not found
+ * @see ContentType
+ */
+ @Override
+ public int getMimeTypeContentTypeId(String contentTypeStr) {
+ BlobTyping lblobTyping = getBlobTyping();
+ if (lblobTyping != null) {
+ for (ContentType contentType : lblobTyping.getMimeType().getContentTypeList()) {
+ if (contentTypeStr.equals(contentType.getType())) {
+ return contentType.getId();
+ }
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * Provides the defined list of normalizer resolution objects.
+ *
+ * @return list of {@link NormalizerResolution}
+ */
+ public List<NormalizerResolution> getNormalizer() {
+ BlobTyping lblobTyping = getBlobTyping();
+ if (lblobTyping != null) {
+ return lblobTyping.getNormalizer();
+ }
+ return new ArrayList<>();
+ }
+
+ /**
+ * Provides the defined default normalizer resolution id.
+ *
+ * @return default normalizer resolution id
+ */
+ @Override
+ public int getNormalizerDefaultResolutionId() {
+ return getNormalizerResolutionIdByListIndex(0);
+ }
+
+ /**
+ * Provides the normalizer resolution id for an individual position within
+ * the list of all the defined resolution objects of the normalizer object.
+ *
+ * @param index
+ * @return the normalizer resolution id or '-1' if not found
+ */
+ @Override
+ public int getNormalizerResolutionIdByListIndex(int index) {
+ BlobTyping lblobTyping = getBlobTyping();
+ if (lblobTyping != null) {
+ int length = lblobTyping.getNormalizer().size();
+ if (index < length) {
+ return lblobTyping.getNormalizer().get(index).getId();
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * Provides the normalizer resolution name for an individual position within
+ * the list of all the defined resolution objects of the normalizer object.
+ *
+ * @param index
+ * @return the normalizer resolution name as {@link String} or ""(blank) if
+ * not found
+ */
+ @Override
+ public String getNormalizerResolutionNameByListIndex(int index) {
+ BlobTyping lblobTyping = getBlobTyping();
+ if (lblobTyping != null) {
+ int length = lblobTyping.getNormalizer().size();
+ if (index < length) {
+ return lblobTyping.getNormalizer().get(index).getName();
+ }
+ }
+ return "";
+ }
+
+ /**
+ * Provides the normalizer resolution for an individual position within the
+ * list of all the defined resolution objects of the normalizer object.
+ *
+ * @param index
+ * @return the normalizer resolution as {@link String} or ""(blank) if not
+ * found
+ */
+ @Override
+ public String getNormalizerResolutionByListIndex(int index) {
+ BlobTyping lblobTyping = getBlobTyping();
+ if (lblobTyping != null) {
+ int length = lblobTyping.getNormalizer().size();
+ if (index < length) {
+ return lblobTyping.getNormalizer().get(index).getResolution();
+ }
+ }
+ return "";
+ }
+
+ /**
+ * Provides the normalizer resolution id for a specific normalizer
+ * resolution.
+ *
+ * @param resolutionStr
+ * @return the normalizer resolution id or '-1' if not found
+ */
+ @Override
+ public int getNormalizerResolutionIdByName(String resolutionStr) {
+ BlobTyping lblobTyping = getBlobTyping();
+ if (lblobTyping != null) {
+ for (NormalizerResolution normalizerResolution : lblobTyping.getNormalizer()) {
+ if (normalizerResolution.getResolution().equals(resolutionStr)) {
+ return normalizerResolution.getId();
+ }
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * Provides the normalizer resolution for a specific normalizer resolution
+ * id.
+ *
+ * @param resolutionId
+ * @return the normalizer resolution as {@link String} or ""(blank) if not
+ * found
+ */
+ @Override
+ public String getNormalizerResolutionById(int resolutionId) {
+ BlobTyping lblobTyping = getBlobTyping();
+ if (lblobTyping != null) {
+ for (NormalizerResolution normalizerResolution : lblobTyping.getNormalizer()) {
+ if (resolutionId == normalizerResolution.getId()) {
+ return normalizerResolution.getResolution();
+ }
+ }
+ }
+ return "";
+ }
+
+ private BlobTyping getBlobTyping() {
+ if (blobTyping == null) {
+ try {
+ URL fileURL = new URL(DEFAULT_BLOBTYPING);
+ InputStream inputStream = fileURL.openConnection().getInputStream();
+ blobTyping = readBlob(inputStream);
+ } catch (JAXBException | IOException e) {
+ StringWriter sw = new StringWriter();
+ e.printStackTrace(new PrintWriter(sw));
+ String exceptionDetails = sw.toString();
+ LOGGER.error("{}", exceptionDetails);
+ }
+ }
+ return blobTyping;
+ }
+}
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..d55d187
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+#=======================================================================
+# Copyright (c) 2017 - 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 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>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.eclipse.osbp.blob</groupId>
+ <artifactId>org.eclipse.osbp.blob.aggregator</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <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>
+ <distributionManagement>
+ <site>
+ <id>gh-pages</id>
+ <name>OSBP GitHub Pages</name>
+ <url>${distribution.site.url}</url>
+ </site>
+ </distributionManagement>
+
+ <properties>
+
+ <osbp.gitrepo.name>${project.groupId}</osbp.gitrepo.name>
+ </properties>
+
+ <modules>
+ <module>org.eclipse.osbp.blob</module>
+ <module>org.eclipse.osbp.blob.feature</module>
+ </modules>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <resolver>p2</resolver>
+ <pomDependencies>consider</pomDependencies>
+ <environments>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
+ <os>macosx</os>
+ <ws>cocoa</ws>
+ <arch>x86_64</arch>
+ </environment>
+ </environments>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+</project>