Compare commits

..

No commits in common. "master" and "r4.15.0" have entirely different histories.

25 changed files with 336 additions and 228 deletions

38
.classpath Normal file
View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry including="**/*.java" kind="src" output="target/grsf-common-library-1.1.0/WEB-INF/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/grsf-common-library-1.1.0/WEB-INF/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/grsf-common-library-1.1.0/WEB-INF/classes"/>
</classpath>

4
.gitignore vendored
View File

@ -1,5 +1 @@
target target
.classpath
.project
.settings
/.DS_Store

53
.project Normal file
View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>grsf-common-library</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.google.gdt.eclipse.core.webAppProjectValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.google.gwt.eclipse.core.gwtProjectValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
<nature>com.google.gwt.eclipse.core.gwtNature</nature>
</natures>
</projectDescription>

13
.settings/.jsdtscope Normal file
View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/webapp"/>
<classpathentry kind="src" path="target/m2e-wtp/web-resources"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
<attributes>
<attribute name="hide" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
<classpathentry kind="output" path=""/>
</classpath>

View File

@ -0,0 +1,3 @@
eclipse.preferences.version=1
warSrcDir=src/main/webapp
warSrcDirIsOutput=false

View File

@ -0,0 +1,2 @@
eclipse.preferences.version=1
entryPointModules=

View File

@ -0,0 +1,6 @@
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
encoding//src/test/resources=UTF-8
encoding/<project>=UTF-8

View File

@ -0,0 +1,6 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.7

View File

@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="grsf-common-library">
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/resources"/>
<property name="context-root" value="grsf-common-library"/>
<property name="java-output-path" value="/grsf-common-library/target/grsf-common-library-0.0.1-SNAPSHOT/WEB-INF/classes"/>
</wb-module>
</project-modules>

View File

@ -0,0 +1,7 @@
<root>
<facet id="jst.jaxrs">
<node name="libprov">
<attribute name="provider-id" value="jaxrs-no-op-library-provider"/>
</node>
</facet>
</root>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="wst.jsdt.web"/>
<installed facet="java" version="1.8"/>
<installed facet="jst.web" version="2.3"/>
<installed facet="wst.jsdt.web" version="1.0"/>
<installed facet="jst.jaxrs" version="2.0"/>
</faceted-project>

View File

@ -0,0 +1 @@
org.eclipse.wst.jsdt.launching.baseBrowserLibrary

View File

@ -0,0 +1 @@
Window

View File

@ -0,0 +1,2 @@
disabled=06target
eclipse.preferences.version=1

View File

