Revision 49054
Added by Sandro La Bruzzo over 6 years ago
DLIUtils.java | ||
---|---|---|
117 | 117 |
}); |
118 | 118 |
} |
119 | 119 |
|
120 |
public static String inferPidType(final String pid, final String pidType) { |
|
121 |
if (pidType != null && !pidType.toLowerCase().equals("doi")) { |
|
122 |
if (pid != null && pid.contains("http://dx.doi.org/") || pid.contains("http://doi.org/")) |
|
123 |
return "doi"; |
|
124 |
} |
|
125 |
return pidType; |
|
126 |
} |
|
127 |
|
|
120 | 128 |
public static String fixPID(String input) { |
121 | 129 |
if (input != null) { |
122 | 130 |
return input.replace("http://dx.doi.org/", "").replace("http://doi.org/", ""); |
Also available in: Unified diff
update wf