diff --git a/.gitignore b/.gitignore
index 9154f4c..92322c4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,26 +1,2 @@
-# ---> Java
-# Compiled class file
-*.class
-
-# Log file
-*.log
-
-# BlueJ files
-*.ctxt
-
-# Mobile Tools for Java (J2ME)
-.mtj.tmp/
-
-# Package Files #
-*.jar
-*.war
-*.nar
-*.ear
-*.zip
-*.tar.gz
-*.rar
-
-# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
-hs_err_pid*
-replay_pid*
-
+.idea/
+target/
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..5bf6c0d
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,29 @@
+FROM maven:3-eclipse-temurin-21
+
+RUN apt-get update
+RUN apt-get install gpg -y
+
+ARG MAVEN_ACCOUNT_USR
+ARG MAVEN_ACCOUNT_PSW
+ARG REVISION
+ARG MAVEN_GPG_PASSPHRASE
+ARG MAVEN_GPG_KEYNAME
+ARG PROFILE
+ARG DEV_PROFILE_URL_DEPOSIT
+ARG DEV_PROFILE_URL
+ENV gpg_keyname=$MAVEN_GPG_KEYNAME
+ENV gpg_passphrase=$MAVEN_GPG_PASSPHRASE
+ENV server_username=$MAVEN_ACCOUNT_USR
+ENV server_password=$MAVEN_ACCOUNT_PSW
+
+COPY settings.xml /root/.m2/settings.xml
+COPY keypair.asc /tmp/keypair.asc
+RUN if [ "$PROFILE" = "ossrh" ]; then \
+ gpg --batch --import /tmp/keypair.asc; \
+ fi
+
+WORKDIR /build/
+
+COPY . .
+
+RUN mvn -Drevision=${REVISION} -DdevProfileUrlDeposit=${DEV_PROFILE_URL_DEPOSIT} -DdevProfileUrl=${DEV_PROFILE_URL} -P${PROFILE} clean deploy
\ No newline at end of file
diff --git a/Dockerfile.Sonar b/Dockerfile.Sonar
new file mode 100644
index 0000000..9eb6ccf
--- /dev/null
+++ b/Dockerfile.Sonar
@@ -0,0 +1,37 @@
+FROM maven:3-eclipse-temurin-21
+
+RUN apt-get update \
+ && apt-get install gpg -y \
+ && apt-get clean
+
+ARG MAVEN_ACCOUNT_USR
+ARG MAVEN_ACCOUNT_PSW
+ARG REVISION
+ARG MAVEN_GPG_PASSPHRASE
+ARG MAVEN_GPG_KEYNAME
+ARG PROFILE
+ARG DEV_PROFILE_URL_DEPOSIT
+ARG DEV_PROFILE_URL
+ARG ORACLE_URL
+ARG ORACLE_TOKEN
+ENV gpg_keyname=$MAVEN_GPG_KEYNAME
+ENV gpg_passphrase=$MAVEN_GPG_PASSPHRASE
+ENV server_username=$MAVEN_ACCOUNT_USR
+ENV server_password=$MAVEN_ACCOUNT_PSW
+
+COPY settings.xml /root/.m2/settings.xml
+COPY keypair.asc /tmp/keypair.asc
+RUN if [ "$PROFILE" = "ossrh" ]; then \
+ gpg --batch --import /tmp/keypair.asc; \
+ fi
+
+COPY oracle.local.cite.gr.crt $JAVA_HOME/conf/security
+RUN cd $JAVA_HOME/conf/security && keytool -cacerts -storepass changeit -noprompt -trustcacerts -importcert -alias oraclecert -file oracle.local.cite.gr.crt
+
+WORKDIR /build/
+
+COPY . .
+
+RUN mvn -Drevision=${REVISION} -DdevProfileUrlDeposit=${DEV_PROFILE_URL_DEPOSIT} -DdevProfileUrl=${DEV_PROFILE_URL} -P${PROFILE} clean install
+
+RUN mvn sonar:sonar -Dsonar.projectKey=OpenDMP:common-models -Dsonar.login=${ORACLE_TOKEN} -Dsonar.host.url=${ORACLE_URL} -Dsonar.projectName='OpenDMP common-models'
\ No newline at end of file
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..47b2a43
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019-2020 OpenAIRE AMKE
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
index 659d3d4..84b2f92 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1 @@
-# common-models
-
+The common-models module inlcudes the common dmp models
\ No newline at end of file
diff --git a/THIRD-PARTY-NOTICES.txt b/THIRD-PARTY-NOTICES.txt
new file mode 100644
index 0000000..1388417
--- /dev/null
+++ b/THIRD-PARTY-NOTICES.txt
@@ -0,0 +1,426 @@
+THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
+Do Not Translate or Localize
+
+This component uses third party material from the projects listed below.
+The original copyright notice and the license under which CITE
+received such third party material are set forth below. CITE
+reserves all other rights not expressly granted, whether by
+implication, estoppel or otherwise.
+
+In the event that we accidentally failed to list a required notice, please
+bring it to our attention. Post an issue or email us: reception@cite.gr
+
+1. spring-boot-starter-parent
+2. spring-boot-starter-web
+
+spring-boot-starter-parent NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) 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. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+=========================================
+END OF spring-boot-starter-parent NOTICES, INFORMATION, AND LICENSE
+
+spring-boot-starter-web NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) 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. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+=========================================
+END OF spring-boot-starter-web NOTICES, INFORMATION, AND LICENSE
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..3d9d175
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,168 @@
+
+
+ 4.0.0
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.7.4
+
+
+
+ gr.cite.opendmp
+ common-models
+ ${revision}
+ jar
+
+ OpenDMP Common Models
+ OpenDMP Common Models
+ https://code-repo.d4science.org/MaDgiK-CITE/common-models
+
+
+ MIT License
+ https://code-repo.d4science.org/MaDgiK-CITE/common-models/src/branch/master/LICENSE.txt
+ repo
+
+
+
+
+ CITE S.A.
+ maven-central@cite.gr
+ CITE S.A.
+ https://www.cite.gr
+
+
+
+ scm:git:git://code-repo.d4science.org
+ scm:git:ssh://code-repo.d4science.org
+ https://code-repo.d4science.org/MaDgiK-CITE/common-models
+
+
+
+ 1.0.0-SNAPSHOT
+ 21
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
+ 21
+
+
+
+
+
+
+
+ ossrh
+
+
+ ossrh
+ https://s01.oss.sonatype.org/content/repositories/snapshots
+
+
+ ossrh
+ https://s01.oss.sonatype.org/service/local/staging/deploy/maven2
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-install-plugin
+ 2.5.2
+
+ true
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ 3.2.2
+
+
+ javadoc-generation
+ package
+
+ jar
+
+
+ javadoc
+
+ gr/**
+
+
+ README.txt
+
+
+ false
+
+
+
+
+ sources-generation
+ package
+
+ jar
+
+
+ sources
+
+ gr/**
+
+
+ README.txt
+
+
+ false
+
+
+
+
+
+
+
+
+
+ dev
+
+
+ dev
+ Dev Profile
+ ${devProfileUrl}
+
+
+
+
+ dev
+ Dev Profile
+ ${devProfileUrlDeposit}
+
+
+
+
+
+
diff --git a/settings.xml b/settings.xml
new file mode 100644
index 0000000..bce5d32
--- /dev/null
+++ b/settings.xml
@@ -0,0 +1,23 @@
+
+
+
+ ossrh
+ ${server_username}
+ ${server_password}
+
+
+ dev
+ ${server_username}
+ ${server_password}
+
+
+
+
+ ossrh
+
+ ${gpg_passphrase}
+ ${gpg_keyname}
+
+
+
+
diff --git a/src/main/java/eu/eudat/commonmodels/enums/DmpAccessType.java b/src/main/java/eu/eudat/commonmodels/enums/DmpAccessType.java
new file mode 100644
index 0000000..3bae52e
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/enums/DmpAccessType.java
@@ -0,0 +1,29 @@
+package eu.eudat.commonmodels.enums;
+
+import com.fasterxml.jackson.annotation.JsonValue;
+
+import java.util.Map;
+
+public enum DmpAccessType implements EnumValueProvider {
+
+ Public((short) 0), Restricted((short) 1);
+
+ private final Short value;
+
+ DmpAccessType(Short value) {
+ this.value = value;
+ }
+
+ @Override
+ @JsonValue
+ public Short getValue() {
+ return value;
+ }
+
+ private static final Map map = EnumUtils.getEnumValueMap(DmpAccessType.class);
+
+ public static DmpAccessType of(Short i) {
+ return map.get(i);
+ }
+
+}
diff --git a/src/main/java/eu/eudat/commonmodels/enums/DmpUserRole.java b/src/main/java/eu/eudat/commonmodels/enums/DmpUserRole.java
new file mode 100644
index 0000000..aac7acf
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/enums/DmpUserRole.java
@@ -0,0 +1,32 @@
+package eu.eudat.commonmodels.enums;
+
+import com.fasterxml.jackson.annotation.JsonValue;
+
+import java.util.Map;
+
+public enum DmpUserRole implements EnumValueProvider {
+
+ Owner((short) 0),
+ User((short) 1),
+ DescriptionContributor((short) 2),
+ Reviewer((short) 3);
+
+ private final Short value;
+
+ DmpUserRole(Short value) {
+ this.value = value;
+ }
+
+ @Override
+ @JsonValue
+ public Short getValue() {
+ return value;
+ }
+
+ private static final Map map = EnumUtils.getEnumValueMap(DmpUserRole.class);
+
+ public static DmpUserRole of(Short i) {
+ return map.get(i);
+ }
+
+}
diff --git a/src/main/java/eu/eudat/commonmodels/enums/EnumUtils.java b/src/main/java/eu/eudat/commonmodels/enums/EnumUtils.java
new file mode 100644
index 0000000..6b3db66
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/enums/EnumUtils.java
@@ -0,0 +1,14 @@
+package eu.eudat.commonmodels.enums;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class EnumUtils {
+ public static & EnumValueProvider, EnumValue> Map getEnumValueMap(Class enumType){
+ HashMap map = new HashMap<>();
+ for (EnumType v : enumType.getEnumConstants()) {
+ map.put(v.getValue(), v);
+ }
+ return map;
+ }
+}
diff --git a/src/main/java/eu/eudat/commonmodels/enums/EnumValueProvider.java b/src/main/java/eu/eudat/commonmodels/enums/EnumValueProvider.java
new file mode 100644
index 0000000..b10d2fc
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/enums/EnumValueProvider.java
@@ -0,0 +1,8 @@
+package eu.eudat.commonmodels.enums;
+
+import com.fasterxml.jackson.annotation.JsonValue;
+
+public interface EnumValueProvider {
+ @JsonValue
+ T getValue();
+}
diff --git a/src/main/java/eu/eudat/commonmodels/enums/FieldType.java b/src/main/java/eu/eudat/commonmodels/enums/FieldType.java
new file mode 100644
index 0000000..6c8fe24
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/enums/FieldType.java
@@ -0,0 +1,62 @@
+package eu.eudat.commonmodels.enums;
+
+import com.fasterxml.jackson.annotation.JsonValue;
+
+import java.util.Map;
+
+public enum FieldType implements EnumValueProvider {
+ SELECT(Names.Select),
+ BOOLEAN_DECISION(Names.BooleanDecision),
+ RADIO_BOX(Names.RadioBox),
+ INTERNAL_ENTRIES_DMPS(Names.InternalEntitiesDmps),
+ INTERNAL_ENTRIES_DESCRIPTIONS(Names.InternalEntitiesDescriptions),
+ CHECK_BOX(Names.CheckBox),
+ FREE_TEXT(Names.FreeText),
+ TEXT_AREA(Names.TextArea),
+ RICH_TEXT_AREA(Names.RichTextarea),
+ UPLOAD(Names.Upload),
+ DATE_PICKER(Names.DatePicker),
+ TAGS(Names.Tags),
+ REFERENCE_TYPES(Names.ReferenceTypes),
+ DATASET_IDENTIFIER(Names.DatasetIdentifier),
+ CURRENCY(Names.Currency),
+ VALIDATION(Names.Validation);
+ private final String value;
+
+ public static class Names {
+ public static final String Select = "select";
+ public static final String BooleanDecision = "booleanDecision";
+ public static final String RadioBox = "radiobox";
+ public static final String InternalEntitiesDmps = "internalEntitiesDmps";
+ public static final String InternalEntitiesDescriptions = "internalEntitiesDescriptions";
+ public static final String CheckBox = "checkBox";
+ public static final String FreeText = "freetext";
+ public static final String TextArea = "textarea";
+ public static final String RichTextarea = "richTextarea";
+ public static final String Upload = "upload";
+ public static final String DatePicker = "datePicker";
+ public static final String Tags = "tags";
+ public static final String DatasetIdentifier = "datasetIdentifier";
+ public static final String Currency = "currency";
+ public static final String Validation = "validation";
+ public static final String ReferenceTypes = "referenceTypes";
+ }
+
+ FieldType(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ private static final Map map = EnumUtils.getEnumValueMap(FieldType.class);
+
+ public static FieldType of(String i) {
+ return map.get(i);
+ }
+
+
+}
+
diff --git a/src/main/java/eu/eudat/commonmodels/enums/FieldValidationType.java b/src/main/java/eu/eudat/commonmodels/enums/FieldValidationType.java
new file mode 100644
index 0000000..b22c9cf
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/enums/FieldValidationType.java
@@ -0,0 +1,30 @@
+package eu.eudat.commonmodels.enums;
+
+import com.fasterxml.jackson.annotation.JsonValue;
+
+import java.util.Map;
+
+public enum FieldValidationType implements EnumValueProvider {
+
+ None((short) 0),
+ Required((short) 1),
+ Url((short) 2);
+
+ private final Short value;
+
+ FieldValidationType(Short value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public Short getValue() {
+ return value;
+ }
+
+ private static final Map map = EnumUtils.getEnumValueMap(FieldValidationType.class);
+
+ public static FieldValidationType of(Short i) {
+ return map.get(i);
+ }
+
+}
diff --git a/src/main/java/eu/eudat/commonmodels/enums/ReferenceSourceType.java b/src/main/java/eu/eudat/commonmodels/enums/ReferenceSourceType.java
new file mode 100644
index 0000000..2081fd6
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/enums/ReferenceSourceType.java
@@ -0,0 +1,26 @@
+package eu.eudat.commonmodels.enums;
+
+import java.util.Map;
+
+public enum ReferenceSourceType implements EnumValueProvider {
+
+ Internal((short) 0),
+ External((short) 1);
+
+ private final Short value;
+
+ ReferenceSourceType(Short value) {
+ this.value = value;
+ }
+
+ @Override
+ public Short getValue() {
+ return value;
+ }
+
+ private static final Map map = EnumUtils.getEnumValueMap(ReferenceSourceType.class);
+
+ public static ReferenceSourceType of(Short i) {
+ return map.get(i);
+ }
+}
diff --git a/src/main/java/eu/eudat/commonmodels/models/DmpModel.java b/src/main/java/eu/eudat/commonmodels/models/DmpModel.java
new file mode 100644
index 0000000..2fac293
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/models/DmpModel.java
@@ -0,0 +1,129 @@
+package eu.eudat.commonmodels.models;
+
+import eu.eudat.commonmodels.enums.DmpAccessType;
+import eu.eudat.commonmodels.models.description.DescriptionModel;
+import eu.eudat.commonmodels.models.reference.ReferenceModel;
+
+import java.time.Instant;
+import java.util.UUID;
+import java.util.List;
+
+public class DmpModel {
+ private UUID id;
+ private short version;
+ private String label;
+ private String description;
+ private DmpAccessType accessType;
+ private List descriptions;
+ private List users;
+ private List references;
+ private FileEnvelopeModel pdfFile;
+ private FileEnvelopeModel rdaJsonFile;
+ private FileEnvelopeModel supportingFilesZip;
+ private String previousDOI;
+ private Instant finalizedAt;
+
+ public UUID getId() {
+ return id;
+ }
+
+ public void setId(UUID id) {
+ this.id = id;
+ }
+
+ public short getVersion() {
+ return version;
+ }
+
+ public void setVersion(short version) {
+ this.version = version;
+ }
+
+ public String getLabel() {
+ return label;
+ }
+
+ public void setLabel(String label) {
+ this.label = label;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public DmpAccessType getAccessType() {
+ return accessType;
+ }
+
+ public void setAccessType(DmpAccessType accessType) {
+ this.accessType = accessType;
+ }
+
+ public List getUsers() {
+ return users;
+ }
+
+ public void setUsers(List users) {
+ this.users = users;
+ }
+
+ public List getReferences() {
+ return references;
+ }
+
+ public void setReferences(List references) {
+ this.references = references;
+ }
+
+ public FileEnvelopeModel getPdfFile() {
+ return pdfFile;
+ }
+
+ public void setPdfFile(FileEnvelopeModel pdfFile) {
+ this.pdfFile = pdfFile;
+ }
+
+ public FileEnvelopeModel getRdaJsonFile() {
+ return rdaJsonFile;
+ }
+
+ public void setRdaJsonFile(FileEnvelopeModel rdaJsonFile) {
+ this.rdaJsonFile = rdaJsonFile;
+ }
+
+ public FileEnvelopeModel getSupportingFilesZip() {
+ return supportingFilesZip;
+ }
+
+ public void setSupportingFilesZip(FileEnvelopeModel supportingFilesZip) {
+ this.supportingFilesZip = supportingFilesZip;
+ }
+
+ public String getPreviousDOI() {
+ return previousDOI;
+ }
+
+ public void setPreviousDOI(String previousDOI) {
+ this.previousDOI = previousDOI;
+ }
+
+ public Instant getFinalizedAt() {
+ return finalizedAt;
+ }
+
+ public void setFinalizedAt(Instant finalizedAt) {
+ this.finalizedAt = finalizedAt;
+ }
+
+ public List getDescriptions() {
+ return descriptions;
+ }
+
+ public void setDescriptions(List descriptions) {
+ this.descriptions = descriptions;
+ }
+}
diff --git a/src/main/java/eu/eudat/commonmodels/models/DmpUserModel.java b/src/main/java/eu/eudat/commonmodels/models/DmpUserModel.java
new file mode 100644
index 0000000..4a05646
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/models/DmpUserModel.java
@@ -0,0 +1,24 @@
+package eu.eudat.commonmodels.models;
+
+import eu.eudat.commonmodels.enums.DmpUserRole;
+
+public class DmpUserModel {
+ private UserModel user;
+ private DmpUserRole role;
+
+ public UserModel getUser() {
+ return user;
+ }
+
+ public void setUser(UserModel user) {
+ this.user = user;
+ }
+
+ public DmpUserRole getRole() {
+ return role;
+ }
+
+ public void setRole(DmpUserRole role) {
+ this.role = role;
+ }
+}
diff --git a/src/main/java/eu/eudat/commonmodels/models/FileEnvelopeModel.java b/src/main/java/eu/eudat/commonmodels/models/FileEnvelopeModel.java
new file mode 100644
index 0000000..a3958f6
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/models/FileEnvelopeModel.java
@@ -0,0 +1,22 @@
+package eu.eudat.commonmodels.models;
+
+public class FileEnvelopeModel {
+ private String filename;
+ private byte[] file;
+
+ public String getFilename() {
+ return filename;
+ }
+
+ public void setFilename(String filename) {
+ this.filename = filename;
+ }
+
+ public byte[] getFile() {
+ return file;
+ }
+
+ public void setFile(byte[] file) {
+ this.file = file;
+ }
+}
diff --git a/src/main/java/eu/eudat/commonmodels/models/UserModel.java b/src/main/java/eu/eudat/commonmodels/models/UserModel.java
new file mode 100644
index 0000000..6721d3f
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/models/UserModel.java
@@ -0,0 +1,13 @@
+package eu.eudat.commonmodels.models;
+
+public class UserModel {
+ private String name;
+
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+
+}
diff --git a/src/main/java/eu/eudat/commonmodels/models/description/DescriptionModel.java b/src/main/java/eu/eudat/commonmodels/models/description/DescriptionModel.java
new file mode 100644
index 0000000..30a2538
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/models/description/DescriptionModel.java
@@ -0,0 +1,44 @@
+package eu.eudat.commonmodels.models.description;
+
+
+import eu.eudat.commonmodels.models.descriptiotemplate.DescriptionTemplateModel;
+
+public class DescriptionModel {
+ private String label;
+ private String description;
+ private DescriptionTemplateModel descriptionTemplate;
+
+ private PropertyDefinitionModel properties;
+
+ public String getLabel() {
+ return label;
+ }
+
+ public void setLabel(String label) {
+ this.label = label;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public PropertyDefinitionModel getProperties() {
+ return properties;
+ }
+
+ public void setProperties(PropertyDefinitionModel properties) {
+ this.properties = properties;
+ }
+
+ public DescriptionTemplateModel getDescriptionTemplate() {
+ return descriptionTemplate;
+ }
+
+ public void setDescriptionTemplate(DescriptionTemplateModel descriptionTemplate) {
+ this.descriptionTemplate = descriptionTemplate;
+ }
+}
diff --git a/src/main/java/eu/eudat/commonmodels/models/description/ExternalIdentifierModel.java b/src/main/java/eu/eudat/commonmodels/models/description/ExternalIdentifierModel.java
new file mode 100644
index 0000000..de25d7b
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/models/description/ExternalIdentifierModel.java
@@ -0,0 +1,24 @@
+package eu.eudat.commonmodels.models.description;
+
+public class ExternalIdentifierModel {
+
+ private String identifier;
+
+ private String type;
+
+ public String getIdentifier() {
+ return identifier;
+ }
+
+ public void setIdentifier(String identifier) {
+ this.identifier = identifier;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+}
diff --git a/src/main/java/eu/eudat/commonmodels/models/description/FieldModel.java b/src/main/java/eu/eudat/commonmodels/models/description/FieldModel.java
new file mode 100644
index 0000000..6ac889d
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/models/description/FieldModel.java
@@ -0,0 +1,59 @@
+package eu.eudat.commonmodels.models.description;
+
+import eu.eudat.commonmodels.models.reference.ReferenceModel;
+
+import java.time.Instant;
+import java.util.List;
+
+public class FieldModel {
+
+ private String textValue;
+
+ private List textListValue;
+
+ private Instant dateValue;
+
+ private List references;
+
+ private ExternalIdentifierModel externalIdentifier;
+
+ public String getTextValue() {
+ return textValue;
+ }
+
+ public void setTextValue(String textValue) {
+ this.textValue = textValue;
+ }
+
+ public List getTextListValue() {
+ return textListValue;
+ }
+
+ public void setTextListValue(List textListValue) {
+ this.textListValue = textListValue;
+ }
+
+ public Instant getDateValue() {
+ return dateValue;
+ }
+
+ public void setDateValue(Instant dateValue) {
+ this.dateValue = dateValue;
+ }
+
+ public List getReferences() {
+ return references;
+ }
+
+ public void setReferences(List references) {
+ this.references = references;
+ }
+
+ public ExternalIdentifierModel getExternalIdentifier() {
+ return externalIdentifier;
+ }
+
+ public void setExternalIdentifier(ExternalIdentifierModel externalIdentifier) {
+ this.externalIdentifier = externalIdentifier;
+ }
+}
diff --git a/src/main/java/eu/eudat/commonmodels/models/description/PropertyDefinitionFieldSetItemModel.java b/src/main/java/eu/eudat/commonmodels/models/description/PropertyDefinitionFieldSetItemModel.java
new file mode 100644
index 0000000..c67fa29
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/models/description/PropertyDefinitionFieldSetItemModel.java
@@ -0,0 +1,36 @@
+package eu.eudat.commonmodels.models.description;
+
+import java.util.Map;
+
+public class PropertyDefinitionFieldSetItemModel {
+
+ private Map fields;
+
+ private String comment;
+
+ private Integer ordinal;
+
+ public Map getFields() {
+ return fields;
+ }
+
+ public void setFields(Map fields) {
+ this.fields = fields;
+ }
+
+ public String getComment() {
+ return comment;
+ }
+
+ public void setComment(String comment) {
+ this.comment = comment;
+ }
+
+ public Integer getOrdinal() {
+ return ordinal;
+ }
+
+ public void setOrdinal(Integer ordinal) {
+ this.ordinal = ordinal;
+ }
+}
diff --git a/src/main/java/eu/eudat/commonmodels/models/description/PropertyDefinitionFieldSetModel.java b/src/main/java/eu/eudat/commonmodels/models/description/PropertyDefinitionFieldSetModel.java
new file mode 100644
index 0000000..bbbd445
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/models/description/PropertyDefinitionFieldSetModel.java
@@ -0,0 +1,16 @@
+package eu.eudat.commonmodels.models.description;
+
+import java.util.List;
+
+public class PropertyDefinitionFieldSetModel {
+
+ private List items;
+
+ public List getItems() {
+ return items;
+ }
+
+ public void setItems(List items) {
+ this.items = items;
+ }
+}
diff --git a/src/main/java/eu/eudat/commonmodels/models/description/PropertyDefinitionModel.java b/src/main/java/eu/eudat/commonmodels/models/description/PropertyDefinitionModel.java
new file mode 100644
index 0000000..67766f9
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/models/description/PropertyDefinitionModel.java
@@ -0,0 +1,16 @@
+package eu.eudat.commonmodels.models.description;
+
+import java.util.Map;
+
+public class PropertyDefinitionModel {
+ private Map fieldSets;
+
+ public Map getFieldSets() {
+ return fieldSets;
+ }
+
+ public void setFieldSets(Map fieldSets) {
+ this.fieldSets = fieldSets;
+ }
+}
+
diff --git a/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/DefinitionModel.java b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/DefinitionModel.java
new file mode 100644
index 0000000..aefc17a
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/DefinitionModel.java
@@ -0,0 +1,47 @@
+package eu.eudat.commonmodels.models.descriptiotemplate;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class DefinitionModel {
+
+ private List pages;
+
+ public List getPages() {
+ return pages;
+ }
+
+ public void setPages(List pages) {
+ this.pages = pages;
+ }
+
+
+ public List getAllField(){
+ List fieldEntities = new ArrayList<>();
+ if (this.getPages() != null){
+ for (PageModel pageModel: this.getPages()) {
+ fieldEntities.addAll(pageModel.getAllField());
+ }
+ }
+ return fieldEntities;
+ }
+
+ public List getAllFieldSets(){
+ List fieldSetsEntities = new ArrayList<>();
+ if (this.getPages() != null){
+ for (PageModel pageModel: this.getPages()) {
+ fieldSetsEntities.addAll(pageModel.getAllFieldSets());
+ }
+ }
+ return fieldSetsEntities;
+ }
+
+ public List getFieldSetById(String id) {
+ return this.getAllFieldSets().stream().filter(x-> id.equals(x.getId())).toList();
+ }
+
+ public List getFieldById(String id) {
+ return this.getAllField().stream().filter(x-> id.equals(x.getId())).toList();
+ }
+
+}
diff --git a/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/DescriptionTemplateModel.java b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/DescriptionTemplateModel.java
new file mode 100644
index 0000000..c0aa67c
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/DescriptionTemplateModel.java
@@ -0,0 +1,79 @@
+package eu.eudat.commonmodels.models.descriptiotemplate;
+
+
+import java.util.UUID;
+
+public class DescriptionTemplateModel {
+
+ private UUID id;
+
+ private String label;
+
+ private String description;
+
+ private UUID groupId;
+
+ private Short version;
+
+ private String language;
+
+ private DefinitionModel definition;
+
+ public UUID getId() {
+ return id;
+ }
+
+ public void setId(UUID id) {
+ this.id = id;
+ }
+
+ public String getLabel() {
+ return label;
+ }
+
+ public void setLabel(String label) {
+ this.label = label;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public UUID getGroupId() {
+ return groupId;
+ }
+
+ public void setGroupId(UUID groupId) {
+ this.groupId = groupId;
+ }
+
+ public Short getVersion() {
+ return version;
+ }
+
+ public void setVersion(Short version) {
+ this.version = version;
+ }
+
+ public String getLanguage() {
+ return language;
+ }
+
+ public void setLanguage(String language) {
+ this.language = language;
+ }
+
+ public DefinitionModel getDefinition() {
+ return definition;
+ }
+
+ public void setDefinition(DefinitionModel definition) {
+ this.definition = definition;
+ }
+}
+
+
diff --git a/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/FieldModel.java b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/FieldModel.java
new file mode 100644
index 0000000..5ec3916
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/FieldModel.java
@@ -0,0 +1,99 @@
+package eu.eudat.commonmodels.models.descriptiotemplate;
+
+import eu.eudat.commonmodels.enums.FieldValidationType;
+import eu.eudat.commonmodels.models.descriptiotemplate.fielddata.BaseFieldDataModel;
+
+import java.util.List;
+
+public class FieldModel {
+
+ private String id;
+
+ private Integer ordinal;
+
+ private String numbering;
+
+ private List schematics;
+
+ private String defaultValue;
+
+ private List visibilityRules;
+
+ private List validations;
+
+ private Boolean includeInExport;
+
+ private BaseFieldDataModel data;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public Integer getOrdinal() {
+ return ordinal;
+ }
+
+ public void setOrdinal(Integer ordinal) {
+ this.ordinal = ordinal;
+ }
+
+ public String getNumbering() {
+ return numbering;
+ }
+
+ public void setNumbering(String numbering) {
+ this.numbering = numbering;
+ }
+
+ public List getSchematics() {
+ return schematics;
+ }
+
+ public void setSchematics(List schematics) {
+ this.schematics = schematics;
+ }
+
+ public String getDefaultValue() {
+ return defaultValue;
+ }
+
+ public void setDefaultValue(String defaultValue) {
+ this.defaultValue = defaultValue;
+ }
+
+ public List getVisibilityRules() {
+ return visibilityRules;
+ }
+
+ public void setVisibilityRules(List visibilityRules) {
+ this.visibilityRules = visibilityRules;
+ }
+
+ public List getValidations() {
+ return validations;
+ }
+
+ public void setValidations(List validations) {
+ this.validations = validations;
+ }
+
+ public Boolean getIncludeInExport() {
+ return includeInExport;
+ }
+
+ public void setIncludeInExport(Boolean includeInExport) {
+ this.includeInExport = includeInExport;
+ }
+
+ public BaseFieldDataModel getData() {
+ return data;
+ }
+
+ public void setData(BaseFieldDataModel data) {
+ this.data = data;
+ }
+}
diff --git a/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/FieldSetModel.java b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/FieldSetModel.java
new file mode 100644
index 0000000..005acf2
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/FieldSetModel.java
@@ -0,0 +1,118 @@
+package eu.eudat.commonmodels.models.descriptiotemplate;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class FieldSetModel {
+
+ private String id;
+
+ private Integer ordinal;
+
+ private String numbering;
+
+ private String title;
+
+ private String description;
+
+ private String extendedDescription;
+
+ private String additionalInformation;
+
+ private MultiplicityModel multiplicity;
+
+ private Boolean hasCommentField;
+
+ private List fields;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public Integer getOrdinal() {
+ return ordinal;
+ }
+
+ public void setOrdinal(Integer ordinal) {
+ this.ordinal = ordinal;
+ }
+
+ public String getNumbering() {
+ return numbering;
+ }
+
+ public void setNumbering(String numbering) {
+ this.numbering = numbering;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getExtendedDescription() {
+ return extendedDescription;
+ }
+
+ public void setExtendedDescription(String extendedDescription) {
+ this.extendedDescription = extendedDescription;
+ }
+
+ public String getAdditionalInformation() {
+ return additionalInformation;
+ }
+
+ public void setAdditionalInformation(String additionalInformation) {
+ this.additionalInformation = additionalInformation;
+ }
+
+ public MultiplicityModel getMultiplicity() {
+ return multiplicity;
+ }
+
+ public void setMultiplicity(MultiplicityModel multiplicity) {
+ this.multiplicity = multiplicity;
+ }
+
+ public Boolean getHasCommentField() {
+ return hasCommentField;
+ }
+
+ public void setHasCommentField(Boolean hasCommentField) {
+ this.hasCommentField = hasCommentField;
+ }
+
+ public List getFields() {
+ return fields;
+ }
+
+ public void setFields(List fields) {
+ this.fields = fields;
+ }
+
+
+
+ public List getAllField() {
+ return this.getFields() == null ? new ArrayList<>() : this.getFields();
+ }
+
+ public List getFieldById(String id) {
+ return this.getAllField().stream().filter(x-> id.equals(x.getId())).toList();
+ }
+
+}
diff --git a/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/MultiplicityModel.java b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/MultiplicityModel.java
new file mode 100644
index 0000000..9541ed7
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/MultiplicityModel.java
@@ -0,0 +1,44 @@
+package eu.eudat.commonmodels.models.descriptiotemplate;
+
+public class MultiplicityModel {
+
+ private Integer min;
+
+ private Integer max;
+
+ private String placeholder;
+
+ private Boolean tableView;
+
+ public Integer getMin() {
+ return min;
+ }
+
+ public void setMin(Integer min) {
+ this.min = min;
+ }
+
+ public Integer getMax() {
+ return max;
+ }
+
+ public void setMax(Integer max) {
+ this.max = max;
+ }
+
+ public String getPlaceholder() {
+ return placeholder;
+ }
+
+ public void setPlaceholder(String placeholder) {
+ this.placeholder = placeholder;
+ }
+
+ public Boolean getTableView() {
+ return tableView;
+ }
+
+ public void setTableView(Boolean tableView) {
+ this.tableView = tableView;
+ }
+}
diff --git a/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/PageModel.java b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/PageModel.java
new file mode 100644
index 0000000..c4593ce
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/PageModel.java
@@ -0,0 +1,66 @@
+package eu.eudat.commonmodels.models.descriptiotemplate;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class PageModel {
+
+ private String id;
+
+ private Integer ordinal;
+
+ private String title;
+
+ private List sections;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public Integer getOrdinal() {
+ return ordinal;
+ }
+
+ public void setOrdinal(Integer ordinal) {
+ this.ordinal = ordinal;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public List getSections() {
+ return sections;
+ }
+
+ public void setSections(List sections) {
+ this.sections = sections;
+ }
+ public List getAllField(){
+ List fieldEntities = new ArrayList<>();
+ if (this.getSections() != null){
+ for (SectionModel sectionModel: this.getSections()) {
+ fieldEntities.addAll(sectionModel.getAllField());
+ }
+ }
+ return fieldEntities;
+ }
+
+ public List getAllFieldSets(){
+ List fieldSetsEntities = new ArrayList<>();
+ if (this.getSections() != null){
+ for (SectionModel sectionModel: this.getSections()) {
+ fieldSetsEntities.addAll(sectionModel.getAllFieldSets());
+ }
+ }
+ return fieldSetsEntities;
+ }
+}
diff --git a/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/RuleModel.java b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/RuleModel.java
new file mode 100644
index 0000000..69089af
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/RuleModel.java
@@ -0,0 +1,24 @@
+package eu.eudat.commonmodels.models.descriptiotemplate;
+
+public class RuleModel {
+
+ private String target;
+
+ private String value;
+
+ public String getTarget() {
+ return target;
+ }
+
+ public void setTarget(String target) {
+ this.target = target;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+}
diff --git a/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/SectionModel.java b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/SectionModel.java
new file mode 100644
index 0000000..0428f1e
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/SectionModel.java
@@ -0,0 +1,135 @@
+package eu.eudat.commonmodels.models.descriptiotemplate;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class SectionModel {
+
+ private String id;
+
+ private Integer ordinal;
+
+ private Boolean defaultVisibility;
+
+ private Boolean multiplicity;
+
+ private String numbering;
+
+ private String title;
+
+ private String description;
+
+ private String extendedDescription;
+
+ private List sections;
+
+ private List fieldSets;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public Integer getOrdinal() {
+ return ordinal;
+ }
+
+ public void setOrdinal(Integer ordinal) {
+ this.ordinal = ordinal;
+ }
+
+ public Boolean getDefaultVisibility() {
+ return defaultVisibility;
+ }
+
+ public void setDefaultVisibility(Boolean defaultVisibility) {
+ this.defaultVisibility = defaultVisibility;
+ }
+
+ public Boolean getMultiplicity() {
+ return multiplicity;
+ }
+
+ public void setMultiplicity(Boolean multiplicity) {
+ this.multiplicity = multiplicity;
+ }
+
+ public String getNumbering() {
+ return numbering;
+ }
+
+ public void setNumbering(String numbering) {
+ this.numbering = numbering;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getExtendedDescription() {
+ return extendedDescription;
+ }
+
+ public void setExtendedDescription(String extendedDescription) {
+ this.extendedDescription = extendedDescription;
+ }
+
+ public List getSections() {
+ return sections;
+ }
+
+ public void setSections(List sections) {
+ this.sections = sections;
+ }
+
+ public List getFieldSets() {
+ return fieldSets;
+ }
+
+ public void setFieldSets(List fieldSets) {
+ this.fieldSets = fieldSets;
+ }
+
+ public List getAllField(){
+ List fieldEntities = new ArrayList<>();
+ if (this.getFieldSets() != null){
+ for (FieldSetModel fieldSetModel: this.getFieldSets()) {
+ fieldEntities.addAll(fieldSetModel.getAllField());
+ }
+ }
+ if (this.getSections() != null){
+ for (SectionModel sectionModel: this.getSections()) {
+ fieldEntities.addAll(sectionModel.getAllField());
+ }
+ }
+ return fieldEntities;
+ }
+
+ public List getAllFieldSets(){
+ List fieldSetEntities = new ArrayList<>();
+ if (this.getFieldSets() != null){
+ fieldSetEntities.addAll(this.getFieldSets());
+ }
+ if (this.getSections() != null){
+ for (SectionModel sectionModel: this.getSections()) {
+ fieldSetEntities.addAll(sectionModel.getAllFieldSets());
+ }
+ }
+ return fieldSetEntities;
+ }
+}
diff --git a/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/fielddata/BaseFieldDataModel.java b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/fielddata/BaseFieldDataModel.java
new file mode 100644
index 0000000..79aa64b
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/fielddata/BaseFieldDataModel.java
@@ -0,0 +1,53 @@
+package eu.eudat.commonmodels.models.descriptiotemplate.fielddata;
+
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import eu.eudat.commonmodels.enums.FieldType;
+
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.PROPERTY,
+ property = "fieldType",
+ visible = true,
+ defaultImpl = LabelDataModel.class)
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = LabelDataModel.class, name = FieldType.Names.BooleanDecision),
+ @JsonSubTypes.Type(value = LabelAndMultiplicityDataModel.class, name = FieldType.Names.InternalEntitiesDescriptions),
+ @JsonSubTypes.Type(value = LabelAndMultiplicityDataModel.class, name = FieldType.Names.InternalEntitiesDmps),
+ @JsonSubTypes.Type(value = LabelDataModel.class, name = FieldType.Names.CheckBox),
+ @JsonSubTypes.Type(value = LabelDataModel.class, name = FieldType.Names.DatePicker),
+ @JsonSubTypes.Type(value = LabelDataModel.class, name = FieldType.Names.FreeText),
+ @JsonSubTypes.Type(value = ReferenceTypeDataModel.class, name = FieldType.Names.ReferenceTypes),
+ @JsonSubTypes.Type(value = RadioBoxDataModel.class, name = FieldType.Names.RadioBox),
+ @JsonSubTypes.Type(value = LabelDataModel.class, name = FieldType.Names.RichTextarea),
+ @JsonSubTypes.Type(value = LabelDataModel.class, name = FieldType.Names.Tags),
+ @JsonSubTypes.Type(value = LabelDataModel.class, name = FieldType.Names.TextArea),
+ @JsonSubTypes.Type(value = UploadDataModel.class, name = FieldType.Names.Upload),
+ @JsonSubTypes.Type(value = LabelDataModel.class, name = FieldType.Names.Validation),
+ @JsonSubTypes.Type(value = LabelDataModel.class, name = FieldType.Names.DatasetIdentifier),
+ @JsonSubTypes.Type(value = LabelDataModel.class, name = FieldType.Names.Currency),
+ @JsonSubTypes.Type(value = SelectDataModel.class, name = FieldType.Names.Select)
+})
+public abstract class BaseFieldDataModel {
+
+ private String label;
+
+ private FieldType fieldType;
+
+ public String getLabel() {
+ return label;
+ }
+
+ public void setLabel(String label) {
+ this.label = label;
+ }
+
+ public FieldType getFieldType() {
+ return fieldType;
+ }
+
+ public void setFieldType(FieldType fieldType) {
+ this.fieldType = fieldType;
+ }
+
+}
diff --git a/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/fielddata/LabelAndMultiplicityDataModel.java b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/fielddata/LabelAndMultiplicityDataModel.java
new file mode 100644
index 0000000..44965e3
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/fielddata/LabelAndMultiplicityDataModel.java
@@ -0,0 +1,13 @@
+package eu.eudat.commonmodels.models.descriptiotemplate.fielddata;
+
+public class LabelAndMultiplicityDataModel extends BaseFieldDataModel {
+ private Boolean multipleSelect;
+
+ public Boolean getMultipleSelect() {
+ return multipleSelect;
+ }
+
+ public void setMultipleSelect(Boolean multipleSelect) {
+ this.multipleSelect = multipleSelect;
+ }
+}
diff --git a/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/fielddata/LabelDataModel.java b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/fielddata/LabelDataModel.java
new file mode 100644
index 0000000..40d8ff7
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/fielddata/LabelDataModel.java
@@ -0,0 +1,5 @@
+package eu.eudat.commonmodels.models.descriptiotemplate.fielddata;
+
+public class LabelDataModel extends BaseFieldDataModel {
+
+}
diff --git a/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/fielddata/RadioBoxDataModel.java b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/fielddata/RadioBoxDataModel.java
new file mode 100644
index 0000000..3af14d8
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/fielddata/RadioBoxDataModel.java
@@ -0,0 +1,37 @@
+package eu.eudat.commonmodels.models.descriptiotemplate.fielddata;
+
+import java.util.List;
+
+public class RadioBoxDataModel extends BaseFieldDataModel {
+
+ private List options;
+
+ public List getOptions() {
+ return options;
+ }
+
+ public void setOptions(List options) {
+ this.options = options;
+ }
+
+ public static class RadioBoxOptionModel {
+ private String label;
+ private String value;
+
+ public String getLabel() {
+ return label;
+ }
+
+ public void setLabel(String label) {
+ this.label = label;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+ }
+}
diff --git a/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/fielddata/ReferenceTypeDataModel.java b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/fielddata/ReferenceTypeDataModel.java
new file mode 100644
index 0000000..846d918
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/fielddata/ReferenceTypeDataModel.java
@@ -0,0 +1,25 @@
+package eu.eudat.commonmodels.models.descriptiotemplate.fielddata;
+
+import eu.eudat.commonmodels.models.reference.ReferenceTypeModel;
+
+public class ReferenceTypeDataModel extends BaseFieldDataModel {
+ private Boolean multipleSelect;
+
+ private ReferenceTypeModel referenceType;
+
+ public Boolean getMultipleSelect() {
+ return multipleSelect;
+ }
+
+ public void setMultipleSelect(Boolean multipleSelect) {
+ this.multipleSelect = multipleSelect;
+ }
+
+ public ReferenceTypeModel getReferenceType() {
+ return referenceType;
+ }
+
+ public void setReferenceType(ReferenceTypeModel referenceType) {
+ this.referenceType = referenceType;
+ }
+}
diff --git a/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/fielddata/SelectDataModel.java b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/fielddata/SelectDataModel.java
new file mode 100644
index 0000000..4636de8
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/fielddata/SelectDataModel.java
@@ -0,0 +1,36 @@
+package eu.eudat.commonmodels.models.descriptiotemplate.fielddata;
+
+import java.util.List;
+
+public class SelectDataModel extends LabelAndMultiplicityDataModel {
+ private List options;
+
+ public List getOptions() {
+ return options;
+ }
+
+ public void setOptions(List options) {
+ this.options = options;
+ }
+
+ public static class OptionModel {
+ private String label;
+ private String value;
+
+ public String getLabel() {
+ return label;
+ }
+
+ public void setLabel(String label) {
+ this.label = label;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+ }
+}
diff --git a/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/fielddata/UploadDataModel.java b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/fielddata/UploadDataModel.java
new file mode 100644
index 0000000..72855e6
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/models/descriptiotemplate/fielddata/UploadDataModel.java
@@ -0,0 +1,36 @@
+package eu.eudat.commonmodels.models.descriptiotemplate.fielddata;
+
+import java.util.List;
+
+public class UploadDataModel extends BaseFieldDataModel {
+ private List types;
+
+ public List getTypes() {
+ return types;
+ }
+
+ public void setTypes(List types) {
+ this.types = types;
+ }
+
+ public static class UploadOptionModel {
+ private String label;
+ private String value;
+
+ public String getLabel() {
+ return label;
+ }
+
+ public void setLabel(String label) {
+ this.label = label;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+ }
+}
diff --git a/src/main/java/eu/eudat/commonmodels/models/reference/ReferenceDefinitionModel.java b/src/main/java/eu/eudat/commonmodels/models/reference/ReferenceDefinitionModel.java
new file mode 100644
index 0000000..a562826
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/models/reference/ReferenceDefinitionModel.java
@@ -0,0 +1,16 @@
+package eu.eudat.commonmodels.models.reference;
+
+import java.util.List;
+
+public class ReferenceDefinitionModel {
+ private List fields;
+
+ public List getFields() {
+ return fields;
+ }
+
+ public void setFields(List fields) {
+ this.fields = fields;
+ }
+
+}
diff --git a/src/main/java/eu/eudat/commonmodels/models/reference/ReferenceFieldModel.java b/src/main/java/eu/eudat/commonmodels/models/reference/ReferenceFieldModel.java
new file mode 100644
index 0000000..15563f4
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/models/reference/ReferenceFieldModel.java
@@ -0,0 +1,26 @@
+package eu.eudat.commonmodels.models.reference;
+
+public class ReferenceFieldModel {
+
+ private String code;
+ private String value;
+
+
+ public String getCode() {
+ return code;
+ }
+
+ public void setCode(String code) {
+ this.code = code;
+ }
+
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+}
diff --git a/src/main/java/eu/eudat/commonmodels/models/reference/ReferenceModel.java b/src/main/java/eu/eudat/commonmodels/models/reference/ReferenceModel.java
new file mode 100644
index 0000000..06ee27a
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/models/reference/ReferenceModel.java
@@ -0,0 +1,99 @@
+package eu.eudat.commonmodels.models.reference;
+
+import eu.eudat.commonmodels.enums.ReferenceSourceType;
+
+import java.util.UUID;
+
+public class ReferenceModel {
+
+ private UUID id;
+
+ private String label;
+
+ private ReferenceTypeModel type;
+
+ private String description;
+
+ private ReferenceDefinitionModel definition;
+
+ private String reference;
+
+ private String abbreviation;
+
+ private String source;
+
+ private ReferenceSourceType sourceType;
+
+ public UUID getId() {
+ return id;
+ }
+
+ public void setId(UUID id) {
+ this.id = id;
+ }
+
+ public String getLabel() {
+ return label;
+ }
+
+ public void setLabel(String label) {
+ this.label = label;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public ReferenceDefinitionModel getDefinition() {
+ return definition;
+ }
+
+ public void setDefinition(ReferenceDefinitionModel definition) {
+ this.definition = definition;
+ }
+
+ public String getReference() {
+ return reference;
+ }
+
+ public void setReference(String reference) {
+ this.reference = reference;
+ }
+
+ public String getAbbreviation() {
+ return abbreviation;
+ }
+
+ public void setAbbreviation(String abbreviation) {
+ this.abbreviation = abbreviation;
+ }
+
+ public String getSource() {
+ return source;
+ }
+
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ public ReferenceSourceType getSourceType() {
+ return sourceType;
+ }
+
+ public void setSourceType(ReferenceSourceType sourceType) {
+ this.sourceType = sourceType;
+ }
+
+ public ReferenceTypeModel getType() {
+ return type;
+ }
+
+ public void setType(ReferenceTypeModel type) {
+ this.type = type;
+ }
+}
+
diff --git a/src/main/java/eu/eudat/commonmodels/models/reference/ReferenceTypeModel.java b/src/main/java/eu/eudat/commonmodels/models/reference/ReferenceTypeModel.java
new file mode 100644
index 0000000..7cc708a
--- /dev/null
+++ b/src/main/java/eu/eudat/commonmodels/models/reference/ReferenceTypeModel.java
@@ -0,0 +1,36 @@
+package eu.eudat.commonmodels.models.reference;
+
+import java.util.UUID;
+
+public class ReferenceTypeModel {
+
+ private UUID id;
+
+ private String name;
+
+ private String code;
+
+ public UUID getId() {
+ return id;
+ }
+
+ public void setId(UUID id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getCode() {
+ return code;
+ }
+
+ public void setCode(String code) {
+ this.code = code;
+ }
+}