1
0
Fork 0

code formatting

This commit is contained in:
Claudio Atzori 2021-03-09 09:12:26 +01:00
parent 8d2bb24512
commit 76441f4edd
1 changed files with 6 additions and 3 deletions

View File

@ -1,8 +1,6 @@
package eu.dnetlib.dhp.schema.oaf; package eu.dnetlib.dhp.schema.oaf;
import eu.dnetlib.dhp.schema.common.ModelSupport;
import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkArgument;
import java.text.ParseException; import java.text.ParseException;
@ -10,6 +8,8 @@ import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
import eu.dnetlib.dhp.schema.common.ModelSupport;
/** /**
* Relation models any edge between two nodes in the OpenAIRE graph. It has a source id and a target id pointing to * Relation models any edge between two nodes in the OpenAIRE graph. It has a source id and a target id pointing to
* graph node identifiers and it is further characterised by the semantic of the link through the fields relType, * graph node identifiers and it is further characterised by the semantic of the link through the fields relType,
@ -137,7 +137,10 @@ public class Relation extends Oaf {
try { try {
setValidationDate(ModelSupport.oldest(getValidationDate(), r.getValidationDate())); setValidationDate(ModelSupport.oldest(getValidationDate(), r.getValidationDate()));
} catch (ParseException e) { } catch (ParseException e) {
throw new IllegalArgumentException(String.format("invalid validation date format in relation [s:%s, t:%s]: %s", getSource(), getTarget(), getValidationDate())); throw new IllegalArgumentException(String
.format(
"invalid validation date format in relation [s:%s, t:%s]: %s", getSource(), getTarget(),
getValidationDate()));
} }
super.mergeFrom(r); super.mergeFrom(r);