parallel ip - initial checkin
Signed-off-by: Ralf Mollik <ramollik@compex-commerce.com>
diff --git a/.project b/.project
new file mode 100644
index 0000000..4627542
--- /dev/null
+++ b/.project
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.xtext.datamart.common.aggregator</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.sonarlint.eclipse.core.sonarlintBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ </natures>
+</projectDescription>
diff --git a/about.html b/about.html
new file mode 100644
index 0000000..64c0598
--- /dev/null
+++ b/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 1, 2016</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/jenkins.build.config.xml b/jenkins.build.config.xml
new file mode 100644
index 0000000..b0e8a32
--- /dev/null
+++ b/jenkins.build.config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2016 - Loetz GmbH&Co.KG -->
+<!--# All rights reserved. This program and the accompanying materials -->
+<!--# are made available under the terms of the Eclipse Public License v1.0 -->
+<!--# which accompanies this distribution, and is available at -->
+<!--# http://www.eclipse.org/legal/epl-v10.html -->
+<!--# -->
+<!--# Contributors: -->
+<!--# Christophe Loetz (Loetz GmbH&Co.KG) - initial API and implementation -->
+<!--#======================================================================= -->
+<!--# Module specific parameters for the Jenkins Job -->
+<!--#======================================================================= -->
+
+<jenkins>
+ <!-- DO NOT EDIT BELOW THIS LINE -->
+ <jenkins.build.dependencies>
+ <jenkins.build.dependency>org.eclipse.osbp.bpm.api</jenkins.build.dependency>
+ <jenkins.build.dependency>org.eclipse.osbp.dsl</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.runtime.web</jenkins.build.dependency>
+ <jenkins.build.dependency>org.eclipse.osbp.ui.api</jenkins.build.dependency>
+ <jenkins.build.dependency>org.eclipse.osbp.utils</jenkins.build.dependency>
+ <jenkins.build.dependency>org.eclipse.osbp.utils.ui</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.xtext.datamart.common.feature/.project b/org.eclipse.osbp.xtext.datamart.common.feature/.project
new file mode 100644
index 0000000..db336bd
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common.feature/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.xtext.datamart.common.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.xtext.datamart.common.feature/LICENSE.txt b/org.eclipse.osbp.xtext.datamart.common.feature/LICENSE.txt
new file mode 100644
index 0000000..ff42ad4
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common.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.xtext.datamart.common.feature/build.properties b/org.eclipse.osbp.xtext.datamart.common.feature/build.properties
new file mode 100644
index 0000000..b8920ff
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common.feature/build.properties
@@ -0,0 +1,2 @@
+bin.includes = license.html, epl-v10.html, feature.xml,\
+ feature.properties
diff --git a/org.eclipse.osbp.xtext.datamart.common.feature/epl-v10.html b/org.eclipse.osbp.xtext.datamart.common.feature/epl-v10.html
new file mode 100644
index 0000000..b398acc
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common.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.xtext.datamart.common.feature/feature.properties b/org.eclipse.osbp.xtext.datamart.common.feature/feature.properties
new file mode 100644
index 0000000..b59cd45
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common.feature/feature.properties
@@ -0,0 +1,169 @@
+###############################################################################
+# 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:
+# Cristiano Gavião - 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 DSL: Datamart common
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse OSBP
+
+# "description" property - description of the feature
+description=This feature provides the common bundles for the OSBP datamart DSL.
+
+# "updateSiteName" property - label for the update site
+updateSiteName=
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2011, 2016 - 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\
+################ 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.xtext.datamart.common.feature/feature.xml b/org.eclipse.osbp.xtext.datamart.common.feature/feature.xml
new file mode 100644
index 0000000..83b6ee9
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common.feature/feature.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--#======================================================================= -->
+<!--# Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) -->
+<!--# All rights reserved. This program and the accompanying materials -->
+<!--# are made available under the terms of the Eclipse Public License v1.0 -->
+<!--# which accompanies this distribution, and is available at -->
+<!--# http://www.eclipse.org/legal/epl-v10.html -->
+<!--# -->
+<!--# Contributors: -->
+<!--# Christophe Loetz (Loetz GmbH&Co.KG) - initial API and implementation -->
+<!--#======================================================================= -->
+
+<feature
+ id="org.eclipse.osbp.xtext.datamart.common.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.xtext.datamart.common"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/org.eclipse.osbp.xtext.datamart.common.feature/license.html b/org.eclipse.osbp.xtext.datamart.common.feature/license.html
new file mode 100644
index 0000000..6e579a5
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common.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.xtext.datamart.common.feature/pom.xml b/org.eclipse.osbp.xtext.datamart.common.feature/pom.xml
new file mode 100644
index 0000000..61d7a9e
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common.feature/pom.xml
@@ -0,0 +1,82 @@
+<?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 implementation 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.xtext.datamart.common</groupId>
+ <artifactId>org.eclipse.osbp.xtext.datamart.common.aggregator</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.osbp.xtext.datamart.common.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.xtext.datamart.common</groupId>
+ <artifactId>org.eclipse.osbp.xtext.datamart.common</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/org.eclipse.osbp.xtext.datamart.common.feature/src/main/javadoc/README.txt b/org.eclipse.osbp.xtext.datamart.common.feature/src/main/javadoc/README.txt
new file mode 100644
index 0000000..831da7e
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common.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.xtext.datamart.common.feature/src/overview.html b/org.eclipse.osbp.xtext.datamart.common.feature/src/overview.html
new file mode 100644
index 0000000..7b4d9c4
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common.feature/src/overview.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+ <title>OSBP Tools Graphical Entity</title>
+</head>
+<body>
+<p>The <strong>OSBP Xtext Datamart Common </strong>provides common bundles for the OSBP datamart DSL.</p>
+</body>
+</html>
diff --git a/org.eclipse.osbp.xtext.datamart.common/.project b/org.eclipse.osbp.xtext.datamart.common/.project
new file mode 100644
index 0000000..d74dc68
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/.project
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osbp.xtext.datamart.common</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.babel.editor.rbeBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.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>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.osbp.xtext.datamart.common/LICENSE.txt b/org.eclipse.osbp.xtext.datamart.common/LICENSE.txt
new file mode 100644
index 0000000..ff42ad4
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/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.xtext.datamart.common/META-INF/MANIFEST.MF b/org.eclipse.osbp.xtext.datamart.common/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..225587d
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/META-INF/MANIFEST.MF
@@ -0,0 +1,49 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.osbp.xtext.datamart.common
+Bundle-SymbolicName: org.eclipse.osbp.xtext.datamart.common
+Bundle-Vendor: Eclipse OSBP
+Bundle-Version: 0.9.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Require-Bundle: mondrian.osgi;bundle-version="[3.5.0,3.5.1)",
+ javax.annotation;bundle-version="[1.1.0,1.2.0)",
+ olap4j.osgi;bundle-version="[1.1.0,1.3.0)",
+ org.jsoup;bundle-version="1.8.1",
+ org.eclipse.core.runtime,
+ org.eclipse.core.databinding;bundle-version="1.4.2",
+ org.eclipse.core.databinding.beans;bundle-version="1.2.200",
+ org.eclipse.osbp.runtime.web.vaadin.databinding;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.dsl.entity.xtext;bundle-version="[0.9.0,0.10.0)",
+ org.eclipse.osbp.dsl.common.xtext;bundle-version="[0.9.0,0.10.0)",
+ com.vaadin.client;bundle-version="7.5.7",
+ com.vaadin.server;bundle-version="7.5.7",
+ com.vaadin.shared;bundle-version="7.5.7",
+ org.eclipse.xtext.common.types;bundle-version="[2.7.3,2.8.0)",
+ org.eclipse.osbp.dsl.datatype.lib
+Import-Package: javax.validation,
+ javax.validation.constraints,
+ org.apache.commons.lang3,
+ org.apache.log4j,
+ org.eclipse.osbp.bpm.api;version="0.9.0",
+ org.eclipse.osbp.dsl.entity.xtext.util;version="0.9.0",
+ org.eclipse.osbp.dsl.semantic.common.types;version="0.9.0",
+ org.eclipse.osbp.dsl.semantic.entity;version="0.9.0",
+ org.eclipse.osbp.preferences;version="0.9.0",
+ org.eclipse.osbp.runtime.common.i18n;version="0.9.0",
+ org.eclipse.osbp.ui.api.datamart;version="0.9.0",
+ org.eclipse.osbp.ui.api.layout;version="0.9.0",
+ org.eclipse.osbp.ui.api.metadata;version="0.9.0",
+ org.eclipse.osbp.ui.api.user;version="0.9.0",
+ org.eclipse.osbp.utils.common;version="0.9.0",
+ org.eclipse.osbp.utils.constants;version="0.9.0",
+ org.eclipse.osbp.utils.entityhelper;version="0.9.0",
+ org.eclipse.osbp.utils.fillertext;version="0.9.0",
+ org.eclipse.osbp.utils.theme;version="0.9.0",
+ org.eclipse.osbp.utils.vaadin;version="0.9.0",
+ org.eclipse.osbp.xtext.i18n;version="0.9.0",
+ org.jbpm.task,
+ org.jbpm.task.query,
+ org.slf4j;resolution:=optional
+Export-Package: org.eclipse.osbp.xtext.datamart.common;version="0.9.0",
+ org.eclipse.osbp.xtext.datamart.common.olap;version="0.9.0",
+ org.eclipse.osbp.xtext.datamart.common.sql;version="0.9.0"
diff --git a/org.eclipse.osbp.xtext.datamart.common/about.html b/org.eclipse.osbp.xtext.datamart.common/about.html
new file mode 100644
index 0000000..64c0598
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/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.xtext.datamart.common/about.ini b/org.eclipse.osbp.xtext.datamart.common/about.ini
new file mode 100644
index 0000000..7df671f
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/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.xtext.datamart.common/about.mappings b/org.eclipse.osbp.xtext.datamart.common/about.mappings
new file mode 100644
index 0000000..4511a0a
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/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.xtext.datamart.common/about.properties b/org.eclipse.osbp.xtext.datamart.common/about.properties
new file mode 100644
index 0000000..e8e1978
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/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.xtext.datamart.common
+
+################ 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.xtext.datamart.common/build.properties b/org.eclipse.osbp.xtext.datamart.common/build.properties
new file mode 100644
index 0000000..051ae17
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/build.properties
@@ -0,0 +1,10 @@
+source.. = src/
+output.. = target/classes/
+bin.includes = about.properties, about.mappings, about.ini, about.html, META-INF/,\
+ .,\
+ license.html,\
+ LICENSE.txt,\
+ epl-v10.html
+src.includes = about.properties, about.mappings, about.ini, about.html, license.html,\
+ LICENSE.txt,\
+ epl-v10.html
diff --git a/org.eclipse.osbp.xtext.datamart.common/epl-v10.html b/org.eclipse.osbp.xtext.datamart.common/epl-v10.html
new file mode 100644
index 0000000..b398acc
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/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.xtext.datamart.common/license.html b/org.eclipse.osbp.xtext.datamart.common/license.html
new file mode 100644
index 0000000..6e579a5
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/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.xtext.datamart.common/notice.html b/org.eclipse.osbp.xtext.datamart.common/notice.html
new file mode 100644
index 0000000..c3d34c3
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/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.xtext.datamart.common/pom.xml b/org.eclipse.osbp.xtext.datamart.common/pom.xml
new file mode 100644
index 0000000..4d1789e
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/pom.xml
@@ -0,0 +1,56 @@
+<?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.xtext.datamart.common</groupId>
+ <artifactId>org.eclipse.osbp.xtext.datamart.common.aggregator</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+ <artifactId>org.eclipse.osbp.xtext.datamart.common</artifactId>
+ <build>
+ <sourceDirectory>emf-gen</sourceDirectory>
+ <resources>
+ <resource>
+ <directory>src</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ <resource>
+ <directory>src-gen</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ <resource>
+ <directory>xtend-gen</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.1</version>
+ <configuration>
+ <source>1.8</source>
+ <target>1.8</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/ACubeDatamart.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/ACubeDatamart.java
new file mode 100644
index 0000000..57a0863
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/ACubeDatamart.java
@@ -0,0 +1,34 @@
+/**
+ *
+ * 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.xtext.datamart.common;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import mondrian.rolap.RolapConnection;
+
+import org.eclipse.osbp.dsl.common.datatypes.IDto;
+import org.eclipse.osbp.ui.api.user.IUser;
+import org.eclipse.osbp.xtext.datamart.common.olap.DerivedCellSet;
+
+@SuppressWarnings("all")
+public abstract class ACubeDatamart extends ADatamart<RolapConnection> {
+
+ public abstract DerivedCellSet getResults(final IUser user, final Map<String,String> filteredItems, final Class operativeDtoClass, final List<IDto> operativeDtos);
+ @Override
+ public final HashMap<Integer, ArrayList<String>> getAxisMap() {
+ return null;
+ }
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/ADatamart.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/ADatamart.java
new file mode 100644
index 0000000..e6b2e77
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/ADatamart.java
@@ -0,0 +1,93 @@
+/**
+ *
+ * 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.xtext.datamart.common;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.osbp.preferences.EnumDatabaseVendor;
+import org.eclipse.osbp.preferences.ProductConfiguration;
+import org.eclipse.osbp.ui.api.datamart.IDataMart;
+import org.eclipse.osbp.ui.api.user.IUser;
+import org.eclipse.osbp.ui.api.datamart.IDataMart.EType;
+
+@SuppressWarnings("all")
+public abstract class ADatamart<C> implements IDataMart {
+ public abstract C connect();
+ public abstract HashMap<Integer,ArrayList<String>> getAxisMap();
+ public abstract int getNumberOfAxes();
+ public abstract HashMap<String, EType> getIdMap();
+ public abstract HashMap<String, EType> getTypesMap(IUser user);
+ public String setFilters(final Map<String,String> filteredItems) {
+ return null;
+ }
+ /**
+ * @see {@link #enableFillerText(boolean)}
+ * @param filteredItems
+ * @return returns results from datamart. If filler text is enabled, the result will be generated via filler text.
+ */
+ public abstract void disconnect();
+
+ protected EnumDatabaseVendor dbVendor = null;
+ private HashMap<String, String> filterMap = null;
+
+ /**
+ * @return the map with all filters, which has to be initialized once
+ */
+ private HashMap<String, String> getFilterMap() {
+ if (filterMap == null) {
+ String jndiName = ProductConfiguration.getPersistenceUnitJndiName(getPersistenceUnit());
+ dbVendor = ProductConfiguration.getDataSource(jndiName).getDatabaseVendor();
+ filterMap = initializeFilterMap();
+ }
+ return filterMap;
+ }
+
+ /**
+ * @return all filter ids
+ */
+ protected Set<String> getFilterIds() {
+ return getFilterMap().keySet();
+ }
+
+ /**
+ * @param filterID
+ * @return the filter for the given filter id
+ */
+ protected String getFilter(String filterID) {
+ String filter = getFilterMap().get(filterID);
+ if (filter != null) {
+ filter = dbVendor.applySqlSpecifications(filter);
+ }
+ return filter;
+ }
+
+ /**
+ * @return count of filters
+ */
+ protected int getFiltersCount() {
+ return getFilterMap().size();
+ }
+
+ /**
+ * @return the persistence unit used
+ */
+ abstract protected String getPersistenceUnit();
+
+ /**
+ * @return the initialized filter map
+ */
+ abstract protected HashMap<String, String> initializeFilterMap();
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/AEntityDatamart.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/AEntityDatamart.java
new file mode 100644
index 0000000..02931ee
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/AEntityDatamart.java
@@ -0,0 +1,118 @@
+/**
+ *
+ * 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.xtext.datamart.common;
+
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.osbp.dsl.common.datatypes.IDto;
+import org.eclipse.osbp.ui.api.datamart.DerivedOlapException;
+import org.eclipse.osbp.ui.api.user.IUser;
+import org.eclipse.osbp.utils.common.IEntityIdModificationListenerView;
+import org.eclipse.osbp.utils.fillertext.FillerTextProvider;
+import org.eclipse.osbp.xtext.datamart.common.olap.DerivedAxis;
+import org.eclipse.osbp.xtext.datamart.common.olap.DerivedCell;
+import org.eclipse.osbp.xtext.datamart.common.olap.DerivedCellSet;
+import org.eclipse.osbp.xtext.datamart.common.olap.DerivedPosition;
+
+@SuppressWarnings("all")
+public abstract class AEntityDatamart extends ADatamart<Connection> {
+ public abstract DerivedCellSet getResults(final IUser user, final Map<String,String> filteredItems, Class operativeDtoClass, List<IDto> operativeDtos);
+ protected boolean fFillerTextEnabled = false;
+
+ /**
+ * @param enableFillerText enable using filler text for following calls to {@link #getResults(Map)}
+ */
+ public void enableFillerText(boolean enableFillerText) {
+ fFillerTextEnabled = enableFillerText;
+ }
+ /**
+ * @return the generated filler text result set. Has be generated for each datamart class
+ */
+ protected ResultSet generateFillerTextResultSet() {
+ return null;
+ }
+ /**
+ * @param provider the filler text provider in use
+ * @return the generated filler text row. Has be generated for each datamart class
+ */
+ public Map<String, Object> generateFillerTextRow(FillerTextProvider provider) {
+ return null;
+ }
+
+ /**
+ * @see {@link IEntityIdModificationListenerView}
+ * The view has to subscribe/unsubsribe to REFRESH_VIEW!
+ * <br>
+ * <b>The IDs/UUIDs for entities have to be on the AXIS_COLUMN only!</b>
+ * @param listeningView the view, that should listen to modifications on modified entity ids
+ * @param cellSet the result set, from which the entity ids, that should be listened to, are extracted
+ */
+ public void addEntityIdsToModifyListener(IEntityIdModificationListenerView listeningView, DerivedCellSet cellSet) {
+ // --- find all columns containing entity ids/uuids
+ Map<String,Integer> entityIdColumns = new HashMap<String, Integer>();
+ try {
+ // --- next get the header for all "columns" ---
+ // Column header
+ // See
+ // http://www.olap4j.org/api/index.html?org/olap4j/Position.html
+ // on how Position works, it helps a lot
+ // Every position will be a column in the header
+ int count = 0;
+ for (DerivedPosition pos : cellSet.getAxes().get(DerivedAxis.AXIS_COLUMNS).getPositions()) {
+ String columnName = pos.getMembers().get(0).getCaption();
+ if (DatamartDefinitionUtil.isEntityIdColumnName(columnName)) {
+ entityIdColumns.put(DatamartDefinitionUtil.getEntityNameForIdColumnName(columnName), count);
+ }
+ count++;
+ }
+ }
+ catch (Exception e) {
+ }
+ if (!entityIdColumns.isEmpty()) {
+ addEntityIdsToModifyListener(listeningView, cellSet, entityIdColumns, cellSet.getAxes().size(), new ArrayList<Integer>());
+ }
+ }
+
+ private void addEntityIdsToModifyListener(IEntityIdModificationListenerView listeningView, DerivedCellSet cellSet, Map<String,Integer> entityIdColumns, int axisDepth, ArrayList<Integer> coordinate) {
+ int itemCount = cellSet.getAxes().get(axisDepth-1).getPositions().size();
+ if (axisDepth > 1) {
+ for (int item = 0; item < itemCount; item++) {
+ ArrayList<Integer> newCoordinate = new ArrayList<Integer>();
+ newCoordinate.add(item);
+ newCoordinate.addAll(coordinate);
+ addEntityIdsToModifyListener(listeningView, cellSet, entityIdColumns, axisDepth-1, newCoordinate);
+ }
+ }
+ else {
+ for (String entityName : entityIdColumns.keySet()) {
+ ArrayList<Integer> newCoordinate = new ArrayList<Integer>();
+ newCoordinate.add(entityIdColumns.get(entityName));
+ newCoordinate.addAll(coordinate);
+ DerivedCell result;
+ try {
+ result = cellSet.getCell(newCoordinate);
+ if (result != null) {
+ listeningView.addEntityIdToModifyListener(entityName, result.getFormattedValue().trim());
+ }
+ } catch (DerivedOlapException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/ATaskDatamart.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/ATaskDatamart.java
new file mode 100644
index 0000000..f649509
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/ATaskDatamart.java
@@ -0,0 +1,25 @@
+/**
+ *
+ * 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.xtext.datamart.common;
+
+import java.sql.Connection;
+import java.util.Map;
+
+import org.eclipse.osbp.bpm.api.IBPMTaskClient;
+import org.eclipse.osbp.ui.api.user.IUser;
+import org.eclipse.osbp.xtext.datamart.common.olap.DerivedCellSet;
+
+public abstract class ATaskDatamart extends ADatamart<Connection> {
+ public abstract DerivedCellSet getResults(final IBPMTaskClient client, final IUser user, final Map<String,String> filteredItems);
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/DataMartDataSource.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/DataMartDataSource.java
new file mode 100644
index 0000000..a840617
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/DataMartDataSource.java
@@ -0,0 +1,82 @@
+/**
+ *
+ * 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.xtext.datamart.common;
+
+import java.io.PrintWriter;
+import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
+import java.util.logging.Logger;
+
+import org.olap4j.OlapConnection;
+import org.olap4j.OlapDataSource;
+
+
+public class DataMartDataSource implements OlapDataSource{
+
+ @Override
+ public PrintWriter getLogWriter() throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public void setLogWriter(PrintWriter out) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void setLoginTimeout(int seconds) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public int getLoginTimeout() throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public Logger getParentLogger() throws SQLFeatureNotSupportedException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public <T> T unwrap(Class<T> iface) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public boolean isWrapperFor(Class<?> iface) throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public OlapConnection getConnection() throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public OlapConnection getConnection(String arg0, String arg1)
+ throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/DatamartData.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/DatamartData.java
new file mode 100644
index 0000000..e3150f7
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/DatamartData.java
@@ -0,0 +1,90 @@
+/**
+ *
+ * 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.xtext.datamart.common;
+
+import org.eclipse.osbp.ui.api.datamart.IDualData;
+
+
+public class DatamartData implements IDualData {
+ private String selectionValue;
+ private String formattedValue;
+ private String significantValue;
+ private String hierarchy = null;
+
+ @Override
+ public String getSelectionValue() {
+ return selectionValue;
+ }
+
+ @Override
+ public void setSelectionValue(String selectionValue) {
+ this.selectionValue = selectionValue;
+ }
+
+ @Override
+ public String getFormattedValue() {
+ return formattedValue;
+ }
+
+ @Override
+ public void setFormattedValue(String formattedValue) {
+ this.formattedValue = formattedValue;
+ }
+
+ @Override
+ public String getHierarchy() {
+ return hierarchy;
+ }
+
+ public void set_hierarchy(String _hierarchy) {
+ this.hierarchy = _hierarchy;
+ }
+
+ @Override
+ public void setUnformattedValue(String unformattedValue) {
+ significantValue = unformattedValue;
+ formattedValue = "";
+ selectionValue = unformattedValue;
+ hierarchy = null;
+ if (unformattedValue != null && unformattedValue.startsWith("[") && unformattedValue.endsWith("]") && unformattedValue.contains(".")) {
+ String parts[] = unformattedValue.split("\\]\\.\\[");
+// hierarchy = parts[0].replace("[","").replace("]", "");
+ hierarchy = parts[0];
+ for (int idx=1; idx<parts.length; idx ++) {
+ if(idx < parts.length-1) {
+ hierarchy += "].["+parts[idx];
+ } else {
+ hierarchy += "]";
+ }
+ if (idx > 1) {
+ formattedValue += " ";
+ }
+ formattedValue += parts[idx].replace("[","").replace("]", "");
+ if(idx == parts.length-1) {
+ significantValue = parts[idx].replace("[","").replace("]", "");
+ }
+ }
+ }
+ else {
+ formattedValue = unformattedValue;
+ }
+// if(hierarchy != null) {
+// formattedValue = "["+hierarchy+"]."+formattedValue;
+// }
+ }
+
+ public String getSignificantValue() {
+ return significantValue;
+ }
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/DatamartDefinitionUtil.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/DatamartDefinitionUtil.java
new file mode 100644
index 0000000..331b726
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/DatamartDefinitionUtil.java
@@ -0,0 +1,82 @@
+/**
+ *
+ * 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.xtext.datamart.common;
+
+import org.eclipse.osbp.dsl.semantic.entity.LEntity;
+import org.eclipse.osbp.dsl.semantic.entity.LEntityAttribute;
+import org.eclipse.osbp.ui.api.datamart.IDataMart;
+import org.eclipse.osbp.utils.entityhelper.DataType;
+import org.eclipse.osbp.ui.api.datamart.IDataMart.EType;
+
+public class DatamartDefinitionUtil {
+
+ public static String getEntityNameForIdColumnName(String columnName) {
+ if (isEntityIdColumnName(columnName)) {
+ return columnName.substring(IDataMart.DATAMART_ID_COLUMN_PREFIX.length(), columnName.length()-IDataMart.DATAMART_ID_COLUMN_POSTFIX.length());
+ }
+ else {
+ return null;
+ }
+ }
+
+ public static boolean isEntityIdColumnName(String columnName) {
+ return columnName.startsWith(IDataMart.DATAMART_ID_COLUMN_PREFIX) && columnName.endsWith(IDataMart.DATAMART_ID_COLUMN_POSTFIX);
+ }
+
+ public static String getEntityIdColumnName(LEntity entityRef) {
+ LEntityAttribute idAttribute = getEntityIdAttribute(entityRef);
+ if (idAttribute == null) {
+ return null;
+ }
+ else {
+ return entityRef.getName()+"."+idAttribute.getName();
+ }
+ }
+
+ public static String getEntityIdAliasName(LEntity entityRef) {
+ LEntityAttribute idAttribute = getEntityIdAttribute(entityRef);
+ if (idAttribute == null) {
+ return null;
+ }
+ else {
+ return IDataMart.DATAMART_ID_COLUMN_PREFIX+entityRef.getName()+IDataMart.DATAMART_ID_COLUMN_POSTFIX;
+ }
+ }
+
+ public static LEntityAttribute getEntityIdAttribute(LEntity entityRef) {
+ for (LEntityAttribute attribute : entityRef.getAllAttributes()) {
+ if (attribute.isId() || attribute.isUuid()) {
+ return attribute;
+ }
+ }
+ return null;
+ }
+
+ public static String getEntityIdDatatype(LEntity entityRef) {
+ for (LEntityAttribute attribute : entityRef.getAllAttributes()) {
+ if (attribute.isId() || attribute.isUuid()) {
+ return attribute.getType().getName();
+ }
+ }
+ return null;
+ }
+
+ public static EType getEntityIdEType(LEntity entityRef) {
+ for (LEntityAttribute attribute : entityRef.getAllAttributes()) {
+ if (attribute.isId() || attribute.isUuid()) {
+ return (new DataType()).getBasicType(attribute);
+ }
+ }
+ return null;
+ }
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/DatamartDtoMapper.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/DatamartDtoMapper.java
new file mode 100644
index 0000000..e5638ce
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/DatamartDtoMapper.java
@@ -0,0 +1,54 @@
+/**
+ *
+ * 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.xtext.datamart.common;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.osbp.ui.api.datamart.IDataMart.EType;
+
+public class DatamartDtoMapper {
+
+ private final Map<String, String> dtoToIdAttribute;
+ private final Map<String, EType> dtoToIdDataTypeClassName;
+ private final Map<String, String> dtoToIdAliasName;
+
+ public DatamartDtoMapper() {
+ dtoToIdAttribute = new HashMap<String, String>();
+ dtoToIdDataTypeClassName = new HashMap<String, EType>();
+ dtoToIdAliasName = new HashMap<String, String>();
+ }
+
+ public DatamartDtoMapper add(String dtoFqn, String entityIdAttribute, EType entityIdDataTypeClassName, String entityIdAliasName) {
+ dtoToIdAttribute.put(dtoFqn, entityIdAttribute);
+ dtoToIdDataTypeClassName.put(dtoFqn, entityIdDataTypeClassName);
+ dtoToIdAliasName.put(dtoFqn, entityIdAliasName);
+ return this;
+ }
+
+ public boolean contains(String dtoFqn) {
+ return dtoToIdAttribute.containsKey(dtoFqn);
+ }
+
+ public String getEntityIdAttribute(String dtoFqn) {
+ return dtoToIdAttribute.get(dtoFqn);
+ }
+
+ public EType getEntityIdDataTypeClassName(String dtoFqn) {
+ return dtoToIdDataTypeClassName.get(dtoFqn);
+ }
+
+ public String getEntityIdAliasName(String dtoFqn) {
+ return dtoToIdAliasName.get(dtoFqn);
+ }
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/DatamartFilterGenerator.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/DatamartFilterGenerator.java
new file mode 100644
index 0000000..a951fd5
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/DatamartFilterGenerator.java
@@ -0,0 +1,403 @@
+/**
+ *
+ * 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.xtext.datamart.common;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import org.eclipse.osbp.ui.api.datamart.IDataMart;
+import org.eclipse.osbp.ui.api.datamart.IDatamartFilterGenerator;
+import org.eclipse.osbp.ui.api.datamart.IDatamartSelectable;
+import org.eclipse.osbp.ui.api.datamart.IDualData;
+import org.eclipse.osbp.ui.api.layout.IViewLayoutManager;
+import org.eclipse.osbp.ui.api.metadata.IDSLMetadataService;
+import org.eclipse.osbp.ui.api.user.IUser;
+import org.eclipse.osbp.utils.theme.EnumCssClass;
+import org.eclipse.osbp.utils.vaadin.ViewLayoutManager;
+import org.eclipse.osbp.xtext.i18n.I18NKeyGenerator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.vaadin.data.Property.ValueChangeListener;
+import com.vaadin.ui.AbstractOrderedLayout;
+import com.vaadin.ui.Alignment;
+import com.vaadin.ui.Component;
+import com.vaadin.ui.HorizontalLayout;
+import com.vaadin.ui.VerticalLayout;
+
+// creates a filtermap from selected and multiselected components.
+// For cubes the class creates permutated slices over all filter aspects
+public class DatamartFilterGenerator implements IDatamartFilterGenerator {
+
+ private static Logger log = LoggerFactory
+ .getLogger(DatamartFilterGenerator.class);
+
+ // the key is the same as the filterMap key
+ // the selection component is therefore associated with the filterMap id and
+ // so with the event id
+ private Map<String, IDatamartSelectable> selectors = new HashMap<String, IDatamartSelectable>();
+ private boolean idMode = false;
+ private String id = null;
+ private String idProperty;
+ private boolean cube = false;
+ private HorizontalLayout selectionArea = null;
+ private IDSLMetadataService dslMetadataService;
+ private boolean showCaption;
+
+ @Override
+ public void setDslMetadataService(IDSLMetadataService dslMetadataService) {
+ this.dslMetadataService = dslMetadataService;
+ }
+
+ @Override
+ public void setId(String idProperty, String id) {
+ idMode = true;
+ this.idProperty = idProperty;
+ this.id = id;
+ }
+
+ @Override
+ public void resetId() {
+ idMode = false;
+ }
+
+ @Override
+ public Map<String, IDatamartSelectable> getSelectors() {
+ return selectors;
+ }
+
+ @Override
+ public boolean isCube() {
+ return cube;
+ }
+
+ @Override
+ public void setCube(boolean cube) {
+ this.cube = cube;
+ }
+
+ @Override
+ public void selectItem(String filter, String selection) {
+ if (selection != null) {
+ String sel = selection.replace("_", " ");
+ if (selectors.containsKey(filter)) {
+ for (Object id : selectors.get(filter).getContainerDataSource()
+ .getItemIds()) {
+ if (((IDualData) id).getSignificantValue().equals(sel)) {
+ selectors.get(filter).select(id);
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ public void resetItem(String filter) {
+ if (selectors.containsKey(filter)) {
+ selectors.get(filter).select(selectors.get(filter).getFirstItem());
+ }
+ }
+
+ private String getTranslatableKey(String filterName) {
+ return I18NKeyGenerator.key(stripHierarchy(filterName));
+ }
+
+ private String stripMDXCharacters(String filterName) {
+ return filterName.replace(IDataMart.singleSelectDecorator, "").replace(IDataMart.multiSelectDecorator, "").replace(IDataMart.exceptDecorator, "")
+ .replace(IDataMart.slicerSingleSelectDecorator, "").replace(IDataMart.slicerMultiSelectDecorator, "").replace("[", "")
+ .replace("]", "");
+ }
+
+ private String stripHierarchy(String filterName) {
+ String result = filterName;
+ String[] parts = stripMDXCharacters(filterName).split("\\.");
+ int len = parts.length;
+ if (len > 0) {
+ result = parts[len - 1];
+ }
+ return result.replace(".", " ");
+ }
+
+ @Override
+ public boolean createFilter(IDataMart datamart, IUser user,
+ ValueChangeListener filterChangeListener,
+ IViewLayoutManager layoutManager) {
+ return createFilter(datamart, user, filterChangeListener, layoutManager, false);
+ }
+
+ @Override
+ public boolean createFilter(IDataMart datamart, IUser user,
+ ValueChangeListener filterChangeListener,
+ IViewLayoutManager layoutManager,
+ boolean showCaption) {
+ boolean hasFilters = false;
+ this.showCaption = showCaption;
+ HashMap<String, ArrayList<IDualData>> filters = datamart
+ .getFilters(user);
+ if ((filters != null) && filters.size() > 0) {
+ for (String filter : filters.keySet()) {
+ if (!hasFilters) {
+ hasFilters = true;
+ }
+ // the id filter solution
+ if (!filters.get(filter).contains(IDataMart.filterIdPlaceholder)) {
+ boolean isSingleSelect = false;
+ boolean isMultiSelect = false;
+ boolean isSlicer = false;
+ boolean isExcept = false;
+ if (filter.contains(IDataMart.multiSelectDecorator)) {
+ isMultiSelect = true;
+ }
+ if (filter.contains(IDataMart.singleSelectDecorator)) {
+ isSingleSelect = true;
+ }
+ if (filter.contains(IDataMart.exceptDecorator)) {
+ isSingleSelect = true;
+ isExcept = true;
+ }
+ if (filter.contains(IDataMart.slicerSingleSelectDecorator)) {
+ isSingleSelect = true;
+ isSlicer = true;
+ }
+ if (filter.contains(IDataMart.slicerMultiSelectDecorator)) {
+ isMultiSelect = true;
+ isSlicer = true;
+ }
+ // --- the filter should be UNIQUE for each view ---
+ if (!selectors.containsKey(filter)) {
+ IDatamartSelectable box = null;
+ if (isSingleSelect) {
+ box = new DatamartSingleSelect(isExcept, isSlicer,
+ filter, filters.get(filter));
+ layoutManager.getTopArea().addComponent((Component)box);
+
+ } else if (isMultiSelect) {
+ box = new DatamartMultiSelect(5, false, isSlicer,
+ filter, filters.get(filter));
+ layoutManager.getSideArea().addComponent((Component)box);
+ }
+ if (box != null && filterChangeListener != null) {
+ box.addValueChangeListener(filterChangeListener);
+ }
+ selectors.put(filter, box);
+ }
+ }
+ }
+ }
+ return hasFilters;
+ }
+
+ @Override
+ public void updateFilter(IDataMart datamart, IUser user,
+ ValueChangeListener filterChangeListener) {
+ HashMap<String, ArrayList<IDualData>> filters = datamart
+ .getFilters(user);
+ if ((filters != null) && filters.size() > 0) {
+ for (String filter : filters.keySet()) {
+ if (selectors.containsKey(filter)) {
+ if(filterChangeListener != null) {
+ selectors.get(filter).removeValueChangeListener(
+ filterChangeListener);
+ }
+ selectors.get(filter).update(filters.get(filter));
+ if(filterChangeListener != null) {
+ selectors.get(filter).addValueChangeListener(
+ filterChangeListener);
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ public Map<String, String> getFilter(boolean isCube) {
+ Map<String, String> filters = new HashMap<String, String>();
+ setCube(isCube);
+ if (idMode) {
+ idMode = false;
+ filters.put(idProperty, id);
+ return filters;
+ }
+ boolean hasSlicer = false;
+ boolean isMultiSelected = false;
+ for (String selector : selectors.keySet()) {
+ if (selectors.get(selector).isSlicer()) {
+ hasSlicer = true;
+ }
+ if (selectors.get(selector).isMultiSelected()) {
+ isMultiSelected = true;
+ }
+ }
+ if (!isCube || !hasSlicer || !isMultiSelected) {
+ for (String selector : selectors.keySet()) {
+ if (selectors.get(selector) instanceof DatamartMultiSelect) {
+ String selection = "";
+ for (IDualData item : selectors.get(selector)
+ .getSelectedItems()) {
+ if (item != null) {
+ if (!selection.isEmpty()) {
+ selection += ",";
+ }
+ selection += item.getSelectionValue();
+ }
+ }
+ filters.put(selectors.get(selector).getFilterName(),
+ selection);
+ } else {
+ try {
+ filters.put(
+ selectors.get(selector).getFilterName(),
+ ((IDualData) selectors.get(selector).getValue())
+ .getSelectionValue());
+ } catch (NullPointerException npe) {
+ log.error("NPE for "
+ + selectors.get(selector).getFilterName(), npe);
+ }
+ }
+ }
+ } else {
+ String firstFilter = null;
+ List<List<String>> filterGroup = new ArrayList<List<String>>();
+ for (String multiSelect : selectors.keySet()) {
+ if (selectors.get(multiSelect) instanceof DatamartMultiSelect) {
+ if (selectors.get(multiSelect).isSlicer()) {
+ List<String> myList = new ArrayList<String>();
+ for (IDualData item : selectors.get(multiSelect)
+ .getSelectedItems()) {
+ if (item != null) {
+ myList.add(item.getSelectionValue());
+ }
+ }
+ filterGroup.add(myList);
+ if (firstFilter == null) {
+ firstFilter = selectors.get(multiSelect)
+ .getFilterName();
+ } else {
+ filters.put(selectors.get(multiSelect)
+ .getFilterName(), "<empty>");
+ }
+ } else {
+ String selection = "";
+ for (IDualData item : selectors.get(multiSelect)
+ .getSelectedItems()) {
+ if (item != null) {
+ if (!selection.isEmpty()) {
+ selection += ",";
+ }
+ selection += item.getSelectionValue();
+ }
+ }
+ filters.put(selectors.get(multiSelect).getFilterName(),
+ selection);
+ }
+ } else {
+ if (selectors.get(multiSelect).isSlicer()) {
+ List<String> myList = new ArrayList<String>();
+ for (IDualData item : selectors.get(multiSelect)
+ .getSelectedItems()) {
+ if (item != null) {
+ myList.add(item.getSelectionValue());
+ }
+ }
+ filterGroup.add(myList);
+ if (firstFilter == null) {
+ firstFilter = selectors.get(multiSelect)
+ .getFilterName();
+ } else {
+ filters.put(selectors.get(multiSelect)
+ .getFilterName(), "<empty>");
+ }
+ } else if (selectors.get(multiSelect).getValue() != null) {
+ try {
+ filters.put(selectors.get(multiSelect)
+ .getFilterName(), ((IDualData) selectors
+ .get(multiSelect).getValue())
+ .getSelectionValue());
+ } catch (NullPointerException npe) {
+ log.error("NPE for "
+ + selectors.get(multiSelect)
+ .getFilterName(), npe);
+ }
+ }
+ }
+ }
+ // calculate every permutation of selection as slices must be
+ // created
+ List<List<String>> permutations = new ArrayList<List<String>>();
+ int numEntries = 1;
+ for (List<String> list : filterGroup) {
+ numEntries *= list.size();
+ }
+ for (int i = 0; i < numEntries; i++) {
+ permutations.add(new ArrayList<String>());
+ }
+ for (List<String> itemList : filterGroup) {
+ Iterator<String> iterator = itemList.iterator();
+ if (iterator.hasNext()) {
+ for (List<String> entry : permutations) {
+ entry.add(iterator.next());
+ if (!iterator.hasNext()) {
+ iterator = itemList.iterator();
+ }
+ }
+ }
+ }
+ String set = "";
+ boolean firstSet = true;
+ for (List<String> permutation : permutations) {
+ boolean firstTuple = true;
+ String tuple = "";
+ for (String item : permutation) {
+ if (firstTuple) {
+ firstTuple = false;
+ } else {
+ tuple += ",";
+ }
+ tuple += item;
+ }
+ if (firstSet) {
+ firstSet = false;
+ } else {
+ set += ",";
+ }
+ set += "(" + tuple + ")";
+ }
+ filters.put(firstFilter, "{" + set + "}");
+ }
+ return filters;
+ }
+
+ @Override
+ public void setLocale(Locale locale) {
+ if (dslMetadataService != null) {
+ for (String sel : selectors.keySet()) {
+ if (showCaption) {
+ selectors.get(sel).setCaption(
+ dslMetadataService.translate(
+ locale.toLanguageTag(),
+ getTranslatableKey(selectors.get(sel)
+ .getFilterName())));
+ }
+ selectors.get(sel).setDescription(
+ dslMetadataService.translate(locale.toLanguageTag(),
+ getTranslatableKey(selectors.get(sel)
+ .getFilterName())));
+ }
+ }
+ }
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/DatamartMultiSelect.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/DatamartMultiSelect.java
new file mode 100644
index 0000000..ea1e7cb
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/DatamartMultiSelect.java
@@ -0,0 +1,174 @@
+/**
+ *
+ * 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.xtext.datamart.common;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.osbp.ui.api.datamart.IDatamartSelectable;
+import org.eclipse.osbp.ui.api.datamart.IDualData;
+import org.eclipse.osbp.utils.theme.EnumCssClass;
+
+import com.vaadin.data.Container;
+import com.vaadin.ui.ListSelect;
+
+public class DatamartMultiSelect extends ListSelect implements
+ IDatamartSelectable {
+
+ private static final long serialVersionUID = 7284120542309904692L;
+ private String filterName = null;
+ private boolean slicer = false;
+ private String hierarchy = null;
+ private IDualData firstItem = null;
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public boolean isMultiSelected() {
+ Collection<IDualData> obj = (Collection<IDualData>) getValue();
+ return (obj.size() > 0);
+ }
+
+ public DatamartMultiSelect(int rowsLimit, boolean isExcept,
+ boolean isSlicer, String filterName, Collection<IDualData> data) {
+ addStyleName(EnumCssClass.MULTI_SELECTION.styleName());
+ slicer = isSlicer;
+ setFilterName(filterName);
+ setMultiSelect(true);
+ update(data);
+ if (data.size() > rowsLimit) {
+ setRows(rowsLimit);
+ } else {
+ setRows(data.size());
+ }
+ }
+
+ public static long getSerialversionuid() {
+ return serialVersionUID;
+ }
+
+ public boolean isSlicer() {
+ return slicer;
+ }
+
+ public DatamartMultiSelect() {
+ }
+
+ /**
+ * (re)set all options visible in this box
+ *
+ * @param options
+ */
+ public void update(Collection<IDualData> options) {
+ removeAllItems();
+ firstItem = null;
+ for (IDualData dd : options) {
+ setHierarchy(dd.getHierarchy());
+ // String item = dd.getFormattedValue();
+ String item = dd.getSignificantValue();
+ if (item != null) {
+ if (firstItem == null) {
+ firstItem = dd;
+ }
+ addItem(dd);
+ // setItemCaption(dd, dd.getFormattedValue());
+ setItemCaption(dd, dd.getSignificantValue());
+ }
+ }
+ // always select the first option
+ Collection<IDualData> selectedItems = new ArrayList<IDualData>();
+ selectedItems.add(firstItem);
+ setValue(selectedItems);
+ setEnabled(true);
+ super.setWidth(null);
+ setNullSelectionAllowed(false);
+ setImmediate(true);
+ }
+
+ public void setWidth(String width) {
+ super.setWidth(width);
+ }
+
+ public String getFilterName() {
+ return filterName;
+ }
+
+ public void setFilterName(String filterName) {
+ this.filterName = filterName;
+ }
+
+ public List<IDualData> getSelectedItems() {
+ List<IDualData> list = new ArrayList<IDualData>();
+ for (Object item : (Collection<?>) getValue()) {
+ list.add((IDualData) item);
+ }
+ return (list);
+ }
+
+ public IDualData getFirstItem() {
+ return firstItem;
+ }
+
+ public String getHierarchy() {
+ return hierarchy;
+ }
+
+ public void setHierarchy(String hierarchy) {
+ this.hierarchy = hierarchy;
+ }
+
+ @Override
+ public Container getContainerDataSource() {
+ return super.getContainerDataSource();
+ }
+
+ @Override
+ public void select(Object obj) {
+ super.select(obj);
+ }
+
+ @Override
+ public void addValueChangeListener(ValueChangeListener listener) {
+ super.addValueChangeListener(listener);
+ }
+
+ @Override
+ public void removeValueChangeListener(ValueChangeListener listener) {
+ super.removeValueChangeListener(listener);
+ }
+
+ @Override
+ public void setCaption(String caption) {
+ super.setCaption(caption);
+ }
+
+ @Override
+ public void setDescription(String description) {
+ super.setDescription(description);
+ }
+
+ @Override
+ public float getHeight() {
+ return super.getHeight();
+ }
+
+ @Override
+ public Unit getHeightUnits() {
+ return super.getHeightUnits();
+ }
+
+ @Override
+ public Object getValue() {
+ return super.getValue();
+ }
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/DatamartSingleSelect.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/DatamartSingleSelect.java
new file mode 100644
index 0000000..a1c37d2
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/DatamartSingleSelect.java
@@ -0,0 +1,162 @@
+/**
+ *
+ * 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.xtext.datamart.common;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.osbp.ui.api.datamart.IDatamartSelectable;
+import org.eclipse.osbp.ui.api.datamart.IDualData;
+import org.eclipse.osbp.utils.theme.EnumCssClass;
+
+import com.vaadin.data.Container;
+import com.vaadin.ui.ComboBox;
+
+public class DatamartSingleSelect extends ComboBox implements
+ IDatamartSelectable {
+
+ private static final long serialVersionUID = -5673052113801450589L;
+ private String filterName = null;
+ private String hierarchy = null;
+ private boolean slicer = false;
+ private IDualData firstItem = null;
+
+ public static long getSerialversionuid() {
+ return serialVersionUID;
+ }
+
+ public boolean isSlicer() {
+ return slicer;
+ }
+
+ public DatamartSingleSelect(boolean isExcept, boolean isSlicer,
+ String filterName, Collection<IDualData> data) {
+ addStyleName(EnumCssClass.SINGLE_SELECTION.styleName());
+ slicer = isSlicer;
+ setFilterName(filterName);
+ update(data);
+ }
+
+ public DatamartSingleSelect() {
+ }
+
+ /**
+ * (re)set all options visible in this box
+ *
+ * @param options
+ */
+ public void update(Collection<IDualData> options) {
+ removeAllItems();
+ firstItem = null;
+ for (IDualData dd : options) {
+ setHierarchy(dd.getHierarchy());
+ // String item = dd.getFormattedValue();
+ String item = dd.getSignificantValue();
+ if (item != null) {
+ if (firstItem == null) {
+ firstItem = dd;
+ }
+ addItem(dd);
+ // setItemCaption(dd, dd.getFormattedValue());
+ setItemCaption(dd, dd.getSignificantValue());
+ }
+ }
+ // always select the first option
+ setValue(firstItem);
+ setEnabled(true);
+ super.setWidth(null);
+ setNullSelectionAllowed(false);
+ setImmediate(true);
+ }
+
+ public void setWidth(String width) {
+ super.setWidth(width);
+ }
+
+ public String getFilterName() {
+ return filterName;
+ }
+
+ public void setFilterName(String filterName) {
+ this.filterName = filterName;
+ }
+
+ public List<IDualData> getSelectedItems() {
+ List<IDualData> items = new ArrayList<IDualData>();
+ items.add((IDualData) getValue());
+ return items;
+ }
+
+ public IDualData getFirstItem() {
+ return firstItem;
+ }
+
+ public String getHierarchy() {
+ return hierarchy;
+ }
+
+ public void setHierarchy(String hierarchy) {
+ this.hierarchy = hierarchy;
+ }
+
+ @Override
+ public Container getContainerDataSource() {
+ return super.getContainerDataSource();
+ }
+
+ @Override
+ public void select(Object obj) {
+ super.select(obj);
+ }
+
+ @Override
+ public void addValueChangeListener(ValueChangeListener listener) {
+ super.addValueChangeListener(listener);
+ }
+
+ @Override
+ public void removeValueChangeListener(ValueChangeListener listener) {
+ super.removeValueChangeListener(listener);
+ }
+
+ @Override
+ public void setCaption(String caption) {
+ super.setCaption(caption);
+ }
+
+ @Override
+ public void setDescription(String description) {
+ super.setDescription(description);
+ }
+
+ @Override
+ public float getHeight() {
+ return super.getHeight();
+ }
+
+ @Override
+ public Unit getHeightUnits() {
+ return super.getHeightUnits();
+ }
+
+ @Override
+ public boolean isMultiSelected() {
+ return false;
+ }
+
+ @Override
+ public Object getValue() {
+ return super.getValue();
+ }
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/Cell2dTable.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/Cell2dTable.java
new file mode 100644
index 0000000..5916595
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/Cell2dTable.java
@@ -0,0 +1,195 @@
+/**
+ *
+ * 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.xtext.datamart.common.olap;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.eclipse.osbp.dsl.entity.xtext.util.PersistenceNamingUtils;
+import org.eclipse.osbp.ui.api.datamart.DerivedOlapException;
+
+/**
+ * Do not mistake {@link Cell2dTable} with {@link DerivedCellSet}!
+ * <ul>
+ * <li>{@link DerivedCellSet} corresponds to OLAP and Mondrian structure of data!</li>
+ * <li>{@link Cell2dTable} allows a 2d access to the data via <code>headers</code> and <code>rows</code>!</li>
+ * </ul>
+ */
+public class Cell2dTable {
+
+ private final DerivedCellSet fCellSet;
+ private final Map<Integer,HeaderMapping> fIndexToHeaderMap;
+ private final Map<String,HeaderMapping> fNameToHeaderMap;
+
+ public Cell2dTable(DerivedCellSet cellSet) throws DerivedOlapException {
+ fCellSet = cellSet;
+ fIndexToHeaderMap = new TreeMap<Integer,HeaderMapping>();
+ fNameToHeaderMap = new HashMap<String,HeaderMapping>();
+
+ if (cellSet == null) {
+ throw new DerivedOlapException("referenced datamart EmployeeSalary generates no results");
+ } else if (cellSet.getAxes().size() < 2) {
+ throw new DerivedOlapException("at least 2 axes from referenced datamart EmployeeSalary are needed to render EmployeeSalary");
+ } else {
+ try {
+ // --- first get the header for all "rows" ---
+ DerivedHierarchy hier = fCellSet.getAxes().get(DerivedAxis.AXIS_ROWS).getPositions().get(0).getMembers().get(0).getHierarchy();
+ if (hier != null) {
+ int count = 0;
+ for (DerivedLevel lev : hier.getLevels()) {
+ HeaderMapping headerMap = new HeaderMapping(
+ fIndexToHeaderMap.size(),
+ // see DatamartDSLJvmInferrer & ReportDSLJvmInferrer
+ PersistenceNamingUtils.camelCaseToUpperCase(lev.getName()).toLowerCase(),
+ DerivedAxis.AXIS_ROWS,
+ count);
+ fIndexToHeaderMap.put(headerMap.fHeaderIndex, headerMap);
+ fNameToHeaderMap.put(headerMap.fHeaderName, headerMap);
+ count++;
+ }
+ }
+ }
+ catch (DerivedOlapException oe) {
+ throw oe;
+ }
+ catch (Exception e) {
+ }
+
+ try {
+ // --- next get the header for all "columns" ---
+ // Column header
+ // See
+ // http://www.olap4j.org/api/index.html?org/olap4j/Position.html
+ // on how Position works, it helps a lot
+ // Every position will be a column in the header
+ int count = 0;
+ for (DerivedPosition pos : fCellSet.getAxes().get(DerivedAxis.AXIS_COLUMNS).getPositions()) {
+ // --- only use 1st member ---
+ HeaderMapping headerMap = new HeaderMapping(
+ fIndexToHeaderMap.size(),
+ // see DatamartDSLJvmInferrer & ReportDSLJvmInferrer
+ PersistenceNamingUtils.camelCaseToUpperCase(pos.getMembers().get(0).getCaption()).toLowerCase(),
+ DerivedAxis.AXIS_COLUMNS,
+ count);
+ fIndexToHeaderMap.put(headerMap.fHeaderIndex, headerMap);
+ fNameToHeaderMap.put(headerMap.fHeaderName, headerMap);
+ count++;
+ }
+ }
+ catch (Exception e) {
+ throw new DerivedOlapException(e.getLocalizedMessage());
+ }
+ }
+ }
+
+ private HeaderMapping header(int index) {
+ return fIndexToHeaderMap.get(index);
+ }
+
+ private HeaderMapping header(String name) {
+ // see DatamartDSLJvmInferrer & ReportDSLJvmInferrer
+ return fNameToHeaderMap.get(PersistenceNamingUtils.camelCaseToUpperCase(name).toLowerCase());
+ }
+
+ /**
+ * @return the count of headers
+ */
+ public int getHeaderCount() {
+ return fIndexToHeaderMap.size();
+ }
+
+ /**
+ * @param name
+ * @return the index of the header or -1 if it doesn't exist
+ */
+ public int getHeaderIndex(String name) {
+ HeaderMapping header = header(name);
+ return header == null ? -1 : header.fHeaderIndex;
+ }
+
+ /**
+ * @param index
+ * @return the name of the header or null if it doesn't exist
+ */
+ public String getHeaderName(int index) {
+ HeaderMapping header = header(index);
+ return header == null ? null : header.fHeaderName;
+ }
+
+ /**
+ * @return count of rows
+ */
+ public int getRowCount() {
+ return fCellSet.getAxes().get(DerivedAxis.AXIS_ROWS).getPositionCount();
+ }
+
+ /**
+ * <b>Do not mistake the position of <a>int headerIndex</a>/<a>int rowIndex</a> with <a>List<Integer> coordinate</a>!</b><br>
+ * This method gets the cell depending on the headerIndex as retrieved by {@link #getHeaderIndex(String)}!<br>
+ * <ul>
+ * <li>{@link #getCell(int, int)} is <u>analog</u> to {@link #getCell(String, int)}</li>
+ * <li>{@link #getCell(int, int)} is <u><b>not</b> analog</u> to {@link DerivedCellSet#getCell(List)}</li>
+ * </ul>
+ * @param headerIndex
+ * @param rowIndex
+ * @return
+ */
+ public DerivedCell getCell(int headerIndex, int rowIndex) {
+ return getCell(header(headerIndex), rowIndex);
+ }
+
+ /**
+ * <b>Do not mistake the position of <a>int headerName</a>/<a>int rowIndex</a> with <a>List<Integer> coordinate</a>!</b><br>
+ * This method gets the cell depending on the headerIndex as retrieved by {@link #getHeaderName(int)}!
+ * <ul>
+ * <li>{@link #getCell(String, int)} is <u>analog</u> to {@link #getCell(int, int)}</li>
+ * <li>{@link #getCell(String, int)} is <u><b>not</b> analog</u> to {@link DerivedCellSet#getCell(List)}</li>
+ * </ul>
+ * @param headerIndex
+ * @param rowIndex
+ * @return
+ */
+ public DerivedCell getCell(String headerName, int rowIndex) {
+ return getCell(header(headerName), rowIndex);
+ }
+
+ private DerivedCell getCell(HeaderMapping header, int rowIndex) {
+ DerivedCell result = null;
+ if (header != null) {
+ switch (header.fAxisNo) {
+ case DerivedAxis.AXIS_ROWS:
+ DerivedMember member = fCellSet.getAxes().get(DerivedAxis.AXIS_ROWS).getPositions().get(rowIndex).getMembers().get(0);
+ String[] tokens = member.getUniqueName().split("\\]\\.\\[");
+ if (header.fIndexOnAxis < tokens.length) {
+ String value = tokens[header.fIndexOnAxis+1].replace("[", "").replace("]", "");
+ result = new DerivedCell(value, value);
+ }
+ break;
+ case DerivedAxis.AXIS_COLUMNS:
+ ArrayList<Integer> list = new ArrayList<Integer>();
+ list.add(header.fIndexOnAxis); // coordinte
+ list.add(rowIndex); // coordinte
+ try {
+ result = fCellSet.getCell(list);
+ } catch (DerivedOlapException e) {
+ e.printStackTrace();
+ }
+ break;
+ }
+ }
+ return result;
+ }
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/CellSetToD3JsonConverter.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/CellSetToD3JsonConverter.java
new file mode 100644
index 0000000..472ac18
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/CellSetToD3JsonConverter.java
@@ -0,0 +1,145 @@
+/**
+ *
+ * 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.xtext.datamart.common.olap;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.osbp.ui.api.datamart.DerivedOlapException;
+
+import elemental.json.JsonFactory;
+import elemental.json.impl.JreJsonArray;
+import elemental.json.impl.JreJsonFactory;
+import elemental.json.impl.JreJsonObject;
+
+public class CellSetToD3JsonConverter {
+
+ private static final String KEY_CHILDREN="children";
+ private static final String KEY_NAME="name";
+ private static final String KEY_TOOLTIPNAME="tooltipName";
+ private static JsonFactory factory = new JreJsonFactory();
+
+ public static String getD3JsonString(DerivedCellSet cxCellSet) throws DerivedOlapException{
+ // generate a new result component
+ if (cxCellSet == null) {
+ return "";
+ }
+
+ ArrayList<Integer> coordinateSystem = new ArrayList<>();
+ // create a multidimensional coordinate system against the cellSet
+ for (int axis = 0; axis < cxCellSet.getAxes().size(); axis++) {
+ coordinateSystem.add(0);
+ }
+ List<Integer> coordinate = new ArrayList<>(coordinateSystem);
+ // add styles to page for the axis's custom styles
+ List<String> dataColumns = getDataColumnNameList(cxCellSet);
+
+ JreJsonArray jsonArrayStructure = new JreJsonArray(factory);
+
+ // for every data row
+ for (DerivedPosition rows : cxCellSet.getAxes().get(1).getPositions()) {
+ // row Data
+ coordinate.set(1, rows.getOrdinal());
+ // fill in the row members for the row axis
+ for (DerivedMember member : rows.getMembers()) {
+ JreJsonObject childrenListMap = new JreJsonObject(factory);
+ String[] tokens = member.getUniqueName().split("\\]\\.\\[");
+ LinkedList<String> tokenList = new LinkedList<>(Arrays.asList(tokens));
+ // create a concatenated name of all members for the data column
+ childrenListMap.put(KEY_TOOLTIPNAME, member.getUniqueName().replace("[", "").replace("]", "").replace(".", "-"));
+ // create a name from the last member for the data column
+ childrenListMap.put(KEY_NAME, tokenList.getLast().replace("[", "").replace("]", ""));
+ for (DerivedPosition columns : cxCellSet.getAxes().get(0).getPositions()) {
+ coordinate.set(0, columns.getOrdinal());
+ childrenListMap.put(dataColumns.get(columns.getOrdinal()), cxCellSet.getCell(coordinate).getFormattedValue());
+ }
+ // creation of a LinkedHashMap structure
+ createJsonMapStructure(jsonArrayStructure, tokenList, childrenListMap);
+ }
+ }
+ JreJsonObject jsonMap;
+ // to ensure that only exist one root node
+ if (jsonArrayStructure.length() > 0){
+ jsonMap = new JreJsonObject(factory);
+ jsonMap.put(KEY_NAME, "RootNode");
+ jsonMap.put(KEY_CHILDREN, jsonArrayStructure);
+ } else {
+ jsonMap = (JreJsonObject) jsonArrayStructure.get(0);
+ }
+ return jsonMap.toString();
+ }
+
+ public static List<String> getDataColumnNameList(DerivedCellSet cxCellSet) {
+ // create a table column for all data column
+ List<String> dataColumns = new LinkedList<>();
+ for (DerivedPosition columns : cxCellSet.getAxes().get(0).getPositions()) {
+ String title = null;
+ for (DerivedMember member : columns.getMembers()) {
+ if (title == null) {
+ title = member.getCaption();
+ }
+ else {
+ title += " "+member.getCaption();
+ }
+ }
+ dataColumns.add(title);
+ }
+ return dataColumns;
+ }
+
+ private static JreJsonArray createJsonMapStructure(JreJsonArray jsonArray, LinkedList<String> tokenList, JreJsonObject childrenListMap) {
+ String tokenStr = tokenList.get(0).replace("]", "").replace("[", "");
+ tokenList.removeFirst();
+ JreJsonArray jsonChildrenArray = null;
+ JreJsonObject jsonMap = null;
+ // if a jsonMap with the current tokenStr already exist, then no new jsonChildrenArray is created,
+ // but the existing jsonChildrenArray within the children key of the jsonMap is used.
+ for (int i=0; i < jsonArray.length(); i++) {
+ jsonMap = (JreJsonObject) jsonArray.get(i);
+ if (tokenStr.equals(jsonMap.get(KEY_NAME))) {
+ jsonChildrenArray = (JreJsonArray)jsonMap.get(KEY_CHILDREN);
+ break;
+ }
+ }
+
+ // only checking existing jsonChildrenArray,
+ // because jsonMap can be the last map of the jsonArray if exists.
+ // So if no jsonChildrenArray exist it has to be created with a new jsonMap.
+ if (jsonChildrenArray==null) {
+ jsonMap = new JreJsonObject(factory);
+ jsonMap.put(KEY_NAME, tokenStr);
+ jsonArray.set(jsonArray.length(), jsonMap);
+ jsonChildrenArray = new JreJsonArray(factory);
+ }
+ if (tokenList.size()==1){
+ JreJsonArray jsonRowsDataArray;
+ //check if children with JreJsonArray exist
+ if (jsonMap.hasKey(KEY_CHILDREN)){
+ jsonRowsDataArray = (JreJsonArray) jsonMap.get(KEY_CHILDREN);
+ } else {
+ jsonRowsDataArray = new JreJsonArray(factory);
+ }
+ jsonRowsDataArray.set(jsonArray.length(), childrenListMap);
+ jsonMap.put(KEY_CHILDREN, jsonRowsDataArray);
+ } else {
+ jsonChildrenArray = createJsonMapStructure(jsonChildrenArray, tokenList, childrenListMap);
+ jsonMap.put(KEY_CHILDREN, jsonChildrenArray);
+ }
+
+ return jsonArray;
+ }
+
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/DerivedAxis.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/DerivedAxis.java
new file mode 100644
index 0000000..b846ace
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/DerivedAxis.java
@@ -0,0 +1,173 @@
+/**
+ *
+ * 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.xtext.datamart.common.olap;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+
+import mondrian.olap.Axis;
+
+import org.jbpm.task.query.TaskSummary;
+import org.olap4j.CellSetAxis;
+
+
+public class DerivedAxis {
+ private DerivedCellSet container = null;
+ public static final int AXIS_COLUMNS = 0; // see Cellset javadoc
+ public static final int AXIS_ROWS = 1; // see Cellset javadoc
+
+ private CellSetAxis olapAxis = null;
+ private Axis mondrianAxis = null;
+ private List<TaskSummary> taskAxis = null;
+ private List<DerivedPosition> positionList = new ArrayList<>();
+ private Map<Integer, DerivedPosition> positionsByOrdinal = new HashMap<>();
+ private Map<DerivedPosition, Integer> ordinalsByPosition = new HashMap<>();
+ public DerivedAxis(CellSetAxis olapAxis, DerivedCellSet container) {
+ super();
+ this.container = container;
+ this.olapAxis = olapAxis;
+ for (org.olap4j.Position olapPosition : olapAxis.getPositions()) {
+ DerivedPosition pos = new DerivedPosition(olapPosition, container);
+ positionList.add(pos);
+ positionsByOrdinal.put(olapPosition.getOrdinal(), pos);
+ ordinalsByPosition.put(pos, olapPosition.getOrdinal());
+ }
+ }
+
+ public DerivedAxis(Axis mondrianAxis, DerivedCellSet container) {
+ super();
+ this.container = container;
+ this.mondrianAxis = mondrianAxis;
+ int ordinal = 0;
+ for (mondrian.olap.Position mondrianPosition : mondrianAxis.getPositions()) {
+ DerivedPosition pos = new DerivedPosition(mondrianPosition, ordinal, container);
+ positionList.add(pos);
+ positionsByOrdinal.put(ordinal, pos);
+ ordinalsByPosition.put(pos, ordinal);
+ ordinal++;
+ }
+ }
+
+ public DerivedAxis(List<TaskSummary> taskAxis, int axisNo, DerivedCellSet container) {
+ super();
+ this.container = container;
+ this.taskAxis = taskAxis;
+ int ordinal = 0;
+ if (axisNo == 0) {
+ DerivedPosition pos = new DerivedPosition("name", ordinal++, container);
+ positionList.add(pos);
+ positionsByOrdinal.put(ordinal, pos);
+ ordinalsByPosition.put(pos, ordinal);
+ pos = new DerivedPosition("priority", ordinal++, container);
+ positionList.add(pos);
+ positionsByOrdinal.put(ordinal, pos);
+ ordinalsByPosition.put(pos, ordinal);
+ pos = new DerivedPosition("status", ordinal++, container);
+ positionList.add(pos);
+ positionsByOrdinal.put(ordinal, pos);
+ ordinalsByPosition.put(pos, ordinal);
+ pos = new DerivedPosition("subject", ordinal++, container);
+ positionList.add(pos);
+ positionsByOrdinal.put(ordinal, pos);
+ ordinalsByPosition.put(pos, ordinal);
+ pos = new DerivedPosition("description", ordinal++, container);
+ positionList.add(pos);
+ positionsByOrdinal.put(ordinal, pos);
+ ordinalsByPosition.put(pos, ordinal);
+ pos = new DerivedPosition("expiration", ordinal++, container);
+ positionList.add(pos);
+ positionsByOrdinal.put(ordinal, pos);
+ ordinalsByPosition.put(pos, ordinal);
+ pos = new DerivedPosition("created", ordinal++, container);
+ positionList.add(pos);
+ positionsByOrdinal.put(ordinal, pos);
+ ordinalsByPosition.put(pos, ordinal);
+ pos = new DerivedPosition("created by", ordinal++, container);
+ positionList.add(pos);
+ positionsByOrdinal.put(ordinal, pos);
+ ordinalsByPosition.put(pos, ordinal);
+ pos = new DerivedPosition("activation", ordinal++, container);
+ positionList.add(pos);
+ positionsByOrdinal.put(ordinal, pos);
+ ordinalsByPosition.put(pos, ordinal);
+ pos = new DerivedPosition("owner", ordinal++, container);
+ positionList.add(pos);
+ positionsByOrdinal.put(ordinal, pos);
+ ordinalsByPosition.put(pos, ordinal);
+ pos = new DerivedPosition("taskid", ordinal++, container);
+ positionList.add(pos);
+ positionsByOrdinal.put(ordinal, pos);
+ ordinalsByPosition.put(pos, ordinal);
+ }
+ if (axisNo == 1) {
+ for (TaskSummary task : taskAxis) {
+ DerivedPosition pos = new DerivedPosition("row", ordinal++, container);
+ positionList.add(pos);
+ positionsByOrdinal.put(ordinal, pos);
+ ordinalsByPosition.put(pos, ordinal);
+ }
+ }
+ }
+
+ public List<DerivedPosition> getPositions() {
+ return positionList;
+ }
+
+ public int getPositionCount() {
+ if (olapAxis!=null){
+ return olapAxis.getPositionCount();
+ } else if (mondrianAxis!=null) {
+ return mondrianAxis.getPositions().size();
+ } else {
+ return positionList.size();
+ }
+ }
+
+ public ListIterator<DerivedPosition> iterator() {
+ return getPositions().listIterator();
+ }
+
+ public Map<Integer, DerivedPosition> getPositionsByOrdinal() {
+ return positionsByOrdinal;
+ }
+
+ public void setPositionsByOrdinal(Map<Integer, DerivedPosition> positionsByOrdinal) {
+ this.positionsByOrdinal = positionsByOrdinal;
+ }
+
+ public Map<DerivedPosition, Integer> getOrdinalsByPosition() {
+ return ordinalsByPosition;
+ }
+
+ public void setOrdinalsByPosition(Map<DerivedPosition, Integer> ordinalsByPosition) {
+ this.ordinalsByPosition = ordinalsByPosition;
+ }
+
+ public DerivedPosition getPositionByOrdinal(Integer ordinal) {
+ if (positionsByOrdinal.containsKey(ordinal)) {
+ return positionsByOrdinal.get(ordinal);
+ }
+ return null;
+ }
+
+ public int getOrdinalByPosition(DerivedPosition pos) {
+ if (ordinalsByPosition.containsKey(pos)) {
+ return ordinalsByPosition.get(pos);
+ }
+ return -1;
+ }
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/DerivedCell.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/DerivedCell.java
new file mode 100644
index 0000000..7894fbf
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/DerivedCell.java
@@ -0,0 +1,80 @@
+/**
+ *
+ * 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.xtext.datamart.common.olap;
+
+import org.eclipse.osbp.xtext.datamart.common.sql.SqlCell;
+
+import mondrian.olap.Cell;
+
+
+public class DerivedCell {
+
+ private org.olap4j.Cell olapCell;
+ private mondrian.olap.Cell mondrianCell;
+ private Object value = null;
+ private String formattedValue = "";
+
+ public DerivedCell(org.olap4j.Cell olapCell) {
+ this.olapCell = olapCell;
+ }
+
+ public DerivedCell(Cell mondrianCell) {
+ super();
+ this.mondrianCell = mondrianCell;
+ }
+
+ public DerivedCell(Object value, String formattedValue) {
+ super();
+ this.value = value;
+ this.formattedValue = formattedValue;
+ }
+
+ public Object getValue(){
+ if (olapCell!=null){
+ return olapCell.getValue();
+ } else if (mondrianCell!=null){
+ return mondrianCell.getValue();
+ } else {
+ return value;
+ }
+ }
+
+ public String getFormattedValue(){
+ if (olapCell!=null){
+ return olapCell.getFormattedValue();
+ } else if (mondrianCell!=null){
+ return mondrianCell.getFormattedValue();
+ } else {
+ return formattedValue;
+ }
+ }
+
+ public boolean isId() {
+ if (olapCell!=null){
+ if (olapCell instanceof SqlCell) {
+ return ((SqlCell)olapCell).isId();
+ }
+ }
+ return false;
+ }
+
+ public String getIdType() {
+ if (olapCell!=null){
+ if (olapCell instanceof SqlCell) {
+ return ((SqlCell)olapCell).getType().toString();
+ }
+ }
+ return "";
+ }
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/DerivedCellSet.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/DerivedCellSet.java
new file mode 100644
index 0000000..bafa401
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/DerivedCellSet.java
@@ -0,0 +1,241 @@
+/**
+ *
+ * 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.xtext.datamart.common.olap;
+
+import java.sql.ResultSetMetaData;
+import java.util.ArrayList;
+import java.util.List;
+
+import mondrian.olap.Result;
+
+import org.apache.commons.lang3.ArrayUtils;
+import org.eclipse.osbp.ui.api.datamart.DerivedOlapException;
+import org.eclipse.osbp.ui.api.metadata.IDSLMetadataService;
+import org.eclipse.osbp.ui.api.user.IUser;
+import org.eclipse.osbp.xtext.datamart.common.sql.OperativeDtoContainer;
+import org.eclipse.osbp.xtext.datamart.common.sql.SqlCellSet;
+import org.jbpm.task.query.TaskSummary;
+import org.olap4j.CellSet;
+import org.olap4j.CellSetAxis;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Do not mistake {@link Cell2dTable} with {@link DerivedCellSet}!
+ * <ul>
+ * <li>{@link DerivedCellSet} corresponds to OLAP and Mondrian structure of data!</li>
+ * <li>{@link Cell2dTable} allows a 2d access to the data via <code>headers</code> and <code>rows</code>!</li>
+ * </ul>
+ */
+public class DerivedCellSet{
+ private final static Logger cellLog = LoggerFactory.getLogger(DerivedCellSet.class);
+ private final ResultSetMetaData resultSetMetaData;
+
+ private CellSet olapCellset = null;
+ private Result mondrianCellset = null;
+ private List<TaskSummary> taskCellset = null;
+ private List<DerivedAxis> axisList = new ArrayList<DerivedAxis>();
+ private IDSLMetadataService dslMetadataService;
+ private IUser user;
+
+ public DerivedCellSet(CellSet olapCellset, ResultSetMetaData resultSetMetaData, IDSLMetadataService dslMetadataService, IUser user) {
+ super();
+ this.dslMetadataService = dslMetadataService;
+ this.user = user;
+ this.resultSetMetaData = resultSetMetaData;
+ this.olapCellset = olapCellset;
+ if (olapCellset != null) {
+ for (CellSetAxis olapAxis : olapCellset.getAxes()) {
+ axisList.add(new DerivedAxis(olapAxis, this));
+ }
+ }
+ }
+
+ public DerivedCellSet(Result mondrianCellset, IDSLMetadataService dslMetadataService, IUser user) {
+ super();
+ this.dslMetadataService = dslMetadataService;
+ this.user = user;
+ this.resultSetMetaData = null;
+ this.mondrianCellset = mondrianCellset;
+ if (mondrianCellset != null) {
+ for (int i = 0; i < mondrianCellset.getAxes().length; i++) {
+ axisList.add(new DerivedAxis(mondrianCellset.getAxes()[i], this));
+ }
+ }
+ }
+
+ public DerivedCellSet(List<TaskSummary> tasks, IDSLMetadataService dslMetadataService, IUser user) {
+ super();
+ this.dslMetadataService = dslMetadataService;
+ this.user = user;
+ this.resultSetMetaData = null;
+ this.taskCellset = tasks;
+ axisList.add(new DerivedAxis(tasks, 0, this));
+ axisList.add(new DerivedAxis(tasks, 1, this));
+ }
+
+ public OperativeDtoContainer getOperativeDtoContainer() {
+ if (olapCellset instanceof SqlCellSet) {
+ return ((SqlCellSet) olapCellset).getOperativeDtoContainer();
+ }
+ return null;
+ }
+
+ public ResultSetMetaData getResultSetMetaData() {
+ return resultSetMetaData;
+ }
+
+ public Object getInstance() {
+ if (olapCellset!=null){
+ return olapCellset;
+ } else if (mondrianCellset != null){
+ return mondrianCellset;
+ } else if (taskCellset != null) {
+ return taskCellset;
+ }
+ return null;
+ }
+
+ public List<DerivedAxis> getAxes(){
+ return axisList;
+ }
+
+ /**
+ * <b>Do not mistake the position of <a>List<Integer> coordinate</a> with <a>int headerName</a>/<a>int rowIndex</a>!</b><br>
+ * This method gets the cell as described in OLAP, Mondrian or the like!
+ * <ul>
+ * <li>{@link #getCell(List)} is <u><b>neither</b> analog</u> to {@link Cell2dTable#getCell(int, int)} <u><b>nor</b></u> to {@link Cell2dTable#getCell(String, int)}</li>
+ * <li>{@link Cell2dTable#getCell(int, int)} is <u>analog</u> to {@link Cell2dTable#getCell(String, int)}</li>
+ * </ul>
+ * @param headerIndex
+ * @param rowIndex
+ * @return
+ */
+ public DerivedCell getCell(List<Integer> coordinate) throws DerivedOlapException {
+ DerivedCell cxCell = null;
+ try {
+ if (olapCellset!=null){
+ cxCell = new DerivedCell(olapCellset.getCell(coordinate));
+ } else if (mondrianCellset != null){
+ cxCell = new DerivedCell(getMondrianCell(mondrianCellset,coordinate));
+ } else if (taskCellset != null) {
+ cxCell = new DerivedCell(getTaskCellValue(taskCellset,coordinate), getTaskCellFormattedValue(taskCellset,coordinate));
+ }
+ } catch (Exception e) {
+ cellLog.error(e.getLocalizedMessage());
+ }
+ return cxCell;
+ }
+
+ private mondrian.olap.Cell getMondrianCell(Result mondrianCellset, List<Integer> coordinate){
+ int[] coordinateArray = ArrayUtils.toPrimitive(coordinate
+ .toArray(new Integer[coordinate.size()]));
+ return mondrianCellset.getCell(coordinateArray);
+ }
+
+ private Object getTaskCellValue(List<TaskSummary> taskCellset, List<Integer> coordinate){
+ TaskSummary task = taskCellset.get(coordinate.get(1));
+ switch(coordinate.get(0)) {
+ case 0: return task.getName();
+ case 1: return task.getPriority();
+ case 2: return task.getStatus().ordinal();
+ case 3: return task.getSubject();
+ case 4: return task.getDescription();
+ case 5: return task.getExpirationTime();
+ case 6: return task.getCreatedOn();
+ case 7: return task.getCreatedBy();
+ case 8: return task.getActivationTime();
+ case 9: return task.getActualOwner();
+ case 10:return task.getId();
+ }
+ return null;
+ }
+
+ private String getTaskCellFormattedValue(List<TaskSummary> taskCellset, List<Integer> coordinate){
+ TaskSummary task = taskCellset.get(coordinate.get(1));
+ switch(coordinate.get(0)) {
+ case 0: return task.getName();
+ case 1:
+ return Integer.toString(task.getPriority());
+ case 2:
+ return task.getStatus().name();
+ case 3: return task.getSubject();
+ case 4: return task.getDescription();
+ case 5:
+ if (task.getExpirationTime() != null) {
+ return task.getExpirationTime().toString();
+ }
+ return null;
+ case 6:
+ if (task.getCreatedOn() != null) {
+ return task.getCreatedOn().toString();
+ }
+ return null;
+ case 7:
+ if (task.getCreatedBy() != null) {
+ return task.getCreatedBy().toString();
+ }
+ return null;
+ case 8:
+ if (task.getActivationTime() != null) {
+ return task.getActivationTime().toString();
+ }
+ return null;
+ case 9:
+ if (task.getActualOwner() != null) {
+ return task.getActualOwner().toString();
+ }
+ return null;
+ case 10:
+ if (task.getId() != -1) {
+ return Long.toString(task.getId());
+ }
+ return null;
+ }
+ return null;
+ }
+
+ public IDSLMetadataService getDSLMetadataService() {
+ return dslMetadataService;
+ }
+
+ public IUser getUser() {
+ return user;
+ }
+
+ public boolean idsMatch(DerivedCellSet other, List<Integer>coordinateSystem, int rowOrdinal) throws DerivedOlapException {
+ List<Integer> coordinates = new ArrayList<Integer>(coordinateSystem);
+ coordinates.set(1, rowOrdinal);
+ Object value = null;
+ Object otherValue = null;
+ for(DerivedPosition column: getAxes().get(0).getPositions()) { // search the columns
+ coordinates.set(0, column.getOrdinal());
+ if(getCell(coordinates).isId()) {
+ value = getCell(coordinates).getValue();
+ }
+ }
+ for(DerivedPosition column: other.getAxes().get(0).getPositions()) { // search the columns
+ coordinates.set(0, column.getOrdinal());
+ if(other.getCell(coordinates).isId()) {
+ otherValue = other.getCell(coordinates).getValue();
+ }
+ }
+ if (value == null && otherValue == null) {
+ return true; // there are no ids in table
+ }
+ if (value != null && otherValue != null && value.equals(otherValue)) {
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/DerivedHierarchy.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/DerivedHierarchy.java
new file mode 100644
index 0000000..9d06d27
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/DerivedHierarchy.java
@@ -0,0 +1,58 @@
+/**
+ *
+ * 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.xtext.datamart.common.olap;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.osbp.ui.api.datamart.DerivedOlapException;
+
+public class DerivedHierarchy {
+ private org.olap4j.metadata.Hierarchy olapHierarchy;
+ private mondrian.olap.Hierarchy mondrianHierarchy;
+ private DerivedOlapException cxOlapException = new DerivedOlapException("No Hierarchy found!!!!");
+
+ List<DerivedLevel> levelList = new ArrayList<DerivedLevel>();
+
+ public DerivedHierarchy(org.olap4j.metadata.Hierarchy olapHierarchy) {
+ this.olapHierarchy = olapHierarchy;
+ for (org.olap4j.metadata.Level olapLevel : olapHierarchy.getLevels()) {
+ levelList.add(new DerivedLevel(olapLevel));
+ }
+ }
+
+ public DerivedHierarchy(mondrian.olap.Hierarchy mondrianHierarchy) {
+ this.mondrianHierarchy = mondrianHierarchy;
+ for (mondrian.olap.Level mondrianLevel : mondrianHierarchy.getLevels()) {
+ levelList.add(new DerivedLevel(mondrianLevel));
+ }
+ }
+
+ public String getName() throws DerivedOlapException{
+ String name = "";
+ if (olapHierarchy!=null){
+ name = olapHierarchy.getName();
+ } else if (mondrianHierarchy!=null){
+ name = mondrianHierarchy.getName();
+ } else {
+ throw cxOlapException;
+ }
+ return name;
+ }
+
+ public List<DerivedLevel> getLevels(){
+ return levelList;
+
+ }
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/DerivedLevel.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/DerivedLevel.java
new file mode 100644
index 0000000..477a782
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/DerivedLevel.java
@@ -0,0 +1,38 @@
+/**
+ *
+ * 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.xtext.datamart.common.olap;
+
+public class DerivedLevel {
+ private org.olap4j.metadata.Level olapLevel;
+ private mondrian.olap.Level mondrianLevel;
+
+ public DerivedLevel(org.olap4j.metadata.Level olapLevel) {
+ this.olapLevel = olapLevel;
+ }
+
+ public DerivedLevel(mondrian.olap.Level mondrianLevel) {
+ this.mondrianLevel = mondrianLevel;
+ }
+
+ public String getName(){
+ String name = "";
+ if (olapLevel!=null){
+ name = olapLevel.getName();
+ } else if (mondrianLevel!=null){
+ name = mondrianLevel.getName();
+ }
+ return name;
+ }
+
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/DerivedMember.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/DerivedMember.java
new file mode 100644
index 0000000..d71a11e
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/DerivedMember.java
@@ -0,0 +1,84 @@
+/**
+ *
+ * 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.xtext.datamart.common.olap;
+
+import org.eclipse.osbp.ui.api.datamart.DerivedOlapException;
+
+public class DerivedMember {
+
+ private org.olap4j.metadata.Member olapMember = null;
+ private mondrian.olap.Member mondrianMember = null;
+ private String taskMember = null;
+ private DerivedOlapException cxOlapException = new DerivedOlapException("No Member found!!!!");
+
+ public DerivedMember(org.olap4j.metadata.Member olapMember) {
+ this.olapMember = olapMember;
+ }
+
+ public DerivedMember(mondrian.olap.Member mondrianMember) {
+ this.mondrianMember = mondrianMember;
+ }
+
+ public DerivedMember(String taskMember) {
+ this.taskMember = taskMember;
+ }
+
+ public String getUniqueName() {
+ String uniqueName = "";
+ if (olapMember != null) {
+ uniqueName = olapMember.getUniqueName();
+ } else if (mondrianMember != null) {
+ uniqueName = mondrianMember.getUniqueName();
+ } else if (taskMember != null) {
+ uniqueName = taskMember;
+ }
+ return uniqueName;
+ }
+
+ public String getCaption() {
+ String caption = "";
+ if (olapMember != null) {
+ caption = olapMember.getCaption();
+ } else if (mondrianMember != null) {
+ caption = mondrianMember.getCaption();
+ } else if (taskMember != null) {
+ caption = taskMember;
+ }
+ return caption;
+ }
+
+ public DerivedHierarchy getHierarchy() throws DerivedOlapException {
+ DerivedHierarchy hierarchy = null;
+ if (olapMember != null) {
+ hierarchy = new DerivedHierarchy(olapMember.getHierarchy());
+ } else if (mondrianMember != null) {
+ hierarchy = new DerivedHierarchy(mondrianMember.getHierarchy());
+ } else {
+ return null;
+ }
+ return hierarchy;
+ }
+
+ public DerivedLevel getLevel() {
+ DerivedLevel level = null;
+ if (olapMember != null) {
+ level = new DerivedLevel(olapMember.getLevel());
+ } else if (mondrianMember != null) {
+ level = new DerivedLevel(mondrianMember.getLevel());
+ } else {
+ return null;
+ }
+ return level;
+ }
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/DerivedPosition.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/DerivedPosition.java
new file mode 100644
index 0000000..6107494
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/DerivedPosition.java
@@ -0,0 +1,153 @@
+/**
+ *
+ * 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.xtext.datamart.common.olap;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Locale;
+
+import org.eclipse.osbp.ui.api.datamart.DerivedOlapException;
+
+import mondrian.olap.Member;
+
+
+
+public class DerivedPosition {
+ private DerivedCellSet container;
+ private org.olap4j.Position olapPosition = null;
+ private mondrian.olap.Position mondrianPosition = null;
+ private String taskPosition = null;
+ private List<DerivedMember> memberList = new ArrayList<DerivedMember>();
+ private int ordinal;
+
+ public DerivedPosition(org.olap4j.Position olapPosition, DerivedCellSet container) {
+ super();
+ setContainer(container);
+ this.olapPosition = olapPosition;
+ for (org.olap4j.metadata.Member olapMember : olapPosition.getMembers()) {
+ memberList.add(new DerivedMember(olapMember));
+ }
+ }
+ public DerivedPosition(mondrian.olap.Position mondrianPosition, int ordinal, DerivedCellSet container) {
+ super();
+ setContainer(container);
+ this.ordinal = ordinal;
+ this.mondrianPosition = mondrianPosition;
+ for (ListIterator<Member> iterator = mondrianPosition.listIterator();iterator.hasNext();) {
+ mondrian.olap.Member mondrianMember = (mondrian.olap.Member) iterator.next();
+ memberList.add(new DerivedMember(mondrianMember));
+ }
+ }
+
+ public DerivedCellSet getContainer() {
+ return container;
+ }
+ public void setContainer(DerivedCellSet container) {
+ this.container = container;
+ }
+ public DerivedPosition(String taskPosition, int ordinal, DerivedCellSet container) {
+ super();
+ setContainer(container);
+ this.ordinal = ordinal;
+ this.taskPosition = taskPosition;
+ memberList.add(new DerivedMember(taskPosition));
+ }
+
+ // dummy position
+ public DerivedPosition(List<DerivedMember> memberList, int ordinal, DerivedCellSet container) {
+ super();
+ setContainer(container);
+ this.ordinal = ordinal;
+ this.memberList = memberList;
+ }
+
+ public List<DerivedMember> getMembers(){
+ return memberList;
+ }
+
+ public int getOrdinal(){
+ if (olapPosition != null) {
+ return olapPosition.getOrdinal();
+ } else {
+ return ordinal;
+ }
+ }
+
+ private String getTranslatedColumnHeader(Locale locale) {
+ String hdr = getColumnHeader(true, locale);
+ if(hdr != null) {
+ return hdr.replace(" ", " ");
+ }
+ return hdr;
+ }
+
+ private String getColumnHeader() {
+ return getColumnHeader(false, null);
+ }
+
+ private String getColumnHeader(boolean withBreaks, Locale locale) {
+ String header = null;
+ for (DerivedMember member : getMembers()) {
+ String headerPart = "";
+ if (getOrdinal() < 0) {
+ List<String>colHeaders = new ArrayList<String>();
+ DerivedHierarchy hier = null;
+ try {
+ hier = member.getHierarchy();
+ } catch (DerivedOlapException e) {
+ e.printStackTrace();
+ }
+ if (hier != null) {
+ for(DerivedLevel lev : hier.getLevels()) {
+ if(locale != null) {
+ colHeaders.add(container.getDSLMetadataService().translate(locale.toLanguageTag(), lev.getName()));
+ } else {
+ colHeaders.add(lev.getName());
+ }
+ }
+ }
+ headerPart = colHeaders.get(-1*(getOrdinal()+1));
+ }
+ else {
+ if(locale != null) {
+ headerPart = container.getDSLMetadataService().translate(locale.toLanguageTag(), member.getCaption());
+ } else {
+ headerPart = member.getCaption();
+ }
+ }
+ if (header == null) {
+ header = headerPart;
+ } else {
+ if (withBreaks) {
+ headerPart = "<br>"+headerPart;
+ }
+ header += headerPart;
+ }
+ }
+ return header;
+ }
+
+ public String toString(Locale locale) {
+ return getTranslatedColumnHeader(locale);
+ }
+
+ public String toUnformattedString() {
+ return getColumnHeader();
+ }
+
+ public String toUppercaseString() {
+ return getColumnHeader().toUpperCase();
+ }
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/HeaderMapping.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/HeaderMapping.java
new file mode 100644
index 0000000..d425b7c
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/olap/HeaderMapping.java
@@ -0,0 +1,28 @@
+/**
+ *
+ * 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.xtext.datamart.common.olap;
+
+class HeaderMapping {
+
+ protected final int fHeaderIndex;
+ protected final String fHeaderName;
+ protected final int fAxisNo;
+ protected final int fIndexOnAxis;
+
+ protected HeaderMapping(int headerIndex, String headerName, int axisNo, int indexOnAxis) {
+ fHeaderIndex = headerIndex;
+ fHeaderName = headerName;
+ fAxisNo = axisNo;
+ fIndexOnAxis = indexOnAxis;
+ }
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/FillerTextResultSet.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/FillerTextResultSet.java
new file mode 100644
index 0000000..daf5bac
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/FillerTextResultSet.java
@@ -0,0 +1,1278 @@
+/**
+ *
+ * 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.xtext.datamart.common.sql;
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.math.BigDecimal;
+import java.net.URL;
+import java.sql.Array;
+import java.sql.Blob;
+import java.sql.Clob;
+import java.sql.Date;
+import java.sql.NClob;
+import java.sql.Ref;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.RowId;
+import java.sql.SQLException;
+import java.sql.SQLWarning;
+import java.sql.SQLXML;
+import java.sql.Statement;
+import java.sql.Time;
+import java.sql.Timestamp;
+import java.util.Calendar;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+
+import org.eclipse.osbp.xtext.datamart.common.AEntityDatamart;
+
+import org.eclipse.osbp.utils.fillertext.FillerTextProvider;
+
+public class FillerTextResultSet implements ResultSet {
+
+ private final AEntityDatamart fDatamartClass;
+ private final FillerTextProvider fProvider;
+ private final int fRowCount;
+ private final FillerTextResultSetMetaData fMetaData;
+ private int fRowPointer;
+ private Map<String,Object> fRowData;
+
+ public FillerTextResultSet(AEntityDatamart datamartClass, int minRowCount, int maxRowCount) {
+ fDatamartClass = datamartClass;
+ fMetaData = new FillerTextResultSetMetaData();
+ fRowPointer = -1;
+ int rowCount = 0;
+ FillerTextProvider provider = null;
+ try {
+ provider = FillerTextProvider.get(Locale.getDefault());
+ rowCount = provider.signedinteger(minRowCount, maxRowCount);
+ }
+ catch (Throwable e) { // NOSONAR - here we want to catch everything. If there is a problem with the translation we dont care.
+ System.err.println(e); // NOSONAR
+ }
+ fProvider = provider;
+ fRowCount = rowCount;
+ }
+
+ public void addColumn(String columnName, Class<?> columnClassName, String columnLabel, int columnType) {
+ fMetaData.addColumn(columnName, columnClassName, columnLabel, columnType);
+ }
+
+ @Override
+ public boolean isWrapperFor(Class<?> arg0) throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public <T> T unwrap(Class<T> arg0) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public boolean absolute(int row) throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public void afterLast() throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void beforeFirst() throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void cancelRowUpdates() throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void clearWarnings() throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void close() throws SQLException {
+ fRowPointer = fRowCount;
+ fRowData = null;
+ }
+
+ @Override
+ public void deleteRow() throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public int findColumn(String columnLabel) throws SQLException {
+ return fMetaData.findColumn(columnLabel);
+ }
+
+ @Override
+ public boolean first() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public Array getArray(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Array getArray(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public InputStream getAsciiStream(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public InputStream getAsciiStream(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
+ Object object = getObject(columnIndex);
+ return (object instanceof BigDecimal ? (BigDecimal)object : null);
+ }
+
+ @Override
+ public BigDecimal getBigDecimal(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public BigDecimal getBigDecimal(int columnIndex, int scale)
+ throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public BigDecimal getBigDecimal(String columnLabel, int scale)
+ throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public InputStream getBinaryStream(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public InputStream getBinaryStream(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Blob getBlob(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Blob getBlob(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public boolean getBoolean(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean getBoolean(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public byte getByte(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public byte getByte(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public byte[] getBytes(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public byte[] getBytes(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Reader getCharacterStream(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Reader getCharacterStream(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Clob getClob(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Clob getClob(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public int getConcurrency() throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public String getCursorName() throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Date getDate(int columnIndex) throws SQLException {
+ Object object = getObject(columnIndex);
+ if (object instanceof Date) {
+ return (Date)object;
+ }
+ if (object instanceof Timestamp) {
+ return new Date(((Timestamp)object).getTime());
+ }
+ return null;
+ }
+
+ @Override
+ public Date getDate(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Date getDate(int columnIndex, Calendar cal) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Date getDate(String columnLabel, Calendar cal) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public double getDouble(int columnIndex) throws SQLException {
+ Object object = getObject(columnIndex);
+ if (object instanceof Double) {
+ return (Double)object;
+ }
+ if (object instanceof BigDecimal) {
+ return ((BigDecimal)object).doubleValue();
+ }
+ return 0;
+ }
+
+ @Override
+ public double getDouble(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public int getFetchDirection() throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public int getFetchSize() throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public float getFloat(int columnIndex) throws SQLException {
+ Object object = getObject(columnIndex);
+ return (object instanceof Float ? (Float)object : 0);
+ }
+
+ @Override
+ public float getFloat(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public int getHoldability() throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public int getInt(int columnIndex) throws SQLException {
+ Object object = getObject(columnIndex);
+ return (object instanceof Integer ? (Integer)object : 0);
+ }
+
+ @Override
+ public int getInt(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public long getLong(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public long getLong(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public ResultSetMetaData getMetaData() throws SQLException {
+ return fMetaData;
+ }
+
+ @Override
+ public Reader getNCharacterStream(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Reader getNCharacterStream(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public NClob getNClob(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public NClob getNClob(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getNString(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getNString(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Object getObject(int columnIndex) throws SQLException {
+ return fRowData.get(fMetaData.getColumnLabel(columnIndex));
+ }
+
+ @Override
+ public Object getObject(String columnLabel) throws SQLException {
+ return fRowData.get(columnLabel);
+ }
+
+ @Override
+ public Object getObject(int columnIndex, Map<String, Class<?>> map)
+ throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Object getObject(String columnLabel, Map<String, Class<?>> map)
+ throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public <T> T getObject(String columnLabel, Class<T> type)
+ throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Ref getRef(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Ref getRef(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public int getRow() throws SQLException {
+ return fRowPointer;
+ }
+
+ @Override
+ public RowId getRowId(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public RowId getRowId(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public SQLXML getSQLXML(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public SQLXML getSQLXML(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public short getShort(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public short getShort(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public Statement getStatement() throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getString(int columnIndex) throws SQLException {
+ Object object = getObject(columnIndex);
+ return (object instanceof String ? (String)object : (object == null ? null : object.toString()));
+ }
+
+ @Override
+ public String getString(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Time getTime(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Time getTime(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Time getTime(int columnIndex, Calendar cal) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Time getTime(String columnLabel, Calendar cal) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Timestamp getTimestamp(int columnIndex) throws SQLException {
+ Object object = getObject(columnIndex);
+ return (object instanceof Timestamp ? (Timestamp)object : null);
+ }
+
+ @Override
+ public Timestamp getTimestamp(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Timestamp getTimestamp(int columnIndex, Calendar cal)
+ throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Timestamp getTimestamp(String columnLabel, Calendar cal)
+ throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public int getType() throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public URL getURL(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public URL getURL(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public InputStream getUnicodeStream(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public InputStream getUnicodeStream(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public SQLWarning getWarnings() throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public void insertRow() throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public boolean isAfterLast() throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean isBeforeFirst() throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean isClosed() throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean isFirst() throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean isLast() throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean last() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public void moveToCurrentRow() throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void moveToInsertRow() throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public boolean next() throws SQLException {
+ // --- reset the provider to receive new values ---
+ fProvider.reset();
+ fRowPointer++;
+ fRowData = fDatamartClass.generateFillerTextRow(fProvider);
+ return (fRowPointer < fRowCount);
+ }
+
+ @Override
+ public boolean previous() throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public void refreshRow() throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public boolean relative(int rows) throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean rowDeleted() throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean rowInserted() throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean rowUpdated() throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public void setFetchDirection(int direction) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void setFetchSize(int rows) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateArray(int columnIndex, Array x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateArray(String columnLabel, Array x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateAsciiStream(int columnIndex, InputStream x)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateAsciiStream(String columnLabel, InputStream x)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateAsciiStream(int columnIndex, InputStream x, int length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateAsciiStream(String columnLabel, InputStream x, int length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateAsciiStream(int columnIndex, InputStream x, long length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateAsciiStream(String columnLabel, InputStream x, long length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBigDecimal(int columnIndex, BigDecimal x)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBigDecimal(String columnLabel, BigDecimal x)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBinaryStream(int columnIndex, InputStream x)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBinaryStream(String columnLabel, InputStream x)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBinaryStream(int columnIndex, InputStream x, int length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBinaryStream(String columnLabel, InputStream x, int length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBinaryStream(int columnIndex, InputStream x, long length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBinaryStream(String columnLabel, InputStream x,
+ long length) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBlob(int columnIndex, Blob x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBlob(String columnLabel, Blob x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBlob(int columnIndex, InputStream inputStream)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBlob(String columnLabel, InputStream inputStream)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBlob(int columnIndex, InputStream inputStream, long length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBlob(String columnLabel, InputStream inputStream,
+ long length) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBoolean(int columnIndex, boolean x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBoolean(String columnLabel, boolean x)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateByte(int columnIndex, byte x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateByte(String columnLabel, byte x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBytes(int columnIndex, byte[] x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBytes(String columnLabel, byte[] x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateCharacterStream(int columnIndex, Reader x)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateCharacterStream(String columnLabel, Reader reader)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateCharacterStream(int columnIndex, Reader x, int length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateCharacterStream(String columnLabel, Reader reader,
+ int length) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateCharacterStream(int columnIndex, Reader x, long length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateCharacterStream(String columnLabel, Reader reader,
+ long length) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateClob(int columnIndex, Clob x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateClob(String columnLabel, Clob x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateClob(int columnIndex, Reader reader) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateClob(String columnLabel, Reader reader)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateClob(int columnIndex, Reader reader, long length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateClob(String columnLabel, Reader reader, long length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateDate(int columnIndex, Date x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateDate(String columnLabel, Date x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateDouble(int columnIndex, double x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateDouble(String columnLabel, double x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateFloat(int columnIndex, float x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateFloat(String columnLabel, float x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateInt(int columnIndex, int x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateInt(String columnLabel, int x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateLong(int columnIndex, long x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateLong(String columnLabel, long x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateNCharacterStream(int columnIndex, Reader x)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateNCharacterStream(String columnLabel, Reader reader)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateNCharacterStream(int columnIndex, Reader x, long length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateNCharacterStream(String columnLabel, Reader reader,
+ long length) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateNClob(int columnIndex, NClob nClob) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateNClob(String columnLabel, NClob nClob)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateNClob(int columnIndex, Reader reader) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateNClob(String columnLabel, Reader reader)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateNClob(int columnIndex, Reader reader, long length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateNClob(String columnLabel, Reader reader, long length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateNString(int columnIndex, String nString)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateNString(String columnLabel, String nString)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateNull(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateNull(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateObject(int columnIndex, Object x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateObject(String columnLabel, Object x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateObject(int columnIndex, Object x, int scaleOrLength)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateObject(String columnLabel, Object x, int scaleOrLength)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateRef(int columnIndex, Ref x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateRef(String columnLabel, Ref x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateRow() throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateRowId(int columnIndex, RowId x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateRowId(String columnLabel, RowId x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateSQLXML(int columnIndex, SQLXML xmlObject)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateSQLXML(String columnLabel, SQLXML xmlObject)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateShort(int columnIndex, short x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateShort(String columnLabel, short x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateString(int columnIndex, String x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateString(String columnLabel, String x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateTime(int columnIndex, Time x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateTime(String columnLabel, Time x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateTimestamp(int columnIndex, Timestamp x)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateTimestamp(String columnLabel, Timestamp x)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public boolean wasNull() throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/FillerTextResultSetMetaData.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/FillerTextResultSetMetaData.java
new file mode 100644
index 0000000..71c951a
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/FillerTextResultSetMetaData.java
@@ -0,0 +1,180 @@
+/**
+ *
+ * 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.xtext.datamart.common.sql;
+
+import java.sql.ResultSetMetaData;
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class FillerTextResultSetMetaData implements ResultSetMetaData {
+
+ private final Map<Integer,String> fColumnNames;
+ private final Map<Integer,Class<?>> fColumnClassNames;
+ private final Map<Integer,String> fColumnLabels;
+ private final Map<String,Integer> fColumnIndexForLabels;
+ private final Map<Integer,Integer> fColumnTypes;
+
+ public FillerTextResultSetMetaData() {
+ fColumnNames = new HashMap<>();
+ fColumnClassNames = new HashMap<>();
+ fColumnLabels = new HashMap<>();
+ fColumnIndexForLabels = new HashMap<>();
+ fColumnTypes = new HashMap<>();
+ }
+
+ @Override
+ public boolean isWrapperFor(Class<?> iface) throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public <T> T unwrap(Class<T> iface) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getCatalogName(int column) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getColumnClassName(int column) throws SQLException {
+ return fColumnClassNames.get(column).getCanonicalName();
+ }
+
+ @Override
+ public int getColumnCount() throws SQLException {
+ return fColumnNames.size();
+ }
+
+ @Override
+ public int getColumnDisplaySize(int column) throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public String getColumnLabel(int column) throws SQLException {
+ return fColumnLabels.get(column);
+ }
+
+ @Override
+ public String getColumnName(int column) throws SQLException {
+ return fColumnNames.get(column);
+ }
+
+ @Override
+ public int getColumnType(int column) throws SQLException {
+ return fColumnTypes.get(column);
+ }
+
+ @Override
+ public String getColumnTypeName(int column) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public int getPrecision(int column) throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public int getScale(int column) throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public String getSchemaName(int column) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getTableName(int column) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public boolean isAutoIncrement(int column) throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean isCaseSensitive(int column) throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean isCurrency(int column) throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean isDefinitelyWritable(int column) throws SQLException {
+ return false;
+ }
+
+ @Override
+ public int isNullable(int column) throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public boolean isReadOnly(int column) throws SQLException {
+ return true;
+ }
+
+ @Override
+ public boolean isSearchable(int column) throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean isSigned(int column) throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean isWritable(int column) throws SQLException {
+ return false;
+ }
+
+ public void addColumn(String columnName, Class<?> columnClassName, String columnLabel, int columnType) {
+ if (columnLabel == null) {
+ columnLabel = columnName;
+ }
+ int index = fColumnNames.size()+1;
+ fColumnNames.put(index, columnName);
+ fColumnClassNames.put(index, columnClassName);
+ fColumnLabels.put(index, columnLabel);
+ fColumnIndexForLabels.put(columnLabel, index);
+ fColumnTypes.put(index, columnType);
+ }
+
+ public int findColumn(String columnLabel) {
+ return fColumnIndexForLabels.get(columnLabel);
+ }
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/OperativeDtoContainer.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/OperativeDtoContainer.java
new file mode 100644
index 0000000..40abd47
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/OperativeDtoContainer.java
@@ -0,0 +1,117 @@
+/**
+ *
+ * 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.xtext.datamart.common.sql;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+import org.eclipse.osbp.dsl.common.datatypes.IDto;
+import org.eclipse.osbp.ui.api.datamart.IDataMart.EType;
+import org.eclipse.osbp.xtext.datamart.common.DatamartDtoMapper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class OperativeDtoContainer {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(OperativeDtoContainer.class);
+
+ private final String operativeDtoIdColumn;
+ private final EType operativeDtoIdDatatype;
+ private final Map<Object, IDto> operativeDtoIdsMap;
+
+ public OperativeDtoContainer() {
+ operativeDtoIdColumn = null;
+ operativeDtoIdDatatype = null;
+ operativeDtoIdsMap = new HashMap<>();
+ }
+
+ public OperativeDtoContainer(DatamartDtoMapper datamartDtoMapper, Class<?> operativeDtoClass, List<IDto> operativeDtos) {
+ operativeDtoIdsMap = new HashMap<>();
+ if ((operativeDtoClass != null) && datamartDtoMapper.contains(operativeDtoClass.getCanonicalName())) {
+ String dtoFqn = operativeDtoClass.getCanonicalName();
+ operativeDtoIdColumn = datamartDtoMapper.getEntityIdAliasName(dtoFqn);
+ operativeDtoIdDatatype = datamartDtoMapper.getEntityIdDataTypeClassName(dtoFqn);
+ try {
+ switch (operativeDtoIdDatatype) {
+ case INTEGER:
+ break;
+ case STRING:
+ break;
+ default:
+ throw new IllegalArgumentException("Column "+dtoFqn+"."+datamartDtoMapper.getEntityIdAttribute(dtoFqn)+" must be either int or String");
+ }
+ if (!operativeDtos.isEmpty()) {
+ String getterName = "get"+StringUtils.capitalize(datamartDtoMapper.getEntityIdAttribute(dtoFqn));
+ Method getter = operativeDtoClass.getMethod(getterName, (Class[]) null);
+ for (IDto dtoInstance : operativeDtos) {
+ switch (operativeDtoIdDatatype) {
+ case INTEGER:
+ operativeDtoIdsMap.put(new BigDecimal((Integer)getter.invoke(dtoInstance)), dtoInstance);
+ break;
+ case STRING:
+ operativeDtoIdsMap.put((String)getter.invoke(dtoInstance), dtoInstance);
+ break;
+ default:
+ }
+ }
+ }
+ }
+ catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
+ LOGGER.error(e.getLocalizedMessage(), e);
+ }
+ }
+ else {
+ operativeDtoIdDatatype = null;
+ operativeDtoIdColumn = null;
+ }
+// analyze columnaxis if contains operative dto object
+// if so get column label for operative dto id field
+// add all column values of operative dtos into ids set
+ }
+
+ public String getOperativeDtoIdColumn() {
+ return operativeDtoIdColumn;
+ }
+
+ public IDto getOperativeDtoForId(Object id) {
+ switch (operativeDtoIdDatatype) {
+ case INTEGER:
+ if (id instanceof BigDecimal) {
+ return operativeDtoIdsMap.get(id);
+ }
+ else if (id instanceof String) {
+ try {
+ id = ((String)id).split("\\.")[0];
+ return operativeDtoIdsMap.get(new BigDecimal(Long.parseLong((String)id)));
+ }
+ catch (Exception e) {
+ throw new IllegalArgumentException("id '"+id+"' must be INTEGER/BigDecimal or parseable STRING/String");
+ }
+ }
+ throw new IllegalArgumentException("id must be INTEGER/BigDecimal");
+ case STRING:
+ if (id instanceof String) {
+ return operativeDtoIdsMap.get(id);
+ }
+ throw new IllegalArgumentException("id must be STRING/String");
+ default:
+ }
+ return null;
+ }
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/SqlCell.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/SqlCell.java
new file mode 100644
index 0000000..3a6d205
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/SqlCell.java
@@ -0,0 +1,151 @@
+/**
+ *
+ * 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.xtext.datamart.common.sql;
+
+import java.math.BigDecimal;
+import java.sql.ResultSet;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.olap4j.AllocationPolicy;
+import org.olap4j.Cell;
+import org.olap4j.CellSet;
+import org.olap4j.OlapException;
+import org.olap4j.metadata.Property;
+
+import org.eclipse.osbp.ui.api.datamart.IDataMart.EType;
+
+public class SqlCell implements Cell {
+
+ private final CellSet fCellSet;
+ private final List<Integer> fCoordinate;
+ private final Object fValue;
+ private final String fFormatted;
+ private final boolean isId;
+ private final EType type;
+
+ public SqlCell(CellSet cellSet, int row, int column, Object value, String formatted, boolean isId, EType type) {
+ fCellSet = cellSet;
+ fCoordinate = new ArrayList<Integer>();
+ fCoordinate.add(column);
+ fCoordinate.add(row);
+ fValue = value;
+ fFormatted = formatted;
+ this.isId = isId;
+ this.type = type;
+ }
+
+ @Override
+ public CellSet getCellSet() {
+ return fCellSet;
+ }
+
+ @Override
+ public List<Integer> getCoordinateList() {
+ return fCoordinate;
+ }
+
+ @Override
+ public double getDoubleValue() throws OlapException {
+ if (fValue instanceof Double) {
+ return (Double)fValue;
+ }
+ else if (fValue instanceof Float) {
+ return (Float)fValue;
+ }
+ else if (fValue instanceof Long) {
+ return (Long)fValue;
+ }
+ else if (fValue instanceof Integer) {
+ return (Integer)fValue;
+ }
+ else if (fValue instanceof BigDecimal) {
+ return ((BigDecimal)fValue).doubleValue();
+ }
+ throw new OlapException("unsupported type conversion");
+ }
+
+ @Override
+ public String getFormattedValue() {
+ return fFormatted;
+ }
+
+ @Override
+ public Object getValue() {
+ // get rid of the missing bigdecimal implementation of filtertable
+ if (fValue instanceof BigDecimal) {
+ return ((BigDecimal)fValue).doubleValue();
+ }
+ return fValue;
+ }
+
+ /* ============== NOT NEEDED NOW ============== */
+
+ @Override
+ public ResultSet drillThrough() throws OlapException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getErrorText() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public int getOrdinal() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public Object getPropertyValue(Property arg0) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public boolean isEmpty() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean isError() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean isNull() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public void setValue(Object arg0, AllocationPolicy arg1, Object... arg2)
+ throws OlapException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public boolean isId() {
+ return isId;
+ }
+
+ public EType getType() {
+ return type;
+ }
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/SqlCellSet.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/SqlCellSet.java
new file mode 100644
index 0000000..38bbf38
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/SqlCellSet.java
@@ -0,0 +1,1734 @@
+/**
+ *
+ * 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.xtext.datamart.common.sql;
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.io.UnsupportedEncodingException;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.math.BigDecimal;
+import java.net.URL;
+import java.sql.Array;
+import java.sql.Blob;
+import java.sql.Clob;
+import java.sql.Date;
+import java.sql.NClob;
+import java.sql.Ref;
+import java.sql.ResultSet;
+import java.sql.RowId;
+import java.sql.SQLException;
+import java.sql.SQLWarning;
+import java.sql.SQLXML;
+import java.sql.Time;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.jbpm.task.query.TaskSummary;
+import org.olap4j.Cell;
+import org.olap4j.CellSet;
+import org.olap4j.CellSetAxis;
+import org.olap4j.CellSetMetaData;
+import org.olap4j.OlapException;
+import org.olap4j.OlapStatement;
+import org.olap4j.Position;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.commons.lang3.StringUtils;
+import org.eclipse.osbp.dsl.common.datatypes.IDto;
+import org.eclipse.osbp.utils.common.EntityUtils;
+import org.eclipse.osbp.ui.api.datamart.IDataMart.EType;
+import org.eclipse.osbp.xtext.datamart.common.DatamartDtoMapper;
+
+class TaskMetaInfo {
+ String type;
+ Integer ordinal;
+
+ TaskMetaInfo(String type, Integer ordinal) {
+ this.type = type;
+ this.ordinal = ordinal;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public Integer getOrdinal() {
+ return ordinal;
+ }
+
+ public void setOrdinal(Integer ordinal) {
+ this.ordinal = ordinal;
+ }
+}
+
+public class SqlCellSet implements CellSet {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(SqlCellSet.class);
+ private final List<Cell[]> fCells;
+ private final List<CellSetAxis> fAxes;
+ private final List<SqlCellSetAxis> sqlAxes;
+ private final Map<String, TaskMetaInfo> taskMetaData = new HashMap<String, TaskMetaInfo>() {{
+ put("Name", new TaskMetaInfo("String", 0));
+ put("Priority", new TaskMetaInfo("Integer", 1));
+ put("Status", new TaskMetaInfo("Integer", 2));
+ put("Subject", new TaskMetaInfo("String", 3));
+ put("Description", new TaskMetaInfo("String", 4));
+ put("ExpirationTime", new TaskMetaInfo("Date", 5));
+ put("CreatedOn", new TaskMetaInfo("Date", 6));
+ put("CreatedBy", new TaskMetaInfo("String", 7));
+ put("ActivationTime", new TaskMetaInfo("Date", 8));
+ put("ActualOwner", new TaskMetaInfo("String", 9));
+ put("TaskId", new TaskMetaInfo("Long", 10));
+ put("ProcessId", new TaskMetaInfo("String", 11));
+ put("ProcessInstanceId",new TaskMetaInfo("Long", 12));
+ put("ProcessSessionId", new TaskMetaInfo("Integer", 13));
+ }};
+
+ private OperativeDtoContainer operativeDtoContainer = null;
+
+ public SqlCellSet(List<TaskSummary> tasks, HashMap<Integer,ArrayList<String>> axisMap) {
+ fCells = new ArrayList<Cell[]>();
+ fAxes = new ArrayList<CellSetAxis>();
+ sqlAxes = new ArrayList<SqlCellSetAxis>();
+ int numColumns = taskMetaData.keySet().size();
+ if (!axisMap.keySet().isEmpty()) {
+ for (int axisNumber : axisMap.keySet()) {
+ SqlCellSetAxis sqlCellSetAxis = new SqlCellSetAxis(this, axisNumber);
+ if (axisNumber == 0) { // the columns axis
+ int ordinal = 0;
+ for (String columnLabel : axisMap.get(0)) {
+ sqlCellSetAxis.addPosition(axisNumber, ordinal, taskMetaData.get(columnLabel).getType(), columnLabel, columnLabel);
+ ordinal ++;
+ }
+ }
+ sqlAxes.add(sqlCellSetAxis);
+ }
+ }
+ else {
+ SqlCellSetAxis sqlCellSetAxis = new SqlCellSetAxis(this, 0);
+ int idx = 0;
+ for (String columnLabel : taskMetaData.keySet()) {
+ sqlCellSetAxis.addPosition(0, idx++, taskMetaData.get(columnLabel).getType(), columnLabel, columnLabel);
+ }
+ sqlAxes.add(sqlCellSetAxis);
+ }
+ // add a default row axis if none given
+ if (axisMap.keySet().size() < 2) {
+ SqlCellSetAxis sqlCellSetAxis = new SqlCellSetAxis(this, 1);
+ sqlAxes.add(sqlCellSetAxis);
+ }
+
+ if (numColumns > 0) {
+ int rowNo = 0;
+ for(TaskSummary task : tasks) {
+ Cell[] row = null;
+ if (!axisMap.keySet().isEmpty()) {
+ int numCols = axisMap.get(0).size();
+ row = new Cell[numCols];
+ }
+ else {
+ row = new Cell[numColumns];
+ }
+ String formattedValue;
+ Object value;
+ if (!axisMap.keySet().isEmpty()) {
+ for (int axisNumber : axisMap.keySet()) {
+ int ordinal = 0;
+ for (String columnLabel : axisMap.get(axisNumber)) {
+ formattedValue = getFormattedValue(task, columnLabel);
+ value = getValue(task, columnLabel);
+ if (axisMap.keySet().size() > 1 && axisMap.get(1).contains(columnLabel)) {
+ sqlAxes.get(1).addPosition(1, rowNo, columnLabel, formattedValue, formattedValue);
+ }
+ else {
+ row[ordinal] = new SqlCell(this, rowNo, ordinal, value, formattedValue, false, null);
+ ordinal ++;
+ }
+ }
+ }
+ }
+ else {
+ int colNo = 0;
+ for (String columnLabel : taskMetaData.keySet()) {
+ formattedValue = getFormattedValue(task, columnLabel);
+ value = getValue(task, columnLabel);
+ row[colNo] = new SqlCell(this, rowNo, colNo, value, formattedValue, false, null);
+ colNo ++;
+ }
+ }
+ if (axisMap.keySet().size() < 2) {
+ sqlAxes.get(1).addPosition(0, rowNo, "", "", "");
+ }
+ fCells.add(row);
+ rowNo++;
+ }
+ for(SqlCellSetAxis axis : sqlAxes) {
+ fAxes.add(axis);
+ }
+ }
+ }
+
+ private Object getValue(TaskSummary task, String column){
+ switch(column) {
+ case "Name": return task.getName()!=null ?task.getName():"";
+ case "Priority": return task.getPriority();
+ case "Status": return task.getStatus()!=null ? task.getStatus().ordinal() : 0;
+ case "Subject": return task.getSubject()!=null?task.getSubject():"";
+ case "Description": return task.getDescription()!=null?task.getDescription():"";
+ case "ExpirationTime": return task.getExpirationTime();
+ case "CreatedOn": return task.getCreatedOn();
+ case "CreatedBy": return task.getCreatedBy()!=null ? task.getCreatedBy().getId() : "";
+ case "ActivationTime": return task.getActivationTime();
+ case "ActualOwner": return task.getActualOwner()!= null ? task.getActualOwner().getId() : "";
+ case "TaskId": return task.getId();
+ case "ProcessId": return task.getProcessId();
+ case "ProcessInstanceId": return task.getProcessInstanceId();
+ case "ProcessSessionId": return task.getProcessSessionId();
+ default: return null;
+ }
+ }
+
+ private String getFormattedValue(TaskSummary task, String column){
+ switch(column) {
+ case "Name": return task.getName();
+ case "Priority":
+ return Integer.toString(task.getPriority());
+ case "Status":
+ return task.getStatus().name();
+ case "Subject": return task.getSubject();
+ case "Description": return task.getDescription();
+ case "ExpirationTime":
+ if (task.getExpirationTime() != null) {
+ return task.getExpirationTime().toString();
+ }
+ return null;
+ case "CreatedOn":
+ if (task.getCreatedOn() != null) {
+ return task.getCreatedOn().toString();
+ }
+ return null;
+ case "CreatedBy":
+ if (task.getCreatedBy() != null) {
+ return task.getCreatedBy().toString();
+ }
+ return null;
+ case "ActivationTime":
+ if (task.getActivationTime() != null) {
+ return task.getActivationTime().toString();
+ }
+ return null;
+ case "ActualOwner":
+ if (task.getActualOwner() != null) {
+ return task.getActualOwner().toString();
+ }
+ return null;
+ case "TaskId":
+ return Long.toString(task.getId());
+ case "ProcessId":
+ return task.getProcessId();
+ case "ProcessInstanceId":
+ return Long.toString(task.getProcessInstanceId());
+ case "ProcessSessionId":
+ return Integer.toString(task.getProcessSessionId());
+ default:
+ return null;
+ }
+
+ }
+
+ private boolean isId(String columnName, HashMap<String, EType> idMap) {
+ return idMap.keySet().iterator().hasNext() && columnName.equals(idMap.keySet().iterator().next());
+ }
+
+ private EType getType(String columnName, HashMap<String, EType> idMap) {
+ if(idMap.keySet().iterator().hasNext()) {
+ return idMap.get(idMap.keySet().iterator().next());
+ }
+ return null;
+ }
+
+
+ public SqlCellSet(ResultSet rs, HashMap<Integer,ArrayList<String>> axisMap, HashMap<String, EType> idMap, DatamartDtoMapper datamartDtoMapper, Class<?> operativeDtoClass, List<IDto> operativeDtos) {
+ operativeDtoContainer = null;
+ fCells = new ArrayList<>();
+ fAxes = new ArrayList<>();
+ sqlAxes = new ArrayList<SqlCellSetAxis>();
+ int numColumns = 0;
+ SqlCellSetAxis sqlCellSetAxis = null;
+ try {
+ numColumns = rs.getMetaData().getColumnCount();
+ } catch (SQLException e) {
+ LOGGER.error(e.getLocalizedMessage());
+ return;
+ }
+ try {
+ if (!axisMap.keySet().isEmpty()) {
+ for (int axisNumber : axisMap.keySet()) {
+ sqlCellSetAxis = new SqlCellSetAxis(this, axisNumber);
+ if (axisNumber == 0) { // the columns axis
+ int ordinal = 0;
+ for (String columnLabel : axisMap.get(0)) {
+ try {
+ int columnIdx = rs.findColumn(columnLabel);
+ sqlCellSetAxis.addPosition(axisNumber, ordinal, rs.getMetaData().getColumnClassName(columnIdx), rs.getMetaData().getColumnName(columnIdx), rs.getMetaData().getColumnLabel(columnIdx));
+ ordinal ++;
+ } catch (SQLException e) {}
+ }
+ }
+ sqlAxes.add(sqlCellSetAxis);
+ }
+ }
+ else {
+ sqlCellSetAxis = new SqlCellSetAxis(this, 0);
+ for (int idx=1; idx<=numColumns; idx++) {
+ sqlCellSetAxis.addPosition(0, idx-1, rs.getMetaData().getColumnClassName(idx), rs.getMetaData().getColumnName(idx), rs.getMetaData().getColumnLabel(idx));
+ }
+ sqlAxes.add(sqlCellSetAxis);
+ }
+
+ } catch (SQLException e) {
+ LOGGER.error(e.getLocalizedMessage());
+ return;
+ }
+ // add a default row axis if none given
+ if (axisMap.keySet().size() < 2) {
+ sqlCellSetAxis = new SqlCellSetAxis(this, 1);
+ sqlAxes.add(sqlCellSetAxis);
+ }
+
+ if (numColumns > 0) {
+ try {
+ int targetRowNo = 0;
+ while (rs.next()) {
+ if (operativeDtoContainer == null) {
+ operativeDtoContainer = new OperativeDtoContainer(datamartDtoMapper, operativeDtoClass, operativeDtos);
+ }
+ boolean displayRow = true;
+ if (operativeDtoContainer.getOperativeDtoIdColumn() != null) {
+ int columnIdx = rs.findColumn(operativeDtoContainer.getOperativeDtoIdColumn());
+ Object value = rs.getObject(columnIdx);
+ displayRow = (operativeDtoContainer.getOperativeDtoForId(value) != null);
+ }
+ if (displayRow) {
+ Cell[] row = null;
+ if (axisMap.keySet().size() > 1) {
+ int numCols = 0;
+ for (int idx=1; idx<=numColumns; idx++) {
+ String columnName = rs.getMetaData().getColumnName(idx).toLowerCase();
+ if (!axisMap.get(1).contains(columnName)) {
+ numCols ++;
+ }
+ }
+ row = new Cell[numCols];
+ }
+ else {
+ row = new Cell[numColumns];
+ }
+ int colNo = 0;
+ String formattedValue;
+ Object value;
+ if ( !axisMap.keySet().isEmpty() ) {
+ for (int axisNumber : axisMap.keySet()) {
+ int ordinal = 0;
+ for (String columnLabel : axisMap.get(axisNumber)) {
+ try {
+ int columnIdx = rs.findColumn(columnLabel);
+ formattedValue = getFormattedValue(rs, columnIdx);
+ value = rs.getObject(columnIdx);
+ if (axisMap.keySet().size() > 1 && axisMap.get(1).contains(columnLabel)) {
+ sqlAxes.get(1).addPosition(1, targetRowNo, columnLabel, formattedValue, formattedValue);
+ }
+ else {
+ row[ordinal] = new SqlCell(this, targetRowNo, ordinal, value, formattedValue, isId(columnLabel, idMap), getType(columnLabel, idMap));
+ ordinal ++;
+ }
+ } catch (SQLException e) {}
+ }
+ }
+ }
+ else {
+ for (int idx=1; idx<=numColumns; idx++) {
+ String columnLabel = rs.getMetaData().getColumnLabel(idx);
+ formattedValue = getFormattedValue(rs, idx);
+ value = rs.getObject(idx);
+ row[colNo] = new SqlCell(this, targetRowNo, colNo, value, formattedValue, isId(columnLabel, idMap), getType(columnLabel, idMap));
+ colNo ++;
+ }
+ }
+ if (axisMap.keySet().size() < 2) {
+ sqlAxes.get(1).addPosition(0, targetRowNo, "", "", "");
+ }
+ fCells.add(row);
+ targetRowNo++;
+ }
+ }
+ }
+ catch (SQLException e) {
+ LOGGER.error(e.getLocalizedMessage());
+ }
+ for(SqlCellSetAxis axis : sqlAxes) {
+ fAxes.add(axis);
+ }
+ }
+ }
+
+ public OperativeDtoContainer getOperativeDtoContainer() {
+ return operativeDtoContainer;
+ }
+
+ private String getFormattedValue(ResultSet rs, int idx) throws SQLException {
+ int type = rs.getMetaData().getColumnType(idx);
+ String formattedValue = "";
+ switch (type) {
+ case java.sql.Types.DATE:
+ case java.sql.Types.TIME:
+ case java.sql.Types.TIMESTAMP:
+ if (rs.getDate(idx)!=null) {
+ formattedValue = rs.getDate(idx).toString();
+ }
+ break;
+ case java.sql.Types.TINYINT:
+ case java.sql.Types.SMALLINT:
+ case java.sql.Types.INTEGER:
+ case java.sql.Types.BIGINT:
+ case java.sql.Types.BOOLEAN:
+ formattedValue = Integer.toString(rs.getInt(idx));
+ break;
+ case java.sql.Types.DECIMAL:
+ case java.sql.Types.NUMERIC:
+ case java.sql.Types.DOUBLE:
+ formattedValue = Double.toString(rs.getDouble(idx));
+ break;
+ case java.sql.Types.FLOAT:
+ formattedValue = Float.toString(rs.getFloat(idx));
+ break;
+ case java.sql.Types.CHAR:
+ case java.sql.Types.NCHAR:
+ case java.sql.Types.NVARCHAR:
+ case java.sql.Types.VARCHAR:
+ formattedValue = rs.getString(idx);
+ break;
+ case java.sql.Types.BLOB:
+ case java.sql.Types.CLOB:
+ case java.sql.Types.NCLOB:
+ formattedValue = "LOB";
+ break;
+ case java.sql.Types.DATALINK:
+ formattedValue = "DATALINK";
+ break;
+ case java.sql.Types.SQLXML:
+ formattedValue = "SQLXML";
+ break;
+ case java.sql.Types.ROWID:
+ RowId rowid = rs.getRowId(idx);
+ formattedValue = new String(rowid.getBytes());
+ break;
+
+ }
+ return formattedValue;
+ }
+
+ @Override
+ public List<CellSetAxis> getAxes() {
+ return fAxes;
+ }
+
+ @Override
+ public Cell getCell(List<Integer> position) {
+ try {
+ switch (fAxes.size()) {
+ case 2:
+ return fCells.
+ get(position.get(1))
+ [position.get(0)];
+ case 1:
+ case 3:
+ case 4:
+ case 5:
+ default:
+ return null;
+ }
+ }
+ catch (Exception e) {
+ LOGGER.error("SqlCellSet.getCell(): "+e.getClass().getSimpleName()+": "+e.getMessage());
+ }
+ return null;
+ }
+
+ /* ============== NOT NEEDED NOW ============== */
+
+ @Override
+ public boolean next() throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public void close() throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public boolean wasNull() throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public String getString(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public boolean getBoolean(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public byte getByte(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public short getShort(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public int getInt(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public long getLong(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public float getFloat(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public double getDouble(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public BigDecimal getBigDecimal(int columnIndex, int scale)
+ throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public byte[] getBytes(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Date getDate(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Time getTime(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Timestamp getTimestamp(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public InputStream getAsciiStream(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public InputStream getUnicodeStream(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public InputStream getBinaryStream(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getString(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public boolean getBoolean(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public byte getByte(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public short getShort(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public int getInt(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public long getLong(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public float getFloat(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public double getDouble(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public BigDecimal getBigDecimal(String columnLabel, int scale)
+ throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public byte[] getBytes(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Date getDate(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Time getTime(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Timestamp getTimestamp(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public InputStream getAsciiStream(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public InputStream getUnicodeStream(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public InputStream getBinaryStream(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public SQLWarning getWarnings() throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public void clearWarnings() throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public String getCursorName() throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Object getObject(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Object getObject(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public int findColumn(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public Reader getCharacterStream(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Reader getCharacterStream(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public BigDecimal getBigDecimal(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public boolean isBeforeFirst() throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean isAfterLast() throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean isFirst() throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean isLast() throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public void beforeFirst() throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void afterLast() throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public boolean first() throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean last() throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public int getRow() throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public boolean absolute(int row) throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean relative(int rows) throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean previous() throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public void setFetchDirection(int direction) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public int getFetchDirection() throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public void setFetchSize(int rows) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public int getFetchSize() throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public int getType() throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public int getConcurrency() throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public boolean rowUpdated() throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean rowInserted() throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean rowDeleted() throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public void updateNull(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBoolean(int columnIndex, boolean x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateByte(int columnIndex, byte x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateShort(int columnIndex, short x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateInt(int columnIndex, int x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateLong(int columnIndex, long x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateFloat(int columnIndex, float x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateDouble(int columnIndex, double x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBigDecimal(int columnIndex, BigDecimal x)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateString(int columnIndex, String x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBytes(int columnIndex, byte[] x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateDate(int columnIndex, Date x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateTime(int columnIndex, Time x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateTimestamp(int columnIndex, Timestamp x)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateAsciiStream(int columnIndex, InputStream x, int length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBinaryStream(int columnIndex, InputStream x, int length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateCharacterStream(int columnIndex, Reader x, int length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateObject(int columnIndex, Object x, int scaleOrLength)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateObject(int columnIndex, Object x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateNull(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBoolean(String columnLabel, boolean x)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateByte(String columnLabel, byte x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateShort(String columnLabel, short x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateInt(String columnLabel, int x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateLong(String columnLabel, long x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateFloat(String columnLabel, float x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateDouble(String columnLabel, double x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBigDecimal(String columnLabel, BigDecimal x)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateString(String columnLabel, String x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBytes(String columnLabel, byte[] x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateDate(String columnLabel, Date x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateTime(String columnLabel, Time x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateTimestamp(String columnLabel, Timestamp x)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateAsciiStream(String columnLabel, InputStream x, int length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBinaryStream(String columnLabel, InputStream x, int length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateCharacterStream(String columnLabel, Reader reader,
+ int length) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateObject(String columnLabel, Object x, int scaleOrLength)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateObject(String columnLabel, Object x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void insertRow() throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateRow() throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void deleteRow() throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void refreshRow() throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void cancelRowUpdates() throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void moveToInsertRow() throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void moveToCurrentRow() throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public Object getObject(int columnIndex, Map<String, Class<?>> map)
+ throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Ref getRef(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Blob getBlob(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Clob getClob(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Array getArray(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Object getObject(String columnLabel, Map<String, Class<?>> map)
+ throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Ref getRef(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Blob getBlob(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Clob getClob(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Array getArray(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Date getDate(int columnIndex, Calendar cal) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Date getDate(String columnLabel, Calendar cal) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Time getTime(int columnIndex, Calendar cal) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Time getTime(String columnLabel, Calendar cal) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Timestamp getTimestamp(int columnIndex, Calendar cal)
+ throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Timestamp getTimestamp(String columnLabel, Calendar cal)
+ throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public URL getURL(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public URL getURL(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public void updateRef(int columnIndex, Ref x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateRef(String columnLabel, Ref x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBlob(int columnIndex, Blob x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBlob(String columnLabel, Blob x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateClob(int columnIndex, Clob x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateClob(String columnLabel, Clob x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateArray(int columnIndex, Array x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateArray(String columnLabel, Array x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public RowId getRowId(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public RowId getRowId(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public void updateRowId(int columnIndex, RowId x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateRowId(String columnLabel, RowId x) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public int getHoldability() throws SQLException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public boolean isClosed() throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public void updateNString(int columnIndex, String nString)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateNString(String columnLabel, String nString)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateNClob(int columnIndex, NClob nClob) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateNClob(String columnLabel, NClob nClob)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public NClob getNClob(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public NClob getNClob(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public SQLXML getSQLXML(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public SQLXML getSQLXML(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public void updateSQLXML(int columnIndex, SQLXML xmlObject)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateSQLXML(String columnLabel, SQLXML xmlObject)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public String getNString(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getNString(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Reader getNCharacterStream(int columnIndex) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Reader getNCharacterStream(String columnLabel) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public void updateNCharacterStream(int columnIndex, Reader x, long length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateNCharacterStream(String columnLabel, Reader reader,
+ long length) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateAsciiStream(int columnIndex, InputStream x, long length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBinaryStream(int columnIndex, InputStream x, long length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateCharacterStream(int columnIndex, Reader x, long length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateAsciiStream(String columnLabel, InputStream x, long length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBinaryStream(String columnLabel, InputStream x,
+ long length) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateCharacterStream(String columnLabel, Reader reader,
+ long length) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBlob(int columnIndex, InputStream inputStream, long length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBlob(String columnLabel, InputStream inputStream,
+ long length) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateClob(int columnIndex, Reader reader, long length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateClob(String columnLabel, Reader reader, long length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateNClob(int columnIndex, Reader reader, long length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateNClob(String columnLabel, Reader reader, long length)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateNCharacterStream(int columnIndex, Reader x)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateNCharacterStream(String columnLabel, Reader reader)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateAsciiStream(int columnIndex, InputStream x)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBinaryStream(int columnIndex, InputStream x)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateCharacterStream(int columnIndex, Reader x)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateAsciiStream(String columnLabel, InputStream x)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBinaryStream(String columnLabel, InputStream x)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateCharacterStream(String columnLabel, Reader reader)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBlob(int columnIndex, InputStream inputStream)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateBlob(String columnLabel, InputStream inputStream)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateClob(int columnIndex, Reader reader) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateClob(String columnLabel, Reader reader)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateNClob(int columnIndex, Reader reader) throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updateNClob(String columnLabel, Reader reader)
+ throws SQLException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public <T> T getObject(String columnLabel, Class<T> type)
+ throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public <T> T unwrap(Class<T> iface) throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public boolean isWrapperFor(Class<?> iface) throws SQLException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public int coordinatesToOrdinal(List<Integer> arg0) {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public Cell getCell(int arg0) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Cell getCell(Position... arg0) {
+ if (arg0.length == 2) {
+ Position x = arg0[1];
+ Position y = arg0[0];
+ try {
+ switch (fAxes.size()) {
+ case 2:
+ try {
+ return fCells.get(x.getOrdinal())[y.getOrdinal()];
+ } catch (ArrayIndexOutOfBoundsException e) {
+ return null;
+ }
+ case 1:
+ case 3:
+ case 4:
+ case 5:
+ default:
+ return null;
+ }
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ else {
+ throw new IllegalArgumentException("only 2 dimensional axes are supported for now");
+ }
+ return null;
+ }
+
+ @Override
+ public CellSetAxis getFilterAxis() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public CellSetMetaData getMetaData() throws OlapException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public OlapStatement getStatement() throws SQLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public List<Integer> ordinalToCoordinates(int arg0) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/SqlCellSetAxis.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/SqlCellSetAxis.java
new file mode 100644
index 0000000..0ed030c
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/SqlCellSetAxis.java
@@ -0,0 +1,106 @@
+/**
+ *
+ * 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.xtext.datamart.common.sql;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.olap4j.Axis;
+import org.olap4j.CellSet;
+import org.olap4j.CellSetAxis;
+import org.olap4j.CellSetAxisMetaData;
+import org.olap4j.Position;
+import org.olap4j.metadata.Hierarchy;
+
+public class SqlCellSetAxis implements CellSetAxis {
+
+ private final CellSet fCellSet;
+ private final Axis fAxis;
+ private final List<Position> fPositions;
+ private Hierarchy fHierarchy;
+
+ public Hierarchy getHierarchy() {
+ return fHierarchy;
+ }
+
+ public SqlCellSetAxis(CellSet cellSet, int axisOrdinal) {
+ fCellSet = cellSet;
+ fAxis = Axis.Factory.forOrdinal(axisOrdinal);
+ fPositions = new ArrayList<Position>();
+ fHierarchy = null;
+ }
+
+ public SqlCellSetAxis(CellSet cellSet, int axisOrdinal, String type, String name, String label) {
+ this(cellSet, axisOrdinal);
+ addPosition(axisOrdinal, 0, type, name, label);
+ }
+
+ public void addPosition(int axis, int ordinal, String type, String name, String label) {
+ for (Position pos : fPositions){
+ if (pos.getOrdinal() == ordinal) {
+ if (axis == 1) { // the row values must be qualified for later decomposition
+ if (pos.getMembers().size() == 0) {
+ pos.getMembers().add(new SqlMember(type, "["+name+"]", label, fHierarchy));
+ }
+ else {
+ ((SqlMember)pos.getMembers().get(0)).appendLevel(type, name);
+ }
+ }
+ else {
+ pos.getMembers().add(new SqlMember(type, name, label, fHierarchy));
+ }
+ return;
+ }
+ }
+ if (fHierarchy == null) {
+ fHierarchy = new SqlHierarchy();
+ }
+ fPositions.add(new SqlPosition(ordinal, type, name, label, fHierarchy));
+ }
+
+ @Override
+ public Axis getAxisOrdinal() {
+ return fAxis;
+ }
+
+ @Override
+ public CellSet getCellSet() {
+ return fCellSet;
+ }
+
+ @Override
+ public int getPositionCount() {
+ return fPositions.size();
+ }
+
+ @Override
+ public List<Position> getPositions() {
+ return fPositions;
+ }
+
+ @Override
+ public ListIterator<Position> iterator() {
+ return getPositions().listIterator();
+ }
+
+ /* ============== NOT NEEDED NOW ============== */
+
+ @Override
+ public CellSetAxisMetaData getAxisMetaData() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/SqlHierarchy.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/SqlHierarchy.java
new file mode 100644
index 0000000..84bb2f5
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/SqlHierarchy.java
@@ -0,0 +1,109 @@
+/**
+ *
+ * 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.xtext.datamart.common.sql;
+
+import org.olap4j.OlapException;
+import org.olap4j.impl.ArrayNamedListImpl;
+import org.olap4j.metadata.Dimension;
+import org.olap4j.metadata.Hierarchy;
+import org.olap4j.metadata.Level;
+import org.olap4j.metadata.Member;
+import org.olap4j.metadata.NamedList;
+
+public class SqlHierarchy implements Hierarchy {
+
+ public final NamedList<Level> fLevels;
+
+ public SqlHierarchy(NamedList<Level> levels) {
+ fLevels = levels;
+ }
+
+ public SqlHierarchy() {
+ fLevels = new ArrayNamedListImpl<Level>() {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 3930932684980779699L;
+
+ @Override
+ public String getName(Object level) {
+ if (level instanceof Level) {
+ return ((Level)level).getName();
+ }
+ return null;
+ }
+ };
+ }
+
+ @Override
+ public String getCaption() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getDescription() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getName() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getUniqueName() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public boolean isVisible() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public Member getDefaultMember() throws OlapException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Dimension getDimension() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public NamedList<Level> getLevels() {
+ return fLevels;
+ }
+
+ @Override
+ public NamedList<Member> getRootMembers() throws OlapException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public boolean hasAll() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/SqlLevel.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/SqlLevel.java
new file mode 100644
index 0000000..8549c93
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/SqlLevel.java
@@ -0,0 +1,114 @@
+/**
+ *
+ * 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.xtext.datamart.common.sql;
+
+import java.util.List;
+
+import org.olap4j.OlapException;
+import org.olap4j.metadata.Dimension;
+import org.olap4j.metadata.Hierarchy;
+import org.olap4j.metadata.Level;
+import org.olap4j.metadata.Member;
+import org.olap4j.metadata.NamedList;
+import org.olap4j.metadata.Property;
+
+public class SqlLevel implements Level {
+ public String fName;
+
+ public SqlLevel(String name) {
+ fName = name;
+ }
+
+ public void setName(String fName) {
+ this.fName = fName;
+ }
+
+ @Override
+ public String getCaption() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getDescription() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getName() {
+ return fName;
+ }
+
+ @Override
+ public String getUniqueName() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public boolean isVisible() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public int getCardinality() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public int getDepth() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public Dimension getDimension() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Hierarchy getHierarchy() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Type getLevelType() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public List<Member> getMembers() throws OlapException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public NamedList<Property> getProperties() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public boolean isCalculated() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/SqlMember.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/SqlMember.java
new file mode 100644
index 0000000..66e0ee2
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/SqlMember.java
@@ -0,0 +1,225 @@
+/**
+ *
+ * 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.xtext.datamart.common.sql;
+
+import java.util.List;
+
+import org.olap4j.OlapException;
+import org.olap4j.mdx.ParseTreeNode;
+import org.olap4j.metadata.Dimension;
+import org.olap4j.metadata.Hierarchy;
+import org.olap4j.metadata.Level;
+import org.olap4j.metadata.Member;
+import org.olap4j.metadata.NamedList;
+import org.olap4j.metadata.Property;
+
+public class SqlMember implements Member {
+
+ private String fType;
+ private String fName;
+ private final String fCaption;
+ private Hierarchy fHierarchy;
+
+ public SqlMember(String type, String name, String label, Hierarchy hierarchy) {
+ fType = type;
+ fName = name;
+ fCaption = label;
+ fHierarchy = hierarchy;
+ for (Level level : fHierarchy.getLevels()) {
+ if (level.getName().equals(type)) {
+ return;
+ }
+ }
+ // if (fHierarchy.getLevels().size() == 0) {
+ // fHierarchy.getLevels().add(new SqlLevel("(All)"));
+ // }
+ fHierarchy.getLevels().add(new SqlLevel(type));
+ }
+
+ public void appendLevel(String type, String name) {
+ fName += ".[" + name + "]";
+ for (Level level : fHierarchy.getLevels()) {
+ if (level.getName().equals(type)) {
+ return;
+ }
+ }
+ fHierarchy.getLevels().add(new SqlLevel(type));
+ }
+
+ public void setName(String name) {
+ fName = name;
+ }
+
+ public void setType(String type) {
+ fType = type;
+ }
+
+ @Override
+ public String getCaption() {
+ return fCaption;
+ }
+
+ @Override
+ public String getDescription() {
+ return getCaption();
+ }
+
+ @Override
+ public String getName() {
+ return fName;
+ }
+
+ @Override
+ public String getUniqueName() {
+ return "[" + fType + "]." + getName();
+ }
+
+ /* ============== NOT NEEDED NOW ============== */
+
+ @Override
+ public boolean isVisible() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public List<Member> getAncestorMembers() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public int getChildMemberCount() throws OlapException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public NamedList<? extends Member> getChildMembers() throws OlapException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Member getDataMember() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public int getDepth() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public Dimension getDimension() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public ParseTreeNode getExpression() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Hierarchy getHierarchy() {
+ return fHierarchy;
+ }
+
+ @Override
+ public Level getLevel() {
+ return getHierarchy().getLevels().get(0);
+ }
+
+ @Override
+ public Type getMemberType() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public int getOrdinal() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public Member getParentMember() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public NamedList<Property> getProperties() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getPropertyFormattedValue(Property arg0) throws OlapException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Object getPropertyValue(Property arg0) throws OlapException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public int getSolveOrder() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public boolean isAll() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean isCalculated() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean isCalculatedInQuery() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean isChildOrEqualTo(Member arg0) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean isHidden() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public void setProperty(Property arg0, Object arg1) throws OlapException {
+ // TODO Auto-generated method stub
+
+ }
+}
diff --git a/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/SqlPosition.java b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/SqlPosition.java
new file mode 100644
index 0000000..8e385a4
--- /dev/null
+++ b/org.eclipse.osbp.xtext.datamart.common/src/org/eclipse/osbp/xtext/datamart/common/sql/SqlPosition.java
@@ -0,0 +1,54 @@
+/**
+ *
+ * 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.xtext.datamart.common.sql;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.olap4j.Position;
+import org.olap4j.metadata.Hierarchy;
+import org.olap4j.metadata.Member;
+
+public class SqlPosition implements Position {
+
+ private final int fOrdinal;
+ private final List<Member> fMembers;
+ private Hierarchy fHierarchy;
+
+ protected SqlPosition(int ordinal, String type, String name, String label, Hierarchy hierarchy) {
+ fOrdinal = ordinal;
+ fMembers = new ArrayList<>();
+ fHierarchy = hierarchy;
+ if (type.length()>0) {
+ fMembers.add(new SqlMember(type, "["+name+"]", label, fHierarchy));
+ }
+ }
+
+ public Hierarchy getHierarchy() {
+ return fHierarchy;
+ }
+
+ @Override
+ public List<Member> getMembers() {
+ return fMembers;
+ }
+
+ @Override
+ public int getOrdinal() {
+ return fOrdinal;
+ }
+
+ /* ============== NOT NEEDED NOW ============== */
+
+}
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..8a88564
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,95 @@
+<?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 implementation 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.xtext.datamart.common</groupId>
+ <artifactId>org.eclipse.osbp.xtext.datamart.common.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.xtext.datamart.common</module>
+ <module>org.eclipse.osbp.xtext.datamart.common.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_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>