Commit 35bf7546 authored by bourgesl's avatar bourgesl
Browse files

skip datacite publication of staging DOI

parent 2a5e2c80
......@@ -56,17 +56,22 @@ public final class DataciteSyncPipeline extends AbstractPipeline<PipelineCommonD
}
private void prepare() {
final DataciteClient dc = doiConfig.getDataciteClient();
this.publishedDois = dc.getDois();
if (doiConfig.isDataciteClientEnabled()) {
final DataciteClient dc = doiConfig.getDataciteClient();
this.publishedDois = dc.getDois();
logger.debug("Datacite DOI list:\n{}", publishedDois);
logger.debug("Datacite DOI list:\n{}", publishedDois);
}
}
private void publishDatacite(final ProjectConfig projectConfig) throws IOException {
logger.info("publishDatacite ...");
if (doStaging) {
publishDatacite(projectConfig, true);
if (false) {
// 2019.6: test prefix disabled on datacite.org
// skip datacite publication for staging DOIs
publishDatacite(projectConfig, true);
}
}
if (doPublic) {
publishDatacite(projectConfig, false);
......
......@@ -48,8 +48,11 @@ public final class GenerateRedirectPipeline extends AbstractPipeline<PipelineCom
sb.append("\n# Redirect DOI to Landing page:");
sb.append("\n# [/r/DOI_SUFFIX] => [landing page Ext]");
sb.append("\n# or [/public/<PROJECT>/<DOI_SUFFIX>.html] (public)");
sb.append("\n# or [/staging/<PROJECT>/<DOI_SUFFIX>.html] (staging)");
// 2019.6: test prefix disabled on datacite.org
// skip datacite publication for staging DOIs
// sb.append("\n# or [/staging/<PROJECT>/<DOI_SUFFIX>.html] (staging)");
final DoiService doiService = doiConfig.getDoiService();
final ProjectRepository pr = doiService.getProjectRepository();
final DoiRepository dr = doiService.getDoiRepository();
......@@ -96,7 +99,10 @@ public final class GenerateRedirectPipeline extends AbstractPipeline<PipelineCom
}
sb.append('\"');
}
} else {
} else if (false) {
// 2019.6: test prefix disabled on datacite.org
// skip datacite publication for staging DOIs
// Status.STAGING:
final DoiStaging ds = dsr.findOneByDoi(doi);
......@@ -155,7 +161,7 @@ public final class GenerateRedirectPipeline extends AbstractPipeline<PipelineCom
final List<Doi> dois = dr.findByProject(projectName);
logger.info("Dois for project[{}]: {}", projectName, dois.size());
// skip empty projects (orphans)
if (!dois.isEmpty()) {
final ProjectConfig projectConfig = pipeData.getProjectConfigAll(projectName);
......@@ -170,7 +176,6 @@ public final class GenerateRedirectPipeline extends AbstractPipeline<PipelineCom
/embed/AMMA-CATCH.CE.RainD_Nc-header => /staging/AMMA-CATCH/embed/AMMA-CATCH.CE.RainD_Nc-header.html
/embed/AMMA-CATCH.CE.RainD_Nc-meta => /staging/AMMA-CATCH/embed/AMMA-CATCH.CE.RainD_Nc-meta.html
*/
for (Doi doi : dois) {
final String doiSuffix = doi.getIdentifier();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment