diff --git a/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/dump/zenodo/Creator.java b/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/dump/zenodo/Creator.java index d9a072db0f..d105205730 100644 --- a/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/dump/zenodo/Creator.java +++ b/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/dump/zenodo/Creator.java @@ -29,4 +29,19 @@ public class Creator { public void setOrcid(String orcid) { this.orcid = orcid; } + + public static Creator newInstance(String name, String affiliation, String orcid) { + Creator c = new Creator(); + if (!(name == null)) { + c.name = name; + } + if (!(affiliation == null)) { + c.affiliation = affiliation; + } + if (!(orcid == null)) { + c.orcid = orcid; + } + + return c; + } } diff --git a/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/dump/zenodo/Grant.java b/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/dump/zenodo/Grant.java index 712644cde7..c9e81846d6 100644 --- a/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/dump/zenodo/Grant.java +++ b/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/dump/zenodo/Grant.java @@ -13,4 +13,11 @@ public class Grant implements Serializable { public void setId(String id) { this.id = id; } + + public static Grant newInstance(String id) { + Grant g = new Grant(); + g.id = id; + + return g; + } }