From dc5096a327d903e533f4f02931f01c5499926abc Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Wed, 19 Aug 2020 10:57:36 +0200 Subject: [PATCH] refactoring due to compilation --- .../dnetlib/dhp/oa/graph/dump/SendToZenodoHDFS.java | 2 ++ .../dnetlib/dhp/oa/graph/dump/graph/Extractor.java | 12 +++++------- .../eu/dnetlib/dhp/oa/graph/dump/graph/Process.java | 5 ++--- .../graph/dump/graph/SparkOrganizationRelation.java | 5 ++--- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/dump/SendToZenodoHDFS.java b/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/dump/SendToZenodoHDFS.java index 9ffc313990..23784cd66c 100644 --- a/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/dump/SendToZenodoHDFS.java +++ b/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/dump/SendToZenodoHDFS.java @@ -3,11 +3,13 @@ package eu.dnetlib.dhp.oa.graph.dump; import java.io.Serializable; import java.util.Optional; + import org.apache.commons.io.IOUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.*; + import eu.dnetlib.dhp.application.ArgumentApplicationParser; import eu.dnetlib.dhp.common.api.MissingConceptDoiException; import eu.dnetlib.dhp.common.api.ZenodoAPIClient; diff --git a/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/dump/graph/Extractor.java b/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/dump/graph/Extractor.java index 3daaed47f4..73957e41db 100644 --- a/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/dump/graph/Extractor.java +++ b/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/dump/graph/Extractor.java @@ -23,13 +23,11 @@ import eu.dnetlib.dhp.schema.oaf.KeyValue; import eu.dnetlib.dhp.schema.oaf.Result; /** - * Creates new Relations (as in eu.dnetlib.dhp.schema.dump.oaf.graph.Relation) from the information in the Entity. - * The new Relations are created for the datasource in the collectedfrom and hostedby elements and for the context - * related to communities and research initiative/infrastructures. - * - * For collectedfrom elements it creates: datasource -> provides -> result and result -> isProvidedBy -> datasource - * For hostedby elements it creates: datasource -> hosts -> result and result -> isHostedBy -> datasource - * For context elements it creates: context <-> isRelatedTo <-> result + * Creates new Relations (as in eu.dnetlib.dhp.schema.dump.oaf.graph.Relation) from the information in the Entity. The + * new Relations are created for the datasource in the collectedfrom and hostedby elements and for the context related + * to communities and research initiative/infrastructures. For collectedfrom elements it creates: datasource -> provides + * -> result and result -> isProvidedBy -> datasource For hostedby elements it creates: datasource -> hosts -> result + * and result -> isHostedBy -> datasource For context elements it creates: context <-> isRelatedTo <-> result */ public class Extractor implements Serializable { diff --git a/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/dump/graph/Process.java b/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/dump/graph/Process.java index 7b7dafdf37..5fc8fad250 100644 --- a/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/dump/graph/Process.java +++ b/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/dump/graph/Process.java @@ -16,9 +16,8 @@ import eu.dnetlib.dhp.schema.dump.oaf.Provenance; import eu.dnetlib.dhp.schema.dump.oaf.graph.*; /** - * It process the ContextInfo information to produce a new Context Entity or a set of Relations between the - * generic context entity and datasource/projects related to the context. - * + * It process the ContextInfo information to produce a new Context Entity or a set of Relations between the generic + * context entity and datasource/projects related to the context. */ public class Process implements Serializable { private static final Logger log = LoggerFactory.getLogger(Process.class); diff --git a/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/dump/graph/SparkOrganizationRelation.java b/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/dump/graph/SparkOrganizationRelation.java index 50b5771e4e..e597bc2f6d 100644 --- a/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/dump/graph/SparkOrganizationRelation.java +++ b/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/dump/graph/SparkOrganizationRelation.java @@ -1,5 +1,4 @@ - package eu.dnetlib.dhp.oa.graph.dump.graph; import static eu.dnetlib.dhp.common.SparkSessionSupport.runWithSparkSession; @@ -28,8 +27,8 @@ import eu.dnetlib.dhp.schema.dump.oaf.graph.RelType; import eu.dnetlib.dhp.schema.oaf.Relation; /** - * Create new Relations between Context Entities and Organizations whose products are associated to the context. - * It produces relation such as: organization <-> isRelatedTo <-> context + * Create new Relations between Context Entities and Organizations whose products are associated to the context. It + * produces relation such as: organization <-> isRelatedTo <-> context */ public class SparkOrganizationRelation implements Serializable { private static final Logger log = LoggerFactory.getLogger(SparkOrganizationRelation.class);