1
0
Fork 0

minor changes

This commit is contained in:
Claudio Atzori 2020-11-26 11:04:17 +01:00
parent 13eae4b31e
commit d0d5525d40
2 changed files with 7 additions and 7 deletions

View File

@ -43,13 +43,13 @@ public class OafMapperUtils {
return left; return left;
} }
public static Result mergeResults(Result r1, Result r2) { public static Result mergeResults(Result left, Result right) {
if (new ResultTypeComparator().compare(r1, r2) < 0) { if (new ResultTypeComparator().compare(left, right) < 0) {
r1.mergeFrom(r2); left.mergeFrom(right);
return r1; return left;
} else { } else {
r2.mergeFrom(r1); right.mergeFrom(left);
return r2; return right;
} }
} }

View File

@ -18,7 +18,7 @@ import eu.dnetlib.dhp.schema.oaf.Field;
public class DatePicker { public class DatePicker {
public static final String DATE_PATTERN = "\\d{4}-\\d{2}-\\d{2}"; public static final String DATE_PATTERN = "^\\d{4}-\\d{2}-\\d{2}$";
private static final String DATE_DEFAULT_SUFFIX = "01-01"; private static final String DATE_DEFAULT_SUFFIX = "01-01";
private static final int YEAR_LB = 1300; private static final int YEAR_LB = 1300;
private static final int YEAR_UB = Year.now().getValue() + 5; private static final int YEAR_UB = Year.now().getValue() + 5;