From 5654ee51e83606fe175947d0a6f7b1eb958a9cae Mon Sep 17 00:00:00 2001
From: Nick Molcanov <32801560+nck-mlcnv@users.noreply.github.com>
Date: Wed, 24 Apr 2024 10:35:49 +0200
Subject: [PATCH] Remove spring
---
pom.xml | 27 -------------------
.../iguana/cc/lang/LanguageProcessor.java | 12 +--------
2 files changed, 1 insertion(+), 38 deletions(-)
diff --git a/pom.xml b/pom.xml
index 80ea769b9..2faef6e26 100644
--- a/pom.xml
+++ b/pom.xml
@@ -58,11 +58,6 @@
-
- org.apache.jena
- jena-iri
- ${jena.version}
-
org.apache.jena
jena-arq
@@ -78,11 +73,6 @@
jena-querybuilder
${jena.version}
-
- org.apache.httpcomponents
- httpclient
- 4.5.13
-
ch.qos.logback
logback-classic
@@ -140,30 +130,13 @@
2.35.0
test
-
- org.apache.maven.plugins
- maven-surefire-plugin
- 3.1.2
-
-
- org.springframework.data
- spring-data-commons
- 3.1.2
-
-
- org.springframework
- spring-context
- 6.0.11
-
org.apache.httpcomponents.client5
httpclient5
5.3
-
-
diff --git a/src/main/java/org/aksw/iguana/cc/lang/LanguageProcessor.java b/src/main/java/org/aksw/iguana/cc/lang/LanguageProcessor.java
index bd902dd82..df6716569 100644
--- a/src/main/java/org/aksw/iguana/cc/lang/LanguageProcessor.java
+++ b/src/main/java/org/aksw/iguana/cc/lang/LanguageProcessor.java
@@ -3,7 +3,6 @@
import org.aksw.iguana.cc.storage.Storable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.data.util.AnnotatedTypeScanner;
import java.io.InputStream;
import java.lang.annotation.ElementType;
@@ -41,16 +40,7 @@ public interface LanguageProcessingData extends Storable {
final private static Logger LOGGER = LoggerFactory.getLogger(LanguageProcessor.class);
static {
- final var scanner = new AnnotatedTypeScanner(false, ContentType.class);
- final var langProcessors = scanner.findTypes("org.aksw.iguana.cc.lang");
- for (Class> langProcessor : langProcessors) {
- String contentType = langProcessor.getAnnotation(ContentType.class).value();
- if (LanguageProcessor.class.isAssignableFrom(langProcessor)) {
- processors.put(contentType, (Class extends LanguageProcessor>) langProcessor);
- } else {
- LOGGER.error("Found a class with the ContentType annotation, that doesn't inherit from the class LanguageProcessor: {}", langProcessor.getName());
- }
- }
+ processors.put("application/sparql-results+json", org.aksw.iguana.cc.lang.impl.SaxSparqlJsonResultCountingParser.class);
}
public static LanguageProcessor getInstance(String contentType) {