diff --git a/CHANGELOG.md b/CHANGELOG.md
index a08b31e..8bea81d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,13 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
# Changelog for org.gcube.spatial.data.gcube-sdi-suite
+## [v1.0.2-SNAPSHOT] - 2021-02-24
+-Introduced module sdi-plugins
+-Introduced module notifications-plugins
+-Introduced module dataminer-plugins
+-Introduced module images-plugins
+-Introduced module ckan-plugin
+
## [v1.0.1] - 2021-12-07
- Introduced cms-plugin-framework
- Introduced concessioni use case
diff --git a/ckan-plugin/CHANGELOG.md b/ckan-plugin/CHANGELOG.md
new file mode 100644
index 0000000..a3ab83d
--- /dev/null
+++ b/ckan-plugin/CHANGELOG.md
@@ -0,0 +1,8 @@
+This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+# Changelog for org.gcube.application.cms.ckan-plugin
+
+This library contains gcube-cms plugins for ckan materializations
+
+## [v1.0.0-SNAPSHOT] - 2022-02-24
+- First release
diff --git a/ckan-plugin/FUNDING.md b/ckan-plugin/FUNDING.md
new file mode 100644
index 0000000..9e48b94
--- /dev/null
+++ b/ckan-plugin/FUNDING.md
@@ -0,0 +1,26 @@
+# Acknowledgments
+
+The projects leading to this software have received funding from a series of European Union programmes including:
+
+- the Sixth Framework Programme for Research and Technological Development
+ - [DILIGENT](https://cordis.europa.eu/project/id/004260) (grant no. 004260).
+- the Seventh Framework Programme for research, technological development and demonstration
+ - [D4Science](https://cordis.europa.eu/project/id/212488) (grant no. 212488);
+ - [D4Science-II](https://cordis.europa.eu/project/id/239019) (grant no.239019);
+ - [ENVRI](https://cordis.europa.eu/project/id/283465) (grant no. 283465);
+ - [iMarine](https://cordis.europa.eu/project/id/283644) (grant no. 283644);
+ - [EUBrazilOpenBio](https://cordis.europa.eu/project/id/288754) (grant no. 288754).
+- the H2020 research and innovation programme
+ - [SoBigData](https://cordis.europa.eu/project/id/654024) (grant no. 654024);
+ - [PARTHENOS](https://cordis.europa.eu/project/id/654119) (grant no. 654119);
+ - [EGI-Engage](https://cordis.europa.eu/project/id/654142) (grant no. 654142);
+ - [ENVRI PLUS](https://cordis.europa.eu/project/id/654182) (grant no. 654182);
+ - [BlueBRIDGE](https://cordis.europa.eu/project/id/675680) (grant no. 675680);
+ - [PerformFISH](https://cordis.europa.eu/project/id/727610) (grant no. 727610);
+ - [AGINFRA PLUS](https://cordis.europa.eu/project/id/731001) (grant no. 731001);
+ - [DESIRA](https://cordis.europa.eu/project/id/818194) (grant no. 818194);
+ - [ARIADNEplus](https://cordis.europa.eu/project/id/823914) (grant no. 823914);
+ - [RISIS 2](https://cordis.europa.eu/project/id/824091) (grant no. 824091);
+ - [EOSC-Pillar](https://cordis.europa.eu/project/id/857650) (grant no. 857650);
+ - [Blue Cloud](https://cordis.europa.eu/project/id/862409) (grant no. 862409);
+ - [SoBigData-PlusPlus](https://cordis.europa.eu/project/id/871042) (grant no. 871042);
diff --git a/ckan-plugin/LICENSE.md b/ckan-plugin/LICENSE.md
new file mode 100644
index 0000000..3af0507
--- /dev/null
+++ b/ckan-plugin/LICENSE.md
@@ -0,0 +1,312 @@
+# European Union Public Licence V. 1.1
+
+
+EUPL © the European Community 2007
+
+
+This European Union Public Licence (the “EUPL”) applies to the Work or Software
+(as defined below) which is provided under the terms of this Licence. Any use of
+the Work, other than as authorised under this Licence is prohibited (to the
+extent such use is covered by a right of the copyright holder of the Work).
+
+The Original Work is provided under the terms of this Licence when the Licensor
+(as defined below) has placed the following notice immediately following the
+copyright notice for the Original Work:
+
+Licensed under the EUPL V.1.1
+
+or has expressed by any other mean his willingness to license under the EUPL.
+
+
+
+## 1. Definitions
+
+In this Licence, the following terms have the following meaning:
+
+- The Licence: this Licence.
+
+- The Original Work or the Software: the software distributed and/or
+ communicated by the Licensor under this Licence, available as Source Code and
+ also as Executable Code as the case may be.
+
+- Derivative Works: the works or software that could be created by the Licensee,
+ based upon the Original Work or modifications thereof. This Licence does not
+ define the extent of modification or dependence on the Original Work required
+ in order to classify a work as a Derivative Work; this extent is determined by
+ copyright law applicable in the country mentioned in Article 15.
+
+- The Work: the Original Work and/or its Derivative Works.
+
+- The Source Code: the human-readable form of the Work which is the most
+ convenient for people to study and modify.
+
+- The Executable Code: any code which has generally been compiled and which is
+ meant to be interpreted by a computer as a program.
+
+- The Licensor: the natural or legal person that distributes and/or communicates
+ the Work under the Licence.
+
+- Contributor(s): any natural or legal person who modifies the Work under the
+ Licence, or otherwise contributes to the creation of a Derivative Work.
+
+- The Licensee or “You”: any natural or legal person who makes any usage of the
+ Software under the terms of the Licence.
+
+- Distribution and/or Communication: any act of selling, giving, lending,
+ renting, distributing, communicating, transmitting, or otherwise making
+ available, on-line or off-line, copies of the Work or providing access to its
+ essential functionalities at the disposal of any other natural or legal
+ person.
+
+
+
+## 2. Scope of the rights granted by the Licence
+
+The Licensor hereby grants You a world-wide, royalty-free, non-exclusive,
+sub-licensable licence to do the following, for the duration of copyright vested
+in the Original Work:
+
+- use the Work in any circumstance and for all usage, reproduce the Work, modify
+- the Original Work, and make Derivative Works based upon the Work, communicate
+- to the public, including the right to make available or display the Work or
+- copies thereof to the public and perform publicly, as the case may be, the
+- Work, distribute the Work or copies thereof, lend and rent the Work or copies
+- thereof, sub-license rights in the Work or copies thereof.
+
+Those rights can be exercised on any media, supports and formats, whether now
+known or later invented, as far as the applicable law permits so.
+
+In the countries where moral rights apply, the Licensor waives his right to
+exercise his moral right to the extent allowed by law in order to make effective
+the licence of the economic rights here above listed.
+
+The Licensor grants to the Licensee royalty-free, non exclusive usage rights to
+any patents held by the Licensor, to the extent necessary to make use of the
+rights granted on the Work under this Licence.
+
+
+
+## 3. Communication of the Source Code
+
+The Licensor may provide the Work either in its Source Code form, or as
+Executable Code. If the Work is provided as Executable Code, the Licensor
+provides in addition a machine-readable copy of the Source Code of the Work
+along with each copy of the Work that the Licensor distributes or indicates, in
+a notice following the copyright notice attached to the Work, a repository where
+the Source Code is easily and freely accessible for as long as the Licensor
+continues to distribute and/or communicate the Work.
+
+
+
+## 4. Limitations on copyright
+
+Nothing in this Licence is intended to deprive the Licensee of the benefits from
+any exception or limitation to the exclusive rights of the rights owners in the
+Original Work or Software, of the exhaustion of those rights or of other
+applicable limitations thereto.
+
+
+
+## 5. Obligations of the Licensee
+
+The grant of the rights mentioned above is subject to some restrictions and
+obligations imposed on the Licensee. Those obligations are the following:
+
+Attribution right: the Licensee shall keep intact all copyright, patent or
+trademarks notices and all notices that refer to the Licence and to the
+disclaimer of warranties. The Licensee must include a copy of such notices and a
+copy of the Licence with every copy of the Work he/she distributes and/or
+communicates. The Licensee must cause any Derivative Work to carry prominent
+notices stating that the Work has been modified and the date of modification.
+
+Copyleft clause: If the Licensee distributes and/or communicates copies of the
+Original Works or Derivative Works based upon the Original Work, this
+Distribution and/or Communication will be done under the terms of this Licence
+or of a later version of this Licence unless the Original Work is expressly
+distributed only under this version of the Licence. The Licensee (becoming
+Licensor) cannot offer or impose any additional terms or conditions on the Work
+or Derivative Work that alter or restrict the terms of the Licence.
+
+Compatibility clause: If the Licensee Distributes and/or Communicates Derivative
+Works or copies thereof based upon both the Original Work and another work
+licensed under a Compatible Licence, this Distribution and/or Communication can
+be done under the terms of this Compatible Licence. For the sake of this clause,
+“Compatible Licence” refers to the licences listed in the appendix attached to
+this Licence. Should the Licensee’s obligations under the Compatible Licence
+conflict with his/her obligations under this Licence, the obligations of the
+Compatible Licence shall prevail.
+
+Provision of Source Code: When distributing and/or communicating copies of the
+Work, the Licensee will provide a machine-readable copy of the Source Code or
+indicate a repository where this Source will be easily and freely available for
+as long as the Licensee continues to distribute and/or communicate the Work.
+
+Legal Protection: This Licence does not grant permission to use the trade names,
+trademarks, service marks, or 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 copyright notice.
+
+
+
+## 6. Chain of Authorship
+
+The original Licensor warrants that the copyright in the Original Work granted
+hereunder is owned by him/her or licensed to him/her and that he/she has the
+power and authority to grant the Licence.
+
+Each Contributor warrants that the copyright in the modifications he/she brings
+to the Work are owned by him/her or licensed to him/her and that he/she has the
+power and authority to grant the Licence.
+
+Each time You accept the Licence, the original Licensor and subsequent
+Contributors grant You a licence to their contributions to the Work, under the
+terms of this Licence.
+
+
+
+## 7. Disclaimer of Warranty
+
+The Work is a work in progress, which is continuously improved by numerous
+contributors. It is not a finished work and may therefore contain defects or
+“bugs” inherent to this type of software development.
+
+For the above reason, the Work is provided under the Licence on an “as is” basis
+and without warranties of any kind concerning the Work, including without
+limitation merchantability, fitness for a particular purpose, absence of defects
+or errors, accuracy, non-infringement of intellectual property rights other than
+copyright as stated in Article 6 of this Licence.
+
+This disclaimer of warranty is an essential part of the Licence and a condition
+for the grant of any rights to the Work.
+
+
+
+## 8. Disclaimer of Liability
+
+Except in the cases of wilful misconduct or damages directly caused to natural
+persons, the Licensor will in no event be liable for any direct or indirect,
+material or moral, damages of any kind, arising out of the Licence or of the use
+of the Work, including without limitation, damages for loss of goodwill, work
+stoppage, computer failure or malfunction, loss of data or any commercial
+damage, even if the Licensor has been advised of the possibility of such
+damage. However, the Licensor will be liable under statutory product liability
+laws as far such laws apply to the Work.
+
+
+
+## 9. Additional agreements
+
+While distributing the Original Work or Derivative Works, You may choose to
+conclude an additional agreement to offer, and charge a fee for, acceptance of
+support, warranty, indemnity, or other liability obligations and/or services
+consistent with this Licence. However, in accepting such obligations, You may
+act only on your own behalf and on your sole responsibility, not on behalf of
+the original Licensor or 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 the fact You have accepted
+any such warranty or additional liability.
+
+
+
+## 10. Acceptance of the Licence
+
+The provisions of this Licence can be accepted by clicking on an icon “I agree”
+placed under the bottom of a window displaying the text of this Licence or by
+affirming consent in any other similar way, in accordance with the rules of
+applicable law. Clicking on that icon indicates your clear and irrevocable
+acceptance of this Licence and all of its terms and conditions.
+
+Similarly, you irrevocably accept this Licence and all of its terms and
+conditions by exercising any rights granted to You by Article 2 of this Licence,
+such as the use of the Work, the creation by You of a Derivative Work or the
+Distribution and/or Communication by You of the Work or copies thereof.
+
+
+
+## 11. Information to the public
+
+In case of any Distribution and/or Communication of the Work by means of
+electronic communication by You (for example, by offering to download the Work
+from a remote location) the distribution channel or media (for example, a
+website) must at least provide to the public the information requested by the
+applicable law regarding the Licensor, the Licence and the way it may be
+accessible, concluded, stored and reproduced by the Licensee.
+
+
+
+## 12. Termination of the Licence
+
+The Licence and the rights granted hereunder will terminate automatically upon
+any breach by the Licensee of the terms of the Licence.
+
+Such a termination will not terminate the licences of any person who has
+received the Work from the Licensee under the Licence, provided such persons
+remain in full compliance with the Licence.
+
+
+
+## 13. Miscellaneous
+
+Without prejudice of Article 9 above, the Licence represents the complete
+agreement between the Parties as to the Work licensed hereunder.
+
+If any provision of the Licence is invalid or unenforceable under applicable
+law, this will not affect the validity or enforceability of the Licence as a
+whole. Such provision will be construed and/or reformed so as necessary to make
+it valid and enforceable.
+
+The European Commission may publish other linguistic versions and/or new
+versions of this Licence, so far this is required and reasonable, without
+reducing the scope of the rights granted by the Licence. New versions of the
+Licence will be published with a unique version number.
+
+All linguistic versions of this Licence, approved by the European Commission,
+have identical value. Parties can take advantage of the linguistic version of
+their choice.
+
+
+
+## 14. Jurisdiction
+
+Any litigation resulting from the interpretation of this License, arising
+between the European Commission, as a Licensor, and any Licensee, will be
+subject to the jurisdiction of the Court of Justice of the European Communities,
+as laid down in article 238 of the Treaty establishing the European Community.
+
+Any litigation arising between Parties, other than the European Commission, and
+resulting from the interpretation of this License, will be subject to the
+exclusive jurisdiction of the competent court where the Licensor resides or
+conducts its primary business.
+
+
+
+## 15. Applicable Law
+
+This Licence shall be governed by the law of the European Union country where
+the Licensor resides or has his registered office.
+
+This licence shall be governed by the Belgian law if:
+
+- a litigation arises between the European Commission, as a Licensor, and any
+- Licensee; the Licensor, other than the European Commission, has no residence
+- or registered office inside a European Union country.
+
+
+
+## Appendix
+
+
+
+“Compatible Licences” according to article 5 EUPL are:
+
+
+- GNU General Public License (GNU GPL) v. 2
+
+- Open Software License (OSL) v. 2.1, v. 3.0
+
+- Common Public License v. 1.0
+
+- Eclipse Public License v. 1.0
+
+- Cecill v. 2.0
+
diff --git a/ckan-plugin/README.md b/ckan-plugin/README.md
new file mode 100644
index 0000000..85dd719
--- /dev/null
+++ b/ckan-plugin/README.md
@@ -0,0 +1,52 @@
+gCube CMS Suite
+--------------------------------------------------
+
+gCube CMS Suite is a set of components designed to manage complex space-temporal Documents defined by metadata Profiles.
+
+## Built with
+* [gCube SmartGears] (https://gcube.wiki.gcube-system.org/gcube/SmartGears) - The gCube SmartGears framework
+* [OpenJDK](https://openjdk.java.net/) - The JDK used
+* [JAX-RS](https://github.com/eclipse-ee4j/jaxrs-api) - Java™ API for RESTful Web Services
+* [Jersey](https://jersey.github.io/) - JAX-RS runtime
+* [Maven](https://maven.apache.org/) - Dependency Management
+
+## Documentation
+
+Documentation can be found [here](https://gcube.wiki.gcube-system.org/gcube/GeoPortal_Service).
+
+## Change log
+
+See [CHANGELOG.md](CHANGELOG.md).
+
+## License
+
+This project is licensed under the EUPL V.1.1 License - see the [LICENSE.md](LICENSE.md) file for details.
+
+## About the gCube Framework
+This software is part of the [gCubeFramework](https://www.gcube-system.org/ "gCubeFramework"): an
+open-source software toolkit used for building and operating Hybrid Data
+Infrastructures enabling the dynamic deployment of Virtual Research Environments
+by favouring the realisation of reuse oriented policies.
+
+The projects leading to this software have received funding from a series of European Union programmes including:
+
+- the Sixth Framework Programme for Research and Technological Development
+ - DILIGENT (grant no. 004260).
+- the Seventh Framework Programme for research, technological development and demonstration
+ - D4Science (grant no. 212488);
+ - D4Science-II (grant no.239019);
+ - ENVRI (grant no. 283465);
+ - iMarine(grant no. 283644);
+ - EUBrazilOpenBio (grant no. 288754).
+- the H2020 research and innovation programme
+ - SoBigData (grant no. 654024);
+ - PARTHENOS (grant no. 654119);
+ - EGIEngage (grant no. 654142);
+ - ENVRIplus (grant no. 654182);
+ - BlueBRIDGE (grant no. 675680);
+ - PerformFish (grant no. 727610);
+ - AGINFRAplus (grant no. 731001);
+ - DESIRA (grant no. 818194);
+ - ARIADNEplus (grant no. 823914);
+ - RISIS2 (grant no. 824091);
+
diff --git a/ckan-plugin/pom.xml b/ckan-plugin/pom.xml
new file mode 100644
index 0000000..f4b63db
--- /dev/null
+++ b/ckan-plugin/pom.xml
@@ -0,0 +1,48 @@
+
+
+ 4.0.0
+
+ ckan-plugins
+ 1.0.0-SNAPSHOT
+ gCube CMS - CKAN Plugins
+
+
+
+ org.gcube.application.cms
+ gcube-cms-suite
+ 1.0.2-SNAPSHOT
+
+
+
+ https://code-repo.d4science.org/gCubeSystem
+
+
+
+
+
+ scm:git:${gitBaseUrl}/gcube-cms-suite
+ scm:git:${gitBaseUrl}/gcube-cms-suite
+ ${gitBaseUrl}/gcube-cms-suite
+
+
+
+
+
+
+ org.gcube.application.cms
+ cms-plugin-framework
+
+
+
+ org.gcube.application.cms
+ cms-test-commons
+ test
+
+
+
+
+
+
+
diff --git a/cms-plugin-framework/pom.xml b/cms-plugin-framework/pom.xml
index 83f5175..f6daa8f 100644
--- a/cms-plugin-framework/pom.xml
+++ b/cms-plugin-framework/pom.xml
@@ -9,7 +9,7 @@
org.gcube.application.cms
gcube-cms-suite
- 1.0.1
+ 1.0.2-SNAPSHOT
diff --git a/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/AbstractPlugin.java b/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/AbstractPlugin.java
index 19f48e2..075cf6b 100644
--- a/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/AbstractPlugin.java
+++ b/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/AbstractPlugin.java
@@ -1,5 +1,6 @@
package org.gcube.application.cms.plugins;
+import org.gcube.application.cms.plugins.faults.InvalidProfileException;
import org.gcube.application.cms.plugins.model.PluginDescriptor;
import org.gcube.application.cms.plugins.reports.DocumentHandlingReport;
import org.gcube.application.cms.plugins.requests.BaseExecutionRequest;
@@ -7,6 +8,7 @@ import org.gcube.application.geoportal.common.model.profile.HandlerDeclaration;
import org.gcube.application.geoportal.common.model.profile.Profile;
import java.util.List;
+import java.util.Map;
public abstract class AbstractPlugin implements Plugin{
@@ -14,10 +16,13 @@ public abstract class AbstractPlugin implements Plugin{
- protected HandlerDeclaration getConfigurationFromProfile(Profile profile){
- return getMultipleDeclarationsFromProfile(profile).get(0);
+ protected HandlerDeclaration getConfigurationFromProfile(Profile profile) throws InvalidProfileException{
+ return getMultipleDeclarationsFromProfile(profile).get(0);
}
- protected List getMultipleDeclarationsFromProfile(Profile p){
- return p.getHandlersMap().get(getDescriptor().getId());
+ protected List getMultipleDeclarationsFromProfile(Profile p)throws InvalidProfileException {
+ Map> map = p.getHandlersMapByID();
+ if(map.containsKey(getDescriptor().getId()))
+ return map.get(getDescriptor().getId());
+ else throw new InvalidProfileException("No Configuration found for "+getDescriptor().getId()+" in "+p.getId());
}
}
diff --git a/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/PluginsReflections.java b/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/PluginsReflections.java
new file mode 100644
index 0000000..18c45a7
--- /dev/null
+++ b/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/PluginsReflections.java
@@ -0,0 +1,45 @@
+package org.gcube.application.cms.plugins;
+
+import lombok.extern.slf4j.Slf4j;
+import org.reflections.Reflections;
+import org.reflections.util.ConfigurationBuilder;
+import org.reflections.util.FilterBuilder;
+
+import java.lang.reflect.Modifier;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+@Slf4j
+public class PluginsReflections {
+
+ /** Loads Plugin implementation classes. It should only be accessed once by Plugin Manager
+ * Plugins shouldn't access this unless this class for testing purposes.
+ * @return
+ */
+ public static Map load(){
+ Map toReturn=new HashMap<>();
+ log.warn("WARNING!! LOADING PLUGIN SET : THIS SHOULD HAPPEN ONLY ONCE");
+ Reflections reflections = new Reflections(
+ new ConfigurationBuilder()
+ .forPackage("org.gcube.application.cms")
+ .filterInputsBy(new FilterBuilder().includePackage("org.gcube.application.cms")));
+
+ reflections.getSubTypesOf(Plugin.class).iterator().forEachRemaining(pluginClass->{
+ if(!pluginClass.isInterface() && !Modifier.isAbstract(pluginClass.getModifiers())){
+ try {
+ Plugin plugin = pluginClass.newInstance();
+ log.debug("Loading {} description : {}", plugin, plugin.getDescriptor());
+
+ toReturn.put(plugin.getDescriptor().getId(), plugin);
+
+
+ }catch (Throwable t){
+ log.warn("Unable to instantiate Plugin "+pluginClass,t);
+ }
+ }
+
+ });
+ return toReturn;
+ }
+}
diff --git a/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/faults/InvalidProfileException.java b/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/faults/InvalidProfileException.java
new file mode 100644
index 0000000..1fe0b00
--- /dev/null
+++ b/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/faults/InvalidProfileException.java
@@ -0,0 +1,22 @@
+package org.gcube.application.cms.plugins.faults;
+
+public class InvalidProfileException extends Exception {
+ public InvalidProfileException() {
+ }
+
+ public InvalidProfileException(String message) {
+ super(message);
+ }
+
+ public InvalidProfileException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public InvalidProfileException(Throwable cause) {
+ super(cause);
+ }
+
+ public InvalidProfileException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ }
+}
diff --git a/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/reports/DocumentHandlingReport.java b/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/reports/DocumentHandlingReport.java
index 9a6afc8..b2b17ba 100644
--- a/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/reports/DocumentHandlingReport.java
+++ b/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/reports/DocumentHandlingReport.java
@@ -26,7 +26,7 @@ public class DocumentHandlingReport extends Repo
public DocumentHandlingReport(@NonNull T theRequest) {
this.theRequest = theRequest;
- toSetLifecycleInformation=theRequest.getDocument().getLifecycleInformation().cleanState();
+ toSetLifecycleInformation=theRequest.getDocument().getLifecycleInformation();
resultingDocument = theRequest.getDocument().getTheDocument();
}
diff --git a/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/reports/StepExecutionReport.java b/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/reports/StepExecutionReport.java
index 51d5b47..4659648 100644
--- a/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/reports/StepExecutionReport.java
+++ b/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/reports/StepExecutionReport.java
@@ -14,7 +14,10 @@ import java.util.List;
public class StepExecutionReport extends DocumentHandlingReport{
public StepExecutionReport(@NonNull StepExecutionRequest theRequest) {
+
super(theRequest);
+ this.getToSetLifecycleInformation().cleanState();
+ this.getToSetLifecycleInformation().setLastInvokedStep(theRequest.getStep());
}
List toTriggerEvents;
diff --git a/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/requests/EventExecutionRequest.java b/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/requests/EventExecutionRequest.java
index 0537d31..3074b92 100644
--- a/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/requests/EventExecutionRequest.java
+++ b/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/requests/EventExecutionRequest.java
@@ -1,12 +1,14 @@
package org.gcube.application.cms.plugins.requests;
import lombok.Data;
+import lombok.ToString;
import lombok.extern.slf4j.Slf4j;
import org.bson.Document;
import org.gcube.application.geoportal.common.model.document.ProfiledDocument;
import org.gcube.application.geoportal.common.model.profile.Profile;
@Data
+@ToString(callSuper = true)
public class EventExecutionRequest extends BaseExecutionRequest{
public static class Events{
diff --git a/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/requests/IndexDocumentRequest.java b/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/requests/IndexDocumentRequest.java
index 30ef577..f60685a 100644
--- a/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/requests/IndexDocumentRequest.java
+++ b/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/requests/IndexDocumentRequest.java
@@ -1,5 +1,8 @@
package org.gcube.application.cms.plugins.requests;
+import lombok.ToString;
+
+@ToString(callSuper = true)
public class IndexDocumentRequest extends BaseExecutionRequest{
}
diff --git a/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/requests/MaterializationRequest.java b/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/requests/MaterializationRequest.java
index 60f8eab..78bd3b5 100644
--- a/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/requests/MaterializationRequest.java
+++ b/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/requests/MaterializationRequest.java
@@ -1,12 +1,12 @@
package org.gcube.application.cms.plugins.requests;
import lombok.Data;
+import lombok.ToString;
import org.bson.Document;
import org.gcube.application.geoportal.common.model.document.ProfiledDocument;
import org.gcube.application.geoportal.common.model.profile.Profile;
-@Data
+@ToString(callSuper = true)
public class MaterializationRequest extends BaseExecutionRequest{
-
}
diff --git a/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/requests/StepExecutionRequest.java b/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/requests/StepExecutionRequest.java
index de56486..5f73018 100644
--- a/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/requests/StepExecutionRequest.java
+++ b/cms-plugin-framework/src/main/java/org/gcube/application/cms/plugins/requests/StepExecutionRequest.java
@@ -1,6 +1,7 @@
package org.gcube.application.cms.plugins.requests;
import lombok.Data;
+import lombok.ToString;
import org.bson.Document;
import org.gcube.application.geoportal.common.model.document.ProfiledDocument;
import org.gcube.application.geoportal.common.model.document.accounting.Context;
@@ -8,6 +9,7 @@ import org.gcube.application.geoportal.common.model.document.accounting.User;
import org.gcube.application.geoportal.common.model.profile.Profile;
@Data
+@ToString(callSuper = true)
public class StepExecutionRequest extends BaseExecutionRequest{
public static class Steps{
diff --git a/cms-test-commons/pom.xml b/cms-test-commons/pom.xml
index 7c28195..98d1e72 100644
--- a/cms-test-commons/pom.xml
+++ b/cms-test-commons/pom.xml
@@ -12,7 +12,7 @@
org.gcube.application.cms
gcube-cms-suite
- 1.0.1
+ 1.0.2-SNAPSHOT
diff --git a/cms-test-commons/src/main/java/org/gcube/application/cms/tests/BasicPluginTest.java b/cms-test-commons/src/main/java/org/gcube/application/cms/tests/BasicPluginTest.java
index 6780630..f0d30a5 100644
--- a/cms-test-commons/src/main/java/org/gcube/application/cms/tests/BasicPluginTest.java
+++ b/cms-test-commons/src/main/java/org/gcube/application/cms/tests/BasicPluginTest.java
@@ -2,8 +2,12 @@ package org.gcube.application.cms.tests;
import ch.qos.logback.core.net.SyslogOutputStream;
import org.gcube.application.cms.plugins.InitializablePlugin;
+import org.gcube.application.cms.plugins.MaterializationPlugin;
import org.gcube.application.cms.plugins.Plugin;
+import org.gcube.application.cms.plugins.PluginsReflections;
import org.gcube.application.cms.plugins.faults.InitializationException;
+import org.gcube.application.cms.plugins.requests.MaterializationRequest;
+import org.gcube.application.geoportal.common.utils.tests.GCubeTest;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
@@ -13,36 +17,24 @@ import org.reflections.util.ConfigurationBuilder;
import org.reflections.util.FilterBuilder;
import java.rmi.ServerError;
+import java.util.ArrayList;
import java.util.List;
import java.util.ServiceLoader;
import java.util.concurrent.atomic.AtomicLong;
+import static org.junit.Assume.assumeTrue;
+
public class BasicPluginTest {
- static List plugins;
+ protected String context;
+
+
+ static List plugins=new ArrayList<>();
@BeforeClass
public static void checkPluginRegistration() {
-
-
- Reflections reflections = new Reflections(
- new ConfigurationBuilder()
- .forPackage("org.gcube.application.cms")
- .filterInputsBy(new FilterBuilder().includePackage("org.gcube.application.cms")));
-
- reflections.getSubTypesOf(Plugin.class).iterator().forEachRemaining(pluginClass->{
- if(!pluginClass.isInterface()){
- try {
- Plugin plugin = pluginClass.newInstance();
- plugins.add(plugin);
- }catch (Throwable t){
- t.printStackTrace(System.err);
- Assert.fail("Unable to Load "+pluginClass);
- }
- }
-
- });
-
+ plugins.addAll(PluginsReflections.load().values());
+ plugins.forEach(plugin -> System.out.println());
Assert.assertFalse(plugins.isEmpty());
System.out.println("Plugin Loading OK");
@@ -50,7 +42,7 @@ public class BasicPluginTest {
@Test
- public void basicChecks(){
+ public void init(){
plugins.forEach(p->{
System.out.println("INIT Plugin "+p.getClass());
Assert.assertNotNull(p.getDescriptor());
@@ -68,4 +60,28 @@ public class BasicPluginTest {
}
});
}
+
+
+ @Test
+ public void initInContext(){
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
+ plugins.forEach(p->{
+ TokenSetter.set(context);
+ System.out.println("INIT Plugin "+p.getClass()+" in "+context);
+ Assert.assertNotNull(p.getDescriptor());
+ Assert.assertNotNull(p.getDescriptor().getId());
+ Assert.assertNotNull(p.getDescriptor().getType());
+ Assert.assertNotNull(p.getDescriptor().getVersion());
+ if(p instanceof InitializablePlugin){
+ InitializablePlugin ip=(InitializablePlugin)p;
+ try {
+ ip.initInContext();
+ } catch (InitializationException e) {
+ e.printStackTrace(System.err);
+ Assert.fail("Unable to Init "+p.getDescriptor().getId());
+ }
+ }
+ });
+ }
+
}
diff --git a/cms-test-commons/src/main/java/org/gcube/application/cms/tests/model/DummyPlugin.java b/cms-test-commons/src/main/java/org/gcube/application/cms/tests/model/DummyPlugin.java
new file mode 100644
index 0000000..992daec
--- /dev/null
+++ b/cms-test-commons/src/main/java/org/gcube/application/cms/tests/model/DummyPlugin.java
@@ -0,0 +1,70 @@
+package org.gcube.application.cms.tests.model;
+
+import org.gcube.application.cms.plugins.IndexerPluginInterface;
+import org.gcube.application.cms.plugins.LifecycleManager;
+import org.gcube.application.cms.plugins.MaterializationPlugin;
+import org.gcube.application.cms.plugins.PluginManagerInterface;
+import org.gcube.application.cms.plugins.faults.*;
+import org.gcube.application.cms.plugins.model.ComparableVersion;
+import org.gcube.application.cms.plugins.model.PluginDescriptor;
+import org.gcube.application.cms.plugins.reports.*;
+import org.gcube.application.cms.plugins.requests.EventExecutionRequest;
+import org.gcube.application.cms.plugins.requests.IndexDocumentRequest;
+import org.gcube.application.cms.plugins.requests.MaterializationRequest;
+import org.gcube.application.cms.plugins.requests.StepExecutionRequest;
+import org.gcube.application.geoportal.common.model.rest.Configuration;
+import org.gcube.application.geoportal.common.model.rest.ConfigurationException;
+
+public class DummyPlugin implements LifecycleManager, IndexerPluginInterface, MaterializationPlugin {
+
+
+ @Override
+ public IndexDocumentReport index(IndexDocumentRequest request) {
+ return new IndexDocumentReport(request);
+ }
+
+ @Override
+ public InitializationReport initInContext() throws InitializationException {
+ return new InitializationReport();
+ }
+
+ @Override
+ public InitializationReport init() throws InitializationException {
+ return new InitializationReport();
+ }
+
+ @Override
+ public void shutdown() throws ShutDownException {
+
+ }
+
+ @Override
+ public StepExecutionReport performStep(StepExecutionRequest request) throws StepException {
+ return new StepExecutionReport(request);
+ }
+
+ @Override
+ public Configuration getCurrentConfiguration() throws ConfigurationException {
+ return new Configuration();
+ }
+
+ @Override
+ public EventExecutionReport onEvent(EventExecutionRequest request) throws EventException {
+ return new EventExecutionReport(request);
+ }
+
+ @Override
+ public void setPluginManager(PluginManagerInterface manager) {
+
+ }
+
+ @Override
+ public MaterializationReport materialize(MaterializationRequest request) throws MaterializationException {
+ return new MaterializationReport(request);
+ }
+
+ @Override
+ public PluginDescriptor getDescriptor() {
+ return new PluginDescriptor("DUMMY-PLUGIN","DUMMY-TYPE","Dummy","No op plugin", new ComparableVersion("1.0.0"));
+ }
+}
diff --git a/cms-test-commons/src/test/java/org/gcube/application/cms/commons/model/concessioni/SerializationTest.java b/cms-test-commons/src/test/java/org/gcube/application/cms/commons/model/concessioni/SerializationTest.java
index 494a1a8..5a3f5b1 100644
--- a/cms-test-commons/src/test/java/org/gcube/application/cms/commons/model/concessioni/SerializationTest.java
+++ b/cms-test-commons/src/test/java/org/gcube/application/cms/commons/model/concessioni/SerializationTest.java
@@ -34,16 +34,16 @@ public class SerializationTest {
}
- @Test
- public void readProfile() throws JsonProcessingException, IOException {
-
- Profile concessione=mapper.readerFor(Profile.class).readValue(new File(TestConcessioniModel.getBaseFolder(),"ProfileConcessioni.json"));
-
- System.out.println("Profile is "+mapper.writeValueAsString(concessione));
-
- //Assert.assertTrue(concessione .getFields().size()>0);
-
- }
+// @Test
+// public void readProfile() throws JsonProcessingException, IOException {
+//
+// Profile concessione=mapper.readerFor(Profile.class).readValue(new File(TestConcessioniModel.getBaseFolder(),"ProfileConcessioni.json"));
+//
+// System.out.println("Profile is "+mapper.writeValueAsString(concessione));
+//
+// //Assert.assertTrue(concessione .getFields().size()>0);
+//
+// }
@Test
public void readConcessione() throws JsonProcessingException, IOException {
diff --git a/concessioni-lifecycle/pom.xml b/concessioni-lifecycle/pom.xml
index bdda5fa..289d48f 100644
--- a/concessioni-lifecycle/pom.xml
+++ b/concessioni-lifecycle/pom.xml
@@ -12,7 +12,7 @@
org.gcube.application.cms
gcube-cms-suite
- 1.0.1
+ 1.0.2-SNAPSHOT
diff --git a/concessioni-lifecycle/src/main/java/org/gcube/application/cms/concessioni/plugins/ConcessioniLifeCycleManager.java b/concessioni-lifecycle/src/main/java/org/gcube/application/cms/concessioni/plugins/ConcessioniLifeCycleManager.java
index dea2f94..8e5e47a 100644
--- a/concessioni-lifecycle/src/main/java/org/gcube/application/cms/concessioni/plugins/ConcessioniLifeCycleManager.java
+++ b/concessioni-lifecycle/src/main/java/org/gcube/application/cms/concessioni/plugins/ConcessioniLifeCycleManager.java
@@ -166,8 +166,8 @@ public class ConcessioniLifeCycleManager implements LifecycleManager {
indexRequest.setDocument(request.getDocument());
indexRequest.setProfile(request.getProfile());
Document callParameters = new Document();
- callParameters.put("workspace","gna_concessioni_"+request.getContext());
- callParameters.put("indexName","gna_concessioni_centroids_"+request.getContext());
+ callParameters.put("workspace",Files.fixFilename("gna_concessioni_"+request.getContext().getId()));
+ callParameters.put("indexName",Files.fixFilename("gna_concessioni_centroids_"+request.getContext().getId()));
indexRequest.setCallParameters(callParameters);
IndexDocumentReport indexReport = indexerPlugin.index(indexRequest);
diff --git a/concessioni-lifecycle/src/main/java/org/gcube/application/cms/sdi/engine/SDIManagerWrapper.java b/concessioni-lifecycle/src/main/java/org/gcube/application/cms/sdi/engine/SDIManagerWrapper.java
index 4d661b7..76bd86a 100644
--- a/concessioni-lifecycle/src/main/java/org/gcube/application/cms/sdi/engine/SDIManagerWrapper.java
+++ b/concessioni-lifecycle/src/main/java/org/gcube/application/cms/sdi/engine/SDIManagerWrapper.java
@@ -67,7 +67,7 @@ public class SDIManagerWrapper extends SDIManager{
// Evaluate Layer Name
String baseName = getToUseBaseLayerName(fileSet);
- log.debug("Base layer name is {}, checking conflicts.. ");
+ log.debug("Base layer name is {}, checking conflicts.. ",baseName);
String toSetLayerName = baseName;
//Check if layer already exists
int count = 0;
diff --git a/concessioni-lifecycle/src/main/java/org/gcube/application/cms/sdi/plugins/SDIIndexerPlugin.java b/concessioni-lifecycle/src/main/java/org/gcube/application/cms/sdi/plugins/SDIIndexerPlugin.java
index 269c131..1b45995 100644
--- a/concessioni-lifecycle/src/main/java/org/gcube/application/cms/sdi/plugins/SDIIndexerPlugin.java
+++ b/concessioni-lifecycle/src/main/java/org/gcube/application/cms/sdi/plugins/SDIIndexerPlugin.java
@@ -5,6 +5,7 @@ import lombok.extern.slf4j.Slf4j;
import org.bson.Document;
import org.gcube.application.cms.plugins.IndexerPluginInterface;
import org.gcube.application.cms.plugins.faults.InitializationException;
+import org.gcube.application.cms.plugins.faults.InvalidProfileException;
import org.gcube.application.cms.plugins.model.PluginDescriptor;
import org.gcube.application.cms.plugins.reports.IndexDocumentReport;
import org.gcube.application.cms.plugins.reports.InitializationReport;
@@ -20,16 +21,23 @@ import org.gcube.application.geoportal.common.model.document.ProfiledDocument;
import org.gcube.application.geoportal.common.model.document.filesets.GCubeSDILayer;
import org.gcube.application.geoportal.common.model.profile.Profile;
+import java.util.ArrayList;
import java.util.List;
@Slf4j
public class SDIIndexerPlugin extends SDIAbstractPlugin implements IndexerPluginInterface {
@Data
- private class MappingObject{
+ private static class MappingObject{
private String name;
private String type;
private String path;
+
+ public void validate () throws RuntimeException {
+ if(name==null) throw new RuntimeException("Invalid mapping "+this+" : name is null");
+ if(type==null) throw new RuntimeException("Invalid mapping "+this+" : type is null");
+ if(path==null) throw new RuntimeException("Invalid mapping "+this+" : path is null");
+ }
}
@@ -68,26 +76,27 @@ public class SDIIndexerPlugin extends SDIAbstractPlugin implements IndexerPlugin
@Override
public IndexDocumentReport index(IndexDocumentRequest request) {
- log.info("Indxer {} : Performing {} ",this.getDescriptor().getId(),request);
+ log.info("Indexer {} : Performing {} ",this.getDescriptor().getId(),request);
ProfiledDocument profiledDocument=request.getDocument();
Profile profile = request.getProfile();
Document requestArguments=request.getCallParameters();
- Document profileConfiguration =getConfigurationFromProfile(profile).getConfiguration();
IndexDocumentReport report= new IndexDocumentReport(request);
- log.debug("Profile Configuration is {} ",profileConfiguration);
+
try{
// ********* INIT INDEX
// TODO CACHE
PostgisIndexer indexer = new PostgisIndexer(sdiCache.getObject(),profile,postgisCache.getObject());
+ Document profileConfiguration =getConfigurationFromProfile(profile).getConfiguration();
+ log.debug("Profile Configuration is {} ",profileConfiguration);
// SCHEMA
log.debug("Profile {} : Evaluating Index schema.. ",profile.getId());
- List fields = null; // TODO From Profile
+ List fields = new ArrayList<>(); // TODO From Profile
fields.add(new PostgisTable.Field("geom", PostgisTable.FieldType.GEOMETRY));
fields.add(new PostgisTable.Field("projectid", PostgisTable.FieldType.TEXT));
List mappingObjs= profileConfiguration.get("explicitFieldMapping",List.class);
@@ -95,6 +104,7 @@ public class SDIIndexerPlugin extends SDIAbstractPlugin implements IndexerPlugin
mappingObjs.forEach(o -> {
log.trace("Mapping is {} ",o);
MappingObject m = Serialization.convert(o,MappingObject.class);
+ m.validate();
fields.add(new PostgisTable.Field(m.getName(), PostgisTable.FieldType.valueOf(m.getType())));
});
}
@@ -133,7 +143,7 @@ public class SDIIndexerPlugin extends SDIAbstractPlugin implements IndexerPlugin
for(Object pathObj : bboxEvaluationPaths){
log.debug("Profile {} : Evaluating path {} ",profile.getId(),pathObj);
for(String path : documentNavigator.getMatchingPaths(pathObj.toString())) {
- Object bboxObject = documentNavigator.getByPath(path);
+ Object bboxObject = documentNavigator.getByPath(path).get(0);
log.info("Matched path {}, value is {} ",path,bboxObject);
GCubeSDILayer.BBOX box = Serialization.convert(bboxObject, GCubeSDILayer.BBOX.class);
diff --git a/concessioni-lifecycle/src/main/java/org/gcube/application/cms/sdi/plugins/SDIMaterializerPlugin.java b/concessioni-lifecycle/src/main/java/org/gcube/application/cms/sdi/plugins/SDIMaterializerPlugin.java
index 1072d9b..9464421 100644
--- a/concessioni-lifecycle/src/main/java/org/gcube/application/cms/sdi/plugins/SDIMaterializerPlugin.java
+++ b/concessioni-lifecycle/src/main/java/org/gcube/application/cms/sdi/plugins/SDIMaterializerPlugin.java
@@ -92,12 +92,12 @@ public class SDIMaterializerPlugin extends AbstractPlugin implements Materializa
ProfiledDocument profiledDocument=request.getDocument();
Profile profile = request.getProfile();
Document requestArguments=request.getCallParameters();
- Document profileConfiguration =getConfigurationFromProfile(profile).getConfiguration();
MaterializationReport report= new MaterializationReport(request);
- log.debug("Profile Configuration is {} ",profileConfiguration);
try{
+ Document profileConfiguration =getConfigurationFromProfile(profile).getConfiguration();
+ log.debug("Profile Configuration is {} ",profileConfiguration);
JSONPathWrapper documentNavigator=new JSONPathWrapper(profiledDocument.getTheDocument().toJson());
JSONPathWrapper schemaNavigator=new JSONPathWrapper(profile.getSchema().toJson());
@@ -131,7 +131,7 @@ public class SDIMaterializerPlugin extends AbstractPlugin implements Materializa
// Actually materializing
RegisteredFileSet obtained = getSDIManager().materializeLayer(fs,requestArguments);
log.debug("Obtained {} ",obtained);
- documentNavigator.setElement("$..[?(@.uuid == '"+fs.getUUID()+"')]",obtained);
+ documentNavigator.setElement("$..[?(@."+ RegisteredFileSet.UUID+" == '"+fs.getUUID()+"')]",obtained);
}
}
diff --git a/concessioni-model/pom.xml b/concessioni-model/pom.xml
index ac112d0..a502594 100644
--- a/concessioni-model/pom.xml
+++ b/concessioni-model/pom.xml
@@ -13,7 +13,7 @@
org.gcube.application.cms
gcube-cms-suite
- 1.0.1
+ 1.0.2-SNAPSHOT
diff --git a/dataminer-plugins/CHANGELOG.md b/dataminer-plugins/CHANGELOG.md
new file mode 100644
index 0000000..42441c2
--- /dev/null
+++ b/dataminer-plugins/CHANGELOG.md
@@ -0,0 +1,8 @@
+This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+# Changelog for org.gcube.application.cms.dataminer-plugins
+
+This library contains gcube-cms plugins for processing via gCube Dataminer
+
+## [v1.0.0-SNAPSHOT] - 2022-02-24
+- First release
diff --git a/dataminer-plugins/FUNDING.md b/dataminer-plugins/FUNDING.md
new file mode 100644
index 0000000..9e48b94
--- /dev/null
+++ b/dataminer-plugins/FUNDING.md
@@ -0,0 +1,26 @@
+# Acknowledgments
+
+The projects leading to this software have received funding from a series of European Union programmes including:
+
+- the Sixth Framework Programme for Research and Technological Development
+ - [DILIGENT](https://cordis.europa.eu/project/id/004260) (grant no. 004260).
+- the Seventh Framework Programme for research, technological development and demonstration
+ - [D4Science](https://cordis.europa.eu/project/id/212488) (grant no. 212488);
+ - [D4Science-II](https://cordis.europa.eu/project/id/239019) (grant no.239019);
+ - [ENVRI](https://cordis.europa.eu/project/id/283465) (grant no. 283465);
+ - [iMarine](https://cordis.europa.eu/project/id/283644) (grant no. 283644);
+ - [EUBrazilOpenBio](https://cordis.europa.eu/project/id/288754) (grant no. 288754).
+- the H2020 research and innovation programme
+ - [SoBigData](https://cordis.europa.eu/project/id/654024) (grant no. 654024);
+ - [PARTHENOS](https://cordis.europa.eu/project/id/654119) (grant no. 654119);
+ - [EGI-Engage](https://cordis.europa.eu/project/id/654142) (grant no. 654142);
+ - [ENVRI PLUS](https://cordis.europa.eu/project/id/654182) (grant no. 654182);
+ - [BlueBRIDGE](https://cordis.europa.eu/project/id/675680) (grant no. 675680);
+ - [PerformFISH](https://cordis.europa.eu/project/id/727610) (grant no. 727610);
+ - [AGINFRA PLUS](https://cordis.europa.eu/project/id/731001) (grant no. 731001);
+ - [DESIRA](https://cordis.europa.eu/project/id/818194) (grant no. 818194);
+ - [ARIADNEplus](https://cordis.europa.eu/project/id/823914) (grant no. 823914);
+ - [RISIS 2](https://cordis.europa.eu/project/id/824091) (grant no. 824091);
+ - [EOSC-Pillar](https://cordis.europa.eu/project/id/857650) (grant no. 857650);
+ - [Blue Cloud](https://cordis.europa.eu/project/id/862409) (grant no. 862409);
+ - [SoBigData-PlusPlus](https://cordis.europa.eu/project/id/871042) (grant no. 871042);
diff --git a/dataminer-plugins/LICENSE.md b/dataminer-plugins/LICENSE.md
new file mode 100644
index 0000000..3af0507
--- /dev/null
+++ b/dataminer-plugins/LICENSE.md
@@ -0,0 +1,312 @@
+# European Union Public Licence V. 1.1
+
+
+EUPL © the European Community 2007
+
+
+This European Union Public Licence (the “EUPL”) applies to the Work or Software
+(as defined below) which is provided under the terms of this Licence. Any use of
+the Work, other than as authorised under this Licence is prohibited (to the
+extent such use is covered by a right of the copyright holder of the Work).
+
+The Original Work is provided under the terms of this Licence when the Licensor
+(as defined below) has placed the following notice immediately following the
+copyright notice for the Original Work:
+
+Licensed under the EUPL V.1.1
+
+or has expressed by any other mean his willingness to license under the EUPL.
+
+
+
+## 1. Definitions
+
+In this Licence, the following terms have the following meaning:
+
+- The Licence: this Licence.
+
+- The Original Work or the Software: the software distributed and/or
+ communicated by the Licensor under this Licence, available as Source Code and
+ also as Executable Code as the case may be.
+
+- Derivative Works: the works or software that could be created by the Licensee,
+ based upon the Original Work or modifications thereof. This Licence does not
+ define the extent of modification or dependence on the Original Work required
+ in order to classify a work as a Derivative Work; this extent is determined by
+ copyright law applicable in the country mentioned in Article 15.
+
+- The Work: the Original Work and/or its Derivative Works.
+
+- The Source Code: the human-readable form of the Work which is the most
+ convenient for people to study and modify.
+
+- The Executable Code: any code which has generally been compiled and which is
+ meant to be interpreted by a computer as a program.
+
+- The Licensor: the natural or legal person that distributes and/or communicates
+ the Work under the Licence.
+
+- Contributor(s): any natural or legal person who modifies the Work under the
+ Licence, or otherwise contributes to the creation of a Derivative Work.
+
+- The Licensee or “You”: any natural or legal person who makes any usage of the
+ Software under the terms of the Licence.
+
+- Distribution and/or Communication: any act of selling, giving, lending,
+ renting, distributing, communicating, transmitting, or otherwise making
+ available, on-line or off-line, copies of the Work or providing access to its
+ essential functionalities at the disposal of any other natural or legal
+ person.
+
+
+
+## 2. Scope of the rights granted by the Licence
+
+The Licensor hereby grants You a world-wide, royalty-free, non-exclusive,
+sub-licensable licence to do the following, for the duration of copyright vested
+in the Original Work:
+
+- use the Work in any circumstance and for all usage, reproduce the Work, modify
+- the Original Work, and make Derivative Works based upon the Work, communicate
+- to the public, including the right to make available or display the Work or
+- copies thereof to the public and perform publicly, as the case may be, the
+- Work, distribute the Work or copies thereof, lend and rent the Work or copies
+- thereof, sub-license rights in the Work or copies thereof.
+
+Those rights can be exercised on any media, supports and formats, whether now
+known or later invented, as far as the applicable law permits so.
+
+In the countries where moral rights apply, the Licensor waives his right to
+exercise his moral right to the extent allowed by law in order to make effective
+the licence of the economic rights here above listed.
+
+The Licensor grants to the Licensee royalty-free, non exclusive usage rights to
+any patents held by the Licensor, to the extent necessary to make use of the
+rights granted on the Work under this Licence.
+
+
+
+## 3. Communication of the Source Code
+
+The Licensor may provide the Work either in its Source Code form, or as
+Executable Code. If the Work is provided as Executable Code, the Licensor
+provides in addition a machine-readable copy of the Source Code of the Work
+along with each copy of the Work that the Licensor distributes or indicates, in
+a notice following the copyright notice attached to the Work, a repository where
+the Source Code is easily and freely accessible for as long as the Licensor
+continues to distribute and/or communicate the Work.
+
+
+
+## 4. Limitations on copyright
+
+Nothing in this Licence is intended to deprive the Licensee of the benefits from
+any exception or limitation to the exclusive rights of the rights owners in the
+Original Work or Software, of the exhaustion of those rights or of other
+applicable limitations thereto.
+
+
+
+## 5. Obligations of the Licensee
+
+The grant of the rights mentioned above is subject to some restrictions and
+obligations imposed on the Licensee. Those obligations are the following:
+
+Attribution right: the Licensee shall keep intact all copyright, patent or
+trademarks notices and all notices that refer to the Licence and to the
+disclaimer of warranties. The Licensee must include a copy of such notices and a
+copy of the Licence with every copy of the Work he/she distributes and/or
+communicates. The Licensee must cause any Derivative Work to carry prominent
+notices stating that the Work has been modified and the date of modification.
+
+Copyleft clause: If the Licensee distributes and/or communicates copies of the
+Original Works or Derivative Works based upon the Original Work, this
+Distribution and/or Communication will be done under the terms of this Licence
+or of a later version of this Licence unless the Original Work is expressly
+distributed only under this version of the Licence. The Licensee (becoming
+Licensor) cannot offer or impose any additional terms or conditions on the Work
+or Derivative Work that alter or restrict the terms of the Licence.
+
+Compatibility clause: If the Licensee Distributes and/or Communicates Derivative
+Works or copies thereof based upon both the Original Work and another work
+licensed under a Compatible Licence, this Distribution and/or Communication can
+be done under the terms of this Compatible Licence. For the sake of this clause,
+“Compatible Licence” refers to the licences listed in the appendix attached to
+this Licence. Should the Licensee’s obligations under the Compatible Licence
+conflict with his/her obligations under this Licence, the obligations of the
+Compatible Licence shall prevail.
+
+Provision of Source Code: When distributing and/or communicating copies of the
+Work, the Licensee will provide a machine-readable copy of the Source Code or
+indicate a repository where this Source will be easily and freely available for
+as long as the Licensee continues to distribute and/or communicate the Work.
+
+Legal Protection: This Licence does not grant permission to use the trade names,
+trademarks, service marks, or 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 copyright notice.
+
+
+
+## 6. Chain of Authorship
+
+The original Licensor warrants that the copyright in the Original Work granted
+hereunder is owned by him/her or licensed to him/her and that he/she has the
+power and authority to grant the Licence.
+
+Each Contributor warrants that the copyright in the modifications he/she brings
+to the Work are owned by him/her or licensed to him/her and that he/she has the
+power and authority to grant the Licence.
+
+Each time You accept the Licence, the original Licensor and subsequent
+Contributors grant You a licence to their contributions to the Work, under the
+terms of this Licence.
+
+
+
+## 7. Disclaimer of Warranty
+
+The Work is a work in progress, which is continuously improved by numerous
+contributors. It is not a finished work and may therefore contain defects or
+“bugs” inherent to this type of software development.
+
+For the above reason, the Work is provided under the Licence on an “as is” basis
+and without warranties of any kind concerning the Work, including without
+limitation merchantability, fitness for a particular purpose, absence of defects
+or errors, accuracy, non-infringement of intellectual property rights other than
+copyright as stated in Article 6 of this Licence.
+
+This disclaimer of warranty is an essential part of the Licence and a condition
+for the grant of any rights to the Work.
+
+
+
+## 8. Disclaimer of Liability
+
+Except in the cases of wilful misconduct or damages directly caused to natural
+persons, the Licensor will in no event be liable for any direct or indirect,
+material or moral, damages of any kind, arising out of the Licence or of the use
+of the Work, including without limitation, damages for loss of goodwill, work
+stoppage, computer failure or malfunction, loss of data or any commercial
+damage, even if the Licensor has been advised of the possibility of such
+damage. However, the Licensor will be liable under statutory product liability
+laws as far such laws apply to the Work.
+
+
+
+## 9. Additional agreements
+
+While distributing the Original Work or Derivative Works, You may choose to
+conclude an additional agreement to offer, and charge a fee for, acceptance of
+support, warranty, indemnity, or other liability obligations and/or services
+consistent with this Licence. However, in accepting such obligations, You may
+act only on your own behalf and on your sole responsibility, not on behalf of
+the original Licensor or 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 the fact You have accepted
+any such warranty or additional liability.
+
+
+
+## 10. Acceptance of the Licence
+
+The provisions of this Licence can be accepted by clicking on an icon “I agree”
+placed under the bottom of a window displaying the text of this Licence or by
+affirming consent in any other similar way, in accordance with the rules of
+applicable law. Clicking on that icon indicates your clear and irrevocable
+acceptance of this Licence and all of its terms and conditions.
+
+Similarly, you irrevocably accept this Licence and all of its terms and
+conditions by exercising any rights granted to You by Article 2 of this Licence,
+such as the use of the Work, the creation by You of a Derivative Work or the
+Distribution and/or Communication by You of the Work or copies thereof.
+
+
+
+## 11. Information to the public
+
+In case of any Distribution and/or Communication of the Work by means of
+electronic communication by You (for example, by offering to download the Work
+from a remote location) the distribution channel or media (for example, a
+website) must at least provide to the public the information requested by the
+applicable law regarding the Licensor, the Licence and the way it may be
+accessible, concluded, stored and reproduced by the Licensee.
+
+
+
+## 12. Termination of the Licence
+
+The Licence and the rights granted hereunder will terminate automatically upon
+any breach by the Licensee of the terms of the Licence.
+
+Such a termination will not terminate the licences of any person who has
+received the Work from the Licensee under the Licence, provided such persons
+remain in full compliance with the Licence.
+
+
+
+## 13. Miscellaneous
+
+Without prejudice of Article 9 above, the Licence represents the complete
+agreement between the Parties as to the Work licensed hereunder.
+
+If any provision of the Licence is invalid or unenforceable under applicable
+law, this will not affect the validity or enforceability of the Licence as a
+whole. Such provision will be construed and/or reformed so as necessary to make
+it valid and enforceable.
+
+The European Commission may publish other linguistic versions and/or new
+versions of this Licence, so far this is required and reasonable, without
+reducing the scope of the rights granted by the Licence. New versions of the
+Licence will be published with a unique version number.
+
+All linguistic versions of this Licence, approved by the European Commission,
+have identical value. Parties can take advantage of the linguistic version of
+their choice.
+
+
+
+## 14. Jurisdiction
+
+Any litigation resulting from the interpretation of this License, arising
+between the European Commission, as a Licensor, and any Licensee, will be
+subject to the jurisdiction of the Court of Justice of the European Communities,
+as laid down in article 238 of the Treaty establishing the European Community.
+
+Any litigation arising between Parties, other than the European Commission, and
+resulting from the interpretation of this License, will be subject to the
+exclusive jurisdiction of the competent court where the Licensor resides or
+conducts its primary business.
+
+
+
+## 15. Applicable Law
+
+This Licence shall be governed by the law of the European Union country where
+the Licensor resides or has his registered office.
+
+This licence shall be governed by the Belgian law if:
+
+- a litigation arises between the European Commission, as a Licensor, and any
+- Licensee; the Licensor, other than the European Commission, has no residence
+- or registered office inside a European Union country.
+
+
+
+## Appendix
+
+
+
+“Compatible Licences” according to article 5 EUPL are:
+
+
+- GNU General Public License (GNU GPL) v. 2
+
+- Open Software License (OSL) v. 2.1, v. 3.0
+
+- Common Public License v. 1.0
+
+- Eclipse Public License v. 1.0
+
+- Cecill v. 2.0
+
diff --git a/dataminer-plugins/README.md b/dataminer-plugins/README.md
new file mode 100644
index 0000000..85dd719
--- /dev/null
+++ b/dataminer-plugins/README.md
@@ -0,0 +1,52 @@
+gCube CMS Suite
+--------------------------------------------------
+
+gCube CMS Suite is a set of components designed to manage complex space-temporal Documents defined by metadata Profiles.
+
+## Built with
+* [gCube SmartGears] (https://gcube.wiki.gcube-system.org/gcube/SmartGears) - The gCube SmartGears framework
+* [OpenJDK](https://openjdk.java.net/) - The JDK used
+* [JAX-RS](https://github.com/eclipse-ee4j/jaxrs-api) - Java™ API for RESTful Web Services
+* [Jersey](https://jersey.github.io/) - JAX-RS runtime
+* [Maven](https://maven.apache.org/) - Dependency Management
+
+## Documentation
+
+Documentation can be found [here](https://gcube.wiki.gcube-system.org/gcube/GeoPortal_Service).
+
+## Change log
+
+See [CHANGELOG.md](CHANGELOG.md).
+
+## License
+
+This project is licensed under the EUPL V.1.1 License - see the [LICENSE.md](LICENSE.md) file for details.
+
+## About the gCube Framework
+This software is part of the [gCubeFramework](https://www.gcube-system.org/ "gCubeFramework"): an
+open-source software toolkit used for building and operating Hybrid Data
+Infrastructures enabling the dynamic deployment of Virtual Research Environments
+by favouring the realisation of reuse oriented policies.
+
+The projects leading to this software have received funding from a series of European Union programmes including:
+
+- the Sixth Framework Programme for Research and Technological Development
+ - DILIGENT (grant no. 004260).
+- the Seventh Framework Programme for research, technological development and demonstration
+ - D4Science (grant no. 212488);
+ - D4Science-II (grant no.239019);
+ - ENVRI (grant no. 283465);
+ - iMarine(grant no. 283644);
+ - EUBrazilOpenBio (grant no. 288754).
+- the H2020 research and innovation programme
+ - SoBigData (grant no. 654024);
+ - PARTHENOS (grant no. 654119);
+ - EGIEngage (grant no. 654142);
+ - ENVRIplus (grant no. 654182);
+ - BlueBRIDGE (grant no. 675680);
+ - PerformFish (grant no. 727610);
+ - AGINFRAplus (grant no. 731001);
+ - DESIRA (grant no. 818194);
+ - ARIADNEplus (grant no. 823914);
+ - RISIS2 (grant no. 824091);
+
diff --git a/dataminer-plugins/pom.xml b/dataminer-plugins/pom.xml
new file mode 100644
index 0000000..c19f72b
--- /dev/null
+++ b/dataminer-plugins/pom.xml
@@ -0,0 +1,48 @@
+
+
+ 4.0.0
+
+ dataminer-plugins
+ 1.0.0-SNAPSHOT
+ gCube CMS - Dataminer Plugins
+
+
+
+ org.gcube.application.cms
+ gcube-cms-suite
+ 1.0.2-SNAPSHOT
+
+
+
+ https://code-repo.d4science.org/gCubeSystem
+
+
+
+
+
+ scm:git:${gitBaseUrl}/gcube-cms-suite
+ scm:git:${gitBaseUrl}/gcube-cms-suite
+ ${gitBaseUrl}/gcube-cms-suite
+
+
+
+
+
+
+ org.gcube.application.cms
+ cms-plugin-framework
+
+
+
+ org.gcube.application.cms
+ cms-test-commons
+ test
+
+
+
+
+
+
+
diff --git a/geoportal-client/pom.xml b/geoportal-client/pom.xml
index b6065f8..a435eb6 100644
--- a/geoportal-client/pom.xml
+++ b/geoportal-client/pom.xml
@@ -11,7 +11,7 @@
org.gcube.application.cms
gcube-cms-suite
- 1.0.1
+ 1.0.2-SNAPSHOT
diff --git a/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/BasicVreTests.java b/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/BasicVreTests.java
index 151c7fa..cacdbdb 100644
--- a/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/BasicVreTests.java
+++ b/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/BasicVreTests.java
@@ -1,15 +1,19 @@
package org.gcube.application.geoportal.clients;
import org.gcube.application.cms.tests.TokenSetter;
+import org.gcube.application.geoportal.common.utils.tests.GCubeTest;
import org.junit.BeforeClass;
-public class BasicVreTests {
+import static org.junit.Assume.assumeTrue;
+
+public class BasicVreTests extends GCubeTest {
@BeforeClass
public static void setScope(){
+ assumeTrue(isTestInfrastructureEnabled());
// TokenSetter.set("/pred4s/preprod/preVRE");
// TokenSetter.set("/d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype");
- TokenSetter.set("/gcube/devsec/devVRE");
+ TokenSetter.set(GCubeTest.getContext());
}
diff --git a/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/ProfiledDocumentsTest.java b/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/ProfiledDocumentsTest.java
index 8073eb5..d80d632 100644
--- a/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/ProfiledDocumentsTest.java
+++ b/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/ProfiledDocumentsTest.java
@@ -6,6 +6,7 @@ import org.gcube.application.geoportal.common.model.document.ProfiledDocument;
import org.gcube.application.geoportal.common.model.rest.Configuration;
import org.gcube.application.geoportal.common.model.rest.QueryRequest;
import org.gcube.application.geoportal.common.rest.ProfiledDocumentsI;
+import org.gcube.application.geoportal.common.utils.tests.GCubeTest;
import org.junit.Test;
import java.rmi.RemoteException;
@@ -13,6 +14,7 @@ import java.util.concurrent.atomic.AtomicLong;
import static junit.framework.TestCase.assertTrue;
import static org.gcube.application.geoportal.client.GeoportalAbstractPlugin.*;
+import static org.junit.Assume.assumeTrue;
public class ProfiledDocumentsTest> extends BasicVreTests{
@@ -25,6 +27,7 @@ public class ProfiledDocumentsTest client = (ProfiledDocumentsI) getClient();
Configuration config=client.getConfiguration();
System.out.println("Configuration is "+ config);
@@ -33,6 +36,7 @@ public class ProfiledDocumentsTest client = (ProfiledDocumentsI) getClient();
AtomicLong counter=new AtomicLong(0);
client.query(new QueryRequest()).forEachRemaining( M -> counter.incrementAndGet());
@@ -43,6 +47,7 @@ public class ProfiledDocumentsTest client = (ProfiledDocumentsI) getClient();
AtomicLong counter=new AtomicLong(0);
client.query(new QueryRequest()).forEachRemaining( m -> {
diff --git a/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/legacy/StatefulClientTests.java b/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/legacy/StatefulClientTests.java
index 6ca1c57..0c97682 100644
--- a/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/legacy/StatefulClientTests.java
+++ b/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/legacy/StatefulClientTests.java
@@ -2,6 +2,7 @@ package org.gcube.application.geoportal.clients.legacy;
import static org.gcube.application.geoportal.client.GeoportalAbstractPlugin.statefulMongoConcessioni;
import static org.junit.Assert.*;
+import static org.junit.Assume.assumeTrue;
import java.io.File;
import java.io.FileInputStream;
@@ -16,6 +17,7 @@ import org.gcube.application.geoportal.common.model.legacy.*;
import org.gcube.application.geoportal.common.model.legacy.report.ValidationReport.ValidationStatus;
import org.gcube.application.geoportal.common.model.rest.TempFile;
import org.gcube.application.geoportal.common.utils.StorageUtils;
+import org.gcube.application.geoportal.common.utils.tests.GCubeTest;
import org.gcube.contentmanagement.blobstorage.transport.backend.RemoteBackendException;
import org.junit.Test;
@@ -95,6 +97,7 @@ public class StatefulClientTests extends BasicVreTests {
@Test
public void testRegisterNew() throws RemoteBackendException, FileNotFoundException, Exception {
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
Concessione published=publishNew();
@@ -116,6 +119,7 @@ public class StatefulClientTests extends BasicVreTests {
@Test
public void delete() throws Exception {
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
ConcessioniManagerI manager=statefulMongoConcessioni().build();
StorageUtils storage=new StorageUtils();
diff --git a/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/legacy/StatelessClientTests.java b/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/legacy/StatelessClientTests.java
index 589b47d..c7844c5 100644
--- a/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/legacy/StatelessClientTests.java
+++ b/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/legacy/StatelessClientTests.java
@@ -1,18 +1,5 @@
package org.gcube.application.geoportal.clients.legacy;
-import static org.gcube.application.geoportal.client.GeoportalAbstractPlugin.mongoConcessioni;
-import static org.junit.Assert.*;
-import static org.junit.Assume.assumeTrue;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.nio.charset.Charset;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.concurrent.atomic.AtomicLong;
-
-import com.sun.xml.internal.ws.api.addressing.AddressingPropertySet;
-import org.bson.Document;
import org.gcube.application.cms.tests.model.concessioni.TestConcessioniFilters;
import org.gcube.application.cms.tests.model.concessioni.TestConcessioniModel;
import org.gcube.application.cms.tests.model.concessioni.TestConcessioniQueries;
@@ -23,25 +10,34 @@ import org.gcube.application.geoportal.common.model.legacy.*;
import org.gcube.application.geoportal.common.model.legacy.Concessione.Paths;
import org.gcube.application.geoportal.common.model.legacy.report.ValidationReport.ValidationStatus;
import org.gcube.application.geoportal.common.model.rest.AddSectionToConcessioneRequest;
-import org.gcube.application.geoportal.common.model.rest.QueryRequest;
import org.gcube.application.geoportal.common.rest.MongoConcessioni;
import org.gcube.application.geoportal.common.utils.FileSets;
-import org.gcube.application.geoportal.common.utils.Files;
import org.gcube.application.geoportal.common.utils.StorageUtils;
+import org.gcube.application.geoportal.common.utils.tests.GCubeTest;
import org.junit.Test;
+import java.io.File;
+import java.util.Iterator;
+import java.util.concurrent.atomic.AtomicLong;
+
+import static org.gcube.application.geoportal.client.GeoportalAbstractPlugin.mongoConcessioni;
+import static org.junit.Assert.*;
+import static org.junit.Assume.assumeTrue;
+
public class StatelessClientTests extends BasicVreTests {
- private MongoConcessioni client=mongoConcessioni().build();
+ private final MongoConcessioni client=mongoConcessioni().build();
@Test
public void getConfiguration() throws Exception {
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
System.out.println(client.getCurrentConfiguration());
}
@Test
public void searches() throws Exception {
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
TestConcessioniFilters.filters.forEach((k, v)->{
try {
System.out.println("Count for " + k + "\t" + count(client.search(v)));
@@ -56,7 +52,7 @@ public class StatelessClientTests extends BasicVreTests {
@Test
public void query() throws Exception {
-
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
System.out.println("FRA "+ count(client.query(
Queries.parse(TestConcessioniQueries.queries.get("emptyresult.json")))));
@@ -94,6 +90,7 @@ public class StatelessClientTests extends BasicVreTests {
@Test
public void testList() throws Exception {
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
final AtomicLong counter=new AtomicLong();
long before=System.currentTimeMillis();
client.getList().forEachRemaining((Concessione c)-> {counter.addAndGet(1);});
@@ -102,6 +99,7 @@ public class StatelessClientTests extends BasicVreTests {
@Test
public void testCreateNew() throws Exception {
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
Concessione c= client.createNew(TestConcessioniModel.prepareEmptyConcessione());
assertNotNull(c);
assertNotNull(c.getMongo_id());
@@ -109,6 +107,7 @@ public class StatelessClientTests extends BasicVreTests {
@Test
public void testReplace() throws Exception {
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
Concessione testObject= client.createNew(TestConcessioniModel.prepareEmptyConcessione());
String title="My new shiny Title";
testObject.setNome(title);
@@ -118,6 +117,7 @@ public class StatelessClientTests extends BasicVreTests {
@Test
public void testUploadFileSet() throws Exception {
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
Concessione testObject= client.createNew(TestConcessioniModel.prepareConcessione());
AddSectionToConcessioneRequest request=
Serialization.convert(
@@ -136,6 +136,7 @@ public class StatelessClientTests extends BasicVreTests {
@Test
public void testDeleteById() throws Exception {
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
Concessione c= client.createNew(TestConcessioniModel.prepareEmptyConcessione());
client.deleteById(c.getMongo_id());
}
@@ -143,6 +144,7 @@ public class StatelessClientTests extends BasicVreTests {
@Test
public void testPublish() throws Exception {
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
Concessione c=prepare();
assertTrue(c.getReport().getStatus().equals(ValidationStatus.PASSED));
@@ -152,7 +154,7 @@ public class StatelessClientTests extends BasicVreTests {
@Test
public void testCleanFileSet() throws Exception {
-
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
Concessione testObject=prepare();
System.out.println("Object is "+testObject.getPosizionamentoScavo());
//Precheck to be sure
diff --git a/geoportal-common/pom.xml b/geoportal-common/pom.xml
index 513c053..3a1311d 100644
--- a/geoportal-common/pom.xml
+++ b/geoportal-common/pom.xml
@@ -10,7 +10,7 @@
org.gcube.application.cms
gcube-cms-suite
- 1.0.1
+ 1.0.2-SNAPSHOT
diff --git a/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/JSONPathWrapper.java b/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/JSONPathWrapper.java
index 88c2b75..823d90e 100644
--- a/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/JSONPathWrapper.java
+++ b/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/JSONPathWrapper.java
@@ -86,6 +86,7 @@ public class JSONPathWrapper {
} else{
log.debug("Path is not definte, evaluating matching paths..");
for(String p : getMatchingPaths(path)){
+ log.debug("Actually setting {} as {} ",p,toSet);
setElement(p,toSet);
}
}
diff --git a/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/document/filesets/GCubeSDILayer.java b/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/document/filesets/GCubeSDILayer.java
index 86e9a5b..b099eaf 100644
--- a/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/document/filesets/GCubeSDILayer.java
+++ b/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/document/filesets/GCubeSDILayer.java
@@ -62,7 +62,7 @@ public class GCubeSDILayer extends Materialization{
}
public List getOGCLinks(){return this.get(OGC_LINKS, List.class);}
- public BBOX getBBox(){return this.get(B_BOX,BBOX.class);}
+ public Object getBBox(){return this.get(B_BOX);}
public List getPlatformInfo(){return this.get(PLATFORM_INFO,List.class);}
}
diff --git a/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/profile/Field.java b/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/profile/Field.java
index ed53b6c..9ed6543 100644
--- a/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/profile/Field.java
+++ b/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/profile/Field.java
@@ -30,6 +30,11 @@ public class Field extends Document {
return this.getString(TYPE);
};
+ public Boolean isLeaf(){
+ List children = getChildren();
+ return children == null || children.isEmpty() || children.get(0)==null;
+ }
+
public List getChildren(){
return this.get(CHILDREN,List.class);
}
diff --git a/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/profile/HandlerDeclaration.java b/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/profile/HandlerDeclaration.java
index ba012e4..f39854e 100644
--- a/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/profile/HandlerDeclaration.java
+++ b/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/profile/HandlerDeclaration.java
@@ -7,10 +7,14 @@ import org.bson.Document;
@Data
public class HandlerDeclaration {
- @JsonProperty("_id")
+ public static final String ID="_id";
+ public static final String TYPE="_TYPE";
+ public static final String CONFIGURATION="_configuration";
+
+ @JsonProperty(ID)
private String id;
- @JsonProperty("_type")
+ @JsonProperty(TYPE)
private String type;
- @JsonProperty("_configuration")
+ @JsonProperty(CONFIGURATION)
private Document configuration;
}
diff --git a/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/profile/Profile.java b/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/profile/Profile.java
index 3a9200f..bbaf283 100644
--- a/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/profile/Profile.java
+++ b/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/profile/Profile.java
@@ -11,11 +11,14 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.vdurmont.semver4j.Semver;
import lombok.Data;
import lombok.NoArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import lombok.extern.slf4j.XSlf4j;
import org.gcube.application.geoportal.common.model.document.accounting.AccountingInfo;
@Data
@NoArgsConstructor
@XmlRootElement
+@Slf4j
public class Profile{
public static final String ID="_id";
@@ -55,15 +58,33 @@ public class Profile{
* Returns map Type -> Handler Declaration
* @return
*/
- public Map> getHandlersMap(){
+ public Map> getHandlersMapByType(){
HashMap> toReturn=new HashMap<>();
handlers.forEach(h->{
+ try {
if(!toReturn.containsKey(h.getType()))
toReturn.put(h.getType(),new ArrayList<>());
toReturn.get(h.getType()).add(h);
+ }catch (Throwable t){log.error("Invalid profile : unable to get Handler Map by Type with {} in profile [ID {}]",h,this.getId(),t);}
});
return toReturn;
}
+ /**
+ * Returns map Type -> Handler Declaration
+ * @return
+ */
+ public Map> getHandlersMapByID(){
+ HashMap> toReturn=new HashMap<>();
+ handlers.forEach(h->{
+ try {
+ if (!toReturn.containsKey(h.getId()))
+ toReturn.put(h.getId(), new ArrayList<>());
+ toReturn.get(h.getId()).add(h);
+ }catch (Throwable t){
+ log.error("Invalid profile : unable to get Handler Map by ID with {} in profile [ID {}]",h,this.getId(),t);}
+ });
+ return toReturn;
+ }
}
diff --git a/geoportal-common/src/main/java/org/gcube/application/geoportal/common/utils/Files.java b/geoportal-common/src/main/java/org/gcube/application/geoportal/common/utils/Files.java
index fc04d6b..a8145e6 100644
--- a/geoportal-common/src/main/java/org/gcube/application/geoportal/common/utils/Files.java
+++ b/geoportal-common/src/main/java/org/gcube/application/geoportal/common/utils/Files.java
@@ -96,6 +96,6 @@ public class Files {
toFix=toFix.substring(0,toFix.indexOf("."));
}
return toFix.toLowerCase().
- replaceAll("[\\*\\+\\/\\\\ \\[\\]\\(\\)\\.\\\"\\:\\;\\|]","_")+extension;
+ replaceAll("[\\*\\+\\/\\\\ \\[\\]\\(\\)\\.\\\"\\:\\;\\|\\=]","_")+extension;
}
}
diff --git a/geoportal-common/src/main/java/org/gcube/application/geoportal/common/utils/tests/GCubeTest.java b/geoportal-common/src/main/java/org/gcube/application/geoportal/common/utils/tests/GCubeTest.java
new file mode 100644
index 0000000..aba77e4
--- /dev/null
+++ b/geoportal-common/src/main/java/org/gcube/application/geoportal/common/utils/tests/GCubeTest.java
@@ -0,0 +1,30 @@
+package org.gcube.application.geoportal.common.utils.tests;
+
+public class GCubeTest {
+
+ public static String getContext() {
+ String testContext=null;
+ testContext = System.getProperty("testContext");
+ if(testContext==null) {
+ // trying with env
+ testContext=System.getenv("testContext");
+ }
+
+
+ testContext = "/pred4s/preprod/preVRE";
+
+
+
+ System.out.println("TEST CONTEXT = "+testContext);
+ return testContext;
+ }
+
+
+
+ public static boolean isTestInfrastructureEnabled() {
+ return getContext()!=null;
+ }
+
+
+
+}
diff --git a/geoportal-common/src/test/java/org/gcube/application/geoportal/common/StorageUtilsTest.java b/geoportal-common/src/test/java/org/gcube/application/geoportal/common/StorageUtilsTest.java
index 23235fd..8a04832 100644
--- a/geoportal-common/src/test/java/org/gcube/application/geoportal/common/StorageUtilsTest.java
+++ b/geoportal-common/src/test/java/org/gcube/application/geoportal/common/StorageUtilsTest.java
@@ -1,10 +1,12 @@
package org.gcube.application.geoportal.common;
import com.mongodb.MongoWaitQueueFullException;
+import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.gcube.application.geoportal.common.rest.InterfaceConstants;
import org.gcube.application.geoportal.common.utils.ContextUtils;
import org.gcube.application.geoportal.common.utils.StorageUtils;
+import org.gcube.application.geoportal.common.utils.tests.GCubeTest;
import org.gcube.contentmanagement.blobstorage.service.IClient;
import org.gcube.contentmanager.storageclient.wrapper.AccessType;
import org.gcube.contentmanager.storageclient.wrapper.MemoryType;
@@ -22,6 +24,8 @@ import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
+import static org.junit.Assume.assumeTrue;
+
@Slf4j
public class StorageUtilsTest {
@@ -29,7 +33,8 @@ public class StorageUtilsTest {
@Before
public void init(){
- TokenSetter.set("/gcube/devsec/devVRE");
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
+ TokenSetter.set(GCubeTest.getContext());
client=new StorageClient(InterfaceConstants.SERVICE_CLASS, InterfaceConstants.SERVICE_NAME,
ContextUtils.getCurrentCaller(), AccessType.SHARED, MemoryType.VOLATILE).getClient();
}
@@ -46,7 +51,7 @@ public class StorageUtilsTest {
@Test
public void testParallelStorage() throws FileNotFoundException, InterruptedException {
-
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
ExecutorService service = Executors.newFixedThreadPool(10);
LocalDateTime start=LocalDateTime.now();
AtomicLong executed = new AtomicLong(0);
@@ -80,7 +85,7 @@ public class StorageUtilsTest {
@Test
public void testSerialStorage() throws FileNotFoundException {
- TokenSetter.set("/gcube/devsec/devVRE");
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
//get client
client=new StorageClient(InterfaceConstants.SERVICE_CLASS, InterfaceConstants.SERVICE_NAME,
ContextUtils.getCurrentCaller(), AccessType.SHARED, MemoryType.VOLATILE).getClient();
diff --git a/geoportal-common/src/test/java/org/gcube/application/geoportal/common/model/JSONPathTests.java b/geoportal-common/src/test/java/org/gcube/application/geoportal/common/model/JSONPathTests.java
index 27458fb..15d70ba 100644
--- a/geoportal-common/src/test/java/org/gcube/application/geoportal/common/model/JSONPathTests.java
+++ b/geoportal-common/src/test/java/org/gcube/application/geoportal/common/model/JSONPathTests.java
@@ -14,6 +14,7 @@ import org.gcube.application.geoportal.common.model.document.ProfiledDocument;
import org.gcube.application.geoportal.common.model.document.filesets.Materialization;
import org.gcube.application.geoportal.common.model.document.filesets.RegisteredFileSet;
import org.gcube.application.geoportal.common.model.document.lifecycle.TriggeredEvents;
+import org.gcube.application.geoportal.common.model.profile.HandlerDeclaration;
import org.gcube.application.geoportal.common.utils.Files;
import org.junit.Test;
@@ -30,7 +31,7 @@ public class JSONPathTests {
static File baseFolder=new File("../test-data/profiledDocuments");
private JSONPathWrapper profileNavigator() throws IOException {
- return getNavigator("basicProfile.json");
+ return getNavigator("profiles/basicProfile.json");
}
private JSONPathWrapper getNavigator(String filename) throws IOException {
@@ -73,8 +74,8 @@ public class JSONPathTests {
checkAddElement(wrapper,"$..triggeredEvents",event);
- wrapper=getNavigator("basicProfile.json");
- checkPutElement(wrapper,"$..[?(@.id == 'SDI-Default-Materializer')].configuration","additional",
+ wrapper=getNavigator("profiles/basicProfile.json");
+ checkPutElement(wrapper,"$..[?(@."+HandlerDeclaration.ID+" == 'SDI-Default-Materializer')]."+ HandlerDeclaration.CONFIGURATION,"additional",
Collections.singletonMap("myKey","myField"));
}
diff --git a/geoportal-service/pom.xml b/geoportal-service/pom.xml
index 55a71c3..cc3c96a 100644
--- a/geoportal-service/pom.xml
+++ b/geoportal-service/pom.xml
@@ -11,7 +11,7 @@
org.gcube.application.cms
gcube-cms-suite
- 1.0.1
+ 1.0.2-SNAPSHOT
diff --git a/geoportal-service/src/main/java/org/gcube/application/geoportal/service/engine/mongo/ProfiledMongoManager.java b/geoportal-service/src/main/java/org/gcube/application/geoportal/service/engine/mongo/ProfiledMongoManager.java
index b8a4a48..da98e4b 100644
--- a/geoportal-service/src/main/java/org/gcube/application/geoportal/service/engine/mongo/ProfiledMongoManager.java
+++ b/geoportal-service/src/main/java/org/gcube/application/geoportal/service/engine/mongo/ProfiledMongoManager.java
@@ -96,7 +96,7 @@ public class ProfiledMongoManager extends MongoManager implements MongoManagerI<
try{
LifecycleManager toReturn=null;
//Getting Lifecycle Manager declaration from Profile
- List handlerDeclarations= profile.getHandlersMap().get(PluginDescriptor.BaseTypes.LIFECYCLE_MANAGER);
+ List handlerDeclarations= profile.getHandlersMapByType().get(PluginDescriptor.BaseTypes.LIFECYCLE_MANAGER);
if(handlerDeclarations==null || handlerDeclarations.isEmpty()) throw new ConfigurationException("No Lifecycle Handler defined for profile ID "+profile.getId());
if(handlerDeclarations.size()>1) throw new ConfigurationException("Too many Lifecycle Handlers defined ("+handlerDeclarations+") in profile ID "+profile.getId());
diff --git a/geoportal-service/src/main/java/org/gcube/application/geoportal/service/engine/providers/PluginManager.java b/geoportal-service/src/main/java/org/gcube/application/geoportal/service/engine/providers/PluginManager.java
index d9c2d8f..43b9e6c 100644
--- a/geoportal-service/src/main/java/org/gcube/application/geoportal/service/engine/providers/PluginManager.java
+++ b/geoportal-service/src/main/java/org/gcube/application/geoportal/service/engine/providers/PluginManager.java
@@ -4,10 +4,7 @@ import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.gcube.application.cms.caches.AbstractScopedMap;
-import org.gcube.application.cms.plugins.InitializablePlugin;
-import org.gcube.application.cms.plugins.LifecycleManager;
-import org.gcube.application.cms.plugins.Plugin;
-import org.gcube.application.cms.plugins.PluginManagerInterface;
+import org.gcube.application.cms.plugins.*;
import org.gcube.application.cms.plugins.faults.InitializationException;
import org.gcube.application.cms.plugins.faults.ShutDownException;
import org.gcube.application.cms.plugins.reports.InitializationReport;
@@ -37,31 +34,20 @@ public class PluginManager extends AbstractScopedMap im
super("Plugin Cache");
// reflections
- Reflections reflections = new Reflections(
- new ConfigurationBuilder()
- .forPackage("org.gcube.application.cms")
- .filterInputsBy(new FilterBuilder().includePackage("org.gcube.application.cms")));
-
- reflections.getSubTypesOf(Plugin.class).iterator().forEachRemaining(pluginClass->{
- if(!pluginClass.isInterface() && !Modifier.isAbstract(pluginClass.getModifiers())){
- try {
- Plugin plugin = pluginClass.newInstance();
- log.debug("Loading {} description : {}", plugin, plugin.getDescriptor());
- implementations.put(plugin.getDescriptor().getId(), plugin);
-
- if(plugin instanceof LifecycleManager)
- ((LifecycleManager)plugin).setPluginManager(this);
- }catch (Throwable t){
- log.warn("Unable to instantiate Plugin "+pluginClass,t);
- }
- }
-
- });
-
+ implementations.putAll(PluginsReflections.load());
log.info("Loaded {} plugins",implementations.keySet().size());
+
+
+
// Init plugins
implementations.forEach((id,p)->{
+ log.info("Registering plugin Manager ");
+ if(p instanceof LifecycleManager) {
+ log.debug("Registering plugin Manager to {} ",id);
+ ((LifecycleManager) p).setPluginManager(this);
+ }
+
if(p instanceof InitializablePlugin){
log.info("INIT Plugin {}",id);
try {
@@ -79,10 +65,12 @@ public class PluginManager extends AbstractScopedMap im
@Override
protected PluginMap retrieveObject() throws ConfigurationException {
+ String context=ContextUtils.getCurrentScope();
+ log.warn("PLUGIN INITIALIZTIONS IN CONTEXT {} ",context);
// Init plugins
implementations.forEach((id,p)->{
if(p instanceof InitializablePlugin){
- log.info("INIT Plugin {} in context {} ",id, ContextUtils.getCurrentScope());
+ log.info("INIT Plugin {} in context {} ",id, context);
try {
InitializablePlugin ip=(InitializablePlugin) p;
logReport(ip,ip.initInContext());
diff --git a/geoportal-service/src/main/resources/profiles/profiledConcessioni.json b/geoportal-service/src/main/resources/profiles/profiledConcessioni.json
index c5a23d5..14b2984 100644
--- a/geoportal-service/src/main/resources/profiles/profiledConcessioni.json
+++ b/geoportal-service/src/main/resources/profiles/profiledConcessioni.json
@@ -70,6 +70,21 @@
+ {
+ "_id" : "SDI-Indexer-Plugin",
+ "_type" : "Indexer",
+ "_configuration" : {
+ "bboxEvaluation" : ["$..posizionamentoScavo.._bbox"],
+ "explicitFieldMapping" : [
+ {"name" : "titolo", "path" : "$._theDocument.title", "type" : "TEXT"}
+ ],
+ "jslt" : {},
+ "additionalLayers" : [
+ {"source" : {"url" : "..."},"toSetTitle":""}
+ ]
+ }
+ },
+
{
"_id" : "org.gcube....geoportal-data-entry-portlet",
"_type" : "DATA_ENTRY_GUI",
diff --git a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/BasicServiceTestUnit.java b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/BasicServiceTestUnit.java
index 0a714ed..8b198b3 100644
--- a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/BasicServiceTestUnit.java
+++ b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/BasicServiceTestUnit.java
@@ -2,6 +2,7 @@ package org.gcube.application.geoportal.service;
import lombok.extern.slf4j.Slf4j;
import org.gcube.application.cms.tests.TokenSetter;
+import org.gcube.application.geoportal.common.utils.tests.GCubeTest;
import org.gcube.application.geoportal.service.rest.GuardedMethod;
import org.gcube.application.cms.serialization.Serialization;
import org.glassfish.jersey.test.JerseyTest;
@@ -9,6 +10,9 @@ import org.junit.BeforeClass;
import javax.ws.rs.core.Application;
import javax.ws.rs.core.Response;
+
+import static org.junit.Assume.assumeTrue;
+
@Slf4j
public class BasicServiceTestUnit extends JerseyTest {
@@ -19,30 +23,17 @@ public class BasicServiceTestUnit extends JerseyTest {
return new GeoPortalService();
}
-// protected static String scope="/gcube/devsec/devVRE";
- protected static String scope="/pred4s/preprod/preVRE";
-// protected static String scope="/d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype";
+
@BeforeClass
public static void init() {
-
GuardedMethod.addPreoperation(new Runnable() {
@Override
public void run() {
- log.debug("TEST IMPL : Setting context "+scope+" in received call");
- TokenSetter.set(scope);
+ String context = GCubeTest.getContext();
+ log.debug("TEST IMPL : Setting context "+context+" in received call");
+ TokenSetter.set(context);
}
});
-// ImplementationProvider.get().setStorageProvider(
-// new StorageClientProvider(){
-// @Override
-// public StorageUtils retrieveObject(){
-// new StorageUtils(){
-// @Override
-// getP
-// }
-// };
-// }
-// );
}
diff --git a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/InexistentProfileTests.java b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/InexistentProfileTests.java
index 48ed2ba..778c921 100644
--- a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/InexistentProfileTests.java
+++ b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/InexistentProfileTests.java
@@ -1,6 +1,7 @@
package org.gcube.application.geoportal.service;
import org.gcube.application.geoportal.common.rest.InterfaceConstants;
+import org.gcube.application.geoportal.service.profiledDocuments.AbstractProfiledDocumentsTests;
import org.junit.Test;
import javax.ws.rs.client.WebTarget;
diff --git a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/MongoTests.java b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/MongoTests.java
index e7e47c5..a519d2a 100644
--- a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/MongoTests.java
+++ b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/MongoTests.java
@@ -8,6 +8,7 @@ import com.mongodb.client.model.Projections;
import org.bson.Document;
import org.gcube.application.cms.tests.TokenSetter;
import org.gcube.application.cms.implementations.ImplementationProvider;
+import org.gcube.application.geoportal.common.utils.tests.GCubeTest;
import org.gcube.application.geoportal.service.engine.mongo.MongoManager;
import org.gcube.application.geoportal.service.engine.providers.MongoClientProvider;
import org.gcube.application.geoportal.service.model.internal.db.Mongo;
@@ -17,6 +18,8 @@ import org.junit.Test;
import java.io.IOException;
+import static org.junit.Assume.assumeTrue;
+
public class MongoTests {
public static class MongoTester extends MongoManager {
@@ -35,6 +38,8 @@ public class MongoTests {
@BeforeClass
public static final void init() {
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
+
ImplementationProvider.get().setEngine(new MongoClientProvider() {
@Override
public Mongo getObject() throws ConfigurationException {
@@ -68,6 +73,7 @@ public class MongoTests {
@Test
public void queries() throws ConfigurationException {
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
MongoTester tester=new MongoTester();
System.out.println("Using builders..");
tester.getCollection().find(Document.parse("{\"report.status\" : \"WARNING\"}")).
diff --git a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/Profiles.java b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/Profiles.java
deleted file mode 100644
index 3da4a69..0000000
--- a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/Profiles.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package org.gcube.application.geoportal.service;
-
-import org.gcube.application.cms.tests.TestProfiles;
-import org.junit.Test;
-
-public class Profiles {
-
-
- @Test
- public void getFields(){
- TestProfiles.profiles.forEach((k,v)->{
- System.out.println(k+"\t"+v);
- v.getSchema().getChildren().forEach(
- i-> System.out.println(i.getClass()+"\t"+i)
- );
- });
- }
-
-}
diff --git a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/engine/caches/Caches.java b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/engine/caches/Caches.java
index a45de54..164d298 100644
--- a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/engine/caches/Caches.java
+++ b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/engine/caches/Caches.java
@@ -6,6 +6,7 @@ import org.gcube.application.cms.tests.TokenSetter;
import org.gcube.application.cms.tests.model.concessioni.TestConcessioniModel;
import org.gcube.application.geoportal.common.utils.StorageUtils;
+import org.gcube.application.geoportal.common.utils.tests.GCubeTest;
import org.gcube.application.geoportal.service.BasicServiceTestUnit;
import org.gcube.application.cms.implementations.ImplementationProvider;
import org.gcube.application.geoportal.service.engine.mongo.ConcessioniMongoManager;
@@ -24,14 +25,15 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
import static org.junit.Assert.assertTrue;
+import static org.junit.Assume.assumeTrue;
@Slf4j
public class Caches extends BasicServiceTestUnit {
@Test
public void testCache() throws ConfigurationException {
-
- TokenSetter.set("/gcube/devsec/devVRE");
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
+ TokenSetter.set(GCubeTest.getContext());
Duration ttl=Duration.of(10, ChronoUnit.SECONDS);
@@ -66,9 +68,10 @@ public class Caches extends BasicServiceTestUnit {
}
- @Test
+// @Test
public void mongoconnections() throws ConfigurationException, InterruptedException {
- TokenSetter.set(scope);
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
+ TokenSetter.set(GCubeTest.getContext());
ExecutorService service = Executors.newFixedThreadPool(1000);
LocalDateTime start=LocalDateTime.now();
AtomicLong executed = new AtomicLong(0);
@@ -101,9 +104,10 @@ public class Caches extends BasicServiceTestUnit {
}
- @Test
+ //@Test
public void testStorageCache() throws ConfigurationException, FileNotFoundException, InterruptedException {
- TokenSetter.set(scope);
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
+ TokenSetter.set(GCubeTest.getContext());
ExecutorService service = Executors.newFixedThreadPool(10);
LocalDateTime start=LocalDateTime.now();
AtomicLong executed = new AtomicLong(0);
diff --git a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/engine/materialization/SDITests.java b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/engine/materialization/SDITests.java
index 70639d3..1d008d2 100644
--- a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/engine/materialization/SDITests.java
+++ b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/engine/materialization/SDITests.java
@@ -9,6 +9,7 @@ import org.gcube.application.geoportal.common.model.legacy.Concessione;
import org.gcube.application.geoportal.common.model.legacy.GeoServerContent;
import org.gcube.application.geoportal.common.model.legacy.LayerConcessione;
import org.gcube.application.geoportal.common.utils.Files;
+import org.gcube.application.geoportal.common.utils.tests.GCubeTest;
import org.gcube.application.geoportal.service.engine.postgis.PostgisIndex;
import org.gcube.application.geoportal.common.model.rest.ConfigurationException;
import org.gcube.application.geoportal.service.model.internal.faults.SDIInteractionException;
@@ -25,17 +26,17 @@ import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
+import static org.junit.Assume.assumeTrue;
+
@Slf4j
-public class SDITests {
+public class SDITests extends GCubeTest {
+
- @Before
- public void init(){
- TokenSetter.set("/gcube/devsec/devVRE");
- }
@Test
public void registerCentroidsLayer() throws SDIInteractionException, SQLException, ConfigurationException {
+ assumeTrue(isTestInfrastructureEnabled());
PostgisIndex index=new PostgisIndex();
}
diff --git a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/ConcessioniOverMongoTest.java b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/legacy/ConcessioniOverMongoTest.java
similarity index 93%
rename from geoportal-service/src/test/java/org/gcube/application/geoportal/service/ConcessioniOverMongoTest.java
rename to geoportal-service/src/test/java/org/gcube/application/geoportal/service/legacy/ConcessioniOverMongoTest.java
index b6739a1..ecda221 100644
--- a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/ConcessioniOverMongoTest.java
+++ b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/legacy/ConcessioniOverMongoTest.java
@@ -1,4 +1,4 @@
-package org.gcube.application.geoportal.service;
+package org.gcube.application.geoportal.service.legacy;
import org.bson.Document;
import org.gcube.application.cms.tests.TokenSetter;
@@ -18,6 +18,8 @@ import org.gcube.application.geoportal.common.utils.FileSets;
import org.gcube.application.geoportal.common.utils.Files;
import org.gcube.application.geoportal.common.utils.StorageUtils;
import org.gcube.application.cms.serialization.Serialization;
+import org.gcube.application.geoportal.common.utils.tests.GCubeTest;
+import org.gcube.application.geoportal.service.BasicServiceTestUnit;
import org.geotoolkit.referencing.operation.provider.PolarStereographic;
import org.json.JSONObject;
import org.junit.Assert;
@@ -36,8 +38,9 @@ import java.util.Map;
import java.util.concurrent.atomic.AtomicLong;
import static org.junit.Assert.*;
+import static org.junit.Assume.assumeTrue;
-public class ConcessioniOverMongoTest extends BasicServiceTestUnit{
+public class ConcessioniOverMongoTest extends BasicServiceTestUnit {
private static final String PATH=InterfaceConstants.Methods.MONGO_CONCESSIONI;
@@ -47,7 +50,8 @@ public class ConcessioniOverMongoTest extends BasicServiceTestUnit{
@Before
public void setContext(){
- TokenSetter.set(scope);
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
+ TokenSetter.set(GCubeTest.getContext());
}
//Used for local test data
@@ -138,12 +142,14 @@ public class ConcessioniOverMongoTest extends BasicServiceTestUnit{
@Test
public void list() {
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
WebTarget target=target(PATH);
System.out.println(target.request(MediaType.APPLICATION_JSON).get(List.class));
}
@Test
public void search() throws Exception {
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
WebTarget target=target(PATH);
AtomicLong validatedCount= new AtomicLong(0);
Iterator it=search(TestConcessioniFilters.filters.get("validated.json"),target);
@@ -153,6 +159,7 @@ public class ConcessioniOverMongoTest extends BasicServiceTestUnit{
@Test
public void query() throws Exception {
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
WebTarget target=target(PATH);
Iterator it;
@@ -173,6 +180,7 @@ public class ConcessioniOverMongoTest extends BasicServiceTestUnit{
@Test
public void getConfiguration() throws Exception {
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
WebTarget target=target(PATH);
System.out.println(check(target.path(InterfaceConstants.Methods.CONFIGURATION_PATH).request(MediaType.APPLICATION_JSON).get(),String.class));
}
@@ -180,6 +188,7 @@ public class ConcessioniOverMongoTest extends BasicServiceTestUnit{
@Test
public void createNew() throws Exception {
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
WebTarget target=target(PATH);
Concessione c=register(target,TestConcessioniModel.prepareConcessione());
Assert.assertTrue(c.getMongo_id()!=null&&!c.getMongo_id().isEmpty());
@@ -188,6 +197,7 @@ public class ConcessioniOverMongoTest extends BasicServiceTestUnit{
@Test
public void delete() throws Exception {
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
WebTarget target=target(PATH);
Concessione c = get(target);
@@ -203,6 +213,7 @@ public class ConcessioniOverMongoTest extends BasicServiceTestUnit{
@Test
public void republish() throws Exception{
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
WebTarget target=target(PATH);
Concessione published=getFullPublished(target);
//Concessione published=getById(target,"6155ba6002ad3d2c23b72b5a");
@@ -215,6 +226,7 @@ public class ConcessioniOverMongoTest extends BasicServiceTestUnit{
@Test
public void handlePrecise() throws Exception {
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
//Republishing
WebTarget target=target(PATH);
//String id="61e6d5212f7b172ac9874879";
@@ -248,6 +260,7 @@ public class ConcessioniOverMongoTest extends BasicServiceTestUnit{
@Test
public void getById() throws Exception {
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
WebTarget target=target(PATH);
Concessione c = get(target);
Response resp=target.path(c.getMongo_id()).request(MediaType.APPLICATION_JSON).get();
@@ -259,6 +272,7 @@ public class ConcessioniOverMongoTest extends BasicServiceTestUnit{
@Test
public void update() throws Exception {
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
WebTarget target=target(PATH);
Concessione c = get(target);
String newTitle="Questo titolo l'ho modificato mo nel test quello proprio apposta pewr questa cosa'";
@@ -269,6 +283,7 @@ public class ConcessioniOverMongoTest extends BasicServiceTestUnit{
@Test
public void uploadFile() throws Exception {
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
WebTarget target=target(PATH);
Response resp=target.request(MediaType.APPLICATION_JSON).post(Entity.entity(Serialization.write(TestConcessioniModel.prepareEmptyConcessione()), MediaType.APPLICATION_JSON));
Concessione c=check(resp,Concessione.class);
@@ -293,6 +308,7 @@ public class ConcessioniOverMongoTest extends BasicServiceTestUnit{
@Test
public void testClearFileSet() throws Exception {
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
WebTarget target=target(PATH);
Concessione published=getFullPublished(target);
@@ -326,6 +342,7 @@ public class ConcessioniOverMongoTest extends BasicServiceTestUnit{
@Test
public void publish() throws Exception {
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
WebTarget target=target(PATH);
Concessione published=getFullPublished(target);
diff --git a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/AbstractProfiledDocumentsTests.java b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/profiledDocuments/AbstractProfiledDocumentsTests.java
similarity index 91%
rename from geoportal-service/src/test/java/org/gcube/application/geoportal/service/AbstractProfiledDocumentsTests.java
rename to geoportal-service/src/test/java/org/gcube/application/geoportal/service/profiledDocuments/AbstractProfiledDocumentsTests.java
index a237177..8089859 100644
--- a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/AbstractProfiledDocumentsTests.java
+++ b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/profiledDocuments/AbstractProfiledDocumentsTests.java
@@ -1,4 +1,4 @@
-package org.gcube.application.geoportal.service;
+package org.gcube.application.geoportal.service.profiledDocuments;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.jayway.jsonpath.JsonPath;
@@ -17,6 +17,8 @@ import org.gcube.application.geoportal.common.model.rest.StepExecutionRequest;
import org.gcube.application.geoportal.common.rest.InterfaceConstants;
import org.gcube.application.geoportal.common.utils.FileSets;
import org.gcube.application.geoportal.common.utils.StorageUtils;
+import org.gcube.application.geoportal.common.utils.tests.GCubeTest;
+import org.gcube.application.geoportal.service.BasicServiceTestUnit;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
@@ -31,13 +33,15 @@ import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
+import static org.junit.Assume.assumeTrue;
-public abstract class AbstractProfiledDocumentsTests extends BasicServiceTestUnit{
+public abstract class AbstractProfiledDocumentsTests extends BasicServiceTestUnit {
@Before
public void setContext(){
- TokenSetter.set(scope);
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
+ TokenSetter.set(GCubeTest.getContext());
}
@@ -47,11 +51,13 @@ public abstract class AbstractProfiledDocumentsTests extends BasicServiceTestUni
@Test
public void getAll() {
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
System.out.println(baseTarget().request(MediaType.APPLICATION_JSON).get(List.class));
}
@Test
public void getByID(){
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
baseTarget().request(MediaType.APPLICATION_JSON).get(List.class).forEach(d ->{
try {
@@ -66,12 +72,14 @@ public abstract class AbstractProfiledDocumentsTests extends BasicServiceTestUni
@Test
public void getConfiguration() {
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
System.out.println(baseTarget().path(InterfaceConstants.Methods.CONFIGURATION_PATH).request(MediaType.APPLICATION_JSON).get(Configuration.class));
}
// Queries
@Test
public void query() throws JsonProcessingException {
+ assumeTrue(GCubeTest.isTestInfrastructureEnabled());
System.out.println(baseTarget().path(InterfaceConstants.Methods.QUERY_PATH).
request(MediaType.APPLICATION_JSON).
post(Entity.entity(Serialization.write(new QueryRequest()),MediaType.APPLICATION_JSON)));
diff --git a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/DummyProfiledDocumentTest.java b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/profiledDocuments/DummyProfiledDocumentTest.java
similarity index 96%
rename from geoportal-service/src/test/java/org/gcube/application/geoportal/service/DummyProfiledDocumentTest.java
rename to geoportal-service/src/test/java/org/gcube/application/geoportal/service/profiledDocuments/DummyProfiledDocumentTest.java
index 54f984f..81155f3 100644
--- a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/DummyProfiledDocumentTest.java
+++ b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/profiledDocuments/DummyProfiledDocumentTest.java
@@ -1,4 +1,4 @@
-package org.gcube.application.geoportal.service;
+package org.gcube.application.geoportal.service.profiledDocuments;
import org.bson.Document;
import org.gcube.application.cms.serialization.Serialization;
@@ -13,13 +13,13 @@ import org.gcube.application.geoportal.common.model.rest.RegisterFileSetRequest;
import org.gcube.application.geoportal.common.model.rest.StepExecutionRequest;
import org.gcube.application.geoportal.common.rest.InterfaceConstants;
import org.gcube.application.geoportal.common.utils.StorageUtils;
+import org.gcube.application.geoportal.service.BasicServiceTestUnit;
import org.junit.Assert;
import org.junit.Test;
import javax.ws.rs.client.Entity;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.MediaType;
-import java.util.Collections;
import java.util.List;
import static org.junit.Assert.assertTrue;
@@ -50,7 +50,7 @@ public class DummyProfiledDocumentTest extends AbstractProfiledDocumentsTests{
doc.getTheDocument().put("someStrangeField","someOtherRandomValue");
String edited=doc.getTheDocument().toJson();
Assert.assertNotEquals(beforeJson,doc.getTheDocument().toJson());
- doc=check(baseTarget().path(doc.getId()).request(MediaType.APPLICATION_JSON).
+ doc= BasicServiceTestUnit.check(baseTarget().path(doc.getId()).request(MediaType.APPLICATION_JSON).
put(Entity.entity(doc.getTheDocument(), MediaType.APPLICATION_JSON)),ProfiledDocument.class);
Assert.assertEquals(edited,doc.getTheDocument().toJson());
}
diff --git a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/ProfiledConcessioniTests.java b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/profiledDocuments/ProfiledConcessioniTests.java
similarity index 92%
rename from geoportal-service/src/test/java/org/gcube/application/geoportal/service/ProfiledConcessioniTests.java
rename to geoportal-service/src/test/java/org/gcube/application/geoportal/service/profiledDocuments/ProfiledConcessioniTests.java
index b932612..30b64fd 100644
--- a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/ProfiledConcessioniTests.java
+++ b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/profiledDocuments/ProfiledConcessioniTests.java
@@ -1,8 +1,7 @@
-package org.gcube.application.geoportal.service;
+package org.gcube.application.geoportal.service.profiledDocuments;
import org.bson.Document;
import org.gcube.application.cms.serialization.Serialization;
-import org.gcube.application.cms.tests.model.concessioni.TestConcessioniModel;
import org.gcube.application.geoportal.common.model.document.ProfiledDocument;
import org.gcube.application.geoportal.common.model.document.lifecycle.LifecycleInformation;
import org.gcube.application.geoportal.common.model.rest.RegisterFileSetRequest;
@@ -12,7 +11,6 @@ import org.gcube.application.geoportal.common.utils.StorageUtils;
import org.junit.Test;
import javax.ws.rs.client.WebTarget;
-import javax.ws.rs.core.Response;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
diff --git a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/profiledDocuments/Profiles.java b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/profiledDocuments/Profiles.java
new file mode 100644
index 0000000..0ea790c
--- /dev/null
+++ b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/profiledDocuments/Profiles.java
@@ -0,0 +1,21 @@
+package org.gcube.application.geoportal.service.profiledDocuments;
+
+import org.gcube.application.cms.tests.TestProfiles;
+import org.junit.Test;
+
+public class Profiles {
+
+
+ @Test
+ public void getFields(){
+ TestProfiles.profiles.forEach((k,v)->{
+ System.out.println(k+"\t"+v);
+ if(v.getSchema()!=null&&!v.getSchema().isLeaf()) {
+ v.getSchema().getChildren().forEach(
+ i -> System.out.println(i.getClass() + "\t" + i)
+ );
+ }
+ });
+ }
+
+}
diff --git a/images-plugin/CHANGELOG.md b/images-plugin/CHANGELOG.md
new file mode 100644
index 0000000..329a411
--- /dev/null
+++ b/images-plugin/CHANGELOG.md
@@ -0,0 +1,8 @@
+This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+# Changelog for org.gcube.application.cms.images-plugin
+
+This library contains gcube-cms plugins for images materializations
+
+## [v1.0.0-SNAPSHOT] - 2022-02-24
+- First release
diff --git a/images-plugin/FUNDING.md b/images-plugin/FUNDING.md
new file mode 100644
index 0000000..9e48b94
--- /dev/null
+++ b/images-plugin/FUNDING.md
@@ -0,0 +1,26 @@
+# Acknowledgments
+
+The projects leading to this software have received funding from a series of European Union programmes including:
+
+- the Sixth Framework Programme for Research and Technological Development
+ - [DILIGENT](https://cordis.europa.eu/project/id/004260) (grant no. 004260).
+- the Seventh Framework Programme for research, technological development and demonstration
+ - [D4Science](https://cordis.europa.eu/project/id/212488) (grant no. 212488);
+ - [D4Science-II](https://cordis.europa.eu/project/id/239019) (grant no.239019);
+ - [ENVRI](https://cordis.europa.eu/project/id/283465) (grant no. 283465);
+ - [iMarine](https://cordis.europa.eu/project/id/283644) (grant no. 283644);
+ - [EUBrazilOpenBio](https://cordis.europa.eu/project/id/288754) (grant no. 288754).
+- the H2020 research and innovation programme
+ - [SoBigData](https://cordis.europa.eu/project/id/654024) (grant no. 654024);
+ - [PARTHENOS](https://cordis.europa.eu/project/id/654119) (grant no. 654119);
+ - [EGI-Engage](https://cordis.europa.eu/project/id/654142) (grant no. 654142);
+ - [ENVRI PLUS](https://cordis.europa.eu/project/id/654182) (grant no. 654182);
+ - [BlueBRIDGE](https://cordis.europa.eu/project/id/675680) (grant no. 675680);
+ - [PerformFISH](https://cordis.europa.eu/project/id/727610) (grant no. 727610);
+ - [AGINFRA PLUS](https://cordis.europa.eu/project/id/731001) (grant no. 731001);
+ - [DESIRA](https://cordis.europa.eu/project/id/818194) (grant no. 818194);
+ - [ARIADNEplus](https://cordis.europa.eu/project/id/823914) (grant no. 823914);
+ - [RISIS 2](https://cordis.europa.eu/project/id/824091) (grant no. 824091);
+ - [EOSC-Pillar](https://cordis.europa.eu/project/id/857650) (grant no. 857650);
+ - [Blue Cloud](https://cordis.europa.eu/project/id/862409) (grant no. 862409);
+ - [SoBigData-PlusPlus](https://cordis.europa.eu/project/id/871042) (grant no. 871042);
diff --git a/images-plugin/LICENSE.md b/images-plugin/LICENSE.md
new file mode 100644
index 0000000..3af0507
--- /dev/null
+++ b/images-plugin/LICENSE.md
@@ -0,0 +1,312 @@
+# European Union Public Licence V. 1.1
+
+
+EUPL © the European Community 2007
+
+
+This European Union Public Licence (the “EUPL”) applies to the Work or Software
+(as defined below) which is provided under the terms of this Licence. Any use of
+the Work, other than as authorised under this Licence is prohibited (to the
+extent such use is covered by a right of the copyright holder of the Work).
+
+The Original Work is provided under the terms of this Licence when the Licensor
+(as defined below) has placed the following notice immediately following the
+copyright notice for the Original Work:
+
+Licensed under the EUPL V.1.1
+
+or has expressed by any other mean his willingness to license under the EUPL.
+
+
+
+## 1. Definitions
+
+In this Licence, the following terms have the following meaning:
+
+- The Licence: this Licence.
+
+- The Original Work or the Software: the software distributed and/or
+ communicated by the Licensor under this Licence, available as Source Code and
+ also as Executable Code as the case may be.
+
+- Derivative Works: the works or software that could be created by the Licensee,
+ based upon the Original Work or modifications thereof. This Licence does not
+ define the extent of modification or dependence on the Original Work required
+ in order to classify a work as a Derivative Work; this extent is determined by
+ copyright law applicable in the country mentioned in Article 15.
+
+- The Work: the Original Work and/or its Derivative Works.
+
+- The Source Code: the human-readable form of the Work which is the most
+ convenient for people to study and modify.
+
+- The Executable Code: any code which has generally been compiled and which is
+ meant to be interpreted by a computer as a program.
+
+- The Licensor: the natural or legal person that distributes and/or communicates
+ the Work under the Licence.
+
+- Contributor(s): any natural or legal person who modifies the Work under the
+ Licence, or otherwise contributes to the creation of a Derivative Work.
+
+- The Licensee or “You”: any natural or legal person who makes any usage of the
+ Software under the terms of the Licence.
+
+- Distribution and/or Communication: any act of selling, giving, lending,
+ renting, distributing, communicating, transmitting, or otherwise making
+ available, on-line or off-line, copies of the Work or providing access to its
+ essential functionalities at the disposal of any other natural or legal
+ person.
+
+
+
+## 2. Scope of the rights granted by the Licence
+
+The Licensor hereby grants You a world-wide, royalty-free, non-exclusive,
+sub-licensable licence to do the following, for the duration of copyright vested
+in the Original Work:
+
+- use the Work in any circumstance and for all usage, reproduce the Work, modify
+- the Original Work, and make Derivative Works based upon the Work, communicate
+- to the public, including the right to make available or display the Work or
+- copies thereof to the public and perform publicly, as the case may be, the
+- Work, distribute the Work or copies thereof, lend and rent the Work or copies
+- thereof, sub-license rights in the Work or copies thereof.
+
+Those rights can be exercised on any media, supports and formats, whether now
+known or later invented, as far as the applicable law permits so.
+
+In the countries where moral rights apply, the Licensor waives his right to
+exercise his moral right to the extent allowed by law in order to make effective
+the licence of the economic rights here above listed.
+
+The Licensor grants to the Licensee royalty-free, non exclusive usage rights to
+any patents held by the Licensor, to the extent necessary to make use of the
+rights granted on the Work under this Licence.
+
+
+
+## 3. Communication of the Source Code
+
+The Licensor may provide the Work either in its Source Code form, or as
+Executable Code. If the Work is provided as Executable Code, the Licensor
+provides in addition a machine-readable copy of the Source Code of the Work
+along with each copy of the Work that the Licensor distributes or indicates, in
+a notice following the copyright notice attached to the Work, a repository where
+the Source Code is easily and freely accessible for as long as the Licensor
+continues to distribute and/or communicate the Work.
+
+
+
+## 4. Limitations on copyright
+
+Nothing in this Licence is intended to deprive the Licensee of the benefits from
+any exception or limitation to the exclusive rights of the rights owners in the
+Original Work or Software, of the exhaustion of those rights or of other
+applicable limitations thereto.
+
+
+
+## 5. Obligations of the Licensee
+
+The grant of the rights mentioned above is subject to some restrictions and
+obligations imposed on the Licensee. Those obligations are the following:
+
+Attribution right: the Licensee shall keep intact all copyright, patent or
+trademarks notices and all notices that refer to the Licence and to the
+disclaimer of warranties. The Licensee must include a copy of such notices and a
+copy of the Licence with every copy of the Work he/she distributes and/or
+communicates. The Licensee must cause any Derivative Work to carry prominent
+notices stating that the Work has been modified and the date of modification.
+
+Copyleft clause: If the Licensee distributes and/or communicates copies of the
+Original Works or Derivative Works based upon the Original Work, this
+Distribution and/or Communication will be done under the terms of this Licence
+or of a later version of this Licence unless the Original Work is expressly
+distributed only under this version of the Licence. The Licensee (becoming
+Licensor) cannot offer or impose any additional terms or conditions on the Work
+or Derivative Work that alter or restrict the terms of the Licence.
+
+Compatibility clause: If the Licensee Distributes and/or Communicates Derivative
+Works or copies thereof based upon both the Original Work and another work
+licensed under a Compatible Licence, this Distribution and/or Communication can
+be done under the terms of this Compatible Licence. For the sake of this clause,
+“Compatible Licence” refers to the licences listed in the appendix attached to
+this Licence. Should the Licensee’s obligations under the Compatible Licence
+conflict with his/her obligations under this Licence, the obligations of the
+Compatible Licence shall prevail.
+
+Provision of Source Code: When distributing and/or communicating copies of the
+Work, the Licensee will provide a machine-readable copy of the Source Code or
+indicate a repository where this Source will be easily and freely available for
+as long as the Licensee continues to distribute and/or communicate the Work.
+
+Legal Protection: This Licence does not grant permission to use the trade names,
+trademarks, service marks, or 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 copyright notice.
+
+
+
+## 6. Chain of Authorship
+
+The original Licensor warrants that the copyright in the Original Work granted
+hereunder is owned by him/her or licensed to him/her and that he/she has the
+power and authority to grant the Licence.
+
+Each Contributor warrants that the copyright in the modifications he/she brings
+to the Work are owned by him/her or licensed to him/her and that he/she has the
+power and authority to grant the Licence.
+
+Each time You accept the Licence, the original Licensor and subsequent
+Contributors grant You a licence to their contributions to the Work, under the
+terms of this Licence.
+
+
+
+## 7. Disclaimer of Warranty
+
+The Work is a work in progress, which is continuously improved by numerous
+contributors. It is not a finished work and may therefore contain defects or
+“bugs” inherent to this type of software development.
+
+For the above reason, the Work is provided under the Licence on an “as is” basis
+and without warranties of any kind concerning the Work, including without
+limitation merchantability, fitness for a particular purpose, absence of defects
+or errors, accuracy, non-infringement of intellectual property rights other than
+copyright as stated in Article 6 of this Licence.
+
+This disclaimer of warranty is an essential part of the Licence and a condition
+for the grant of any rights to the Work.
+
+
+
+## 8. Disclaimer of Liability
+
+Except in the cases of wilful misconduct or damages directly caused to natural
+persons, the Licensor will in no event be liable for any direct or indirect,
+material or moral, damages of any kind, arising out of the Licence or of the use
+of the Work, including without limitation, damages for loss of goodwill, work
+stoppage, computer failure or malfunction, loss of data or any commercial
+damage, even if the Licensor has been advised of the possibility of such
+damage. However, the Licensor will be liable under statutory product liability
+laws as far such laws apply to the Work.
+
+
+
+## 9. Additional agreements
+
+While distributing the Original Work or Derivative Works, You may choose to
+conclude an additional agreement to offer, and charge a fee for, acceptance of
+support, warranty, indemnity, or other liability obligations and/or services
+consistent with this Licence. However, in accepting such obligations, You may
+act only on your own behalf and on your sole responsibility, not on behalf of
+the original Licensor or 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 the fact You have accepted
+any such warranty or additional liability.
+
+
+
+## 10. Acceptance of the Licence
+
+The provisions of this Licence can be accepted by clicking on an icon “I agree”
+placed under the bottom of a window displaying the text of this Licence or by
+affirming consent in any other similar way, in accordance with the rules of
+applicable law. Clicking on that icon indicates your clear and irrevocable
+acceptance of this Licence and all of its terms and conditions.
+
+Similarly, you irrevocably accept this Licence and all of its terms and
+conditions by exercising any rights granted to You by Article 2 of this Licence,
+such as the use of the Work, the creation by You of a Derivative Work or the
+Distribution and/or Communication by You of the Work or copies thereof.
+
+
+
+## 11. Information to the public
+
+In case of any Distribution and/or Communication of the Work by means of
+electronic communication by You (for example, by offering to download the Work
+from a remote location) the distribution channel or media (for example, a
+website) must at least provide to the public the information requested by the
+applicable law regarding the Licensor, the Licence and the way it may be
+accessible, concluded, stored and reproduced by the Licensee.
+
+
+
+## 12. Termination of the Licence
+
+The Licence and the rights granted hereunder will terminate automatically upon
+any breach by the Licensee of the terms of the Licence.
+
+Such a termination will not terminate the licences of any person who has
+received the Work from the Licensee under the Licence, provided such persons
+remain in full compliance with the Licence.
+
+
+
+## 13. Miscellaneous
+
+Without prejudice of Article 9 above, the Licence represents the complete
+agreement between the Parties as to the Work licensed hereunder.
+
+If any provision of the Licence is invalid or unenforceable under applicable
+law, this will not affect the validity or enforceability of the Licence as a
+whole. Such provision will be construed and/or reformed so as necessary to make
+it valid and enforceable.
+
+The European Commission may publish other linguistic versions and/or new
+versions of this Licence, so far this is required and reasonable, without
+reducing the scope of the rights granted by the Licence. New versions of the
+Licence will be published with a unique version number.
+
+All linguistic versions of this Licence, approved by the European Commission,
+have identical value. Parties can take advantage of the linguistic version of
+their choice.
+
+
+
+## 14. Jurisdiction
+
+Any litigation resulting from the interpretation of this License, arising
+between the European Commission, as a Licensor, and any Licensee, will be
+subject to the jurisdiction of the Court of Justice of the European Communities,
+as laid down in article 238 of the Treaty establishing the European Community.
+
+Any litigation arising between Parties, other than the European Commission, and
+resulting from the interpretation of this License, will be subject to the
+exclusive jurisdiction of the competent court where the Licensor resides or
+conducts its primary business.
+
+
+
+## 15. Applicable Law
+
+This Licence shall be governed by the law of the European Union country where
+the Licensor resides or has his registered office.
+
+This licence shall be governed by the Belgian law if:
+
+- a litigation arises between the European Commission, as a Licensor, and any
+- Licensee; the Licensor, other than the European Commission, has no residence
+- or registered office inside a European Union country.
+
+
+
+## Appendix
+
+
+
+“Compatible Licences” according to article 5 EUPL are:
+
+
+- GNU General Public License (GNU GPL) v. 2
+
+- Open Software License (OSL) v. 2.1, v. 3.0
+
+- Common Public License v. 1.0
+
+- Eclipse Public License v. 1.0
+
+- Cecill v. 2.0
+
diff --git a/images-plugin/README.md b/images-plugin/README.md
new file mode 100644
index 0000000..85dd719
--- /dev/null
+++ b/images-plugin/README.md
@@ -0,0 +1,52 @@
+gCube CMS Suite
+--------------------------------------------------
+
+gCube CMS Suite is a set of components designed to manage complex space-temporal Documents defined by metadata Profiles.
+
+## Built with
+* [gCube SmartGears] (https://gcube.wiki.gcube-system.org/gcube/SmartGears) - The gCube SmartGears framework
+* [OpenJDK](https://openjdk.java.net/) - The JDK used
+* [JAX-RS](https://github.com/eclipse-ee4j/jaxrs-api) - Java™ API for RESTful Web Services
+* [Jersey](https://jersey.github.io/) - JAX-RS runtime
+* [Maven](https://maven.apache.org/) - Dependency Management
+
+## Documentation
+
+Documentation can be found [here](https://gcube.wiki.gcube-system.org/gcube/GeoPortal_Service).
+
+## Change log
+
+See [CHANGELOG.md](CHANGELOG.md).
+
+## License
+
+This project is licensed under the EUPL V.1.1 License - see the [LICENSE.md](LICENSE.md) file for details.
+
+## About the gCube Framework
+This software is part of the [gCubeFramework](https://www.gcube-system.org/ "gCubeFramework"): an
+open-source software toolkit used for building and operating Hybrid Data
+Infrastructures enabling the dynamic deployment of Virtual Research Environments
+by favouring the realisation of reuse oriented policies.
+
+The projects leading to this software have received funding from a series of European Union programmes including:
+
+- the Sixth Framework Programme for Research and Technological Development
+ - DILIGENT (grant no. 004260).
+- the Seventh Framework Programme for research, technological development and demonstration
+ - D4Science (grant no. 212488);
+ - D4Science-II (grant no.239019);
+ - ENVRI (grant no. 283465);
+ - iMarine(grant no. 283644);
+ - EUBrazilOpenBio (grant no. 288754).
+- the H2020 research and innovation programme
+ - SoBigData (grant no. 654024);
+ - PARTHENOS (grant no. 654119);
+ - EGIEngage (grant no. 654142);
+ - ENVRIplus (grant no. 654182);
+ - BlueBRIDGE (grant no. 675680);
+ - PerformFish (grant no. 727610);
+ - AGINFRAplus (grant no. 731001);
+ - DESIRA (grant no. 818194);
+ - ARIADNEplus (grant no. 823914);
+ - RISIS2 (grant no. 824091);
+
diff --git a/images-plugin/pom.xml b/images-plugin/pom.xml
new file mode 100644
index 0000000..a2cce3c
--- /dev/null
+++ b/images-plugin/pom.xml
@@ -0,0 +1,48 @@
+
+
+ 4.0.0
+
+ images-plugins
+ 1.0.0-SNAPSHOT
+ gCube CMS - Images Plugins
+
+
+
+ org.gcube.application.cms
+ gcube-cms-suite
+ 1.0.2-SNAPSHOT
+
+
+
+ https://code-repo.d4science.org/gCubeSystem
+
+
+
+
+
+ scm:git:${gitBaseUrl}/gcube-cms-suite
+ scm:git:${gitBaseUrl}/gcube-cms-suite
+ ${gitBaseUrl}/gcube-cms-suite
+
+
+
+
+
+
+ org.gcube.application.cms
+ cms-plugin-framework
+
+
+
+ org.gcube.application.cms
+ cms-test-commons
+ test
+
+
+
+
+
+
+
diff --git a/notifications-plugins/CHANGELOG.md b/notifications-plugins/CHANGELOG.md
new file mode 100644
index 0000000..503886f
--- /dev/null
+++ b/notifications-plugins/CHANGELOG.md
@@ -0,0 +1,8 @@
+This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+# Changelog for org.gcube.application.cms.notifications-plugins
+
+This library contains gcube-cms plugins for notitfications events
+
+## [v1.0.0-SNAPSHOT] - 2022-02-24
+- First release
diff --git a/notifications-plugins/FUNDING.md b/notifications-plugins/FUNDING.md
new file mode 100644
index 0000000..9e48b94
--- /dev/null
+++ b/notifications-plugins/FUNDING.md
@@ -0,0 +1,26 @@
+# Acknowledgments
+
+The projects leading to this software have received funding from a series of European Union programmes including:
+
+- the Sixth Framework Programme for Research and Technological Development
+ - [DILIGENT](https://cordis.europa.eu/project/id/004260) (grant no. 004260).
+- the Seventh Framework Programme for research, technological development and demonstration
+ - [D4Science](https://cordis.europa.eu/project/id/212488) (grant no. 212488);
+ - [D4Science-II](https://cordis.europa.eu/project/id/239019) (grant no.239019);
+ - [ENVRI](https://cordis.europa.eu/project/id/283465) (grant no. 283465);
+ - [iMarine](https://cordis.europa.eu/project/id/283644) (grant no. 283644);
+ - [EUBrazilOpenBio](https://cordis.europa.eu/project/id/288754) (grant no. 288754).
+- the H2020 research and innovation programme
+ - [SoBigData](https://cordis.europa.eu/project/id/654024) (grant no. 654024);
+ - [PARTHENOS](https://cordis.europa.eu/project/id/654119) (grant no. 654119);
+ - [EGI-Engage](https://cordis.europa.eu/project/id/654142) (grant no. 654142);
+ - [ENVRI PLUS](https://cordis.europa.eu/project/id/654182) (grant no. 654182);
+ - [BlueBRIDGE](https://cordis.europa.eu/project/id/675680) (grant no. 675680);
+ - [PerformFISH](https://cordis.europa.eu/project/id/727610) (grant no. 727610);
+ - [AGINFRA PLUS](https://cordis.europa.eu/project/id/731001) (grant no. 731001);
+ - [DESIRA](https://cordis.europa.eu/project/id/818194) (grant no. 818194);
+ - [ARIADNEplus](https://cordis.europa.eu/project/id/823914) (grant no. 823914);
+ - [RISIS 2](https://cordis.europa.eu/project/id/824091) (grant no. 824091);
+ - [EOSC-Pillar](https://cordis.europa.eu/project/id/857650) (grant no. 857650);
+ - [Blue Cloud](https://cordis.europa.eu/project/id/862409) (grant no. 862409);
+ - [SoBigData-PlusPlus](https://cordis.europa.eu/project/id/871042) (grant no. 871042);
diff --git a/notifications-plugins/LICENSE.md b/notifications-plugins/LICENSE.md
new file mode 100644
index 0000000..3af0507
--- /dev/null
+++ b/notifications-plugins/LICENSE.md
@@ -0,0 +1,312 @@
+# European Union Public Licence V. 1.1
+
+
+EUPL © the European Community 2007
+
+
+This European Union Public Licence (the “EUPL”) applies to the Work or Software
+(as defined below) which is provided under the terms of this Licence. Any use of
+the Work, other than as authorised under this Licence is prohibited (to the
+extent such use is covered by a right of the copyright holder of the Work).
+
+The Original Work is provided under the terms of this Licence when the Licensor
+(as defined below) has placed the following notice immediately following the
+copyright notice for the Original Work:
+
+Licensed under the EUPL V.1.1
+
+or has expressed by any other mean his willingness to license under the EUPL.
+
+
+
+## 1. Definitions
+
+In this Licence, the following terms have the following meaning:
+
+- The Licence: this Licence.
+
+- The Original Work or the Software: the software distributed and/or
+ communicated by the Licensor under this Licence, available as Source Code and
+ also as Executable Code as the case may be.
+
+- Derivative Works: the works or software that could be created by the Licensee,
+ based upon the Original Work or modifications thereof. This Licence does not
+ define the extent of modification or dependence on the Original Work required
+ in order to classify a work as a Derivative Work; this extent is determined by
+ copyright law applicable in the country mentioned in Article 15.
+
+- The Work: the Original Work and/or its Derivative Works.
+
+- The Source Code: the human-readable form of the Work which is the most
+ convenient for people to study and modify.
+
+- The Executable Code: any code which has generally been compiled and which is
+ meant to be interpreted by a computer as a program.
+
+- The Licensor: the natural or legal person that distributes and/or communicates
+ the Work under the Licence.
+
+- Contributor(s): any natural or legal person who modifies the Work under the
+ Licence, or otherwise contributes to the creation of a Derivative Work.
+
+- The Licensee or “You”: any natural or legal person who makes any usage of the
+ Software under the terms of the Licence.
+
+- Distribution and/or Communication: any act of selling, giving, lending,
+ renting, distributing, communicating, transmitting, or otherwise making
+ available, on-line or off-line, copies of the Work or providing access to its
+ essential functionalities at the disposal of any other natural or legal
+ person.
+
+
+
+## 2. Scope of the rights granted by the Licence
+
+The Licensor hereby grants You a world-wide, royalty-free, non-exclusive,
+sub-licensable licence to do the following, for the duration of copyright vested
+in the Original Work:
+
+- use the Work in any circumstance and for all usage, reproduce the Work, modify
+- the Original Work, and make Derivative Works based upon the Work, communicate
+- to the public, including the right to make available or display the Work or
+- copies thereof to the public and perform publicly, as the case may be, the
+- Work, distribute the Work or copies thereof, lend and rent the Work or copies
+- thereof, sub-license rights in the Work or copies thereof.
+
+Those rights can be exercised on any media, supports and formats, whether now
+known or later invented, as far as the applicable law permits so.
+
+In the countries where moral rights apply, the Licensor waives his right to
+exercise his moral right to the extent allowed by law in order to make effective
+the licence of the economic rights here above listed.
+
+The Licensor grants to the Licensee royalty-free, non exclusive usage rights to
+any patents held by the Licensor, to the extent necessary to make use of the
+rights granted on the Work under this Licence.
+
+
+
+## 3. Communication of the Source Code
+
+The Licensor may provide the Work either in its Source Code form, or as
+Executable Code. If the Work is provided as Executable Code, the Licensor
+provides in addition a machine-readable copy of the Source Code of the Work
+along with each copy of the Work that the Licensor distributes or indicates, in
+a notice following the copyright notice attached to the Work, a repository where
+the Source Code is easily and freely accessible for as long as the Licensor
+continues to distribute and/or communicate the Work.
+
+
+
+## 4. Limitations on copyright
+
+Nothing in this Licence is intended to deprive the Licensee of the benefits from
+any exception or limitation to the exclusive rights of the rights owners in the
+Original Work or Software, of the exhaustion of those rights or of other
+applicable limitations thereto.
+
+
+
+## 5. Obligations of the Licensee
+
+The grant of the rights mentioned above is subject to some restrictions and
+obligations imposed on the Licensee. Those obligations are the following:
+
+Attribution right: the Licensee shall keep intact all copyright, patent or
+trademarks notices and all notices that refer to the Licence and to the
+disclaimer of warranties. The Licensee must include a copy of such notices and a
+copy of the Licence with every copy of the Work he/she distributes and/or
+communicates. The Licensee must cause any Derivative Work to carry prominent
+notices stating that the Work has been modified and the date of modification.
+
+Copyleft clause: If the Licensee distributes and/or communicates copies of the
+Original Works or Derivative Works based upon the Original Work, this
+Distribution and/or Communication will be done under the terms of this Licence
+or of a later version of this Licence unless the Original Work is expressly
+distributed only under this version of the Licence. The Licensee (becoming
+Licensor) cannot offer or impose any additional terms or conditions on the Work
+or Derivative Work that alter or restrict the terms of the Licence.
+
+Compatibility clause: If the Licensee Distributes and/or Communicates Derivative
+Works or copies thereof based upon both the Original Work and another work
+licensed under a Compatible Licence, this Distribution and/or Communication can
+be done under the terms of this Compatible Licence. For the sake of this clause,
+“Compatible Licence” refers to the licences listed in the appendix attached to
+this Licence. Should the Licensee’s obligations under the Compatible Licence
+conflict with his/her obligations under this Licence, the obligations of the
+Compatible Licence shall prevail.
+
+Provision of Source Code: When distributing and/or communicating copies of the
+Work, the Licensee will provide a machine-readable copy of the Source Code or
+indicate a repository where this Source will be easily and freely available for
+as long as the Licensee continues to distribute and/or communicate the Work.
+
+Legal Protection: This Licence does not grant permission to use the trade names,
+trademarks, service marks, or 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 copyright notice.
+
+
+
+## 6. Chain of Authorship
+
+The original Licensor warrants that the copyright in the Original Work granted
+hereunder is owned by him/her or licensed to him/her and that he/she has the
+power and authority to grant the Licence.
+
+Each Contributor warrants that the copyright in the modifications he/she brings
+to the Work are owned by him/her or licensed to him/her and that he/she has the
+power and authority to grant the Licence.
+
+Each time You accept the Licence, the original Licensor and subsequent
+Contributors grant You a licence to their contributions to the Work, under the
+terms of this Licence.
+
+
+
+## 7. Disclaimer of Warranty
+
+The Work is a work in progress, which is continuously improved by numerous
+contributors. It is not a finished work and may therefore contain defects or
+“bugs” inherent to this type of software development.
+
+For the above reason, the Work is provided under the Licence on an “as is” basis
+and without warranties of any kind concerning the Work, including without
+limitation merchantability, fitness for a particular purpose, absence of defects
+or errors, accuracy, non-infringement of intellectual property rights other than
+copyright as stated in Article 6 of this Licence.
+
+This disclaimer of warranty is an essential part of the Licence and a condition
+for the grant of any rights to the Work.
+
+
+
+## 8. Disclaimer of Liability
+
+Except in the cases of wilful misconduct or damages directly caused to natural
+persons, the Licensor will in no event be liable for any direct or indirect,
+material or moral, damages of any kind, arising out of the Licence or of the use
+of the Work, including without limitation, damages for loss of goodwill, work
+stoppage, computer failure or malfunction, loss of data or any commercial
+damage, even if the Licensor has been advised of the possibility of such
+damage. However, the Licensor will be liable under statutory product liability
+laws as far such laws apply to the Work.
+
+
+
+## 9. Additional agreements
+
+While distributing the Original Work or Derivative Works, You may choose to
+conclude an additional agreement to offer, and charge a fee for, acceptance of
+support, warranty, indemnity, or other liability obligations and/or services
+consistent with this Licence. However, in accepting such obligations, You may
+act only on your own behalf and on your sole responsibility, not on behalf of
+the original Licensor or 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 the fact You have accepted
+any such warranty or additional liability.
+
+
+
+## 10. Acceptance of the Licence
+
+The provisions of this Licence can be accepted by clicking on an icon “I agree”
+placed under the bottom of a window displaying the text of this Licence or by
+affirming consent in any other similar way, in accordance with the rules of
+applicable law. Clicking on that icon indicates your clear and irrevocable
+acceptance of this Licence and all of its terms and conditions.
+
+Similarly, you irrevocably accept this Licence and all of its terms and
+conditions by exercising any rights granted to You by Article 2 of this Licence,
+such as the use of the Work, the creation by You of a Derivative Work or the
+Distribution and/or Communication by You of the Work or copies thereof.
+
+
+
+## 11. Information to the public
+
+In case of any Distribution and/or Communication of the Work by means of
+electronic communication by You (for example, by offering to download the Work
+from a remote location) the distribution channel or media (for example, a
+website) must at least provide to the public the information requested by the
+applicable law regarding the Licensor, the Licence and the way it may be
+accessible, concluded, stored and reproduced by the Licensee.
+
+
+
+## 12. Termination of the Licence
+
+The Licence and the rights granted hereunder will terminate automatically upon
+any breach by the Licensee of the terms of the Licence.
+
+Such a termination will not terminate the licences of any person who has
+received the Work from the Licensee under the Licence, provided such persons
+remain in full compliance with the Licence.
+
+
+
+## 13. Miscellaneous
+
+Without prejudice of Article 9 above, the Licence represents the complete
+agreement between the Parties as to the Work licensed hereunder.
+
+If any provision of the Licence is invalid or unenforceable under applicable
+law, this will not affect the validity or enforceability of the Licence as a
+whole. Such provision will be construed and/or reformed so as necessary to make
+it valid and enforceable.
+
+The European Commission may publish other linguistic versions and/or new
+versions of this Licence, so far this is required and reasonable, without
+reducing the scope of the rights granted by the Licence. New versions of the
+Licence will be published with a unique version number.
+
+All linguistic versions of this Licence, approved by the European Commission,
+have identical value. Parties can take advantage of the linguistic version of
+their choice.
+
+
+
+## 14. Jurisdiction
+
+Any litigation resulting from the interpretation of this License, arising
+between the European Commission, as a Licensor, and any Licensee, will be
+subject to the jurisdiction of the Court of Justice of the European Communities,
+as laid down in article 238 of the Treaty establishing the European Community.
+
+Any litigation arising between Parties, other than the European Commission, and
+resulting from the interpretation of this License, will be subject to the
+exclusive jurisdiction of the competent court where the Licensor resides or
+conducts its primary business.
+
+
+
+## 15. Applicable Law
+
+This Licence shall be governed by the law of the European Union country where
+the Licensor resides or has his registered office.
+
+This licence shall be governed by the Belgian law if:
+
+- a litigation arises between the European Commission, as a Licensor, and any
+- Licensee; the Licensor, other than the European Commission, has no residence
+- or registered office inside a European Union country.
+
+
+
+## Appendix
+
+
+
+“Compatible Licences” according to article 5 EUPL are:
+
+
+- GNU General Public License (GNU GPL) v. 2
+
+- Open Software License (OSL) v. 2.1, v. 3.0
+
+- Common Public License v. 1.0
+
+- Eclipse Public License v. 1.0
+
+- Cecill v. 2.0
+
diff --git a/notifications-plugins/README.md b/notifications-plugins/README.md
new file mode 100644
index 0000000..85dd719
--- /dev/null
+++ b/notifications-plugins/README.md
@@ -0,0 +1,52 @@
+gCube CMS Suite
+--------------------------------------------------
+
+gCube CMS Suite is a set of components designed to manage complex space-temporal Documents defined by metadata Profiles.
+
+## Built with
+* [gCube SmartGears] (https://gcube.wiki.gcube-system.org/gcube/SmartGears) - The gCube SmartGears framework
+* [OpenJDK](https://openjdk.java.net/) - The JDK used
+* [JAX-RS](https://github.com/eclipse-ee4j/jaxrs-api) - Java™ API for RESTful Web Services
+* [Jersey](https://jersey.github.io/) - JAX-RS runtime
+* [Maven](https://maven.apache.org/) - Dependency Management
+
+## Documentation
+
+Documentation can be found [here](https://gcube.wiki.gcube-system.org/gcube/GeoPortal_Service).
+
+## Change log
+
+See [CHANGELOG.md](CHANGELOG.md).
+
+## License
+
+This project is licensed under the EUPL V.1.1 License - see the [LICENSE.md](LICENSE.md) file for details.
+
+## About the gCube Framework
+This software is part of the [gCubeFramework](https://www.gcube-system.org/ "gCubeFramework"): an
+open-source software toolkit used for building and operating Hybrid Data
+Infrastructures enabling the dynamic deployment of Virtual Research Environments
+by favouring the realisation of reuse oriented policies.
+
+The projects leading to this software have received funding from a series of European Union programmes including:
+
+- the Sixth Framework Programme for Research and Technological Development
+ - DILIGENT (grant no. 004260).
+- the Seventh Framework Programme for research, technological development and demonstration
+ - D4Science (grant no. 212488);
+ - D4Science-II (grant no.239019);
+ - ENVRI (grant no. 283465);
+ - iMarine(grant no. 283644);
+ - EUBrazilOpenBio (grant no. 288754).
+- the H2020 research and innovation programme
+ - SoBigData (grant no. 654024);
+ - PARTHENOS (grant no. 654119);
+ - EGIEngage (grant no. 654142);
+ - ENVRIplus (grant no. 654182);
+ - BlueBRIDGE (grant no. 675680);
+ - PerformFish (grant no. 727610);
+ - AGINFRAplus (grant no. 731001);
+ - DESIRA (grant no. 818194);
+ - ARIADNEplus (grant no. 823914);
+ - RISIS2 (grant no. 824091);
+
diff --git a/notifications-plugins/pom.xml b/notifications-plugins/pom.xml
new file mode 100644
index 0000000..064db2f
--- /dev/null
+++ b/notifications-plugins/pom.xml
@@ -0,0 +1,46 @@
+
+
+ 4.0.0
+
+ notifications-plugins
+ 1.0.0-SNAPSHOT
+ gCube CMS - Notifications Plugins
+
+
+
+ org.gcube.application.cms
+ gcube-cms-suite
+ 1.0.2-SNAPSHOT
+
+
+
+ https://code-repo.d4science.org/gCubeSystem
+
+
+
+
+
+ scm:git:${gitBaseUrl}/gcube-cms-suite
+ scm:git:${gitBaseUrl}/gcube-cms-suite
+ ${gitBaseUrl}/gcube-cms-suite
+
+
+
+
+
+
+ org.gcube.application.cms
+ cms-plugin-framework
+
+
+
+ org.gcube.application.cms
+ cms-test-commons
+ test
+
+
+
+
+
diff --git a/pom.xml b/pom.xml
index 156e477..ec3ca72 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
org.gcube.application.cms
gcube-cms-suite
pom
- 1.0.1
+ 1.0.2-SNAPSHOT
Gcube CMS Suite
gCube CMS Suite is a set of components designed to manage complex space-temporal Documents defined by metadata Profiles.
@@ -43,6 +43,14 @@
geoportal-client
+
+ sdi-plugins
+ notifications-plugins
+ dataminer-plugins
+ images-plugin
+ ckan-plugin
+
+
concessioni-lifecycle
concessioni-model
@@ -90,6 +98,35 @@
[1.0.0-SNAPSHOT,2.0.0)
+
+
+
+ org.gcube.application.cms
+ sdi-plugins
+ [1.0.0-SNAPSHOT,2.0.0)
+
+
+ org.gcube.application.cms
+ notifications-plugins
+ [1.0.0-SNAPSHOT,2.0.0)
+
+
+ org.gcube.application.cms
+ dataminer-plugins
+ [1.0.0-SNAPSHOT,2.0.0)
+
+
+ org.gcube.application.cms
+ images-plugin
+ [1.0.0-SNAPSHOT,2.0.0)
+
+
+ org.gcube.application.cms
+ ckan-plugin
+ [1.0.0-SNAPSHOT,2.0.0)
+
+
+
org.gcube.application
geoportal-client
diff --git a/sdi-plugins/CHANGELOG.md b/sdi-plugins/CHANGELOG.md
new file mode 100644
index 0000000..f7f23a0
--- /dev/null
+++ b/sdi-plugins/CHANGELOG.md
@@ -0,0 +1,8 @@
+This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+# Changelog for org.gcube.application.cms.sdi-plugins
+
+This library contains gcube-cms plugins for indexing and materializations in gCube SDI
+
+## [v1.0.0-SNAPSHOT] - 2022-02-24
+- First release
diff --git a/sdi-plugins/FUNDING.md b/sdi-plugins/FUNDING.md
new file mode 100644
index 0000000..9e48b94
--- /dev/null
+++ b/sdi-plugins/FUNDING.md
@@ -0,0 +1,26 @@
+# Acknowledgments
+
+The projects leading to this software have received funding from a series of European Union programmes including:
+
+- the Sixth Framework Programme for Research and Technological Development
+ - [DILIGENT](https://cordis.europa.eu/project/id/004260) (grant no. 004260).
+- the Seventh Framework Programme for research, technological development and demonstration
+ - [D4Science](https://cordis.europa.eu/project/id/212488) (grant no. 212488);
+ - [D4Science-II](https://cordis.europa.eu/project/id/239019) (grant no.239019);
+ - [ENVRI](https://cordis.europa.eu/project/id/283465) (grant no. 283465);
+ - [iMarine](https://cordis.europa.eu/project/id/283644) (grant no. 283644);
+ - [EUBrazilOpenBio](https://cordis.europa.eu/project/id/288754) (grant no. 288754).
+- the H2020 research and innovation programme
+ - [SoBigData](https://cordis.europa.eu/project/id/654024) (grant no. 654024);
+ - [PARTHENOS](https://cordis.europa.eu/project/id/654119) (grant no. 654119);
+ - [EGI-Engage](https://cordis.europa.eu/project/id/654142) (grant no. 654142);
+ - [ENVRI PLUS](https://cordis.europa.eu/project/id/654182) (grant no. 654182);
+ - [BlueBRIDGE](https://cordis.europa.eu/project/id/675680) (grant no. 675680);
+ - [PerformFISH](https://cordis.europa.eu/project/id/727610) (grant no. 727610);
+ - [AGINFRA PLUS](https://cordis.europa.eu/project/id/731001) (grant no. 731001);
+ - [DESIRA](https://cordis.europa.eu/project/id/818194) (grant no. 818194);
+ - [ARIADNEplus](https://cordis.europa.eu/project/id/823914) (grant no. 823914);
+ - [RISIS 2](https://cordis.europa.eu/project/id/824091) (grant no. 824091);
+ - [EOSC-Pillar](https://cordis.europa.eu/project/id/857650) (grant no. 857650);
+ - [Blue Cloud](https://cordis.europa.eu/project/id/862409) (grant no. 862409);
+ - [SoBigData-PlusPlus](https://cordis.europa.eu/project/id/871042) (grant no. 871042);
diff --git a/sdi-plugins/LICENSE.md b/sdi-plugins/LICENSE.md
new file mode 100644
index 0000000..3af0507
--- /dev/null
+++ b/sdi-plugins/LICENSE.md
@@ -0,0 +1,312 @@
+# European Union Public Licence V. 1.1
+
+
+EUPL © the European Community 2007
+
+
+This European Union Public Licence (the “EUPL”) applies to the Work or Software
+(as defined below) which is provided under the terms of this Licence. Any use of
+the Work, other than as authorised under this Licence is prohibited (to the
+extent such use is covered by a right of the copyright holder of the Work).
+
+The Original Work is provided under the terms of this Licence when the Licensor
+(as defined below) has placed the following notice immediately following the
+copyright notice for the Original Work:
+
+Licensed under the EUPL V.1.1
+
+or has expressed by any other mean his willingness to license under the EUPL.
+
+
+
+## 1. Definitions
+
+In this Licence, the following terms have the following meaning:
+
+- The Licence: this Licence.
+
+- The Original Work or the Software: the software distributed and/or
+ communicated by the Licensor under this Licence, available as Source Code and
+ also as Executable Code as the case may be.
+
+- Derivative Works: the works or software that could be created by the Licensee,
+ based upon the Original Work or modifications thereof. This Licence does not
+ define the extent of modification or dependence on the Original Work required
+ in order to classify a work as a Derivative Work; this extent is determined by
+ copyright law applicable in the country mentioned in Article 15.
+
+- The Work: the Original Work and/or its Derivative Works.
+
+- The Source Code: the human-readable form of the Work which is the most
+ convenient for people to study and modify.
+
+- The Executable Code: any code which has generally been compiled and which is
+ meant to be interpreted by a computer as a program.
+
+- The Licensor: the natural or legal person that distributes and/or communicates
+ the Work under the Licence.
+
+- Contributor(s): any natural or legal person who modifies the Work under the
+ Licence, or otherwise contributes to the creation of a Derivative Work.
+
+- The Licensee or “You”: any natural or legal person who makes any usage of the
+ Software under the terms of the Licence.
+
+- Distribution and/or Communication: any act of selling, giving, lending,
+ renting, distributing, communicating, transmitting, or otherwise making
+ available, on-line or off-line, copies of the Work or providing access to its
+ essential functionalities at the disposal of any other natural or legal
+ person.
+
+
+
+## 2. Scope of the rights granted by the Licence
+
+The Licensor hereby grants You a world-wide, royalty-free, non-exclusive,
+sub-licensable licence to do the following, for the duration of copyright vested
+in the Original Work:
+
+- use the Work in any circumstance and for all usage, reproduce the Work, modify
+- the Original Work, and make Derivative Works based upon the Work, communicate
+- to the public, including the right to make available or display the Work or
+- copies thereof to the public and perform publicly, as the case may be, the
+- Work, distribute the Work or copies thereof, lend and rent the Work or copies
+- thereof, sub-license rights in the Work or copies thereof.
+
+Those rights can be exercised on any media, supports and formats, whether now
+known or later invented, as far as the applicable law permits so.
+
+In the countries where moral rights apply, the Licensor waives his right to
+exercise his moral right to the extent allowed by law in order to make effective
+the licence of the economic rights here above listed.
+
+The Licensor grants to the Licensee royalty-free, non exclusive usage rights to
+any patents held by the Licensor, to the extent necessary to make use of the
+rights granted on the Work under this Licence.
+
+
+
+## 3. Communication of the Source Code
+
+The Licensor may provide the Work either in its Source Code form, or as
+Executable Code. If the Work is provided as Executable Code, the Licensor
+provides in addition a machine-readable copy of the Source Code of the Work
+along with each copy of the Work that the Licensor distributes or indicates, in
+a notice following the copyright notice attached to the Work, a repository where
+the Source Code is easily and freely accessible for as long as the Licensor
+continues to distribute and/or communicate the Work.
+
+
+
+## 4. Limitations on copyright
+
+Nothing in this Licence is intended to deprive the Licensee of the benefits from
+any exception or limitation to the exclusive rights of the rights owners in the
+Original Work or Software, of the exhaustion of those rights or of other
+applicable limitations thereto.
+
+
+
+## 5. Obligations of the Licensee
+
+The grant of the rights mentioned above is subject to some restrictions and
+obligations imposed on the Licensee. Those obligations are the following:
+
+Attribution right: the Licensee shall keep intact all copyright, patent or
+trademarks notices and all notices that refer to the Licence and to the
+disclaimer of warranties. The Licensee must include a copy of such notices and a
+copy of the Licence with every copy of the Work he/she distributes and/or
+communicates. The Licensee must cause any Derivative Work to carry prominent
+notices stating that the Work has been modified and the date of modification.
+
+Copyleft clause: If the Licensee distributes and/or communicates copies of the
+Original Works or Derivative Works based upon the Original Work, this
+Distribution and/or Communication will be done under the terms of this Licence
+or of a later version of this Licence unless the Original Work is expressly
+distributed only under this version of the Licence. The Licensee (becoming
+Licensor) cannot offer or impose any additional terms or conditions on the Work
+or Derivative Work that alter or restrict the terms of the Licence.
+
+Compatibility clause: If the Licensee Distributes and/or Communicates Derivative
+Works or copies thereof based upon both the Original Work and another work
+licensed under a Compatible Licence, this Distribution and/or Communication can
+be done under the terms of this Compatible Licence. For the sake of this clause,
+“Compatible Licence” refers to the licences listed in the appendix attached to
+this Licence. Should the Licensee’s obligations under the Compatible Licence
+conflict with his/her obligations under this Licence, the obligations of the
+Compatible Licence shall prevail.
+
+Provision of Source Code: When distributing and/or communicating copies of the
+Work, the Licensee will provide a machine-readable copy of the Source Code or
+indicate a repository where this Source will be easily and freely available for
+as long as the Licensee continues to distribute and/or communicate the Work.
+
+Legal Protection: This Licence does not grant permission to use the trade names,
+trademarks, service marks, or 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 copyright notice.
+
+
+
+## 6. Chain of Authorship
+
+The original Licensor warrants that the copyright in the Original Work granted
+hereunder is owned by him/her or licensed to him/her and that he/she has the
+power and authority to grant the Licence.
+
+Each Contributor warrants that the copyright in the modifications he/she brings
+to the Work are owned by him/her or licensed to him/her and that he/she has the
+power and authority to grant the Licence.
+
+Each time You accept the Licence, the original Licensor and subsequent
+Contributors grant You a licence to their contributions to the Work, under the
+terms of this Licence.
+
+
+
+## 7. Disclaimer of Warranty
+
+The Work is a work in progress, which is continuously improved by numerous
+contributors. It is not a finished work and may therefore contain defects or
+“bugs” inherent to this type of software development.
+
+For the above reason, the Work is provided under the Licence on an “as is” basis
+and without warranties of any kind concerning the Work, including without
+limitation merchantability, fitness for a particular purpose, absence of defects
+or errors, accuracy, non-infringement of intellectual property rights other than
+copyright as stated in Article 6 of this Licence.
+
+This disclaimer of warranty is an essential part of the Licence and a condition
+for the grant of any rights to the Work.
+
+
+
+## 8. Disclaimer of Liability
+
+Except in the cases of wilful misconduct or damages directly caused to natural
+persons, the Licensor will in no event be liable for any direct or indirect,
+material or moral, damages of any kind, arising out of the Licence or of the use
+of the Work, including without limitation, damages for loss of goodwill, work
+stoppage, computer failure or malfunction, loss of data or any commercial
+damage, even if the Licensor has been advised of the possibility of such
+damage. However, the Licensor will be liable under statutory product liability
+laws as far such laws apply to the Work.
+
+
+
+## 9. Additional agreements
+
+While distributing the Original Work or Derivative Works, You may choose to
+conclude an additional agreement to offer, and charge a fee for, acceptance of
+support, warranty, indemnity, or other liability obligations and/or services
+consistent with this Licence. However, in accepting such obligations, You may
+act only on your own behalf and on your sole responsibility, not on behalf of
+the original Licensor or 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 the fact You have accepted
+any such warranty or additional liability.
+
+
+
+## 10. Acceptance of the Licence
+
+The provisions of this Licence can be accepted by clicking on an icon “I agree”
+placed under the bottom of a window displaying the text of this Licence or by
+affirming consent in any other similar way, in accordance with the rules of
+applicable law. Clicking on that icon indicates your clear and irrevocable
+acceptance of this Licence and all of its terms and conditions.
+
+Similarly, you irrevocably accept this Licence and all of its terms and
+conditions by exercising any rights granted to You by Article 2 of this Licence,
+such as the use of the Work, the creation by You of a Derivative Work or the
+Distribution and/or Communication by You of the Work or copies thereof.
+
+
+
+## 11. Information to the public
+
+In case of any Distribution and/or Communication of the Work by means of
+electronic communication by You (for example, by offering to download the Work
+from a remote location) the distribution channel or media (for example, a
+website) must at least provide to the public the information requested by the
+applicable law regarding the Licensor, the Licence and the way it may be
+accessible, concluded, stored and reproduced by the Licensee.
+
+
+
+## 12. Termination of the Licence
+
+The Licence and the rights granted hereunder will terminate automatically upon
+any breach by the Licensee of the terms of the Licence.
+
+Such a termination will not terminate the licences of any person who has
+received the Work from the Licensee under the Licence, provided such persons
+remain in full compliance with the Licence.
+
+
+
+## 13. Miscellaneous
+
+Without prejudice of Article 9 above, the Licence represents the complete
+agreement between the Parties as to the Work licensed hereunder.
+
+If any provision of the Licence is invalid or unenforceable under applicable
+law, this will not affect the validity or enforceability of the Licence as a
+whole. Such provision will be construed and/or reformed so as necessary to make
+it valid and enforceable.
+
+The European Commission may publish other linguistic versions and/or new
+versions of this Licence, so far this is required and reasonable, without
+reducing the scope of the rights granted by the Licence. New versions of the
+Licence will be published with a unique version number.
+
+All linguistic versions of this Licence, approved by the European Commission,
+have identical value. Parties can take advantage of the linguistic version of
+their choice.
+
+
+
+## 14. Jurisdiction
+
+Any litigation resulting from the interpretation of this License, arising
+between the European Commission, as a Licensor, and any Licensee, will be
+subject to the jurisdiction of the Court of Justice of the European Communities,
+as laid down in article 238 of the Treaty establishing the European Community.
+
+Any litigation arising between Parties, other than the European Commission, and
+resulting from the interpretation of this License, will be subject to the
+exclusive jurisdiction of the competent court where the Licensor resides or
+conducts its primary business.
+
+
+
+## 15. Applicable Law
+
+This Licence shall be governed by the law of the European Union country where
+the Licensor resides or has his registered office.
+
+This licence shall be governed by the Belgian law if:
+
+- a litigation arises between the European Commission, as a Licensor, and any
+- Licensee; the Licensor, other than the European Commission, has no residence
+- or registered office inside a European Union country.
+
+
+
+## Appendix
+
+
+
+“Compatible Licences” according to article 5 EUPL are:
+
+
+- GNU General Public License (GNU GPL) v. 2
+
+- Open Software License (OSL) v. 2.1, v. 3.0
+
+- Common Public License v. 1.0
+
+- Eclipse Public License v. 1.0
+
+- Cecill v. 2.0
+
diff --git a/sdi-plugins/README.md b/sdi-plugins/README.md
new file mode 100644
index 0000000..85dd719
--- /dev/null
+++ b/sdi-plugins/README.md
@@ -0,0 +1,52 @@
+gCube CMS Suite
+--------------------------------------------------
+
+gCube CMS Suite is a set of components designed to manage complex space-temporal Documents defined by metadata Profiles.
+
+## Built with
+* [gCube SmartGears] (https://gcube.wiki.gcube-system.org/gcube/SmartGears) - The gCube SmartGears framework
+* [OpenJDK](https://openjdk.java.net/) - The JDK used
+* [JAX-RS](https://github.com/eclipse-ee4j/jaxrs-api) - Java™ API for RESTful Web Services
+* [Jersey](https://jersey.github.io/) - JAX-RS runtime
+* [Maven](https://maven.apache.org/) - Dependency Management
+
+## Documentation
+
+Documentation can be found [here](https://gcube.wiki.gcube-system.org/gcube/GeoPortal_Service).
+
+## Change log
+
+See [CHANGELOG.md](CHANGELOG.md).
+
+## License
+
+This project is licensed under the EUPL V.1.1 License - see the [LICENSE.md](LICENSE.md) file for details.
+
+## About the gCube Framework
+This software is part of the [gCubeFramework](https://www.gcube-system.org/ "gCubeFramework"): an
+open-source software toolkit used for building and operating Hybrid Data
+Infrastructures enabling the dynamic deployment of Virtual Research Environments
+by favouring the realisation of reuse oriented policies.
+
+The projects leading to this software have received funding from a series of European Union programmes including:
+
+- the Sixth Framework Programme for Research and Technological Development
+ - DILIGENT (grant no. 004260).
+- the Seventh Framework Programme for research, technological development and demonstration
+ - D4Science (grant no. 212488);
+ - D4Science-II (grant no.239019);
+ - ENVRI (grant no. 283465);
+ - iMarine(grant no. 283644);
+ - EUBrazilOpenBio (grant no. 288754).
+- the H2020 research and innovation programme
+ - SoBigData (grant no. 654024);
+ - PARTHENOS (grant no. 654119);
+ - EGIEngage (grant no. 654142);
+ - ENVRIplus (grant no. 654182);
+ - BlueBRIDGE (grant no. 675680);
+ - PerformFish (grant no. 727610);
+ - AGINFRAplus (grant no. 731001);
+ - DESIRA (grant no. 818194);
+ - ARIADNEplus (grant no. 823914);
+ - RISIS2 (grant no. 824091);
+
diff --git a/sdi-plugins/pom.xml b/sdi-plugins/pom.xml
new file mode 100644
index 0000000..1c2e5f4
--- /dev/null
+++ b/sdi-plugins/pom.xml
@@ -0,0 +1,62 @@
+
+
+ 4.0.0
+
+ sdi-plugins
+ 1.0.0-SNAPSHOT
+ gCube CMS - SDI Plugins
+
+
+
+ org.gcube.application.cms
+ gcube-cms-suite
+ 1.0.2-SNAPSHOT
+
+
+
+ https://code-repo.d4science.org/gCubeSystem
+
+
+
+
+
+ scm:git:${gitBaseUrl}/gcube-cms-suite
+ scm:git:${gitBaseUrl}/gcube-cms-suite
+ ${gitBaseUrl}/gcube-cms-suite
+
+
+
+
+
+
+ org.gcube.application.cms
+ cms-plugin-framework
+
+
+
+
+ org.gcube.spatial.data
+ gis-interface
+ [2.4.6,3.0.0)
+
+
+
+
+ org.gcube.data.transfer
+ data-transfer-library
+ [1.2.1,2.0.0]
+
+
+
+ org.gcube.application.cms
+ cms-test-commons
+ test
+
+
+
+
+
+
+
diff --git a/test-data/profiledDocuments/profiles/basicProfile.json b/test-data/profiledDocuments/profiles/basicProfile.json
index f275439..282bb3e 100644
--- a/test-data/profiledDocuments/profiles/basicProfile.json
+++ b/test-data/profiledDocuments/profiles/basicProfile.json
@@ -65,7 +65,7 @@
{
- "_id" : "PostgisIndex",
+ "_id" : "SDI-Indexer-Plugin",
"_type" : "Indexer",
"_configuration" : {
"bboxEvaluation" : ["$..posizionamentoScavo.._bbox"],
diff --git a/use-cases/CHANGELOG.md b/use-cases/CHANGELOG.md
index 47165ed..5b01ecf 100644
--- a/use-cases/CHANGELOG.md
+++ b/use-cases/CHANGELOG.md
@@ -2,6 +2,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
# Changelog for org.gcube.application.geoportal-client
+## [v1.0.2-SNAPSHOT] - 2022-02-24
+- Updated parent
+
## [v1.0.1] - 2021-09-20
- Updated parent
diff --git a/use-cases/pom.xml b/use-cases/pom.xml
index d4db908..993aea5 100644
--- a/use-cases/pom.xml
+++ b/use-cases/pom.xml
@@ -4,12 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
use-cases
- 1.0.1
+ 1.0.2-SNAPSHOT
CMS Use cases
gcube-cms-suite
org.gcube.application.cms
- 1.0.1
+ 1.0.2-SNAPSHOT
diff --git a/use-cases/src/test/java/org/gcube/application/cms/usecases/EditFileSet.java b/use-cases/src/test/java/org/gcube/application/cms/usecases/EditFileSet.java
index 2bffb60..8059724 100644
--- a/use-cases/src/test/java/org/gcube/application/cms/usecases/EditFileSet.java
+++ b/use-cases/src/test/java/org/gcube/application/cms/usecases/EditFileSet.java
@@ -1,6 +1,7 @@
package org.gcube.application.cms.usecases;
import org.gcube.application.cms.tests.TokenSetter;
+import org.gcube.application.cms.usecases.mocks.ConcessionPublisherThread;
import org.gcube.application.geoportal.common.utils.FileSets;
@@ -37,7 +38,7 @@ public class EditFileSet {
//Prepare Fileset
System.out.println("Preparing request..");
StorageUtils storage=new StorageUtils();
- AddSectionToConcessioneRequest request= FileSets.prepareRequestFromFolder(storage,toEditPath,sourceFolder);
+ AddSectionToConcessioneRequest request= ConcessionPublisherThread.prepareRequest(storage,toEditPath,sourceFolder);
MongoConcessioni client=mongoConcessioni().build();
diff --git a/use-cases/src/test/java/org/gcube/application/cms/usecases/StressTest.java b/use-cases/src/test/java/org/gcube/application/cms/usecases/StressTest.java
index cbf3b2e..7890150 100644
--- a/use-cases/src/test/java/org/gcube/application/cms/usecases/StressTest.java
+++ b/use-cases/src/test/java/org/gcube/application/cms/usecases/StressTest.java
@@ -4,6 +4,7 @@ import lombok.extern.slf4j.Slf4j;
import org.gcube.application.cms.tests.TokenSetter;
import org.gcube.application.cms.tests.model.concessioni.TestConcessioniModel;
+import org.gcube.application.cms.usecases.mocks.ConcessionPublisherThread;
import org.gcube.application.geoportal.common.model.legacy.Concessione;
import org.gcube.application.geoportal.common.model.rest.AddSectionToConcessioneRequest;
import org.gcube.application.geoportal.common.rest.MongoConcessioni;
@@ -29,7 +30,7 @@ public class StressTest {
TokenSetter.set("/pred4s/preprod/preVRE");
AtomicLong executed=new AtomicLong(0);
- AddSectionToConcessioneRequest request= FileSets.prepareRequest(
+ AddSectionToConcessioneRequest request= ConcessionPublisherThread.prepareRequest(
new StorageUtils(), Concessione.Paths.RELAZIONE,new File(TestConcessioniModel.getBaseFolder(),"relazione.pdf"));
int numRequests=100000;
diff --git a/use-cases/src/test/java/org/gcube/application/cms/usecases/mocks/ConcessionPublisherThread.java b/use-cases/src/test/java/org/gcube/application/cms/usecases/mocks/ConcessionPublisherThread.java
index 075b992..4c74894 100644
--- a/use-cases/src/test/java/org/gcube/application/cms/usecases/mocks/ConcessionPublisherThread.java
+++ b/use-cases/src/test/java/org/gcube/application/cms/usecases/mocks/ConcessionPublisherThread.java
@@ -1,22 +1,29 @@
package org.gcube.application.cms.usecases.mocks;
-import lombok.*;
+import lombok.Data;
+import lombok.NonNull;
+import lombok.RequiredArgsConstructor;
+import lombok.ToString;
import lombok.extern.slf4j.Slf4j;
-
import org.gcube.application.cms.tests.model.concessioni.TestConcessioniModel;
import org.gcube.application.geoportal.client.utils.Serialization;
import org.gcube.application.geoportal.common.model.legacy.Concessione;
-import org.gcube.application.geoportal.common.model.legacy.report.ValidationReport;
+import org.gcube.application.geoportal.common.model.legacy.InputStreamDescriptor;
+import org.gcube.application.geoportal.common.model.rest.AddSectionToConcessioneRequest;
import org.gcube.application.geoportal.common.rest.MongoConcessioni;
import org.gcube.application.geoportal.common.utils.FileSets;
import org.gcube.application.geoportal.common.utils.Files;
import org.gcube.application.geoportal.common.utils.StorageUtils;
import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
import java.util.List;
import java.util.Map;
-import java.util.NavigableSet;
-import java.util.concurrent.*;
+import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
import static org.gcube.application.geoportal.client.GeoportalAbstractPlugin.mongoConcessioni;
@@ -113,7 +120,19 @@ public class ConcessionPublisherThread implements Runnable{
}
}
+ public static AddSectionToConcessioneRequest prepareRequest(StorageUtils storage, String path, File... toUpload) throws FileNotFoundException {
+ AddSectionToConcessioneRequest toReturn=new AddSectionToConcessioneRequest();
+ toReturn.setDestinationPath(path);
+ for (File f : toUpload) {
+ if(!f.isDirectory())
+ toReturn.getStreams().add(FileSets.asTemp(storage, new InputStreamDescriptor(new FileInputStream(f), f.getName())));
+ else {
+ toReturn.getStreams().addAll(prepareRequest(storage,path,f.listFiles()).getStreams());
+ }
+ }
+ return toReturn;
+ }
private static Concessione createMock(String baseName, String packageName, Map> piante, List pos,
MongoConcessioni client, StorageUtils storage) throws Exception {
@@ -124,15 +143,15 @@ public class ConcessionPublisherThread implements Runnable{
String mongoId=c.getMongo_id();
// TEST DATA, DO NOT CARE
- client.registerFileSet(mongoId, FileSets.prepareRequest(storage,
+ client.registerFileSet(mongoId, prepareRequest(storage,
Concessione.Paths.RELAZIONE,new File (TestConcessioniModel.getBaseFolder(),"relazione.pdf")));
- client.registerFileSet(mongoId, FileSets.prepareRequest(storage,
+ client.registerFileSet(mongoId, prepareRequest(storage,
Concessione.Paths.imgByIndex(0),Files.getSiblings(TestConcessioniModel.getBaseFolder(),"immagine").get(0)));
// POSIZIONAMENTO
- client.registerFileSet(mongoId, FileSets.prepareRequest(storage,
+ client.registerFileSet(mongoId, prepareRequest(storage,
Concessione.Paths.POSIZIONAMENTO,pos.toArray(new File[pos.size()])));
// PIANTE
@@ -145,7 +164,7 @@ public class ConcessionPublisherThread implements Runnable{
client.update(mongoId, Serialization.write(c));
//Set fileset
- client.registerFileSet(mongoId, FileSets.prepareRequest(storage,path, entries[i].getValue().toArray(new File[0])));
+ client.registerFileSet(mongoId, prepareRequest(storage,path, entries[i].getValue().toArray(new File[0])));
}
c=client.publish(mongoId);