Skip to content

Instantly share code, notes, and snippets.

@mdoering
Created December 10, 2014 10:44
Show Gist options
  • Save mdoering/003ec25987157499e8f7 to your computer and use it in GitHub Desktop.
Save mdoering/003ec25987157499e8f7 to your computer and use it in GitHub Desktop.
package org.gbif.registry.doi;
import org.gbif.api.model.common.DOI;
import org.gbif.doi.metadata.datacite.DataCiteMetadata;
import org.gbif.doi.service.DoiStatus;
import java.net.URI;
/**
* A message to request an update to a DOIs metadata and target URL in DataCite.
* The DOI can be in any current state (registered, reserved, deleted) or even yet unknown to DataCite.
*/
public class DoiUpdateMessage {
private final DOI doi;
private final DoiType type;
private final DoiStatus.Status status;
private final DataCiteMetadata metadata;
private final URI target;
public DoiUpdateMessage(DoiStatus.Status status, DOI doi, DoiType type, DataCiteMetadata metadata, URI target) {
this.status = status;
this.doi = doi;
this.type = type;
this.metadata = metadata;
this.target = target;
}
public DOI getDoi() {
return doi;
}
public DoiType getType() {
return type;
}
/**
* @return the desired status this doi should be updated to
*/
public DoiStatus.Status getStatus() {
return status;
}
public DataCiteMetadata getMetadata() {
return metadata;
}
public URI getTarget() {
return target;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment