pidFilter a bit more permissive

This commit is contained in:
Claudio Atzori 2021-03-17 15:06:05 +01:00
parent 8257f9a2bc
commit a3dac32f16
1 changed files with 1 additions and 9 deletions

View File

@ -171,15 +171,7 @@ public class IdentifierFactory implements Serializable {
if (PidBlacklistProvider.getBlacklist(s.getQualifier().getClassid()).contains(pidValue)) { if (PidBlacklistProvider.getBlacklist(s.getQualifier().getClassid()).contains(pidValue)) {
return false; return false;
} }
switch (PidType.tryValueOf(s.getQualifier().getClassid())) { return true;
case doi:
final String doi = StringUtils.trim(StringUtils.lowerCase(pidValue));
return doi.matches(DOI_REGEX);
case original:
return false;
default:
return true;
}
} }
private static <T extends OafEntity> String idFromPid(T entity, StructuredProperty s, boolean md5) { private static <T extends OafEntity> String idFromPid(T entity, StructuredProperty s, boolean md5) {