Skip to content
Snippets Groups Projects
Commit 8323b909 authored by Jonas Waeber's avatar Jonas Waeber
Browse files

fix label adder

skip step if no entry was created.
parent 61bd3803
No related branches found
Tags 2.0.1
No related merge requests found
Pipeline #60173 passed
......@@ -70,7 +70,10 @@ class Enricher(properties: Properties, private val log: Logger) {
else -> log.error("Unknown action $action for merger.")
}
if (entry.value.labels) {
val id = result["@id"] as String? ?: result["id"] as String
val id = result[entry.key] as String?
if (id == null) {
continue@actionLoop
}
val provider = providers.getProvider(id)
when (provider.providerSlug) {
"GND" -> {
......
......@@ -26,6 +26,14 @@ import java.nio.file.Path
class Tests {
private val log = LogManager.getLogger("EnricherService")
private val properties = KafkaProperties(log).appProperties
private val enricher = Enricher(properties, log)
private val parser = JsonParser(log)
private val viaf = ElasticIndex(properties.getProperty("elastic.search.viaf"), properties, log)
private val gnd = ElasticIndex(properties.getProperty("elastic.search.gnd"), properties, log)
private val wikidata = ElasticIndex(properties.getProperty("elastic.search.wikidata"), properties, log)
private val dbpedia = ElasticIndex(properties.getProperty("elastic.search.dbpedia"), properties, log)
private val path = "/home/jonas/projects/java/kafka-streams-enricher/src/test/resources"
private fun loadData(fileName: String): String {
......@@ -42,6 +50,4 @@ class Tests {
val mergeConfiguration = MergeConfiguration(log)
Assert.assertEquals("", mergeConfiguration.dataModel)
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment