diff --git a/dhp-workflows/dhp-enrichment/src/main/java/eu/dnetlib/dhp/bulktag/community/QueryInformationSystem.java b/dhp-workflows/dhp-enrichment/src/main/java/eu/dnetlib/dhp/bulktag/community/QueryInformationSystem.java index ec89edc632..678b270a06 100644 --- a/dhp-workflows/dhp-enrichment/src/main/java/eu/dnetlib/dhp/bulktag/community/QueryInformationSystem.java +++ b/dhp-workflows/dhp-enrichment/src/main/java/eu/dnetlib/dhp/bulktag/community/QueryInformationSystem.java @@ -26,9 +26,9 @@ public class QueryInformationSystem { + " return " + " " + " { $x//CONFIGURATION/context/@id} " - + " " + - "{$x//CONFIGURATION/context/param[./@name='advancedConstraints']/text() }" + - "" + + " " + + "{$x//CONFIGURATION/context/param[./@name='advancedConstraints']/text() }" + + "" + " " + " {for $y in tokenize($subj,',') " + " return " diff --git a/dhp-workflows/dhp-enrichment/src/main/java/eu/dnetlib/dhp/bulktag/community/ResultTagger.java b/dhp-workflows/dhp-enrichment/src/main/java/eu/dnetlib/dhp/bulktag/community/ResultTagger.java index d6498e9426..0452a6ebf8 100644 --- a/dhp-workflows/dhp-enrichment/src/main/java/eu/dnetlib/dhp/bulktag/community/ResultTagger.java +++ b/dhp-workflows/dhp-enrichment/src/main/java/eu/dnetlib/dhp/bulktag/community/ResultTagger.java @@ -9,16 +9,16 @@ import java.util.*; import java.util.stream.Collectors; import java.util.stream.Stream; -import eu.dnetlib.dhp.schema.common.ModelConstants; -import eu.dnetlib.dhp.schema.common.ModelSupport; -import eu.dnetlib.dhp.schema.oaf.utils.OafMapperUtils; import org.apache.commons.lang3.StringUtils; import com.google.gson.Gson; import com.jayway.jsonpath.DocumentContext; import com.jayway.jsonpath.JsonPath; +import eu.dnetlib.dhp.schema.common.ModelConstants; +import eu.dnetlib.dhp.schema.common.ModelSupport; import eu.dnetlib.dhp.schema.oaf.*; +import eu.dnetlib.dhp.schema.oaf.utils.OafMapperUtils; /** Created by miriam on 02/08/2018. */ public class ResultTagger implements Serializable { diff --git a/dhp-workflows/dhp-enrichment/src/test/java/eu/dnetlib/dhp/bulktag/BulkTagJobTest.java b/dhp-workflows/dhp-enrichment/src/test/java/eu/dnetlib/dhp/bulktag/BulkTagJobTest.java index 364e533760..2af3cdb2ef 100644 --- a/dhp-workflows/dhp-enrichment/src/test/java/eu/dnetlib/dhp/bulktag/BulkTagJobTest.java +++ b/dhp-workflows/dhp-enrichment/src/test/java/eu/dnetlib/dhp/bulktag/BulkTagJobTest.java @@ -48,7 +48,7 @@ public class BulkTagJobTest { + " \"description\" : \"$['description'][*]['value']\", " + " \"subject\" :\"$['subject'][*]['value']\" , " + - "\"fos\" : \"$['subject'][?(@['qualifier']['classid']=='subject:fos')].value\"} "; + "\"fos\" : \"$['subject'][?(@['qualifier']['classid']=='subject:fos')].value\"} "; private static SparkSession spark; diff --git a/dhp-workflows/dhp-enrichment/src/test/java/eu/dnetlib/dhp/bulktag/CommunityConfigurationFactoryTest.java b/dhp-workflows/dhp-enrichment/src/test/java/eu/dnetlib/dhp/bulktag/CommunityConfigurationFactoryTest.java index e3a6608355..c8fd62c8e9 100644 --- a/dhp-workflows/dhp-enrichment/src/test/java/eu/dnetlib/dhp/bulktag/CommunityConfigurationFactoryTest.java +++ b/dhp-workflows/dhp-enrichment/src/test/java/eu/dnetlib/dhp/bulktag/CommunityConfigurationFactoryTest.java @@ -86,32 +86,32 @@ class CommunityConfigurationFactoryTest { @Test void loadSelCriteriaTest2() throws DocumentException, IOException, SAXException { String xml = IOUtils - .toString( - getClass() - .getResourceAsStream( - "/eu/dnetlib/dhp/bulktag/communityconfiguration/community_configuration_selcrit2.xml")); + .toString( + getClass() + .getResourceAsStream( + "/eu/dnetlib/dhp/bulktag/communityconfiguration/community_configuration_selcrit2.xml")); final CommunityConfiguration cc = CommunityConfigurationFactory.newInstance(xml); Map> param = new HashMap<>(); param.put("author", new ArrayList<>(Collections.singletonList("Pippo Pippi"))); param - .put( - "description", - new ArrayList<>( - Collections - .singletonList( - "This work has been partially supported by DARIAH-EU infrastructure"))); + .put( + "description", + new ArrayList<>( + Collections + .singletonList( + "This work has been partially supported by DARIAH-EU infrastructure"))); param - .put( - "contributor", - new ArrayList<>( - Collections - .singletonList( - "Author X helped to write the paper. X works for DARIAH"))); + .put( + "contributor", + new ArrayList<>( + Collections + .singletonList( + "Author X helped to write the paper. X works for DARIAH"))); List comm = cc - .getCommunityForDatasource( - "openaire____::1cfdb2e14977f31a98e0118283401f32", param); + .getCommunityForDatasource( + "openaire____::1cfdb2e14977f31a98e0118283401f32", param); - //TODO add more assertions + // TODO add more assertions Assertions.assertEquals(0, comm.size()); } diff --git a/dhp-workflows/dhp-graph-provision/src/test/java/eu/dnetlib/dhp/oa/provision/IndexRecordTransformerTest.java b/dhp-workflows/dhp-graph-provision/src/test/java/eu/dnetlib/dhp/oa/provision/IndexRecordTransformerTest.java index d9dc609d83..cd5e08426a 100644 --- a/dhp-workflows/dhp-graph-provision/src/test/java/eu/dnetlib/dhp/oa/provision/IndexRecordTransformerTest.java +++ b/dhp-workflows/dhp-graph-provision/src/test/java/eu/dnetlib/dhp/oa/provision/IndexRecordTransformerTest.java @@ -131,37 +131,38 @@ public class IndexRecordTransformerTest { @Test public void testForEOSCFutureSoftwareNotebook() throws IOException, TransformerException { final String record = IOUtils - .toString(getClass().getResourceAsStream("eosc-future/software-justthink.xml")); + .toString(getClass().getResourceAsStream("eosc-future/software-justthink.xml")); testRecordTransformation(record); } @Test public void testForEOSCFutureSoftwareNotebookClaim() throws IOException, TransformerException { final String record = IOUtils - .toString(getClass().getResourceAsStream("eosc-future/software-justthink-claim.xml")); + .toString(getClass().getResourceAsStream("eosc-future/software-justthink-claim.xml")); testRecordTransformation(record); } @Test public void testForEOSCFutureZenodo7353841() throws IOException, TransformerException { final String record = IOUtils - .toString(getClass().getResourceAsStream("eosc-future/zenodo7353841.xml")); + .toString(getClass().getResourceAsStream("eosc-future/zenodo7353841.xml")); testRecordTransformation(record); } @Test public void testForEOSCFutureZenodo7351393() throws IOException, TransformerException { final String record = IOUtils - .toString(getClass().getResourceAsStream("eosc-future/zenodo7351393.xml")); + .toString(getClass().getResourceAsStream("eosc-future/zenodo7351393.xml")); testRecordTransformation(record); } @Test public void testForEOSCFutureZenodo7351221() throws IOException, TransformerException { final String record = IOUtils - .toString(getClass().getResourceAsStream("eosc-future/zenodo7351221.xml")); + .toString(getClass().getResourceAsStream("eosc-future/zenodo7351221.xml")); testRecordTransformation(record); } + @Test void testDoiUrlNormalization() throws MalformedURLException {