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;
}
public static Result mergeResults(Result r1, Result r2) {
if (new ResultTypeComparator().compare(r1, r2) < 0) {
r1.mergeFrom(r2);
return r1;
public static Result mergeResults(Result left, Result right) {
if (new ResultTypeComparator().compare(left, right) < 0) {
left.mergeFrom(right);
return left;
} else {
r2.mergeFrom(r1);
return r2;
right.mergeFrom(left);
return right;
}
}

View File

@ -18,7 +18,7 @@ import eu.dnetlib.dhp.schema.oaf.Field;
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 int YEAR_LB = 1300;
private static final int YEAR_UB = Year.now().getValue() + 5;