diff --git a/dhp-schemas/pom.xml b/dhp-schemas/pom.xml
index d8873d33d..89e52858b 100644
--- a/dhp-schemas/pom.xml
+++ b/dhp-schemas/pom.xml
@@ -30,6 +30,12 @@
com.fasterxml.jackson.core
jackson-databind
+
+
+ junit
+ junit
+ ${junit.version}
+
eu.dnetlib.dhp
diff --git a/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/Relation.java b/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/Relation.java
index d404981f4..24a363bec 100644
--- a/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/Relation.java
+++ b/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/Relation.java
@@ -1,86 +1,83 @@
package eu.dnetlib.dhp.schema.oaf;
-import org.junit.Assert;
-
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
+import org.junit.Assert;
+
public class Relation extends Oaf {
- private String relType;
+ private String relType;
- private String subRelType;
+ private String subRelType;
- private String relClass;
+ private String relClass;
- private String source;
+ private String source;
- private String target;
+ private String target;
- private List collectedFrom = new ArrayList<>();
+ private List collectedFrom = new ArrayList<>();
- public String getRelType() {
- return relType;
- }
+ public String getRelType() {
+ return relType;
+ }
- public void setRelType(String relType) {
- this.relType = relType;
- }
+ public void setRelType(final String relType) {
+ this.relType = relType;
+ }
- public String getSubRelType() {
- return subRelType;
- }
+ public String getSubRelType() {
+ return subRelType;
+ }
- public void setSubRelType(String subRelType) {
- this.subRelType = subRelType;
- }
+ public void setSubRelType(final String subRelType) {
+ this.subRelType = subRelType;
+ }
- public String getRelClass() {
- return relClass;
- }
+ public String getRelClass() {
+ return relClass;
+ }
- public void setRelClass(String relClass) {
- this.relClass = relClass;
- }
+ public void setRelClass(final String relClass) {
+ this.relClass = relClass;
+ }
- public String getSource() {
- return source;
- }
+ public String getSource() {
+ return source;
+ }
- public void setSource(String source) {
- this.source = source;
- }
+ public void setSource(final String source) {
+ this.source = source;
+ }
- public String getTarget() {
- return target;
- }
+ public String getTarget() {
+ return target;
+ }
- public void setTarget(String target) {
- this.target = target;
- }
+ public void setTarget(final String target) {
+ this.target = target;
+ }
- public List getCollectedFrom() {
- return collectedFrom;
- }
+ public List getCollectedFrom() {
+ return collectedFrom;
+ }
- public void setCollectedFrom(List collectedFrom) {
- this.collectedFrom = collectedFrom;
- }
+ public void setCollectedFrom(final List collectedFrom) {
+ this.collectedFrom = collectedFrom;
+ }
- public void mergeFrom(final Relation r) {
- Assert.assertEquals("source ids must be equal", getSource(), r.getSource());
- Assert.assertEquals("target ids must be equal", getTarget(), r.getTarget());
- Assert.assertEquals("relType(s) must be equal", getRelType(), r.getRelType());
- Assert.assertEquals("subRelType(s) must be equal", getSubRelType(), r.getSubRelType());
- Assert.assertEquals("relClass(es) must be equal", getRelClass(), r.getRelClass());
- setCollectedFrom(
- Stream.concat(
- getCollectedFrom().stream(),
- r.getCollectedFrom().stream())
- .distinct() // relies on KeyValue.equals
- .collect(Collectors.toList()));
- }
+ public void mergeFrom(final Relation r) {
+ Assert.assertEquals("source ids must be equal", getSource(), r.getSource());
+ Assert.assertEquals("target ids must be equal", getTarget(), r.getTarget());
+ Assert.assertEquals("relType(s) must be equal", getRelType(), r.getRelType());
+ Assert.assertEquals("subRelType(s) must be equal", getSubRelType(), r.getSubRelType());
+ Assert.assertEquals("relClass(es) must be equal", getRelClass(), r.getRelClass());
+ setCollectedFrom(Stream.concat(getCollectedFrom().stream(), r.getCollectedFrom().stream())
+ .distinct() // relies on KeyValue.equals
+ .collect(Collectors.toList()));
+ }
}
diff --git a/pom.xml b/pom.xml
index faed1db35..74003a407 100644
--- a/pom.xml
+++ b/pom.xml
@@ -76,7 +76,7 @@
junit
junit
- 4.12
+ ${junit.version}
test
@@ -481,6 +481,7 @@
2.9.6
3.5
2.11.12
+ 4.12
3.4.2