diff --git a/src/main/java/org/gcube/common/software/analyser/Analyser.java b/src/main/java/org/gcube/common/software/analyser/Analyser.java index fb6ad9f..54de570 100644 --- a/src/main/java/org/gcube/common/software/analyser/Analyser.java +++ b/src/main/java/org/gcube/common/software/analyser/Analyser.java @@ -1,6 +1,5 @@ package org.gcube.common.software.analyser; -import java.net.URL; import java.util.Set; import java.util.concurrent.TimeUnit; @@ -8,8 +7,6 @@ import org.gcube.com.fasterxml.jackson.databind.JsonNode; import org.gcube.com.fasterxml.jackson.databind.ObjectMapper; import org.gcube.com.fasterxml.jackson.databind.node.ArrayNode; import org.gcube.com.fasterxml.jackson.databind.node.ObjectNode; -import org.gcube.com.fasterxml.jackson.databind.node.TextNode; -import org.gcube.common.software.model.GlobalConfig; import org.gcube.common.software.model.SoftwareVersionConfig; import org.gcube.common.software.model.Variables; import org.gcube.common.software.utils.Utils; @@ -27,32 +24,32 @@ public class Analyser { protected ObjectMapper objectMapper; - protected ObjectNode originalGlobal; - protected ArrayNode originalVersions; - protected ArrayNode exportingVersions; + protected ObjectNode globalConfiguration; + protected ArrayNode versionConfigurations; + protected ArrayNode elaboratedVersions; public Analyser() throws Exception { this.objectMapper = Utils.getObjectMapper(); } - public ObjectNode getOriginalGlobal() { - return originalGlobal; + public ObjectNode getGlobalConfiguration() { + return globalConfiguration; } - public void setOriginalGlobal(ObjectNode originalGlobal) { - this.originalGlobal = originalGlobal.deepCopy(); + public void setGlobalConfiguration(ObjectNode originalGlobal) { + this.globalConfiguration = originalGlobal.deepCopy(); } - public ArrayNode getOriginalVersions() { - return originalVersions; + public ArrayNode getVersionConfigurations() { + return versionConfigurations; } - public void setOriginalVersions(ArrayNode originalVersions) { - this.originalVersions = originalVersions.deepCopy(); + public void setVersionConfigurations(ArrayNode originalVersions) { + this.versionConfigurations = originalVersions.deepCopy(); } - public ArrayNode getExportingVersions() { - return exportingVersions; + public ArrayNode getElaboratedVersions() { + return elaboratedVersions; } protected SoftwareVersionConfig actualizeSoftwareVersionConfig(JsonNode version) throws Exception { @@ -68,93 +65,30 @@ public class Analyser { return softwareVersion; } - protected GlobalConfig actualizeGlobalConfig(JsonNode node) throws Exception { - Variables variables = objectMapper.treeToValue(node, Variables.class); - variables.parse(); - JsonNode sc = objectMapper.convertValue(variables.getProperties(), JsonNode.class); - return objectMapper.treeToValue(sc, GlobalConfig.class); - } - public void analyse() throws Exception { - GlobalConfig globalConfig = actualizeGlobalConfig(originalGlobal); - globalConfig.setOriginalJson(originalGlobal); - SoftwareVersionConfig previous = null; - int i = 0; - exportingVersions = objectMapper.createArrayNode(); - try { - for(i=0; i exporterClass = availableExporters.get(className); SoftwareVersionExporter sve = exporterClass.newInstance(); ExporterConfig exporterConfig = requestedExporters.get(className); - sve.setGlobalConfig(softwareConfig); sve.setSoftwareVersion(softwareVersionConfig); sve.setExporterConfig(exporterConfig); sve.setFirst(first); diff --git a/src/main/java/org/gcube/common/software/export/SoftwareVersionExporter.java b/src/main/java/org/gcube/common/software/export/SoftwareVersionExporter.java index 2161533..fe395a0 100644 --- a/src/main/java/org/gcube/common/software/export/SoftwareVersionExporter.java +++ b/src/main/java/org/gcube/common/software/export/SoftwareVersionExporter.java @@ -6,7 +6,6 @@ import java.util.Map; import org.gcube.common.software.export.biblatex.BibLaTeXSoftwareVersionExporter; import org.gcube.common.software.export.zenodo.ZenodoSoftwareVersionExporter; import org.gcube.common.software.model.ExporterConfig; -import org.gcube.common.software.model.GlobalConfig; import org.gcube.common.software.model.SoftwareVersionConfig; /** @@ -14,35 +13,29 @@ import org.gcube.common.software.model.SoftwareVersionConfig; */ public abstract class SoftwareVersionExporter { - protected static Map> processors; + protected static Map> availableExporters; static { - processors = new HashMap<>(); + availableExporters = new HashMap<>(); add(ZenodoSoftwareVersionExporter.class); add(BibLaTeXSoftwareVersionExporter.class); } private static void add(Class clz) { - processors.put(clz.getSimpleName(), clz); + availableExporters.put(clz.getSimpleName(), clz); } public static Map> getAvailableExporters() { - return processors; + return availableExporters; } - protected GlobalConfig globalConfig; protected SoftwareVersionConfig softwareVersionConfig; protected ExporterConfig processorConfig; protected boolean first; - public GlobalConfig getGlobalConfig() { - return globalConfig; - } - - public void setGlobalConfig(GlobalConfig softwareConfig) { - this.globalConfig = softwareConfig; - } - + protected String fileExtension; + protected String output; + public SoftwareVersionConfig getSoftwareVersionConfig() { return softwareVersionConfig; } diff --git a/src/main/java/org/gcube/common/software/export/biblatex/BibLaTeXSoftwareVersionExporter.java b/src/main/java/org/gcube/common/software/export/biblatex/BibLaTeXSoftwareVersionExporter.java index 7dc9ef8..0db9537 100644 --- a/src/main/java/org/gcube/common/software/export/biblatex/BibLaTeXSoftwareVersionExporter.java +++ b/src/main/java/org/gcube/common/software/export/biblatex/BibLaTeXSoftwareVersionExporter.java @@ -166,8 +166,12 @@ public class BibLaTeXSoftwareVersionExporter extends SoftwareVersionExporter { logger.info("Going to export {} in BibLaTex format.", title); String template = getTemplate(); - String toBeExported = parseTemplate(template); - + output = parseTemplate(template); + + writeToFile(); + } + + protected void writeToFile() throws Exception { File exportFile = getExportFile(); if (first && exportFile.exists()) { exportFile.delete(); @@ -179,13 +183,13 @@ public class BibLaTeXSoftwareVersionExporter extends SoftwareVersionExporter { FileWriter fileWritter = new FileWriter(exportFile, true); BufferedWriter bw = new BufferedWriter(fileWritter); - bw.write(toBeExported); + bw.write(output); bw.write("\n\n"); bw.close(); } protected File getExportFile() { - JsonNode jsonNode = globalConfig.getProperty(AnalyserFactory.EXPORT_FILENAME_PROPERTY_NAME); + JsonNode jsonNode = softwareVersionConfig.getAdditionalProperty(AnalyserFactory.EXPORT_FILENAME_PROPERTY_NAME); String fileName = jsonNode.getNodeType() == JsonNodeType.NULL ? null : jsonNode.asText(); fileName = AnalyserFactory.getExportFileName(fileName); File file = new File(fileName + EXPORT_FILENAME_EXTENSION); diff --git a/src/main/java/org/gcube/common/software/export/zenodo/ZenodoSoftwareVersionExporter.java b/src/main/java/org/gcube/common/software/export/zenodo/ZenodoSoftwareVersionExporter.java index 312fd2c..5ce3423 100644 --- a/src/main/java/org/gcube/common/software/export/zenodo/ZenodoSoftwareVersionExporter.java +++ b/src/main/java/org/gcube/common/software/export/zenodo/ZenodoSoftwareVersionExporter.java @@ -31,6 +31,7 @@ import org.gcube.common.gxhttp.request.GXHTTPStringRequest; import org.gcube.common.software.config.Config; import org.gcube.common.software.export.SoftwareVersionExporter; import org.gcube.common.software.model.ElaborationType; +import org.gcube.common.software.model.SoftwareVersionConfig; import org.gcube.common.software.model.SoftwareVersionFile; import org.gcube.common.software.utils.Utils; import org.glassfish.jersey.client.ClientProperties; @@ -55,11 +56,7 @@ public class ZenodoSoftwareVersionExporter extends SoftwareVersionExporter { public static final String METADATA_FIELD_NAME = "metadata"; -// private static final String SANDBOX_BASE_PATH = "https://sandbox.zenodo.org"; -// private static final String SANDBOX_DOI_URL_BASE_PATH = "https://doi.org/10.5072/zenodo."; -// -// private static final String PRODUCTION_BASE_PATH = "https://zenodo.org"; -// private static final String PRODUCTION_DOI_URL_BASE_PATH = "https://doi.org/10.5281/zenodo."; + public static final String PREVIOUS = "PREVIOUS"; public static final String DEPOSITIONS_COLLECTION_PATH = "/api/deposit/depositions"; public static final String DEPOSITION_PATH = DEPOSITIONS_COLLECTION_PATH + "/:id"; @@ -272,9 +269,11 @@ public class ZenodoSoftwareVersionExporter extends SoftwareVersionExporter { response = getResponse(httpURLConnection); URL conceptDOIURL = createZenodoDOIURLFromID(response.get("conceptrecid").asText()); - softwareVersionConfig.setDOIURL(conceptDOIURL); + softwareVersionConfig.setConceptDOIURL(conceptDOIURL); + softwareVersionConfig.getOriginalJson().put(SoftwareVersionConfig.CONCEPT_DOI_URL_PROPERTY_NAME, conceptDOIURL.toString()); URL doiURL = new URL(doiBaseURL + response.get("id").asText()); softwareVersionConfig.setVersionDOIURL(doiURL); + softwareVersionConfig.getOriginalJson().put(SoftwareVersionConfig.VERSION_DOI_URL_PROPERTY_NAME, doiURL.toString()); finalize(); } @@ -402,7 +401,7 @@ public class ZenodoSoftwareVersionExporter extends SoftwareVersionExporter { gxHTTPStringRequest.queryParams(getAccessTokenQueryParamters()); gxHTTPStringRequest.header("Content-Type", "application/json"); gxHTTPStringRequest.header("Accept", "application/json"); - String conceptID = getZenodoIDFromDOIURL(softwareVersionConfig.getDOIURL()); + String conceptID = getZenodoIDFromDOIURL(softwareVersionConfig.getConceptDOIURL()); gxHTTPStringRequest.path(RECORD_PATH.replace(":id", conceptID)); HttpURLConnection httpURLConnection = gxHTTPStringRequest.get(); JsonNode jsonNode = getResponse(httpURLConnection); @@ -422,7 +421,7 @@ public class ZenodoSoftwareVersionExporter extends SoftwareVersionExporter { String latestVersionVersion = jsonNode.get("metadata").get("version").asText(); String previousVersionVersion = softwareVersionConfig.getPrevious().getVersion().toString(); if(latestVersionVersion.compareTo(previousVersionVersion)!=0) { - logger.error("Zenodo obtained latest Version {} != {} Versoin from previous version", latestVersionVersion, previousVersionVersion); + logger.error("Zenodo obtained latest Version {} != {} Version from previous version", latestVersionVersion, previousVersionVersion); throw new RuntimeException("It seems that your json is not up to date with Zenodo."); } @@ -457,6 +456,7 @@ public class ZenodoSoftwareVersionExporter extends SoftwareVersionExporter { // The reserved DOI of this created new version will be URL doiURL = new URL(response.get("doi_url").asText()); softwareVersionConfig.setVersionDOIURL(doiURL); + softwareVersionConfig.getOriginalJson().put(SoftwareVersionConfig.VERSION_DOI_URL_PROPERTY_NAME, doiURL.toString()); // Remove previous depositionFiles deletePreviousFiles(); @@ -514,13 +514,15 @@ public class ZenodoSoftwareVersionExporter extends SoftwareVersionExporter { softwareVersionConfig.setNewDeposition(true); - if(softwareVersionConfig.getDOIURL()==null) { + if(softwareVersionConfig.getConceptDOIURL()==null) { create(); }else { newVersion(); } } } + + output = Utils.getObjectMapper().writeValueAsString(softwareVersionConfig.getOriginalJson()); } } \ No newline at end of file diff --git a/src/main/java/org/gcube/common/software/model/SoftwareVersionConfig.java b/src/main/java/org/gcube/common/software/model/SoftwareVersionConfig.java index b2c3a1c..e1de21f 100644 --- a/src/main/java/org/gcube/common/software/model/SoftwareVersionConfig.java +++ b/src/main/java/org/gcube/common/software/model/SoftwareVersionConfig.java @@ -33,16 +33,13 @@ public class SoftwareVersionConfig { public static final String AUTHORS_PROPERTY_NAME = "authors"; public static final String FILES_PROPERTY_NAME = "files"; public static final String CODE_LOCATION_PROPERTY_NAME = "code_location"; - public static final String DOI_URL_PROPERTY_NAME = "doi_url"; + public static final String CONCEPT_DOI_URL_PROPERTY_NAME = "concept_doi_url"; public static final String VERSION_DOI_URL_PROPERTY_NAME = "version_doi_url"; public static final String GRANTS_PROPERTY_NAME = "grants"; - public static final String EXPORTERS_PROPERTY_NAME = "exporters"; + public static final String EXPORTERS_PROPERTY_NAME = "availableExporters"; @JsonIgnore protected SoftwareVersionConfig previous; - - @JsonIgnore - protected SoftwareVersionConfig next; @JsonIgnore protected Boolean newDeposition; @@ -75,8 +72,8 @@ public class SoftwareVersionConfig { @JsonProperty(CODE_LOCATION_PROPERTY_NAME) protected String codeLocation; - @JsonProperty(DOI_URL_PROPERTY_NAME) - protected URL doiURL; + @JsonProperty(CONCEPT_DOI_URL_PROPERTY_NAME) + protected URL conceptDOIURL; @JsonProperty(VERSION_DOI_URL_PROPERTY_NAME) protected URL versionDOIURL; @@ -104,16 +101,6 @@ public class SoftwareVersionConfig { this.previous = previous; } - @JsonIgnore - public SoftwareVersionConfig getNext() { - return next; - } - - @JsonIgnore - public void setNext(SoftwareVersionConfig next) { - this.next = next; - } - @JsonIgnore public Boolean isNewDeposition() { return newDeposition; @@ -180,12 +167,12 @@ public class SoftwareVersionConfig { return codeLocation; } - public URL getDOIURL() { - return doiURL; + public URL getConceptDOIURL() { + return conceptDOIURL; } - public void setDOIURL(URL doiURL) { - this.doiURL = doiURL; + public void setConceptDOIURL(URL doiURL) { + this.conceptDOIURL = doiURL; } public URL getVersionDOIURL() { diff --git a/src/test/resources/exported-gcat-from-scratch.bib b/src/test/resources/exported-gcat-from-scratch.bib deleted file mode 100644 index 1003feb..0000000 --- a/src/test/resources/exported-gcat-from-scratch.bib +++ /dev/null @@ -1,160 +0,0 @@ -@software{gcat_1.0.0, - author = {{Luca Frosini}}, - title = {gCube Catalogue (gCat) Service 1.0.0}, - abstract = {gCube Catalogue (gCat) Service allows the publication of items in the gCube Catalogue.}, - date = {2019-01-10}, - version = {1.0.0}, - url = {https://doi.org/10.5072/zenodo.1145770}, - keywords = {Catalogue, D4Science, gCube} -} - -@software{gcat_1.1.0, - author = {{Luca Frosini}}, - title = {gCube Catalogue (gCat) Service 1.1.0}, - abstract = {gCube Catalogue (gCat) Service allows the publication of items in the gCube Catalogue.}, - date = {2019-02-26}, - version = {1.1.0}, - url = {https://doi.org/10.5072/zenodo.1145771}, - keywords = {Catalogue, D4Science, gCube} -} - -@software{gcat_1.2.0, - author = {{Luca Frosini}}, - title = {gCube Catalogue (gCat) Service 1.2.0}, - abstract = {gCube Catalogue (gCat) Service allows the publication of items in the gCube Catalogue.}, - date = {2019-05-20}, - version = {1.2.0}, - url = {https://doi.org/10.5072/zenodo.1145772}, - keywords = {Catalogue, D4Science, gCube} -} - -@software{gcat_1.3.0, - author = {{Luca Frosini}}, - title = {gCube Catalogue (gCat) Service 1.3.0}, - abstract = {gCube Catalogue (gCat) Service allows the publication of items in the gCube Catalogue.}, - date = {2019-06-27}, - version = {1.3.0}, - url = {https://doi.org/10.5072/zenodo.1145773}, - keywords = {Catalogue, D4Science, gCube} -} - -@software{gcat_1.4.0, - author = {{Luca Frosini}}, - title = {gCube Catalogue (gCat) Service 1.4.0}, - abstract = {gCube Catalogue (gCat) Service allows the publication of items in the gCube Catalogue.}, - date = {2019-11-20}, - version = {1.4.0}, - url = {https://doi.org/10.5072/zenodo.1145774}, - keywords = {Catalogue, D4Science, gCube} -} - -@software{gcat_1.4.1, - author = {{Luca Frosini}}, - title = {gCube Catalogue (gCat) Service 1.4.1}, - abstract = {gCube Catalogue (gCat) Service allows the publication of items in the gCube Catalogue.}, - date = {2019-12-20}, - version = {1.4.1}, - url = {https://doi.org/10.5072/zenodo.1145775}, - keywords = {Catalogue, D4Science, gCube} -} - -@software{gcat_1.4.2, - author = {{Luca Frosini}}, - title = {gCube Catalogue (gCat) Service 1.4.2}, - abstract = {gCube Catalogue (gCat) Service allows the publication of items in the gCube Catalogue.}, - date = {2020-02-14}, - version = {1.4.2}, - url = {https://doi.org/10.5072/zenodo.1145776}, - keywords = {Catalogue, D4Science, gCube} -} - -@software{gcat_1.4.3, - author = {{Luca Frosini}}, - title = {gCube Catalogue (gCat) Service 1.4.3}, - abstract = {gCube Catalogue (gCat) Service allows the publication of items in the gCube Catalogue.}, - date = {2020-06-16}, - version = {1.4.3}, - url = {https://doi.org/10.5072/zenodo.1145779}, - keywords = {Catalogue, D4Science, gCube} -} - -@software{gcat_1.4.4, - author = {{Luca Frosini}}, - title = {gCube Catalogue (gCat) Service 1.4.4}, - abstract = {gCube Catalogue (gCat) Service allows the publication of items in the gCube Catalogue.}, - date = {2021-02-24}, - version = {1.4.4}, - url = {https://doi.org/10.5072/zenodo.1145780}, - keywords = {Catalogue, D4Science, gCube} -} - -@software{gcat_1.4.5, - author = {{Luca Frosini}}, - title = {gCube Catalogue (gCat) Service 1.4.5}, - abstract = {gCube Catalogue (gCat) Service allows the publication of items in the gCube Catalogue.}, - date = {2021-03-31}, - version = {1.4.5}, - url = {https://doi.org/10.5072/zenodo.1145781}, - keywords = {Catalogue, D4Science, gCube} -} - -@software{gcat_2.0.0, - author = {{Luca Frosini}}, - title = {gCube Catalogue (gCat) Service 2.0.0}, - abstract = {gCube Catalogue (gCat) Service allows the publication of items in the gCube Catalogue.}, - date = {2021-05-04}, - version = {2.0.0}, - url = {https://doi.org/10.5072/zenodo.1145783}, - keywords = {Catalogue, D4Science, gCube} -} - -@software{gcat_2.1.0, - author = {{Luca Frosini}}, - title = {gCube Catalogue (gCat) Service 2.1.0}, - abstract = {gCube Catalogue (gCat) Service allows the publication of items in the gCube Catalogue.}, - date = {2022-01-27}, - version = {2.1.0}, - url = {https://doi.org/10.5072/zenodo.1145784}, - keywords = {Catalogue, D4Science, gCube} -} - -@software{gcat_2.2.0, - author = {{Luca Frosini}}, - title = {gCube Catalogue (gCat) Service 2.2.0}, - abstract = {gCube Catalogue (gCat) Service allows the publication of items in the gCube Catalogue.}, - date = {2022-05-12}, - version = {2.2.0}, - url = {https://doi.org/10.5072/zenodo.1145785}, - keywords = {Catalogue, D4Science, gCube} -} - -@software{gcat_2.3.0, - author = {{Luca Frosini}}, - title = {gCube Catalogue (gCat) Service 2.3.0}, - abstract = {gCube Catalogue (gCat) Service allows the publication of items in the gCube Catalogue.}, - date = {2022-07-22}, - version = {2.3.0}, - url = {https://doi.org/10.5072/zenodo.1145786}, - keywords = {Catalogue, D4Science, gCube} -} - -@software{gcat_2.4.0, - author = {{Luca Frosini}}, - title = {gCube Catalogue (gCat) Service 2.4.0}, - abstract = {gCube Catalogue (gCat) Service allows the publication of items in the gCube Catalogue.}, - date = {2022-09-16}, - version = {2.4.0}, - url = {https://doi.org/10.5072/zenodo.1145787}, - keywords = {Catalogue, D4Science, gCube} -} - -@software{gcat_2.4.1, - author = {{Luca Frosini}}, - title = {gCube Catalogue (gCat) Service 2.4.1}, - abstract = {gCube Catalogue (gCat) Service allows the publication of items in the gCube Catalogue.}, - date = {2022-12-07}, - version = {2.4.1}, - url = {https://doi.org/10.5072/zenodo.1145788}, - keywords = {Catalogue, D4Science, gCube} -} - diff --git a/src/test/resources/exported-gcat-from-scratch.json b/src/test/resources/exported-gcat-from-scratch.json deleted file mode 100644 index 8aebd27..0000000 --- a/src/test/resources/exported-gcat-from-scratch.json +++ /dev/null @@ -1,340 +0,0 @@ -{ - "global": - { - "name": "gcat", - "group": "data-catalogue", - "title": "gCube Catalogue (gCat) Service {{version}}", - "license": - { - "id": "EUPL-1.1", - "url": "https://opensource.org/licenses/EUPL-1.1" - }, - "keywords": - [ - "gCube", - "Catalogue", - "D4Science" - ], - "description": "gCube Catalogue (gCat) Service allows to publish items in the gCube Catalogue.", - "authors": - [ - { - "affiliation": "Istituto di Scienza e Tecnologie dell'Informazione \"A. Faedo\" - CNR, Italy", - "name": "Frosini, Luca", - "orcid": "0000-0003-3183-2291" - } - ], - "files": - [ - { - "url": "https://code-repo.d4science.org/gCubeSystem/{{name}}/archive/v{{version}}.zip", - "desired_name": "{{name}}-v{{version}}.zip" - }, - { - "url": "https://code-repo.d4science.org/gCubeSystem/{{name}}/archive/v{{version}}.tar.gz", - "desired_name": "{{name}}-v{{version}}.tar.gz" - }, - { - "url": "https://nexus.d4science.org/nexus/service/local/repo_groups/gcube-releases-all/content/org/gcube/{{group}}/{{name}}/{{version}}/{{name}}-{{version}}.war", - "desired_name": "{{name}}-v{{version}}.war" - } - ], - "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}", - "doi_url": "https://doi.org/10.5072/zenodo.1145782", - "grants": - [ - { - "id": "004260", - "name": "DILIGENT", - "url": "https://cordis.europa.eu/project/id/004260" - }, - { - "id": "212488", - "name": "D4Science", - "url": "https://cordis.europa.eu/project/id/212488" - }, - { - "id": "239019", - "name": "D4Science-II", - "url": "https://cordis.europa.eu/project/id/239019" - }, - { - "id": "283465", - "name": "ENVRI", - "url": "https://cordis.europa.eu/project/id/283465" - }, - { - "id": "283644", - "name": "iMarine", - "url": "https://cordis.europa.eu/project/id/283644" - }, - { - "id": "288754", - "name": "EUBrazilOpenBio", - "url": "https://cordis.europa.eu/project/id/288754" - }, - { - "id": "654024", - "name": "SoBigData", - "url": "https://cordis.europa.eu/project/id/654024" - }, - { - "id": "654119", - "name": "PARTHENOS", - "url": "https://cordis.europa.eu/project/id/654119" - }, - { - "id": "654142", - "name": "EGI-Engage", - "url": "https://cordis.europa.eu/project/id/654142" - }, - { - "id": "654182", - "name": "ENVRI PLUS", - "url": "https://cordis.europa.eu/project/id/654182" - }, - { - "id": "675680", - "name": "BlueBRIDGE", - "url": "https://cordis.europa.eu/project/id/675680" - }, - { - "id": "727610", - "name": "PerformFISH", - "url": "https://cordis.europa.eu/project/id/727610" - }, - { - "id": "731001", - "name": "AGINFRA PLUS", - "url": "https://cordis.europa.eu/project/id/731001" - }, - { - "id": "818194", - "name": "DESIRA", - "url": "https://cordis.europa.eu/project/id/818194" - }, - { - "id": "823914", - "name": "ARIADNEplus", - "url": "https://cordis.europa.eu/project/id/823914" - }, - { - "id": "824091", - "name": "RISIS 2", - "url": "https://cordis.europa.eu/project/id/824091" - }, - { - "id": "857650", - "name": "EOSC-Pillar", - "url": "https://cordis.europa.eu/project/id/857650" - }, - { - "id": "862409", - "name": "Blue Cloud", - "url": "https://cordis.europa.eu/project/id/862409" - }, - { - "id": "871042", - "name": "SoBigData-PlusPlus", - "url": "https://cordis.europa.eu/project/id/871042" - } - ], - "exporters": { - "ZenodoSoftwareVersionExporter": { - "elaboration": "NONE", - "html_description": "

gCube Catalogue (gCat) Service allows any client to publish items in the gCube Catalogue.

\n\n

gCube is an open-source software toolkit used for building and operating Hybrid Data Infrastructures enabling the dynamic deployment of Virtual Research Environments, such as the D4Science Infrastructure, by favouring the realisation of reuse-oriented policies.

\n\n

gCube has been used to successfully build and operate infrastructures and virtual research environments for application domains ranging from biodiversity to environmental data management and cultural heritage.

\n\n

gCube offers components supporting typical data management workflows including data access, curation, processing, and visualisation on a large set of data typologies ranging from primary biodiversity data to geospatial and tabular data.

\n\n

D4Science is a Hybrid Data Infrastructure combining over 500 software components and integrating data from more than 50 different data providers into a coherent and managed system of hardware, software, and data resources. The D4Science infrastructure drastically reduces the cost of ownership, maintenance, and operation thanks to the exploitation of gCube.

\n\n

 

", - "html_code_location": "\n\n

The official source code location of this software version is available at:

\n\n

{{code_location}}

", - "skip_grants": ["004260"] - }, - "BibLaTeXSoftwareVersionExporter": { - "elaboration": "ALL" - } - } - }, - "versions": - [ - { - "version": "1.0.0", - "date": "2019-01-10", - "group": "data-publishing", - "files": - [ - { - "url": "https://nexus.d4science.org/nexus/service/local/repositories/gcube-snapshots/content/org/gcube/data-publishing/gcat/1.0.0-SNAPSHOT/gcat-1.0.0-20190109.172827-2.war", - "desired_name": "{{name}}-v{{version}}.war" - } - ], - "gcube_release_version": null, - "gcube_release_ticket": null, - "version_doi_url": "https://doi.org/10.5072/zenodo.1145770", - "code_location": null, - "doi_url": "https://doi.org/10.5072/zenodo.1145769" - }, - { - "version": "1.1.0", - "date": "2019-02-26", - "group": "data-publishing", - "files": - [ - { - "url": "https://nexus.d4science.org/nexus/service/local/repo_groups/gcube-releases-all/content/org/gcube/data-publishing/gcat/1.1.0-4.13.1-177071/gcat-1.1.0-4.13.1-177071-src.zip", - "desired_name": "{{name}}-v{{version}}.zip" - }, - { - "url": "https://nexus.d4science.org/nexus/service/local/repo_groups/gcube-releases-all/content/org/gcube/data-publishing/gcat/1.1.0-4.13.1-177071/gcat-1.1.0-4.13.1-177071.war", - "desired_name": "{{name}}-v{{version}}.war" - } - ], - "gcube_release_version": "4.13.1", - "gcube_release_ticket": "https://support.d4science.org/issues/12988", - "version_doi_url": "https://doi.org/10.5072/zenodo.1145771", - "code_location": null, - "doi_url": "https://doi.org/10.5072/zenodo.1145769" - }, - { - "version": "1.2.0", - "date": "2019-05-20", - "group": "data-publishing", - "files": - [ - { - "url": "https://nexus.d4science.org/nexus/service/local/repositories/gcube-snapshots/content/org/gcube/data-publishing/gcat/1.2.0-SNAPSHOT/gcat-1.2.0-20190520.132914-10.war", - "desired_name": "{{name}}-v{{version}}.war" - } - ], - "gcube_release_version": null, - "gcube_release_ticket": null, - "version_doi_url": "https://doi.org/10.5072/zenodo.1145772", - "code_location": null, - "doi_url": "https://doi.org/10.5072/zenodo.1145769" - }, - { - "version": "1.3.0", - "date": "2019-06-27", - "group": "data-publishing", - "files": - [ - { - "url": "https://nexus.d4science.org/nexus/service/local/repo_groups/gcube-releases-all/content/org/gcube/data-publishing/gcat/1.3.0-4.14.0-179505/gcat-1.3.0-4.14.0-179505-src.zip", - "desired_name": "{{name}}-v{{version}}.zip" - }, - { - "url": "https://nexus.d4science.org/nexus/service/local/repo_groups/gcube-releases-all/content/org/gcube/data-publishing/gcat/1.3.0-4.14.0-179505/gcat-1.3.0-4.14.0-179505.war", - "desired_name": "{{name}}-v{{version}}.war" - } - ], - "gcube_release_version": "4.14.0", - "gcube_release_ticket": "https://support.d4science.org/issues/16743", - "version_doi_url": "https://doi.org/10.5072/zenodo.1145773", - "code_location": null, - "doi_url": "https://doi.org/10.5072/zenodo.1145769" - }, - { - "version": "1.4.0", - "date": "2019-11-20", - "group": "data-publishing", - "gcube_release_version": "4.15.0", - "gcube_release_ticket": "https://support.d4science.org/issues/17294", - "version_doi_url": "https://doi.org/10.5072/zenodo.1145774", - "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}/releases/tag/v{{version}}", - "doi_url": "https://doi.org/10.5072/zenodo.1145769" - }, - { - "version": "1.4.1", - "date": "2019-12-20", - "group": "data-publishing", - "gcube_release_version": "4.18.0", - "gcube_release_ticket": "https://support.d4science.org/issues/18335", - "version_doi_url": "https://doi.org/10.5072/zenodo.1145775", - "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}/releases/tag/v{{version}}", - "doi_url": "https://doi.org/10.5072/zenodo.1145769" - }, - { - "version": "1.4.2", - "date": "2020-02-14", - "group": "data-publishing", - "gcube_release_version": "4.20.0", - "gcube_release_ticket": "https://support.d4science.org/issues/18507", - "version_doi_url": "https://doi.org/10.5072/zenodo.1145776", - "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}/releases/tag/v{{version}}", - "doi_url": "https://doi.org/10.5072/zenodo.1145769" - }, - { - "version": "1.4.3", - "date": "2020-06-16", - "group": "data-publishing", - "gcube_release_version": "4.23.0", - "gcube_release_ticket": "https://support.d4science.org/issues/19322", - "version_doi_url": "https://doi.org/10.5072/zenodo.1145779", - "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}/releases/tag/v{{version}}", - "doi_url": "https://doi.org/10.5072/zenodo.1145769" - }, - { - "version": "1.4.4", - "date": "2021-02-24", - "group": "data-publishing", - "gcube_release_version": "5.0.0", - "gcube_release_ticket": "https://support.d4science.org/issues/20648", - "version_doi_url": "https://doi.org/10.5072/zenodo.1145780", - "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}/releases/tag/v{{version}}", - "doi_url": "https://doi.org/10.5072/zenodo.1145769" - }, - { - "version": "1.4.5", - "date": "2021-03-31", - "group": "data-publishing", - "gcube_release_version": "5.1.0", - "gcube_release_ticket": "https://support.d4science.org/issues/20920", - "version_doi_url": "https://doi.org/10.5072/zenodo.1145781", - "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}/releases/tag/v{{version}}", - "doi_url": "https://doi.org/10.5072/zenodo.1145769" - }, - { - "version": "2.0.0", - "date": "2021-05-04", - "gcube_release_version": "5.2.0", - "version_doi_url": "https://doi.org/10.5072/zenodo.1145783", - "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}/releases/tag/v{{version}}" - }, - { - "version": "2.1.0", - "date": "2022-01-27", - "gcube_release_version": "5.7.0", - "gcube_release_ticket": "https://support.d4science.org/issues/21685/", - "version_doi_url": "https://doi.org/10.5072/zenodo.1145784", - "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}/releases/tag/v{{version}}" - }, - { - "version": "2.2.0", - "date": "2022-05-12", - "gcube_release_version": "5.11.0", - "gcube_release_ticket": "https://support.d4science.org/issues/22943", - "version_doi_url": "https://doi.org/10.5072/zenodo.1145785", - "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}/releases/tag/v{{version}}" - }, - { - "version": "2.3.0", - "date": "2022-07-22", - "gcube_release_version": "5.13.0", - "gcube_release_ticket": "https://support.d4science.org/issues/23374", - "version_doi_url": "https://doi.org/10.5072/zenodo.1145786", - "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}/releases/tag/v{{version}}" - }, - { - "version": "2.4.0", - "date": "2022-09-16", - "gcube_release_version": "5.13.1", - "gcube_release_ticket": "https://support.d4science.org/issues/23650", - "version_doi_url": "https://doi.org/10.5072/zenodo.1145787", - "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}/releases/tag/v{{version}}" - }, - { - "version": "2.4.1", - "date": "2022-12-07", - "gcube_release_version": "5.14.0", - "gcube_release_ticket": "https://support.d4science.org/issues/23885", - "version_doi_url": "https://doi.org/10.5072/zenodo.1145788", - "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}/releases/tag/v{{version}}" - } - ] -} \ No newline at end of file diff --git a/src/test/resources/gcat-from-scratch.json b/src/test/resources/gcat-from-scratch.json index 6a9f816..081fa0d 100644 --- a/src/test/resources/gcat-from-scratch.json +++ b/src/test/resources/gcat-from-scratch.json @@ -31,7 +31,6 @@ } ], "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}", - "doi_url": null, "grants": [ { "id": "004260", @@ -154,6 +153,7 @@ ], "gcube_release_version": null, "gcube_release_ticket": null, + "concept_doi_url": null, "version_doi_url": null, "code_location": null }, @@ -173,6 +173,7 @@ ], "gcube_release_version": "4.13.1", "gcube_release_ticket": "https://support.d4science.org/issues/12988", + "concept_doi_url" = "PREVIOUS", "version_doi_url": null, "code_location": null }, @@ -188,6 +189,7 @@ ], "gcube_release_version": null, "gcube_release_ticket": null, + "concept_doi_url" = "PREVIOUS", "version_doi_url": null, "code_location": null }, @@ -207,6 +209,7 @@ ], "gcube_release_version": "4.14.0", "gcube_release_ticket": "https://support.d4science.org/issues/16743", + "concept_doi_url" = "PREVIOUS", "version_doi_url": null, "code_location": null }, @@ -216,6 +219,7 @@ "group": "data-publishing", "gcube_release_version": "4.15.0", "gcube_release_ticket": "https://support.d4science.org/issues/17294", + "concept_doi_url" = "PREVIOUS", "version_doi_url": null, "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}/releases/tag/v{{version}}" }, @@ -225,6 +229,7 @@ "group": "data-publishing", "gcube_release_version": "4.18.0", "gcube_release_ticket": "https://support.d4science.org/issues/18335", + "concept_doi_url" = "PREVIOUS", "version_doi_url": null, "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}/releases/tag/v{{version}}" }, @@ -234,6 +239,7 @@ "group": "data-publishing", "gcube_release_version": "4.20.0", "gcube_release_ticket": "https://support.d4science.org/issues/18507", + "concept_doi_url" = "PREVIOUS", "version_doi_url": null, "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}/releases/tag/v{{version}}" }, @@ -243,6 +249,7 @@ "group": "data-publishing", "gcube_release_version": "4.23.0", "gcube_release_ticket": "https://support.d4science.org/issues/19322", + "concept_doi_url" = "PREVIOUS", "version_doi_url": null, "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}/releases/tag/v{{version}}" }, @@ -252,6 +259,7 @@ "group": "data-publishing", "gcube_release_version": "5.0.0", "gcube_release_ticket": "https://support.d4science.org/issues/20648", + "concept_doi_url" = "PREVIOUS", "version_doi_url": null, "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}/releases/tag/v{{version}}" }, @@ -261,6 +269,7 @@ "group": "data-publishing", "gcube_release_version": "5.1.0", "gcube_release_ticket": "https://support.d4science.org/issues/20920", + "concept_doi_url" = "PREVIOUS", "version_doi_url": null, "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}/releases/tag/v{{version}}" }, @@ -268,7 +277,7 @@ "version": "2.0.0", "date": "2021-05-04", "gcube_release_version": "5.2.0", - "doi_url": null, + "concept_doi_url": null, "version_doi_url": null, "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}/releases/tag/v{{version}}" }, @@ -277,6 +286,7 @@ "date": "2022-01-27", "gcube_release_version": "5.7.0", "gcube_release_ticket": "https://support.d4science.org/issues/21685/", + "concept_doi_url" = "PREVIOUS", "version_doi_url": null, "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}/releases/tag/v{{version}}" }, @@ -293,6 +303,7 @@ "date": "2022-07-22", "gcube_release_version": "5.13.0", "gcube_release_ticket": "https://support.d4science.org/issues/23374", + "concept_doi_url" = "PREVIOUS", "version_doi_url": null, "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}/releases/tag/v{{version}}" }, @@ -301,6 +312,7 @@ "date": "2022-09-16", "gcube_release_version": "5.13.1", "gcube_release_ticket": "https://support.d4science.org/issues/23650", + "concept_doi_url" = "PREVIOUS", "version_doi_url": null, "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}/releases/tag/v{{version}}" }, @@ -309,6 +321,7 @@ "date": "2022-12-07", "gcube_release_version": "5.14.0", "gcube_release_ticket": "https://support.d4science.org/issues/23885", + "concept_doi_url" = "PREVIOUS", "version_doi_url": null, "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}/releases/tag/v{{version}}" } diff --git a/src/test/resources/gcat-test-sandbox.json b/src/test/resources/gcat-test-sandbox.json index 2cc8675..7cdb3f5 100644 --- a/src/test/resources/gcat-test-sandbox.json +++ b/src/test/resources/gcat-test-sandbox.json @@ -31,7 +31,7 @@ } ], "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}", - "doi_url": "https://doi.org/10.5072/zenodo.1139068", + "concept_doi_url": "https://doi.org/10.5072/zenodo.1139068", "grants": [ { "id": "004260", @@ -154,7 +154,7 @@ ], "gcube_release_version": null, "gcube_release_ticket": null, - "doi_url": "https://doi.org/10.5072/zenodo.1139445", + "concept_doi_url": "https://doi.org/10.5072/zenodo.1139445", "version_doi_url": "https://doi.org/10.5072/zenodo.1139446", "code_location": null }, @@ -174,7 +174,7 @@ ], "gcube_release_version": "4.13.1", "gcube_release_ticket": "https://support.d4science.org/issues/12988", - "doi_url": "https://doi.org/10.5072/zenodo.1139445", + "concept_doi_url": "https://doi.org/10.5072/zenodo.1139445", "version_doi_url": "https://doi.org/10.5072/zenodo.1140461", "code_location": null }, @@ -190,7 +190,7 @@ ], "gcube_release_version": null, "gcube_release_ticket": null, - "doi_url": "https://doi.org/10.5072/zenodo.1139445", + "concept_doi_url": "https://doi.org/10.5072/zenodo.1139445", "version_doi_url": "https://doi.org/10.5072/zenodo.1140750", "code_location": null }, @@ -210,7 +210,7 @@ ], "gcube_release_version": "4.14.0", "gcube_release_ticket": "https://support.d4science.org/issues/16743", - "doi_url": "https://doi.org/10.5072/zenodo.1139445", + "concept_doi_url": "https://doi.org/10.5072/zenodo.1139445", "version_doi_url": "https://doi.org/10.5072/zenodo.1143572", "code_location": null }, @@ -220,7 +220,7 @@ "group": "data-publishing", "gcube_release_version": "4.15.0", "gcube_release_ticket": "https://support.d4science.org/issues/17294", - "doi_url": "https://doi.org/10.5072/zenodo.1139445", + "concept_doi_url": "https://doi.org/10.5072/zenodo.1139445", "version_doi_url": "https://doi.org/10.5072/zenodo.1143583", "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}/releases/tag/v{{version}}" }, @@ -230,7 +230,7 @@ "group": "data-publishing", "gcube_release_version": "4.18.0", "gcube_release_ticket": "https://support.d4science.org/issues/18335", - "doi_url": "https://doi.org/10.5072/zenodo.1139445", + "concept_doi_url": "https://doi.org/10.5072/zenodo.1139445", "version_doi_url": "https://doi.org/10.5072/zenodo.1143585", "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}/releases/tag/v{{version}}" }, @@ -240,7 +240,7 @@ "group": "data-publishing", "gcube_release_version": "4.20.0", "gcube_release_ticket": "https://support.d4science.org/issues/18507", - "doi_url": "https://doi.org/10.5072/zenodo.1139445", + "concept_doi_url": "https://doi.org/10.5072/zenodo.1139445", "version_doi_url": "https://doi.org/10.5072/zenodo.1143586", "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}/releases/tag/v{{version}}" }, @@ -250,7 +250,7 @@ "group": "data-publishing", "gcube_release_version": "4.23.0", "gcube_release_ticket": "https://support.d4science.org/issues/19322", - "doi_url": "https://doi.org/10.5072/zenodo.1139445", + "concept_doi_url": "https://doi.org/10.5072/zenodo.1139445", "version_doi_url": "https://doi.org/10.5072/zenodo.1143587", "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}/releases/tag/v{{version}}" }, @@ -260,7 +260,7 @@ "group": "data-publishing", "gcube_release_version": "5.0.0", "gcube_release_ticket": "https://support.d4science.org/issues/20648", - "doi_url": "https://doi.org/10.5072/zenodo.1139445", + "concept_doi_url": "https://doi.org/10.5072/zenodo.1139445", "version_doi_url": "https://doi.org/10.5072/zenodo.1143589", "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}/releases/tag/v{{version}}" }, @@ -270,7 +270,7 @@ "group": "data-publishing", "gcube_release_version": "5.1.0", "gcube_release_ticket": "https://support.d4science.org/issues/20920", - "doi_url": "https://doi.org/10.5072/zenodo.1139445", + "concept_doi_url": "https://doi.org/10.5072/zenodo.1139445", "version_doi_url": "https://doi.org/10.5072/zenodo.1143590", "code_location": "https://code-repo.d4science.org/gCubeSystem/{{name}}/releases/tag/v{{version}}" },