Compare commits
28 Commits
Author | SHA1 | Date |
---|---|---|
luca.frosini | 5bd85a8219 | |
Luca Frosini | 7449490f36 | |
Luca Frosini | 520f5c2adb | |
Luca Frosini | 30eda48b8a | |
Luca Frosini | bd0cde7838 | |
Luca Frosini | c4f314e383 | |
Luca Frosini | fcbddfc15b | |
Luca Frosini | 9eb98dea3f | |
Luca Frosini | 91c0103dc5 | |
Luca Frosini | 46b00cf1af | |
Luca Frosini | 7b7cae7fa2 | |
Luca Frosini | 3b462dcef0 | |
Luca Frosini | 03b528726a | |
Luca Frosini | 81822f822b | |
Luca Frosini | a95b34202f | |
Luca Frosini | 823822a437 | |
Luca Frosini | 1a336b1b80 | |
Luca Frosini | f83bbf014c | |
Luca Frosini | 7331df839b | |
Luca Frosini | 80e22dd78a | |
Francesco Mangiacrapa | b2b6489f60 | |
Francesco Mangiacrapa | 30483fe41b | |
Francesco Mangiacrapa | 41749d9684 | |
Francesco Mangiacrapa | 35f7e86334 | |
Luca Frosini | 85f26161d8 | |
Luca Frosini | c2065fdad6 | |
Fabio Sinibaldi | 1e220a9b65 | |
Fabio Sinibaldi | 5919e9ab16 |
|
@ -2,3 +2,4 @@ target
|
|||
.classpath
|
||||
.project
|
||||
.settings
|
||||
/.DS_Store
|
||||
|
|
33
CHANGELOG.md
33
CHANGELOG.md
|
@ -3,31 +3,48 @@
|
|||
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).
|
||||
|
||||
## [v1-3-0] [r4.24.0] - 2020-06-19
|
||||
## [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
|
||||
## [v1.2.0] - 2019-11-12
|
||||
|
||||
### Changed
|
||||
|
||||
- Fixed project gcube rule compliancy
|
||||
|
||||
## [v1-1-0] - 2019-11-06
|
||||
## [v1.1.0] - 2019-11-06
|
||||
|
||||
### Changed
|
||||
|
||||
- Switched to git/jenkins
|
||||
|
||||
## [v1-1-0] - 2019-09-28
|
||||
## [v1.1.0] - 2019-09-28
|
||||
|
||||
### Changed
|
||||
|
||||
- Switched maven parent
|
||||
|
||||
## [v1-0-3] - 2018-07-18
|
||||
## [v1.0.3] - 2018-07-18
|
||||
|
||||
### Added
|
||||
|
||||
|
@ -45,7 +62,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
|
||||
- [#11969] Changed 'Scientific advice' to 'Scientific Advice'
|
||||
|
||||
## [v1-0-2] - 2018-03-21
|
||||
## [v1.0.2] - 2018-03-21
|
||||
|
||||
### Changed
|
||||
|
||||
|
@ -53,7 +70,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
|
||||
- [#11487] Fixing issue
|
||||
|
||||
## [v1-0-1] - 2017-12-23
|
||||
## [v1.0.1] - 2017-12-23
|
||||
|
||||
### Changed
|
||||
|
||||
|
@ -61,6 +78,6 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
|
||||
- Minor fixes
|
||||
|
||||
## [v1-0-0] - 2017-11-05
|
||||
## [v1.0.0] - 2017-11-05
|
||||
|
||||
- First Release
|
||||
|
|
22
pom.xml
22
pom.xml
|
@ -14,7 +14,7 @@
|
|||
<groupId>org.gcube.data-catalogue</groupId>
|
||||
<artifactId>grsf-common-library</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.3.0</version>
|
||||
<version>2.0.0</version>
|
||||
<description>Common library for GRSF service and management panel</description>
|
||||
|
||||
<properties>
|
||||
|
@ -39,8 +39,8 @@
|
|||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.gcube.distribution</groupId>
|
||||
<artifactId>maven-smartgears-bom</artifactId>
|
||||
<version>LATEST</version>
|
||||
<artifactId>gcube-bom</artifactId>
|
||||
<version>2.1.0</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
@ -81,6 +81,22 @@
|
|||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.*</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.*</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
|
|
@ -23,8 +23,9 @@ public class Constants {
|
|||
public static final String UUID_KB_CUSTOM_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 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 DATABASE_SOURCES_CUSTOM_KEY = "Database Source";
|
||||
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 REFERS_TO_JSON_KEY = "refers_to";
|
||||
|
@ -32,25 +33,25 @@ public class Constants {
|
|||
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_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_JSON_KEY = "sdg_flag";
|
||||
public static final String CATCHES_CUSTOM_KEY = "Catches";
|
||||
public static final String SDG_FLAG_GROUP_NAME = "GRSF " + SDG_FLAG_CUSTOM_KEY;
|
||||
public static final String CATCHES_CUSTOM_KEY = "Catch";
|
||||
public static final String CATCHES_JSON_KEY = "catches";
|
||||
public static final String LANDINGS_CUSTOM_KEY = "Landings";
|
||||
public static final String LANDINGS_CUSTOM_KEY = "Landing";
|
||||
public static final String LANDINGS_JSON_KEY = "landings";
|
||||
public static final String SPECIES_CUSTOM_KEY = "Species";
|
||||
public static final String SPECIES_JSON_KEY = "species";
|
||||
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_CUSTOM_KEY = "Status of the 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_JSON_KEY = "similar_grsf_records";
|
||||
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_CUSTOM_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_JSON_KEY = "grsf_type";
|
||||
public static final String MANAGEMENT_ENTITIES_CUSTOM_KEY = "Management Body/Authority(ies)";
|
||||
public static final String MANAGEMENT_ENTITIES_CUSTOM_KEY = "Management Body/Authority";
|
||||
public static final String MANAGEMENT_ENTITIES_JSON_KEY = "management_body_authorities";
|
||||
|
||||
public static final String CITATION_CUSTOM_KEY = "Citation";
|
||||
|
@ -61,13 +62,13 @@ public class Constants {
|
|||
public static final String CONNECTED_JSON_KEY = "connected";
|
||||
|
||||
// stock record
|
||||
public static final String STOCK_NAME_CUSTOM_KEY = "Stock Name";
|
||||
public static final String STOCK_NAME_CUSTOM_KEY = "GRSF 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_JSON_KEY = "assessment_area";
|
||||
public static final String EXPLOITING_FISHERY_CUSTOM_KEY = "Exploiting Fishery";
|
||||
public static final String EXPLOITING_FISHERY_JSON_KEY = "exploiting_fishery";
|
||||
public static final String ASSESSMENT_METHODS_CUSTOM_KEY = "Assessment Methods";
|
||||
public static final String ASSESSMENT_METHODS_CUSTOM_KEY = "Assessment Method";
|
||||
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_JSON_KEY = "firms_standard_abundance_level";
|
||||
|
@ -79,7 +80,7 @@ public class Constants {
|
|||
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_JSON_KEY = "state_and_trend_of_marine_resources";
|
||||
public static final String FAO_CATEGORIES_CUSTOM_KEY = "Fao Categories";
|
||||
public static final String FAO_CATEGORIES_CUSTOM_KEY = "FAO Stock Status Category";
|
||||
public static final String FAO_CATEGORIES_JSON_KEY = "fao_categories";
|
||||
public static final String BIOMASS_CUSTOM_KEY = "Biomass";
|
||||
public static final String BIOMASS_JSON_KEY = "biomass";
|
||||
|
@ -87,15 +88,21 @@ public class Constants {
|
|||
public static final String SCIENTIFIC_ADVICE_JSON_KEY = "scientific_advice";
|
||||
public static final String ASSESSOR_CUSTOM_KEY = "Assessor";
|
||||
public static final String ASSESSOR_JSON_KEY = "assessor";
|
||||
public static final String SPATIAL_GEOJSON_JSON_KEY = "spatial";
|
||||
|
||||
// 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 FISHERY_URI = "fishery_uri";
|
||||
public static final String STOCK_URI = "stock_uri";
|
||||
|
||||
// fishery record
|
||||
public static final String FISHERY_NAME_CUSTOM_KEY = "Fishery Name";
|
||||
public static final String FISHERY_NAME_CUSTOM_KEY = "GRSF 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 RESOURCES_EXPLOITED_CUSTOM_KEY = "Resources Exploited";
|
||||
public static final String RESOURCES_EXPLOITED_JSON_KEY = "resources_exploited";
|
||||
|
@ -103,9 +110,7 @@ public class Constants {
|
|||
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_JSON_KEY = "jurisdiction_area";
|
||||
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_CUSTOM_KEY = "Fishing Gear";
|
||||
public static final String FISHING_GEAR_JSON_KEY = "fishing_gear";
|
||||
|
||||
// similar records bean sub-fields
|
||||
|
@ -117,7 +122,7 @@ public class Constants {
|
|||
// other fields/regex
|
||||
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_FOR_SOURCES_VALUE = "Legacy";
|
||||
public static final String SYSTEM_TYPE_LEGACY_RECORD = "Legacy";
|
||||
public static final String GRSF_DATABASE_SOURCE = "Database Source";
|
||||
public static final int TIME_SERIES_TAKE_LAST_VALUES = 5;
|
||||
public static final String REGEX_TAGS = "[^\\s\\w-_.]";
|
||||
|
@ -209,10 +214,6 @@ public class Constants {
|
|||
public static final String NO_SIMILAR_GRSF_RECORDS = "No Similar 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
|
||||
public static final String SIMILARITIES_INDICATOR = "similarities_indicator";
|
||||
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<?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>
|
|
@ -1,7 +1,6 @@
|
|||
package org.gcube.datacatalogue.common.enums;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
|
@ -13,60 +12,73 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
|||
*/
|
||||
public enum Sources {
|
||||
|
||||
FIRMS("FIRMS"),
|
||||
RAM("RAM"),
|
||||
FISHSOURCE("FishSource"),
|
||||
GRSF("GRSF");
|
||||
FIRMS("FIRMS","firms"),
|
||||
RAM("RAM","ram"),
|
||||
FISHSOURCE("FishSource", "fishsource"),
|
||||
GRSF("GRSF", "grsf"),
|
||||
SDG("FAO SDG 14.4.1 Questionnaire","sdg");
|
||||
|
||||
private String subGroupNameOrig;
|
||||
private String sourceName;
|
||||
private String urlPath;
|
||||
|
||||
private Sources(String origName) {
|
||||
this.subGroupNameOrig = origName;
|
||||
private Sources(String sourceName, String urlPath) {
|
||||
this.sourceName = sourceName;
|
||||
this.urlPath = urlPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the original name
|
||||
* @return
|
||||
*/
|
||||
public String getOrigName(){
|
||||
return subGroupNameOrig;
|
||||
public String getSourceName(){
|
||||
return sourceName;
|
||||
}
|
||||
|
||||
@JsonValue
|
||||
public String onSerialize(){
|
||||
return subGroupNameOrig.toLowerCase();
|
||||
return urlPath;
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static Sources onDeserialize(String sourceString) {
|
||||
if(sourceString != null) {
|
||||
for(Sources source : Sources.values()) {
|
||||
if (source.toString().equalsIgnoreCase(sourceString.trim()))
|
||||
if (source.urlPath.equalsIgnoreCase(sourceString.trim())) {
|
||||
return source;
|
||||
}
|
||||
if (source.sourceName.equalsIgnoreCase(sourceString.trim())) {
|
||||
return source;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getURLPath() {
|
||||
return urlPath;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getOrigName();
|
||||
return urlPath;
|
||||
}
|
||||
|
||||
public static String getAsList(){
|
||||
return "[" + Arrays.asList(
|
||||
FIRMS.toString().toLowerCase(),
|
||||
RAM.toString().toLowerCase(),
|
||||
FISHSOURCE.toString().toLowerCase(),
|
||||
GRSF.toString().toLowerCase()) + "]";
|
||||
public static String getJsonArrayAsString(){
|
||||
return "[" + FIRMS.urlPath + "," +
|
||||
RAM.urlPath + "," +
|
||||
FISHSOURCE.urlPath + "," +
|
||||
GRSF.urlPath + "," +
|
||||
SDG.urlPath + "," + "]";
|
||||
}
|
||||
|
||||
public static List<String> getListNames(){
|
||||
public static List<String> listNames(){
|
||||
|
||||
List<String> valuesString = new ArrayList<String>(Sources.values().length);
|
||||
for(Sources source : Sources.values())
|
||||
valuesString.add(source.getOrigName());
|
||||
for(Sources source : Sources.values()) {
|
||||
valuesString.add(source.getSourceName());
|
||||
}
|
||||
|
||||
return valuesString;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue