Skip to content

Commit

Permalink
Downgrade apache-jena-libs in vtl-prov
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoLaval committed Sep 8, 2024
1 parent 5d3a4bb commit df73da0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
10 changes: 9 additions & 1 deletion vtl-prov/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
<artifactId>vtl-prov</artifactId>
<version>1.6.0-SNAPSHOT</version>

<properties>
<sonar.coverage.jacoco.xmlReportPaths>
${project.basedir}/../coverage/target/site/jacoco-aggregate/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>
</properties>

<dependencies>
<dependency>
<groupId>org.jgrapht</groupId>
Expand All @@ -29,12 +35,14 @@
<version>1.6.0-SNAPSHOT</version>
</dependency>

<!-- Jena 5 requires Java 17+ -->
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>apache-jena-libs</artifactId>
<version>3.17.0</version>
<type>pom</type>
<version>5.0.0</version>
</dependency>

</dependencies>

</project>
11 changes: 7 additions & 4 deletions vtl-prov/src/main/java/fr/insee/vtl/prov/RDFUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
import org.apache.jena.rdf.model.Model;
import org.apache.jena.rdf.model.ModelFactory;
import org.apache.jena.rdfconnection.RDFConnection;
import org.apache.jena.rdfconnection.RDFConnectionFactory;
import org.apache.jena.rdfconnection.RDFConnectionRemote;
import org.apache.jena.rdfconnection.RDFDatasetConnection;

public class RDFUtils {

Expand All @@ -19,11 +22,11 @@ public static void loadModelWithCredentials(Model model,
String sparqlEndpointUser,
String sparqlEndpointPassword) {
if (!sparqlEndpoint.isEmpty()) {
RDFConnection connect = RDFConnection
RDFConnection connection = RDFConnectionFactory
.connectPW(sparqlEndpoint, sparqlEndpointUser, sparqlEndpointPassword);
connect.fetchDataset();
connect.load(model);
connect.close();
connection.fetchDataset();
connection.load(model);
connection.close();
}
}
}

0 comments on commit df73da0

Please sign in to comment.