From 526517ec1454b20a277900b3091d11bb4d6a40ea Mon Sep 17 00:00:00 2001 From: Vincent Privat Date: Fri, 19 Jan 2024 10:16:15 +0100 Subject: [PATCH] update dependencies --- pom.xml | 24 +++++++++---------- .../archscrap/wikidata/WikidataUtils.java | 6 ++--- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/pom.xml b/pom.xml index e5aa9ee..d1c26f9 100644 --- a/pom.xml +++ b/pom.xml @@ -3,15 +3,15 @@ com.github.donvip archscrap - 0.1.0-SNAPSHOT + 0.2.0-SNAPSHOT jar archscrap UTF-8 - 17 - 17 + 21 + 21 don-vip_ArchScrap don-vip https://sonarcloud.io @@ -22,7 +22,7 @@ org.eclipse.rdf4j rdf4j-bom - 4.0.3 + 4.3.8 pom import @@ -33,28 +33,28 @@ org.apache.logging.log4j log4j-api - 2.18.0 + 2.22.1 org.apache.logging.log4j log4j-core - 2.18.0 + 2.22.1 org.fusesource.jansi jansi - 2.4.0 + 2.4.1 runtime org.jsoup jsoup - 1.15.1 + 1.17.2 org.hsqldb hsqldb - 2.6.1 + 2.7.2 jakarta.persistence @@ -64,7 +64,7 @@ org.hibernate.orm hibernate-core - 6.1.0.Final + 6.4.2.Final com.github.heideltime @@ -74,12 +74,12 @@ org.apache.uima uimaj-core - 2.11.0 + 3.5.0 org.apache.poi poi - 5.2.2 + 5.2.5 org.eclipse.rdf4j diff --git a/src/main/java/com/github/donvip/archscrap/wikidata/WikidataUtils.java b/src/main/java/com/github/donvip/archscrap/wikidata/WikidataUtils.java index 57e4be8..93ae3e7 100644 --- a/src/main/java/com/github/donvip/archscrap/wikidata/WikidataUtils.java +++ b/src/main/java/com/github/donvip/archscrap/wikidata/WikidataUtils.java @@ -12,7 +12,6 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.eclipse.rdf4j.common.iteration.Iterations; import org.eclipse.rdf4j.query.Binding; import org.eclipse.rdf4j.query.BindingSet; import org.eclipse.rdf4j.query.QueryLanguage; @@ -57,7 +56,8 @@ public static Author retrieveAuthorInfo(String author, Map prede throw new IllegalArgumentException("Unexpected value: " + occupationQid); }; if (query != null) { - List results = Iterations.asList(sparqlConnection.prepareTupleQuery(QueryLanguage.SPARQL, query).evaluate()); + List results = sparqlConnection.prepareTupleQuery(QueryLanguage.SPARQL, query) + .evaluate().stream().toList(); if (results.size() != 1) { LOGGER.info("Not exactly 1 author when looking for {} in Wikidata: {}", author, results); } else { @@ -183,7 +183,7 @@ protected static List findInWikidata(RepositoryConnection sparqlConnecti wdt:P1705 ?noms; } """.replace("$natures", natures).replace("$textualValue", textualValue)); - List results = Iterations.asList(tupleQuery.evaluate()); + List results = tupleQuery.evaluate().stream().toList(); if (results.isEmpty()) { LOGGER.error("No name/surname found when looking for {} {} in Wikidata: {}", natures, textualValue, results); return Collections.emptyList();