@ -1,83 +0,0 @@
# Changelog
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v2.0.0]
- Adding support for "FAO SDG 14.4.1 Questionnaire" source [#23670]
- Upgraded gcube-bom version to 2.1.0
## [v1.3.2]
- Updated Labels [#23167]
## [v1.3.1] - 2021-04-09
### Changed
- Switched dependency management to gcube-bom 2.0.0
[#19500#note-2] Fixing GWT import issue
## [v1.3.0] [r4.24.0] - 2020-06-19
### Changed
- [#19166] Added support for GRSF_pre VRE with the behaviour of GRSF Admin
## [v1.2.0] - 2019-11-12
### Changed
- Fixed project gcube rule compliancy
## [v1.1.0] - 2019-11-06
### Changed
- Switched to git/jenkins
## [v1.1.0] - 2019-09-28
### Changed
- Switched maven parent
## [v1.0.3] - 2018-07-18
### Added
**Features**
- [#11749] Added 'With Similarities'-'No Similarities' tag to GRSF Records
- [#11766] Added 'Connected'-'Not Connected' tag to GRSF Records
- [#11767] Add group for SDG flag
- [#11811] Added citation field
- [#11968] Changed 'State and trend of Marine Resource' to 'State and Trend'
- [#11969] Changed 'Scientific advice' to 'Scientific Advice'
## [v1.0.2] - 2018-03-21
### Changed
**Fixes**
- [#11487] Fixing issue
## [v1.0.1] - 2017-12-23
### Changed
**Fixes**
- Minor fixes
## [v1.0.0] - 2017-11-05
- First Release

View File

@ -1,10 +1,9 @@
# European Union Public Licence V. 1.1 #European Union Public Licence V.1.1
##*EUPL © the European Community 2007*
EUPL © the European Community 2007 This **European Union Public Licence** (the **“EUPL”**) applies to the Work or Software
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 (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 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). extent such use is covered by a right of the copyright holder of the Work).
@ -13,13 +12,13 @@ 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 (as defined below) has placed the following notice immediately following the
copyright notice for the Original Work: copyright notice for the Original Work:
Licensed under the EUPL V.1.1 **Licensed under the EUPL V.1.1**
or has expressed by any other mean his willingness to license under the EUPL. or has expressed by any other mean his willingness to license under the EUPL.
## 1. Definitions ##1. Definitions
In this Licence, the following terms have the following meaning: In this Licence, the following terms have the following meaning:
@ -60,7 +59,7 @@ In this Licence, the following terms have the following meaning:
## 2. Scope of the rights granted by the Licence ##2. Scope of the rights granted by the Licence
The Licensor hereby grants You a world-wide, royalty-free, non-exclusive, 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 sub-licensable licence to do the following, for the duration of copyright vested
@ -86,7 +85,7 @@ rights granted on the Work under this Licence.
## 3. Communication of the Source Code ##3. Communication of the Source Code
The Licensor may provide the Work either in its Source Code form, or as 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 Executable Code. If the Work is provided as Executable Code, the Licensor
@ -98,7 +97,7 @@ continues to distribute and/or communicate the Work.
## 4. Limitations on copyright ##4. Limitations on copyright
Nothing in this Licence is intended to deprive the Licensee of the benefits from 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 any exception or limitation to the exclusive rights of the rights owners in the
@ -107,7 +106,7 @@ applicable limitations thereto.
## 5. Obligations of the Licensee ##5. Obligations of the Licensee
The grant of the rights mentioned above is subject to some restrictions and The grant of the rights mentioned above is subject to some restrictions and
obligations imposed on the Licensee. Those obligations are the following: obligations imposed on the Licensee. Those obligations are the following:
@ -148,7 +147,7 @@ reproducing the content of the copyright notice.
## 6. Chain of Authorship ##6. Chain of Authorship
The original Licensor warrants that the copyright in the Original Work granted 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 hereunder is owned by him/her or licensed to him/her and that he/she has the
@ -164,7 +163,7 @@ terms of this Licence.
## 7. Disclaimer of Warranty ##7. Disclaimer of Warranty
The Work is a work in progress, which is continuously improved by numerous 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 contributors. It is not a finished work and may therefore contain defects or
@ -181,7 +180,7 @@ for the grant of any rights to the Work.
## 8. Disclaimer of Liability ##8. Disclaimer of Liability
Except in the cases of wilful misconduct or damages directly caused to natural 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, persons, the Licensor will in no event be liable for any direct or indirect,
@ -194,7 +193,7 @@ laws as far such laws apply to the Work.
## 9. Additional agreements ##9. Additional agreements
While distributing the Original Work or Derivative Works, You may choose to 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 conclude an additional agreement to offer, and charge a fee for, acceptance of
@ -208,7 +207,7 @@ any such warranty or additional liability.
## 10. Acceptance of the Licence ##10. Acceptance of the Licence
The provisions of this Licence can be accepted by clicking on an icon “I agree” 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 placed under the bottom of a window displaying the text of this Licence or by
@ -223,7 +222,7 @@ Distribution and/or Communication by You of the Work or copies thereof.
## 11. Information to the public ##11. Information to the public
In case of any Distribution and/or Communication of the Work by means of 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 electronic communication by You (for example, by offering to download the Work
@ -234,7 +233,7 @@ accessible, concluded, stored and reproduced by the Licensee.
## 12. Termination of the Licence ##12. Termination of the Licence
The Licence and the rights granted hereunder will terminate automatically upon The Licence and the rights granted hereunder will terminate automatically upon
any breach by the Licensee of the terms of the Licence. any breach by the Licensee of the terms of the Licence.
@ -245,7 +244,7 @@ remain in full compliance with the Licence.
## 13. Miscellaneous ##13. Miscellaneous
Without prejudice of Article 9 above, the Licence represents the complete Without prejudice of Article 9 above, the Licence represents the complete
agreement between the Parties as to the Work licensed hereunder. agreement between the Parties as to the Work licensed hereunder.
@ -266,7 +265,7 @@ their choice.
## 14. Jurisdiction ##14. Jurisdiction
Any litigation resulting from the interpretation of this License, arising Any litigation resulting from the interpretation of this License, arising
between the European Commission, as a Licensor, and any Licensee, will be between the European Commission, as a Licensor, and any Licensee, will be
@ -280,7 +279,7 @@ conducts its primary business.
## 15. Applicable Law ##15. Applicable Law
This Licence shall be governed by the law of the European Union country where This Licence shall be governed by the law of the European Union country where
the Licensor resides or has his registered office. the Licensor resides or has his registered office.
@ -292,12 +291,13 @@ This licence shall be governed by the Belgian law if:
- or registered office inside a European Union country. - or registered office inside a European Union country.
---
## Appendix
##Appendix
“Compatible Licences” according to article 5 EUPL are:
**“Compatible Licences”** according to article 5 EUPL are:
- GNU General Public License (GNU GPL) v. 2 - GNU General Public License (GNU GPL) v. 2
@ -309,4 +309,3 @@ This licence shall be governed by the Belgian law if:
- Eclipse Public License v. 1.0 - Eclipse Public License v. 1.0
- Cecill v. 2.0 - Cecill v. 2.0

View File

@ -1,6 +1,6 @@
# GRSF Common Library # GRSF Common Library
This library contains utility classes for GRSF publisher service. A common utility library for GRSF service and GRSF Manage widget
## Built With ## Built With
@ -9,31 +9,18 @@ This library contains utility classes for GRSF publisher service.
## Documentation ## Documentation
[GRSF Common Library](https://wiki.gcube-system.org/gcube/GCube_Data_Catalogue_for_GRSF)
## Change log ## Change log
See [Releases](https://code-repo.d4science.org/gCubeSystem/grsf-common-library/releases). See the [GRSF Common Library releases](https://code-repo.d4science.org/gCubeSystem/grsf-common-library/releases)
## Authors ## Authors
* **Luca Frosini** ([ORCID](https://orcid.org/0000-0003-3183-2291)) - [ISTI-CNR Infrascience Group](http://nemis.isti.cnr.it/groups/infrascience) * **Costantino Perciante**
## How to Cite this Software ## Mantainers
Tell people how to cite this software. * **Francesco Mangiacrapa** ([ORCID](https://orcid.org/0000-0002-6528-664X)) Computer Scientist at [ISTI-CNR Infrascience Group](http://nemis.isti.cnr.it/groups/infrascience)
* Cite an associated paper?
* Use a specific BibTeX entry for the software?
@Manual{,
title = {GRSF Common Library},
author = {{Perciante, Costantino}, {Frosini, Luca}},
organization = {ISTI - CNR},
address = {Pisa, Italy},
year = 2019,
url = {http://www.gcube-system.org/}
}
## License ## License
@ -54,16 +41,18 @@ The projects leading to this software have received funding from a series of Eur
- D4Science (grant no. 212488); - D4Science (grant no. 212488);
- D4Science-II (grant no.239019); - D4Science-II (grant no.239019);
- ENVRI (grant no. 283465); - ENVRI (grant no. 283465);
- iMarine(grant no. 283644); - EUBrazilOpenBio (grant no. 288754);
- EUBrazilOpenBio (grant no. 288754). - iMarine(grant no. 283644).
- the H2020 research and innovation programme - the H2020 research and innovation programme
- SoBigData (grant no. 654024); - BlueBRIDGE (grant no. 675680);
- PARTHENOS (grant no. 654119);
- EGIEngage (grant no. 654142); - EGIEngage (grant no. 654142);
- ENVRIplus (grant no. 654182); - ENVRIplus (grant no. 654182);
- BlueBRIDGE (grant no. 675680); - PARTHENOS (grant no. 654119);
- PerformFish (grant no. 727610); - SoBigData (grant no. 654024);
- AGINFRAplus (grant no. 731001);
- DESIRA (grant no. 818194); - DESIRA (grant no. 818194);
- ARIADNEplus (grant no. 823914); - ARIADNEplus (grant no. 823914);
- RISIS2 (grant no. 824091); - RISIS2 (grant no. 824091);
- PerformFish (grant no. 727610);
- AGINFRAplus (grant no. 731001).

30
changelog.xml Normal file
View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xml>
<ReleaseNotes>
<Changeset component="org.gcube.data-catalogue.grsf-common-library.1-1-0" date="2019-10-16">
<Change>Switched to git/jenkins</Change>
</Changeset>
<Changeset component="org.gcube.data-catalogue.grsf-common-library.1-1-0" date="2019-09-28">
<Change>Switched maven parent</Change>
</Changeset>
<Changeset component="org.gcube.data-catalogue.grsf-common-library.1-0-3" date="2018-07-18">
<Change>Added 'With Similarities'-'No Similarities' tag to GRSF Records #11749</Change>
<Change>Added 'Connected'-'Not Connected' tag to GRSF Records #11766</Change>
<Change>Add group for SDG flag #11767</Change>
<Change>Added citation field #11811</Change>
<Change>Changed 'State and trend of Marine Resource' to 'State and Trend' #11968</Change>
<Change>Changed 'Scientific advice' to 'Scientific Advice' #11969</Change>
</Changeset>
<Changeset component="org.gcube.data-catalogue.grsf-common-library.1-0-2"
date="2018-03-21">
<Change>Fixing issue: #11487</Change>
</Changeset>
<Changeset component="org.gcube.data-catalogue.grsf-common-library.1-0-1"
date="2017-12-23">
<Change>Minor fixes</Change>
</Changeset>
<Changeset component="org.gcube.data-catalogue.grsf-common-library.1-0-0"
date="2017-11-05">
<Change>First Release</Change>
</Changeset>
</ReleaseNotes>

View File

@ -9,16 +9,17 @@
<baseDirectory>/</baseDirectory> <baseDirectory>/</baseDirectory>
<fileSets> <fileSets>
<fileSet> <fileSet>
<directory>${distroDirectory}</directory>
<outputDirectory>/</outputDirectory> <outputDirectory>/</outputDirectory>
<useDefaultExcludes>true</useDefaultExcludes> <useDefaultExcludes>true</useDefaultExcludes>
<includes> <includes>
<include>LICENSE.md</include>
<include>README.md</include> <include>README.md</include>
<include>CHANGELOG.md</include> <include>LICENSE.md</include>
<include>profile.xml</include>
<include>changelog.xml</include>
</includes> </includes>
<fileMode>755</fileMode> <fileMode>755</fileMode>
<filtered>true</filtered> <filtered>true</filtered>
</fileSet> </fileSet>
</fileSets> </fileSets>
<files> <files>
@ -26,5 +27,6 @@
<source>target/${build.finalName}.${project.packaging}</source> <source>target/${build.finalName}.${project.packaging}</source>
<outputDirectory>/${artifactId}</outputDirectory> <outputDirectory>/${artifactId}</outputDirectory>
</file> </file>
</files> </files>
</assembly> </assembly>

43
pom.xml
View File

@ -14,7 +14,7 @@
<groupId>org.gcube.data-catalogue</groupId> <groupId>org.gcube.data-catalogue</groupId>
<artifactId>grsf-common-library</artifactId> <artifactId>grsf-common-library</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<version>2.0.0</version> <version>1.2.0</version>
<description>Common library for GRSF service and management panel</description> <description>Common library for GRSF service and management panel</description>
<properties> <properties>
@ -39,8 +39,8 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.gcube.distribution</groupId> <groupId>org.gcube.distribution</groupId>
<artifactId>gcube-bom</artifactId> <artifactId>maven-smartgears-bom</artifactId>
<version>2.1.0</version> <version>LATEST</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>
@ -89,6 +89,7 @@
<include>**/*.*</include> <include>**/*.*</include>
</includes> </includes>
</resource> </resource>
<resource> <resource>
<directory>src/main/resources</directory> <directory>src/main/resources</directory>
<includes> <includes>
@ -98,16 +99,46 @@
</resources> </resources>
<plugins> <plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId> <artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<executions> <executions>
<execution> <execution>
<id>make-servicearchive</id> <goals>
<phase>package</phase> <goal>test-jar</goal>
</goals>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>descriptor.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>servicearchive</id>
<phase>install</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- GWT Maven Plugin - not needed --> <!-- GWT Maven Plugin - not needed -->
<!-- GWT Maven Plugin --> <!-- GWT Maven Plugin -->
<plugin> <plugin>

26
profile.xml Normal file
View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<Resource xmlns:p1="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ID/>
<Type>Library</Type>
<Profile>
<Description>${project.description}</Description>
<Class>DataCatalogue</Class>
<Name>${project.artifactId}</Name>
<Version>${project.version}</Version>
<Packages>
<Software>
<Name>${project.artifactId}</Name>
<Description>${project.description}</Description>
<Version>${project.version}</Version>
<MavenCoordinates>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
</MavenCoordinates>
<Files>
<File>${project.build.finalName}.${project.packaging}</File>
</Files>
</Software>
</Packages>
</Profile>
</Resource>

View File

@ -23,9 +23,8 @@ public class Constants {
public static final String UUID_KB_CUSTOM_KEY = "GRSF UUID"; public static final String UUID_KB_CUSTOM_KEY = "GRSF UUID";
public static final String UUID_KB_JSON_KEY = "grsf_uuid"; public static final String UUID_KB_JSON_KEY = "grsf_uuid";
public static final String DOMAIN_CUSTOM_KEY = "Domain"; public static final String DOMAIN_CUSTOM_KEY = "Domain";
public static final String DATA_OWNER_CUSTOM_KEY = "Data Owner"; public static final String DATA_OWNER_CUSTOM_KEY = "Data owner";
public static final String DATA_OWNER_JSON_KEY = "data_owner"; public static final String DATA_OWNER_JSON_KEY = "data_owner";
public static final String DATABASE_SOURCES_CUSTOM_KEY = "Database Source";
public static final String DATABASE_SOURCES_JSON_KEY = "database_sources"; public static final String DATABASE_SOURCES_JSON_KEY = "database_sources";
public static final String SOURCES_OF_INFORMATION_JSON_KEY = "source_of_information"; public static final String SOURCES_OF_INFORMATION_JSON_KEY = "source_of_information";
public static final String REFERS_TO_JSON_KEY = "refers_to"; public static final String REFERS_TO_JSON_KEY = "refers_to";
@ -33,25 +32,25 @@ public class Constants {
public static final String SHORT_NAME_JSON_KEY = "short_name"; public static final String SHORT_NAME_JSON_KEY = "short_name";
public static final String TRACEABILITY_FLAG_CUSTOM_KEY = "Traceability Flag"; public static final String TRACEABILITY_FLAG_CUSTOM_KEY = "Traceability Flag";
public static final String TRACEABILITY_FLAG_JSON_KEY = "traceability_flag"; public static final String TRACEABILITY_FLAG_JSON_KEY = "traceability_flag";
public static final String TRACEABILITY_FLAG_GROUP_NAME = "GRSF" + TRACEABILITY_FLAG_CUSTOM_KEY;
public static final String SDG_FLAG_CUSTOM_KEY = "SDG Flag"; public static final String SDG_FLAG_CUSTOM_KEY = "SDG Flag";
public static final String SDG_FLAG_JSON_KEY = "sdg_flag"; public static final String SDG_FLAG_JSON_KEY = "sdg_flag";
public static final String SDG_FLAG_GROUP_NAME = "GRSF " + SDG_FLAG_CUSTOM_KEY; public static final String CATCHES_CUSTOM_KEY = "Catches";
public static final String CATCHES_CUSTOM_KEY = "Catch";
public static final String CATCHES_JSON_KEY = "catches"; public static final String CATCHES_JSON_KEY = "catches";
public static final String LANDINGS_CUSTOM_KEY = "Landing"; public static final String LANDINGS_CUSTOM_KEY = "Landings";
public static final String LANDINGS_JSON_KEY = "landings"; public static final String LANDINGS_JSON_KEY = "landings";
public static final String SPECIES_CUSTOM_KEY = "Species"; public static final String SPECIES_CUSTOM_KEY = "Species";
public static final String SPECIES_JSON_KEY = "species"; public static final String SPECIES_JSON_KEY = "species";
public static final String STATUS_OF_THE_GRSF_RECORD_CUSTOM_KEY = "Status of the Record"; public static final String STATUS_OF_THE_GRSF_RECORD_CUSTOM_KEY = "Status of the GRSF record";
public static final String STATUS_OF_THE_GRSF_RECORD_JSON_KEY = "status_grsf_record"; public static final String STATUS_OF_THE_GRSF_RECORD_JSON_KEY = "status_grsf_record";
public static final String SIMILAR_GRSF_RECORDS_CUSTOM_KEY = "Similar GRSF Record"; public static final String SIMILAR_GRSF_RECORDS_CUSTOM_KEY = "Similar GRSF Record";
public static final String SIMILAR_GRSF_RECORDS_JSON_KEY = "similar_grsf_records"; public static final String SIMILAR_GRSF_RECORDS_JSON_KEY = "similar_grsf_records";
public static final String GRSF_SEMANTIC_IDENTIFIER_CUSTOM_KEY = "GRSF Semantic Identifier"; public static final String SIMILAR_SOURCE_RECORDS_CUSTOM_KEY = "Similar Source Record";
public static final String SIMILAR_SOURCE_RECORDS_JSON_KEY = "similar_source_records";
public static final String GRSF_SEMANTIC_IDENTIFIER_CUSTOM_KEY = "GRSF Semantic identifier";
public static final String GRSF_SEMANTIC_IDENTIFIER_JSON_KEY = "grsf_semantic_identifier"; public static final String GRSF_SEMANTIC_IDENTIFIER_JSON_KEY = "grsf_semantic_identifier";
public static final String GRSF_TYPE_CUSTOM_KEY = "GRSF Type"; public static final String GRSF_TYPE_CUSTOM_KEY = "GRSF Type";
public static final String GRSF_TYPE_JSON_KEY = "grsf_type"; public static final String GRSF_TYPE_JSON_KEY = "grsf_type";
public static final String MANAGEMENT_ENTITIES_CUSTOM_KEY = "Management Body/Authority"; public static final String MANAGEMENT_ENTITIES_CUSTOM_KEY = "Management Body/Authority(ies)";
public static final String MANAGEMENT_ENTITIES_JSON_KEY = "management_body_authorities"; public static final String MANAGEMENT_ENTITIES_JSON_KEY = "management_body_authorities";
public static final String CITATION_CUSTOM_KEY = "Citation"; public static final String CITATION_CUSTOM_KEY = "Citation";
@ -62,13 +61,13 @@ public class Constants {
public static final String CONNECTED_JSON_KEY = "connected"; public static final String CONNECTED_JSON_KEY = "connected";
// stock record // stock record
public static final String STOCK_NAME_CUSTOM_KEY = "GRSF Stock Name"; public static final String STOCK_NAME_CUSTOM_KEY = "Stock Name";
public static final String STOCK_NAME_JSON_KEY = "stock_name"; public static final String STOCK_NAME_JSON_KEY = "stock_name";
public static final String ASSESSMENT_AREA_CUSTOM_KEY = "Assessment Area"; public static final String ASSESSMENT_AREA_CUSTOM_KEY = "Assessment Area";
public static final String ASSESSMENT_AREA_JSON_KEY = "assessment_area"; public static final String ASSESSMENT_AREA_JSON_KEY = "assessment_area";
public static final String EXPLOITING_FISHERY_CUSTOM_KEY = "Exploiting Fishery"; public static final String EXPLOITING_FISHERY_CUSTOM_KEY = "Exploiting Fishery";
public static final String EXPLOITING_FISHERY_JSON_KEY = "exploiting_fishery"; public static final String EXPLOITING_FISHERY_JSON_KEY = "exploiting_fishery";
public static final String ASSESSMENT_METHODS_CUSTOM_KEY = "Assessment Method"; public static final String ASSESSMENT_METHODS_CUSTOM_KEY = "Assessment Methods";
public static final String ASSESSMENT_METHODS_JSON_KEY = "assessment_methods"; public static final String ASSESSMENT_METHODS_JSON_KEY = "assessment_methods";
public static final String FIRMS_ABUNDANCE_LEVEL_CUSTOM_KEY = "Abundance Level (FIRMS Standard)"; public static final String FIRMS_ABUNDANCE_LEVEL_CUSTOM_KEY = "Abundance Level (FIRMS Standard)";
public static final String FIRMS_ABUNDANCE_LEVEL_JSON_KEY = "firms_standard_abundance_level"; public static final String FIRMS_ABUNDANCE_LEVEL_JSON_KEY = "firms_standard_abundance_level";
@ -80,7 +79,7 @@ public class Constants {
public static final String FISHING_PRESSURE_JSON_KEY = "fishing_pressure"; public static final String FISHING_PRESSURE_JSON_KEY = "fishing_pressure";
public static final String STATE_AND_TREND_MARINE_RESOURCE_CUSTOM_KEY = "State and Trend"; public static final String STATE_AND_TREND_MARINE_RESOURCE_CUSTOM_KEY = "State and Trend";
public static final String STATE_AND_TREND_MARINE_RESOURCE_JSON_KEY = "state_and_trend_of_marine_resources"; public static final String STATE_AND_TREND_MARINE_RESOURCE_JSON_KEY = "state_and_trend_of_marine_resources";
public static final String FAO_CATEGORIES_CUSTOM_KEY = "FAO Stock Status Category"; public static final String FAO_CATEGORIES_CUSTOM_KEY = "Fao Categories";
public static final String FAO_CATEGORIES_JSON_KEY = "fao_categories"; public static final String FAO_CATEGORIES_JSON_KEY = "fao_categories";
public static final String BIOMASS_CUSTOM_KEY = "Biomass"; public static final String BIOMASS_CUSTOM_KEY = "Biomass";
public static final String BIOMASS_JSON_KEY = "biomass"; public static final String BIOMASS_JSON_KEY = "biomass";
@ -88,21 +87,15 @@ public class Constants {
public static final String SCIENTIFIC_ADVICE_JSON_KEY = "scientific_advice"; public static final String SCIENTIFIC_ADVICE_JSON_KEY = "scientific_advice";
public static final String ASSESSOR_CUSTOM_KEY = "Assessor"; public static final String ASSESSOR_CUSTOM_KEY = "Assessor";
public static final String ASSESSOR_JSON_KEY = "assessor"; public static final String ASSESSOR_JSON_KEY = "assessor";
// Must be 'spatial' to allow the Solr plugin to properly index large GeoJson
// The Key will be replaced in the language file to Geospatial as indicated in the wiki
// https://wiki.gcube-system.org/gcube/GCube_Data_Catalogue_for_GRSF#Common_Metadata
public static final String SPATIAL_GEOJSON_CUSTOM_KEY = "spatial";
public static final String SPATIAL_GEOJSON_JSON_KEY = "spatial"; public static final String SPATIAL_GEOJSON_JSON_KEY = "spatial";
public static final String SPATIAL_GEOJSON_CUSTOM_KEY = "spatial";
public static final String FISHERY_URI = "fishery_uri"; public static final String FISHERY_URI = "fishery_uri";
public static final String STOCK_URI = "stock_uri"; public static final String STOCK_URI = "stock_uri";
// fishery record // fishery record
public static final String FISHERY_NAME_CUSTOM_KEY = "GRSF Fishery Name"; public static final String FISHERY_NAME_CUSTOM_KEY = "Fishery Name";
public static final String FISHERY_NAME_JSON_KEY = "fishery_name"; public static final String FISHERY_NAME_JSON_KEY = "fishery_name";
public static final String FISHING_AREA_CUSTOM_KEY = "Fishing Area"; public static final String FISHING_AREA_CUSTOM_KEY = "Fishing area";
public static final String FISHING_AREA_JSON_KEY = "fishing_area"; public static final String FISHING_AREA_JSON_KEY = "fishing_area";
public static final String RESOURCES_EXPLOITED_CUSTOM_KEY = "Resources Exploited"; public static final String RESOURCES_EXPLOITED_CUSTOM_KEY = "Resources Exploited";
public static final String RESOURCES_EXPLOITED_JSON_KEY = "resources_exploited"; public static final String RESOURCES_EXPLOITED_JSON_KEY = "resources_exploited";
@ -110,7 +103,9 @@ public class Constants {
public static final String FLAG_STATE_JSON_KEY = "flag_state"; public static final String FLAG_STATE_JSON_KEY = "flag_state";
public static final String JURISDICTION_AREA_CUSTOM_KEY = "Jurisdiction Area"; public static final String JURISDICTION_AREA_CUSTOM_KEY = "Jurisdiction Area";
public static final String JURISDICTION_AREA_JSON_KEY = "jurisdiction_area"; public static final String JURISDICTION_AREA_JSON_KEY = "jurisdiction_area";
public static final String FISHING_GEAR_CUSTOM_KEY = "Fishing Gear"; public static final String PRODUCTION_SYSTEM_TYPE_CUSTOM_KEY = "Type of Production System";
public static final String PRODUCTION_SYSTEM_TYPE_JSON_KEY = "production_system_type";
public static final String FISHING_GEAR_CUSTOM_KEY = "Fishing gear";
public static final String FISHING_GEAR_JSON_KEY = "fishing_gear"; public static final String FISHING_GEAR_JSON_KEY = "fishing_gear";
// similar records bean sub-fields // similar records bean sub-fields
@ -122,15 +117,12 @@ public class Constants {
// other fields/regex // other fields/regex
public static final String DEFAULT_LICENSE = "CC-BY-SA-4.0"; public static final String DEFAULT_LICENSE = "CC-BY-SA-4.0";
public static final String SYSTEM_TYPE_CUSTOM_KEY = "system:type"; public static final String SYSTEM_TYPE_CUSTOM_KEY = "system:type";
public static final String SYSTEM_TYPE_LEGACY_RECORD = "Legacy"; public static final String SYSTEM_TYPE_FOR_SOURCES_VALUE = "Legacy";
public static final String GRSF_DATABASE_SOURCE = "Database Source"; public static final String GRSF_DATABASE_SOURCE = "Database Source";
public static final int TIME_SERIES_TAKE_LAST_VALUES = 5; public static final int TIME_SERIES_TAKE_LAST_VALUES = 5;
public static final String REGEX_TAGS = "[^\\s\\w-_.]"; public static final String REGEX_TAGS = "[^\\s\\w-_.]";
public static final String ITEM_URL_FIELD = "Record URL"; public static final String ITEM_URL_FIELD = "Record URL";
public static final String GRSF_ADMIN_ORGANIZATION_NAME = "grsf_admin"; public static final String GRSF_ADMIN_ORGANIZATION_NAME = "grsf_admin";
public static final String GRSF_PRE_ORGANIZATION_NAME = "grsf_pre";
public static final String GENERIC_RESOURCE_NAME_MAP_KEY_NAMESPACES_STOCK = "GRSF Stock"; public static final String GENERIC_RESOURCE_NAME_MAP_KEY_NAMESPACES_STOCK = "GRSF Stock";
public static final String GENERIC_RESOURCE_NAME_MAP_KEY_NAMESPACES_FISHERY = "GRSF Fishery"; public static final String GENERIC_RESOURCE_NAME_MAP_KEY_NAMESPACES_FISHERY = "GRSF Fishery";
@ -214,6 +206,10 @@ public class Constants {
public static final String NO_SIMILAR_GRSF_RECORDS = "No Similar Records"; public static final String NO_SIMILAR_GRSF_RECORDS = "No Similar Records";
public static final String NO_CONNECTED_RECORDS = "No Connected Records"; public static final String NO_CONNECTED_RECORDS = "No Connected Records";
// groups for traceability and sdg flags
public static final String TRACEABILITY_FLAG_GROUP_NAME = "traceability-flag";
public static final String SDG_FLAG_GROUP_NAME = "sdg-flag";
// Used to Tag WithSimilarities/WithoutSimilarities see https://support.d4science.org/issues/11749 // Used to Tag WithSimilarities/WithoutSimilarities see https://support.d4science.org/issues/11749
public static final String SIMILARITIES_INDICATOR = "similarities_indicator"; public static final String SIMILARITIES_INDICATOR = "similarities_indicator";

View File

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='GRSFCommon'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' />
<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<!-- <inherits name='com.google.gwt.user.theme.standard.Standard' /> -->
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
<!-- Other module inherits -->
<!-- Specify the app entry point class. -->
<entry-point class='org.gcube.datacatalogue.common.GRSFCommon' />
<!-- Specify the paths for translatable code -->
<source path='' />
</module>

View File

@ -1,6 +1,7 @@
package org.gcube.datacatalogue.common.enums; package org.gcube.datacatalogue.common.enums;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.List; import java.util.List;
import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonCreator;
@ -12,73 +13,60 @@ import com.fasterxml.jackson.annotation.JsonValue;
*/ */
public enum Sources { public enum Sources {
FIRMS("FIRMS","firms"), FIRMS("FIRMS"),
RAM("RAM","ram"), RAM("RAM"),
FISHSOURCE("FishSource", "fishsource"), FISHSOURCE("FishSource"),
GRSF("GRSF", "grsf"), GRSF("GRSF");
SDG("FAO SDG 14.4.1 Questionnaire","sdg");
private String sourceName; private String subGroupNameOrig;
private String urlPath;
private Sources(String sourceName, String urlPath) { private Sources(String origName) {
this.sourceName = sourceName; this.subGroupNameOrig = origName;
this.urlPath = urlPath;
} }
/** /**
* Return the original name * Return the original name
* @return * @return
*/ */
public String getSourceName(){ public String getOrigName(){
return sourceName; return subGroupNameOrig;
} }
@JsonValue @JsonValue
public String onSerialize(){ public String onSerialize(){
return urlPath; return subGroupNameOrig.toLowerCase();
} }
@JsonCreator @JsonCreator
public static Sources onDeserialize(String sourceString) { public static Sources onDeserialize(String sourceString) {
if(sourceString != null) { if(sourceString != null) {
for(Sources source : Sources.values()) { for(Sources source : Sources.values()) {
if (source.urlPath.equalsIgnoreCase(sourceString.trim())) { if (source.toString().equalsIgnoreCase(sourceString.trim()))
return source; return source;
} }
if (source.sourceName.equalsIgnoreCase(sourceString.trim())) {
return source;
}
}
} }
return null; return null;
} }
public String getURLPath() {
return urlPath;
}
@Override @Override
public String toString() { public String toString() {
return urlPath; return getOrigName();
} }
public static String getJsonArrayAsString(){ public static String getAsList(){
return "[" + FIRMS.urlPath + "," + return "[" + Arrays.asList(
RAM.urlPath + "," + FIRMS.toString().toLowerCase(),
FISHSOURCE.urlPath + "," + RAM.toString().toLowerCase(),
GRSF.urlPath + "," + FISHSOURCE.toString().toLowerCase(),
SDG.urlPath + "," + "]"; GRSF.toString().toLowerCase()) + "]";
} }
public static List<String> listNames(){ public static List<String> getListNames(){
List<String> valuesString = new ArrayList<String>(Sources.values().length); List<String> valuesString = new ArrayList<String>(Sources.values().length);
for(Sources source : Sources.values()) { for(Sources source : Sources.values())
valuesString.add(source.getSourceName()); valuesString.add(source.getOrigName());
}
return valuesString; return valuesString;
} }
} }