Renamed component
This commit is contained in:
parent
61a6a7260e
commit
798863ecd3
2
pom.xml
2
pom.xml
|
@ -8,7 +8,7 @@
|
|||
<version>1.1.0</version>
|
||||
</parent>
|
||||
<groupId>org.gcube.common</groupId>
|
||||
<artifactId>zenodo-deposit</artifactId>
|
||||
<artifactId>software-deposit</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<name>Zenodo Deposit</name>
|
||||
<properties>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package org.gcube.common.deposition;
|
||||
|
||||
import org.gcube.com.fasterxml.jackson.databind.JsonNode;
|
||||
import org.gcube.common.deposition.model.DepositionVersion;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -17,6 +18,10 @@ public class ElaborateDepositionVersion {
|
|||
this.depositionVersion = depositionVersion;
|
||||
}
|
||||
|
||||
protected JsonNode getMetadata() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void elaborate() {
|
||||
String name = depositionVersion.getDeposition().getName();
|
||||
|
||||
|
@ -29,6 +34,8 @@ public class ElaborateDepositionVersion {
|
|||
name , depositionVersion.getVersion(),
|
||||
depositionVersion.getPrevious()!=null ? depositionVersion.getPrevious().getVersion(): null);
|
||||
|
||||
|
||||
|
||||
if(depositionVersion.getPrevious()==null) {
|
||||
// TODO New deposit on Zenodo
|
||||
}else {
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
package org.gcube.common.deposition.executor;
|
||||
|
||||
import java.net.URL;
|
||||
|
||||
import org.gcube.com.fasterxml.jackson.databind.JsonNode;
|
||||
import org.gcube.common.deposition.executor.zenodo.ZenodoDepositionExecutor;
|
||||
|
||||
/**
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public abstract class DepositionExecutor {
|
||||
|
||||
public static DepositionExecutor getDefaultExecutor() {
|
||||
return new ZenodoDepositionExecutor();
|
||||
}
|
||||
|
||||
protected JsonNode metadata;
|
||||
protected URL doiURL;
|
||||
|
||||
public JsonNode getMetadata() {
|
||||
return metadata;
|
||||
}
|
||||
|
||||
public void setMetadata(JsonNode metadata) {
|
||||
this.metadata = metadata;
|
||||
}
|
||||
|
||||
public URL getDOIURL() {
|
||||
return doiURL;
|
||||
}
|
||||
|
||||
public void setDOIURL(URL doiURL) {
|
||||
this.doiURL = doiURL;
|
||||
}
|
||||
|
||||
public abstract void create();
|
||||
|
||||
public abstract void update();
|
||||
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package org.gcube.common.deposition.executor.zenodo;
|
||||
|
||||
import org.gcube.common.deposition.executor.DepositionExecutor;
|
||||
|
||||
/**
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public class ZenodoDepositionExecutor extends DepositionExecutor {
|
||||
|
||||
public ZenodoDepositionExecutor() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void create() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -71,7 +71,6 @@ public class Deposition {
|
|||
return depositionVersions;
|
||||
}
|
||||
|
||||
|
||||
public JsonNode getMetadata() {
|
||||
return metadata;
|
||||
}
|
||||
|
|
|
@ -39,6 +39,9 @@ public class DepositionVersion {
|
|||
@JsonProperty(value = "code_location")
|
||||
protected URL codeLocation;
|
||||
|
||||
@JsonProperty(value = "concept_doi_url")
|
||||
protected URL conceptDOIURL;
|
||||
|
||||
@JsonProperty(value = "doi_url")
|
||||
protected URL doiURL;
|
||||
|
||||
|
@ -131,6 +134,23 @@ public class DepositionVersion {
|
|||
}
|
||||
}
|
||||
|
||||
public URL getConceptDOIURL() {
|
||||
return conceptDOIURL;
|
||||
}
|
||||
|
||||
public void setConceptDOIURL(URL conceptDOIURL) {
|
||||
this.conceptDOIURL = conceptDOIURL;
|
||||
}
|
||||
|
||||
@JsonSetter("concept_doi_url")
|
||||
public void setConceptDOIURL(String conceptDOIURL) throws MalformedURLException {
|
||||
try {
|
||||
this.conceptDOIURL = new URL(conceptDOIURL);
|
||||
}catch (Exception e) {
|
||||
this.conceptDOIURL = null;
|
||||
}
|
||||
}
|
||||
|
||||
public URL getDOIURL() {
|
||||
return doiURL;
|
||||
}
|
||||
|
@ -139,7 +159,7 @@ public class DepositionVersion {
|
|||
this.doiURL = doiURL;
|
||||
}
|
||||
|
||||
@JsonSetter("doi-url")
|
||||
@JsonSetter("doi_url")
|
||||
public void setDOIURL(String doiURL) throws MalformedURLException {
|
||||
try {
|
||||
this.doiURL = new URL(doiURL);
|
||||
|
@ -148,4 +168,6 @@ public class DepositionVersion {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
{
|
||||
"version": "1.0.0",
|
||||
"date": "2019-01-10",
|
||||
"gcube_release_version": null,
|
||||
"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",
|
||||
|
@ -29,6 +30,7 @@
|
|||
],
|
||||
"release_ticket": null,
|
||||
"code_location": null,
|
||||
"concept_doi_url": "https://doi.org/10.5072/zenodo.1139445",
|
||||
"doi_url": "https://doi.org/10.5072/zenodo.1139446"
|
||||
},
|
||||
{
|
||||
|
@ -47,11 +49,13 @@
|
|||
],
|
||||
"release_ticket": "https://support.d4science.org/issues/12988",
|
||||
"code_location": null,
|
||||
"concept_doi_url": "https://doi.org/10.5072/zenodo.1139445",
|
||||
"doi_url": "https://doi.org/10.5072/zenodo.1140461"
|
||||
},
|
||||
{
|
||||
"version": "1.2.0",
|
||||
"date": "2019-05-20",
|
||||
"gcube_release_version": null,
|
||||
"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",
|
||||
|
@ -60,6 +64,7 @@
|
|||
],
|
||||
"release_ticket": null,
|
||||
"code_location": null,
|
||||
"concept_doi_url": "https://doi.org/10.5072/zenodo.1139445",
|
||||
"doi_url": "https://doi.org/10.5072/zenodo.1140750"
|
||||
},
|
||||
{
|
||||
|
@ -77,43 +82,50 @@
|
|||
}
|
||||
],
|
||||
"release_ticket": "https://support.d4science.org/issues/16743",
|
||||
"code_location": null
|
||||
"code_location": null,
|
||||
"concept_doi_url": "https://doi.org/10.5072/zenodo.1139445"
|
||||
},
|
||||
{
|
||||
"version": "1.4.0",
|
||||
"date": "2019-11-20",
|
||||
"gcube_release_version": "4.15.0",
|
||||
"release_ticket": "https://support.d4science.org/issues/17294"
|
||||
"release_ticket": "https://support.d4science.org/issues/17294",
|
||||
"concept_doi_url": "https://doi.org/10.5072/zenodo.1139445"
|
||||
},
|
||||
{
|
||||
"version": "1.4.1",
|
||||
"date": "2019-12-20",
|
||||
"gcube_release_version": "4.18.0",
|
||||
"release_ticket": "https://support.d4science.org/issues/18335"
|
||||
"release_ticket": "https://support.d4science.org/issues/18335",
|
||||
"concept_doi_url": "https://doi.org/10.5072/zenodo.1139445"
|
||||
},
|
||||
{
|
||||
"version": "1.4.2",
|
||||
"date": "2020-02-14",
|
||||
"gcube_release_version": "4.20.0",
|
||||
"release_ticket": "https://support.d4science.org/issues/18507"
|
||||
"release_ticket": "https://support.d4science.org/issues/18507",
|
||||
"concept_doi_url": "https://doi.org/10.5072/zenodo.1139445"
|
||||
},
|
||||
{
|
||||
"version": "1.4.3",
|
||||
"date": "2020-06-16",
|
||||
"gcube_release_version": "4.23.0",
|
||||
"release_ticket": "https://support.d4science.org/issues/19322"
|
||||
"release_ticket": "https://support.d4science.org/issues/19322",
|
||||
"concept_doi_url": "https://doi.org/10.5072/zenodo.1139445"
|
||||
},
|
||||
{
|
||||
"version": "1.4.4",
|
||||
"date": "2021-02-24",
|
||||
"gcube_release_version": "5.0.0",
|
||||
"release_ticket": "https://support.d4science.org/issues/20648"
|
||||
"release_ticket": "https://support.d4science.org/issues/20648",
|
||||
"concept_doi_url": "https://doi.org/10.5072/zenodo.1139445"
|
||||
},
|
||||
{
|
||||
"version": "1.4.5",
|
||||
"date": "2021-05-31",
|
||||
"gcube_release_version": "5.1.0",
|
||||
"release_ticket": "https://support.d4science.org/issues/20920"
|
||||
"release_ticket": "https://support.d4science.org/issues/20920",
|
||||
"concept_doi_url": "https://doi.org/10.5072/zenodo.1139445"
|
||||
}
|
||||
],
|
||||
"metadata":
|
||||
|
|
Loading…
Reference in New Issue