Skip to content

Commit

Permalink
Merge pull request #2964 from IQSS/24-add-DataCite-DOI-Support
Browse files Browse the repository at this point in the history
#24 add data cite doi support
  • Loading branch information
scolapasta committed Mar 14, 2016
2 parents e3f635e + f2de248 commit a69052b
Show file tree
Hide file tree
Showing 26 changed files with 1,496 additions and 129 deletions.
31 changes: 21 additions & 10 deletions doc/sphinx-guides/source/installation/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,17 @@ Publishing the Root Dataverse

Non-superusers who are not "Admin" on the root dataverse will not be able to to do anything useful until the root dataverse has been published.

Persistent Identifiers and Publishing Datasets
++++++++++++++++++++++++++++++++++++++++++++++

Persistent identifiers are a required and integral part of the Dataverse platform. They provide a URL that is guaranteed to resolve to the datasets they represent. Dataverse currently supports creating identifiers using DOI and additionally displaying identifiers created using HDL. By default and for testing convenience, the installer configures a temporary DOI test namespace through EZID. This is sufficient to create and publish datasets but they are not citable nor guaranteed to be preserved. To properly configure persistent identifiers for a production installation, an account and associated namespace must be acquired for a fee from one of two DOI providers: EZID (http://ezid.cdlib.org) or DataCite (https://www.datacite.org). Once account credentials and DOI namespace have been acquired, please complete the following identifier configuration parameters:

JVM Options: :ref:`doi.baseurlstring`, :ref:`doi.username`, :ref:`doi.password`

Database Settings: :ref:`:DoiProvider`, :ref:`:Protocol`, :ref:`:Authority`, :ref:`:DoiSeparator`

Please note that any datasets creating using the test configuration cannot be directly migrated and would need to be created again once a valid DOI namespace is configured.

Customizing the Root Dataverse
++++++++++++++++++++++++++++++

Expand Down Expand Up @@ -162,8 +173,8 @@ For limiting the size of thumbnail images generated from files.

doi.baseurlstring
+++++++++++++++++

As of this writing "https://ezid.cdlib.org" is the only valid value. See also these related database settings below:
.. _doi.baseurlstring:
As of this writing "https://ezid.cdlib.org" and "https://mds.datacite.org" are the only valid values. See also these related database settings below:

- :DoiProvider
- :Protocol
Expand All @@ -172,12 +183,12 @@ As of this writing "https://ezid.cdlib.org" is the only valid value. See also th

doi.username
++++++++++++

.. _doi.username:
Used in conjuction with ``doi.baseurlstring``.

doi.password
++++++++++++

.. _doi.password:
Used in conjuction with ``doi.baseurlstring``.

dataverse.handlenet.admcredfile
Expand Down Expand Up @@ -239,28 +250,28 @@ This is the email address that "system" emails are sent from such as password re

:DoiProvider
++++++++++++

As of this writing "EZID" is the only valid options. DataCite support is planned: https://github.com/IQSS/dataverse/issues/24
.. _:DoiProvider:
As of this writing "EZID" and "DataCite" are the only valid options.

``curl -X PUT -d EZID http://localhost:8080/api/admin/settings/:DoiProvider``

:Protocol
+++++++++

.. _:Protocol:
As of this writing "doi" is the only valid option for the protocol for a persistent ID.

``curl -X PUT -d doi http://localhost:8080/api/admin/settings/:Protocol``

:Authority
++++++++++

Use the DOI authority assigned to you by EZID.
.. _:Authority:
Use the DOI authority assigned to you by your DoiProvider.

``curl -X PUT -d 10.xxxx http://localhost:8080/api/admin/settings/:Authority``

:DoiSeparator
+++++++++++++

.. _:DoiSeparator:
It is recommended that you keep this as a slash ("/").

``curl -X PUT -d "/" http://localhost:8080/api/admin/settings/:DoiSeparator``
Expand Down
2 changes: 1 addition & 1 deletion doc/sphinx-guides/source/installation/prep.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ When planning your installation you should be aware of the following components
- PostgreSQL: a relational database.
- Solr: a search engine. A Dataverse-specific schema is provided.
- SMTP server: for sending mail for password resets and other notifications.
- Persistent indentifer service: DOI support is provided. An EZID subscription is required for production use.
- Persistent indentifier service: DOI support is provided. An EZID subscription or DataCite account is required for production use.

There are a number of optional components you may choose to install or configure, including:

Expand Down
51 changes: 51 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,57 @@
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.5.201505241946</version>
</dependency>
<!-- Added for DataCite -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>axis</groupId>
<artifactId>axis</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>io.searchbox</groupId>
<artifactId>jest</artifactId>
<version>0.1.7</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.4.1</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.1</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<groupId>com.maxmind.geoip2</groupId>
<artifactId>geoip2</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
<version>2.10.1</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>

</dependencies>

Expand Down
2 changes: 1 addition & 1 deletion scripts/database/reference_data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ INSERT INTO guestbook(

-- TODO: Remove if http://stackoverflow.com/questions/25743191/how-to-add-a-case-insensitive-jpa-unique-constraint
-- gets an answer. See also https://github.com/IQSS/dataverse/issues/2598#issuecomment-158219334
CREATE UNIQUE INDEX dataverse_alias_unique_idx on dataverse (LOWER(alias))
CREATE UNIQUE INDEX dataverse_alias_unique_idx on dataverse (LOWER(alias));
CREATE UNIQUE INDEX index_authenticateduser_lower_email ON authenticateduser (lower(email));
CREATE UNIQUE INDEX index_builtinuser_lower_email ON builtinuser (lower(email));

Expand Down
4 changes: 4 additions & 0 deletions src/main/java/Bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,9 @@ dataset.email.datasetLinkBtn.tip=Link Dataset to Your Dataverse
dataset.share.datasetShare=Share Dataset
dataset.share.datasetShare.tip=Share this dataset on your favorite social media networks.
dataset.share.datasetShare.shareText=View this dataset.
dataset.publish.error.datacite=This dataset may not be published because the <a href=\"http://status.datacite.org/\" title=\"DataCite Status Page\" target=\"_blank\"/>DataCite Service</a> is currently inaccessible. Please try again. Does the issue continue to persist?
dataset.publish.error.doi=This dataset may not be published because the DOI update failed.
dataset.delete.error.datacite=Could not deaccession the dataset because the DOI update failed.

dataset.versionUI.draft=Draft
dataset.versionUI.inReview=In Review
Expand Down Expand Up @@ -816,6 +819,7 @@ dataset.message.metadataSuccess=The metadata for this dataset has been updated.
dataset.message.termsSuccess=The terms for this dataset has been updated.
dataset.message.filesSuccess=The files for this dataset have been updated.
dataset.message.publishSuccess=This dataset has been published.
dataset.message.only.authenticatedUsers=Only authenticated users may release Datasets.
dataset.message.deleteSuccess=This dataset has been deleted.
dataset.message.bulkFileUpdateSuccess=The selected files have been updated.
datasetVersion.message.deleteSuccess=This dataset draft has been deleted.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package edu.harvard.iq.dataverse;


import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import org.hibernate.validator.constraints.NotBlank;

/**
*
* @author luopc
*/
@NamedQueries(
@NamedQuery( name="DOIDataCiteRegisterCache.findByDoi",
query="SELECT d FROM DOIDataCiteRegisterCache d WHERE d.doi=:doi")
)
@Entity
public class DOIDataCiteRegisterCache implements Serializable{

private static final long serialVersionUID = 8030143094734315681L;

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

@NotBlank
@Column(unique=true)
private String doi;

@NotBlank
private String url;

@NotBlank
private String status;

@NotBlank
@Lob
private String xml;

public Long getId() {
return id;
}

public void setId(Long id) {
this.id = id;
}

public String getDoi() {
return doi;
}

public void setDoi(String doi) {
this.doi = doi;
}

public String getStatus() {
return status;
}

public void setStatus(String status) {
this.status = status;
}

public String getXml() {
return xml;
}

public void setXml(String xml) {
this.xml = xml;
}

public String getUrl() {
return url;
}

public void setUrl(String url) {
this.url = url;
}
}
Loading

0 comments on commit a69052b

Please sign in to comment.