DS-2529 CSV import bugfix for fields under authority control with a language

This commit is contained in:
Antoine Snyers
2015-03-30 11:08:16 +02:00
parent bc28df4093
commit d111039c2e

View File

@@ -1169,10 +1169,8 @@ public class MetadataImport
*/
private static boolean isAuthorityControlledField(String md)
{
int pos = md.indexOf("[");
String mdf = (pos > -1 ? md.substring(0, pos) : md);
pos = md.indexOf(":");
mdf = (pos > -1 ? md.substring(pos+1) : md);
String mdf = StringUtils.substringAfter(md, ":");
mdf = StringUtils.substringBefore(mdf, "[");
return authorityControlled.contains(mdf);
}