1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.mycore.pi.doi;
20
21 import java.util.Locale;
22
23 import org.mycore.pi.MCRPersistentIdentifier;
24
25 public class MCRDigitalObjectIdentifier implements MCRPersistentIdentifier {
26
27 public static final String TYPE = "doi";
28
29 public static final String TEST_DOI_PREFIX = "10.5072";
30
31 private String prefix;
32
33 private String suffix;
34
35 protected MCRDigitalObjectIdentifier(String prefix, String suffix) {
36 this.prefix = prefix;
37 this.suffix = suffix;
38 }
39
40 public String getPrefix() {
41 return prefix;
42 }
43
44 public String getSuffix() {
45 return suffix;
46 }
47
48 @Override
49 public String asString() {
50 return String.format(Locale.ENGLISH, "%s/%s", prefix, suffix);
51 }
52 }