public class DOI extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
DOI.DoiDeserializer |
static class |
DOI.DoiSerializer |
| Modifier and Type | Field and Description |
|---|---|
static String |
GBIF_PREFIX
The DOI prefix registered with DataCite to be used by GBIF-issued production DOIs.
|
static String |
TEST_PREFIX
A DOI prefix provided by DataCite to be used in tests.
|
| Constructor and Description |
|---|
DOI()
Do not use this constructor.
|
DOI(String doi)
Parses a simple DOI string of various forms incl URN, URL or plain DOI names.
|
DOI(String prefix,
String suffix)
Parses a simple DOI string of various forms incl URN, URL or plain DOI names.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getDoiName() |
String |
getDoiString() |
String |
getPrefix() |
String |
getSuffix() |
URI |
getUrl()
|
int |
hashCode() |
static boolean |
isParsable(String source)
Returns true only if the source can be parsed into a DOI.
|
void |
setPrefix(String prefix) |
void |
setSuffix(String suffix) |
String |
toString() |
public static final String GBIF_PREFIX
public static final String TEST_PREFIX
public DOI()
public DOI(String doi)
doi - the full simple DOI stringIllegalArgumentException - if invalid DOI string is passedpublic DOI(String prefix, String suffix)
prefix - a simple DOI prefix starting with 10.suffix - arbitrary suffix part of the DOIIllegalArgumentException - if invalid DOI prefix is givenpublic static boolean isParsable(String source)
public URI getUrl()
IllegalStateException - if the encoding of the DOI is not supportedpublic String getDoiString()
public String getDoiName()
Copyright © 2024 Global Biodiversity Information Facility (GBIF). All rights reserved.