diff --git a/dhp-workflows/dhp-doiboost/pom.xml b/dhp-workflows/dhp-doiboost/pom.xml index e37bf370b9..06f57de6bd 100644 --- a/dhp-workflows/dhp-doiboost/pom.xml +++ b/dhp-workflows/dhp-doiboost/pom.xml @@ -10,6 +10,37 @@ dhp-doiboost + + + + net.alchim31.maven + scala-maven-plugin + 4.0.1 + + + scala-compile-first + initialize + + add-source + compile + + + + scala-test-compile + process-test-resources + + testCompile + + + + + ${scala.version} + + + + + + org.apache.hadoop diff --git a/dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/orciddsmanager/OrcidDSManager.java b/dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/doiboost/orcid/OrcidDSManager.java similarity index 97% rename from dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/orciddsmanager/OrcidDSManager.java rename to dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/doiboost/orcid/OrcidDSManager.java index c5b8f2782d..9bc89926d1 100644 --- a/dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/orciddsmanager/OrcidDSManager.java +++ b/dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/doiboost/orcid/OrcidDSManager.java @@ -1,4 +1,4 @@ -package eu.dnetlib.orciddsmanager; +package eu.dnetlib.doiboost.orcid; import java.io.FileNotFoundException; import java.io.IOException; @@ -6,7 +6,6 @@ import java.net.URI; import java.util.Properties; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.log4j.Logger; diff --git a/dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/orciddsmanager/SummariesDecompressor.java b/dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/doiboost/orcid/SummariesDecompressor.java similarity index 96% rename from dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/orciddsmanager/SummariesDecompressor.java rename to dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/doiboost/orcid/SummariesDecompressor.java index 7b537b2ba9..d8eb490133 100644 --- a/dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/orciddsmanager/SummariesDecompressor.java +++ b/dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/doiboost/orcid/SummariesDecompressor.java @@ -1,5 +1,8 @@ -package eu.dnetlib.orciddsmanager; +package eu.dnetlib.doiboost.orcid; +import eu.dnetlib.doiboost.orcid.json.JsonWriter; +import eu.dnetlib.doiboost.orcid.model.AuthorData; +import eu.dnetlib.doiboost.orcid.xml.XMLRecordParser; import org.apache.commons.compress.archivers.tar.TarArchiveEntry; import org.apache.commons.compress.archivers.tar.TarArchiveInputStream; import org.apache.hadoop.conf.Configuration; @@ -13,10 +16,6 @@ import org.apache.hadoop.io.compress.CompressionCodecFactory; import org.apache.log4j.Logger; import org.xml.sax.SAXException; -import eu.dnetlib.orciddsmanager.json.JsonWriter; -import eu.dnetlib.orciddsmanager.model.AuthorData; -import eu.dnetlib.orciddsmanager.xml.XMLRecordParser; - import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.IOException; diff --git a/dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/orciddsmanager/json/JsonWriter.java b/dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/doiboost/orcid/json/JsonWriter.java similarity index 83% rename from dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/orciddsmanager/json/JsonWriter.java rename to dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/doiboost/orcid/json/JsonWriter.java index 4263e355cd..7e795c1a07 100644 --- a/dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/orciddsmanager/json/JsonWriter.java +++ b/dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/doiboost/orcid/json/JsonWriter.java @@ -1,8 +1,8 @@ -package eu.dnetlib.orciddsmanager.json; +package eu.dnetlib.doiboost.orcid.json; import com.google.gson.JsonObject; -import eu.dnetlib.orciddsmanager.model.AuthorData; +import eu.dnetlib.doiboost.orcid.model.AuthorData; public class JsonWriter { diff --git a/dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/orciddsmanager/model/AuthorData.java b/dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/doiboost/orcid/model/AuthorData.java similarity index 94% rename from dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/orciddsmanager/model/AuthorData.java rename to dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/doiboost/orcid/model/AuthorData.java index 65ac3ac6e9..66997a57e7 100644 --- a/dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/orciddsmanager/model/AuthorData.java +++ b/dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/doiboost/orcid/model/AuthorData.java @@ -1,4 +1,4 @@ -package eu.dnetlib.orciddsmanager.model; +package eu.dnetlib.doiboost.orcid.model; public class AuthorData { diff --git a/dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/orciddsmanager/xml/XMLRecordParser.java b/dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/doiboost/orcid/xml/XMLRecordParser.java similarity index 97% rename from dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/orciddsmanager/xml/XMLRecordParser.java rename to dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/doiboost/orcid/xml/XMLRecordParser.java index bef37e08c9..54be2f316c 100644 --- a/dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/orciddsmanager/xml/XMLRecordParser.java +++ b/dhp-workflows/dhp-doiboost/src/main/java/eu/dnetlib/doiboost/orcid/xml/XMLRecordParser.java @@ -1,4 +1,4 @@ -package eu.dnetlib.orciddsmanager.xml; +package eu.dnetlib.doiboost.orcid.xml; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -13,12 +13,11 @@ import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathExpressionException; import javax.xml.xpath.XPathFactory; +import eu.dnetlib.doiboost.orcid.model.AuthorData; import org.apache.commons.lang.StringUtils; import org.w3c.dom.Document; import org.xml.sax.SAXException; -import eu.dnetlib.orciddsmanager.model.AuthorData; - public class XMLRecordParser { diff --git a/dhp-workflows/dhp-doiboost/src/test/java/eu/dnetlib/doiboost/DoiBoostTest.java b/dhp-workflows/dhp-doiboost/src/test/java/eu/dnetlib/doiboost/DoiBoostTest.java index 774fbd7b81..9041d44888 100644 --- a/dhp-workflows/dhp-doiboost/src/test/java/eu/dnetlib/doiboost/DoiBoostTest.java +++ b/dhp-workflows/dhp-doiboost/src/test/java/eu/dnetlib/doiboost/DoiBoostTest.java @@ -21,7 +21,7 @@ public class DoiBoostTest { Logger logger = LoggerFactory.getLogger(DoiBoostTest.class); - @Test + public void test() throws Exception { //SparkDownloadContentFromCrossref.main(null);