diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index af063bed..37e72c0d 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -20,15 +20,15 @@ jobs:
environment: sonatype
steps:
- # Checks-out the repository under $GITHUB_WORKSPACE
- - uses: actions/checkout@v2
+ - name: Check out the repo
+ uses: actions/checkout@v4.1.1
# Sets up JDK
- - name: Set up JDK 11
- uses: actions/setup-java@v3.4.0
+ - name: Set up JDK
+ uses: actions/setup-java@v4.0.0
with:
distribution: 'temurin'
- java-version: '11'
+ java-version: '17'
# Runs the Maven build
- name: Build and deploy with Maven
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 28f4cfb2..9ad73a19 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -19,14 +19,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
- uses: actions/checkout@v3
+ uses: actions/checkout@v4.1.1
# Sets up JDK
- - name: Set up JDK 11
- uses: actions/setup-java@v3.4.0
+ - name: Set up JDK
+ uses: actions/setup-java@v4.0.0
with:
distribution: 'temurin'
- java-version: '11'
+ java-version: '17'
# Runs the Maven build
- name: Build server with Maven
diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml
index 18edc4cf..8750180b 100644
--- a/.github/workflows/verify.yml
+++ b/.github/workflows/verify.yml
@@ -17,15 +17,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- # Checks-out the repository under $GITHUB_WORKSPACE
- - uses: actions/checkout@v2
+ - name: Check out the repo
+ uses: actions/checkout@v4.1.1
# Sets up JDK
- - name: Set up JDK 11
- uses: actions/setup-java@v3.4.0
+ - name: Set up JDK
+ uses: actions/setup-java@v4.0.0
with:
distribution: 'temurin'
- java-version: '11'
+ java-version: '17'
# Runs the Maven build
- name: Build and verify with Maven
diff --git a/bundles/io.github.linkedfactory.core/pom.xml b/bundles/io.github.linkedfactory.core/pom.xml
index e2d7dcf3..4f3f8e86 100644
--- a/bundles/io.github.linkedfactory.core/pom.xml
+++ b/bundles/io.github.linkedfactory.core/pom.xml
@@ -19,13 +19,13 @@
org.osgi
osgi.core
- 6.0.0
+ 7.0.0
provided
org.osgi
osgi.cmpn
- 6.0.0
+ 7.0.0
provided
@@ -151,7 +151,7 @@
com.google.guava
guava
- 30.1.1-jre
+ 32.1.3-jre
net.enilink.komma
diff --git a/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/komma/ModelModule.java b/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/komma/ModelModule.java
index 02fcb9e2..9aa5f022 100644
--- a/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/komma/ModelModule.java
+++ b/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/komma/ModelModule.java
@@ -6,8 +6,5 @@ public class ModelModule extends KommaModule {
{
addBehaviour(KvinMemoryModelSet.class);
addBehaviour(KvinPersistentModelSet.class);
- addBehaviour(RepositoryManagerModelSet.class);
- addBehaviour(Rdf4jModelSet.class);
}
-
}
diff --git a/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/komma/Rdf4jModelSet.java b/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/komma/Rdf4jModelSet.java
deleted file mode 100644
index be8a5b12..00000000
--- a/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/komma/Rdf4jModelSet.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package io.github.linkedfactory.core.komma;
-
-import net.enilink.commons.iterator.IExtendedIterator;
-import net.enilink.composition.annotations.Iri;
-import net.enilink.komma.core.*;
-import net.enilink.komma.model.MODELS;
-import net.enilink.komma.model.rdf4j.MemoryModelSetSupport;
-import net.enilink.komma.rdf4j.RDF4JValueConverter;
-import org.apache.http.auth.AUTH;
-import org.eclipse.rdf4j.model.Model;
-import org.eclipse.rdf4j.model.impl.LinkedHashModel;
-import org.eclipse.rdf4j.model.impl.SimpleValueFactory;
-import org.eclipse.rdf4j.repository.Repository;
-import org.eclipse.rdf4j.repository.RepositoryException;
-import org.eclipse.rdf4j.repository.config.*;
-import org.eclipse.rdf4j.repository.manager.LocalRepositoryManager;
-
-import java.io.File;
-import java.util.*;
-
-@Iri(MODELS.NAMESPACE + "Rdf4jModelSet")
-public abstract class Rdf4jModelSet extends MemoryModelSetSupport {
- @Iri(MODELS.NAMESPACE + "repository")
- public abstract IReference getRepository();
-
- public Repository createRepository() throws RepositoryException {
- IEntityManager manager = ((IEntity) getBehaviourDelegate()).getEntityManager();
- RDF4JValueConverter converter = new RDF4JValueConverter(SimpleValueFactory.getInstance());
- Model configModel = new LinkedHashModel();
- try (IExtendedIterator stmts = manager
- .createQuery("construct { ?s ?p ?o } where { ?repository (!<:>)* ?s . ?s ?p ?o }")
- .setParameter("repository", getRepository())
- .evaluateRestricted(IStatement.class)) {
- stmts.forEach(stmt -> {
- configModel.add(converter.toRdf4j(stmt));
- });
- }
- Set repositoryIDs = RepositoryConfigUtil.getRepositoryIDs(configModel);
- if (repositoryIDs.isEmpty()) {
- throw new KommaException("No repository ID in configuration: " + getRepository());
- }
- if (repositoryIDs.size() != 1) {
- throw new KommaException("Multiple repository IDs in configuration: " + getRepository());
- }
- RepositoryConfig repoConfig = RepositoryConfigUtil.getRepositoryConfig(configModel,
- repositoryIDs.iterator().next());
- RepositoryImplConfig implConfig = repoConfig.getRepositoryImplConfig();
- if (implConfig == null) {
- throw new KommaException("No implementation config in configuration: " + getRepository());
- }
- RepositoryFactory factory = RepositoryRegistry.getInstance().get(implConfig.getType()).orElseThrow(() -> {
- return new RepositoryConfigException("Unsupported repository type: " + implConfig.getType());
- });
- Repository repository = factory.getRepository(implConfig);
- repository.init();
- addBasicKnowledge(repository);
- return repository;
- }
-
- @Override
- public boolean isPersistent() {
- return true;
- }
-}
diff --git a/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/komma/RepositoryManagerModelSet.java b/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/komma/RepositoryManagerModelSet.java
deleted file mode 100644
index 19451772..00000000
--- a/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/komma/RepositoryManagerModelSet.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package io.github.linkedfactory.core.komma;
-
-import net.enilink.composition.annotations.Iri;
-import net.enilink.komma.core.EntityVar;
-import net.enilink.komma.core.IReference;
-import net.enilink.komma.model.MODELS;
-import net.enilink.komma.model.rdf4j.MemoryModelSetSupport;
-import org.eclipse.rdf4j.repository.Repository;
-import org.eclipse.rdf4j.repository.RepositoryException;
-import org.eclipse.rdf4j.repository.manager.LocalRepositoryManager;
-
-import java.io.File;
-import java.util.Collections;
-
-@Iri(MODELS.NAMESPACE + "RepositoryManagerModelSet")
-public abstract class RepositoryManagerModelSet extends MemoryModelSetSupport {
- EntityVar manager;
-
- @Iri(MODELS.NAMESPACE + "baseDir")
- public abstract Object getBaseDir();
-
- @Iri(MODELS.NAMESPACE + "repositoryID")
- public abstract String getRepositoryID();
-
- public Repository createRepository() throws RepositoryException {
- Object baseDir = getBaseDir();
- File file;
- if (baseDir instanceof IReference && (((IReference) baseDir)).getURI() != null
- && (((IReference) baseDir)).getURI().isFile()) {
- file = new File((((IReference) baseDir)).getURI().toFileString());
- } else {
- file = new File(baseDir.toString());
- }
- LocalRepositoryManager repoManager = new LocalRepositoryManager(file) {
- @Override
- public void shutDown() {
- // prevent manager from shutting down the repositories as this already handled by KOMMA
- setInitializedRepositories(Collections.emptyMap());
- super.shutDown();
- }
- };
- repoManager.init();
- manager.set(repoManager);
- Repository repository = manager.get().getRepository(getRepositoryID());
- repository.init();
- addBasicKnowledge(repository);
- return repository;
- }
-
- @Override
- public void dispose() {
- LocalRepositoryManager m = manager.get();
- if (m != null) {
- m.shutDown();
- }
- manager.remove();
- }
-
- @Override
- public boolean isPersistent() {
- return true;
- }
-}
diff --git a/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/kvin/parquet/KvinParquet.java b/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/kvin/parquet/KvinParquet.java
index dbe1e35e..6394b1cc 100644
--- a/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/kvin/parquet/KvinParquet.java
+++ b/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/kvin/parquet/KvinParquet.java
@@ -13,6 +13,7 @@
import net.enilink.komma.core.URI;
import net.enilink.komma.core.URIs;
import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.parquet.avro.AvroParquetReader;
import org.apache.parquet.filter2.compat.FilterCompat;
diff --git a/bundles/io.github.linkedfactory.core/src/test/java/io/github/linkedfactory/core/rdf4j/Rdf4jModelSetTest.java b/bundles/io.github.linkedfactory.core/src/test/java/io/github/linkedfactory/core/rdf4j/KvinModelSetTest.java
similarity index 90%
rename from bundles/io.github.linkedfactory.core/src/test/java/io/github/linkedfactory/core/rdf4j/Rdf4jModelSetTest.java
rename to bundles/io.github.linkedfactory.core/src/test/java/io/github/linkedfactory/core/rdf4j/KvinModelSetTest.java
index 39cd03e2..8e6908e0 100644
--- a/bundles/io.github.linkedfactory.core/src/test/java/io/github/linkedfactory/core/rdf4j/Rdf4jModelSetTest.java
+++ b/bundles/io.github.linkedfactory.core/src/test/java/io/github/linkedfactory/core/rdf4j/KvinModelSetTest.java
@@ -8,7 +8,7 @@
import org.junit.Assert;
import org.junit.Test;
-public class Rdf4jModelSetTest {
+public class KvinModelSetTest {
@Test
public void testBasicConfig() {
// create configuration and a model set factory
@@ -16,7 +16,7 @@ public void testBasicConfig() {
IModelSetFactory factory = Guice.createInjector(new ModelSetModule(module)).getInstance(IModelSetFactory.class);
IGraph config = new LinkedHashGraph();
- ModelUtil.readData(getClass().getResourceAsStream("/rdf4j-modelset-config.ttl"), null,
+ ModelUtil.readData(getClass().getResourceAsStream("/kvin-modelset-config.ttl"), null,
"text/turtle", new IDataVisitor