From 7dfd56df9d0189c5ed7ce5fb9ebf412ad9668cde Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Tue, 11 Aug 2020 15:42:35 +0200 Subject: [PATCH] - --- .../eu/dnetlib/dhp/oa/graph/dump/GenerateJsonSchema.java | 4 ++-- .../eu/dnetlib/dhp/oa/graph/dump/SplitForCommunityTest.java | 5 +++-- .../java/eu/dnetlib/dhp/oa/graph/dump/ZenodoUploadTest.java | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/dump/GenerateJsonSchema.java b/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/dump/GenerateJsonSchema.java index 81d8bea69..7780a7f4a 100644 --- a/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/dump/GenerateJsonSchema.java +++ b/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/dump/GenerateJsonSchema.java @@ -1,12 +1,12 @@ package eu.dnetlib.dhp.oa.graph.dump; +import eu.dnetlib.dhp.schema.dump.oaf.graph.*; import org.junit.jupiter.api.Test; import com.fasterxml.jackson.databind.JsonNode; import com.github.victools.jsonschema.generator.*; -import eu.dnetlib.dhp.schema.dump.oaf.community.CommunityResult; public class GenerateJsonSchema { @@ -19,7 +19,7 @@ public class GenerateJsonSchema { configBuilder.forFields().withDescriptionResolver(field -> "Description of " + field.getDeclaredName()); SchemaGeneratorConfig config = configBuilder.build(); SchemaGenerator generator = new SchemaGenerator(config); - JsonNode jsonSchema = generator.generateSchema(CommunityResult.class); + JsonNode jsonSchema = generator.generateSchema(Relation.class); System.out.println(jsonSchema.toString()); } diff --git a/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/dump/SplitForCommunityTest.java b/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/dump/SplitForCommunityTest.java index 7cf9a71f2..2273290ce 100644 --- a/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/dump/SplitForCommunityTest.java +++ b/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/dump/SplitForCommunityTest.java @@ -1,3 +1,4 @@ + package eu.dnetlib.dhp.oa.graph.dump; import java.io.IOException; @@ -94,8 +95,8 @@ public class SplitForCommunityTest { .getPath(); final String communityMapPath = getClass() - .getResource("/eu/dnetlib/dhp/oa/graph/dump/communityMapPath/communitymap.json") - .getPath(); + .getResource("/eu/dnetlib/dhp/oa/graph/dump/communityMapPath/communitymap.json") + .getPath(); CommunitySplit split = new CommunitySplit(); diff --git a/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/dump/ZenodoUploadTest.java b/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/dump/ZenodoUploadTest.java index 7e64800f0..05dc423cb 100644 --- a/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/dump/ZenodoUploadTest.java +++ b/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/dump/ZenodoUploadTest.java @@ -22,7 +22,7 @@ public class ZenodoUploadTest { private static String workingDir; private final String URL_STRING = "https://sandbox.zenodo.org/api/deposit/depositions"; - private final String ACCESS_TOKEN = "5ImUj0VC1ICg4ifK5dc3AGzJhcfAB4osxrFlsr8WxHXxjaYgCE0hY8HZcDoe"; + private final String ACCESS_TOKEN = ""; @BeforeAll public static void beforeAll() throws IOException { @@ -143,7 +143,7 @@ public class ZenodoUploadTest { .println( new Gson() .toJson( - SendToZenodoHDFS + Utils .readCommunityMap( fs, getClass() .getResource("/eu/dnetlib/dhp/oa/graph/dump/communityMapPath/communitymap.json")