forked from D-Net/dnet-hadoop
minor changes
This commit is contained in:
parent
13eae4b31e
commit
d0d5525d40
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue