1 package de.dlr.shepard.context.semantic;
2
3 import io.quarkus.logging.Log;
4 import jakarta.enterprise.context.RequestScoped;
5
6 @RequestScoped
7 public class SemanticRepositoryConnectorFactory {
8
9 public ISemanticRepositoryConnector getRepositoryService(SemanticRepositoryType type, String endpoint) {
10 return switch (type) {
11 case SPARQL -> new SparqlConnector(endpoint);
12 default -> {
13 Log.errorf("Missing implementation of type: %s", type);
14 throw new UnsupportedOperationException("Repository Type " + type + "is not yet implemented");
15 }
16 };
17 }
18 }