Commit 597af8e4 authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Add institution teaser color

parent e19f1cea
Pipeline #21983 failed with stages
in 4 minutes and 34 seconds
...@@ -34,7 +34,7 @@ ext { ...@@ -34,7 +34,7 @@ ext {
dependencies { dependencies {
compile group: 'org.elasticsearch.client', name: 'elasticsearch-rest-high-level-client', version: '7.6.1' compile group: 'org.elasticsearch.client', name: 'elasticsearch-rest-high-level-client', version: '7.6.1'
implementation 'org.memobase:memobase-service-utilities:2.0.13' implementation 'org.memobase:memobase-service-utilities:2.0.14'
implementation 'org.apache.jena:apache-jena:3.14.0' implementation 'org.apache.jena:apache-jena:3.14.0'
// Logging Framework // Logging Framework
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
package org.memobase package org.memobase
import ch.memobase.rdf.MB
import ch.memobase.rdf.NS import ch.memobase.rdf.NS
import com.beust.klaxon.JsonArray import com.beust.klaxon.JsonArray
import com.beust.klaxon.JsonObject import com.beust.klaxon.JsonObject
...@@ -113,16 +114,16 @@ class InstitutionSearchDocBuilder( ...@@ -113,16 +114,16 @@ class InstitutionSearchDocBuilder(
numberOfDocuments = recordSetIds numberOfDocuments = recordSetIds
.map { value -> elasticSearchWrapper.countNumberOfDocuments(value) } .map { value -> elasticSearchWrapper.countNumberOfDocuments(value) }
.sum(), .sum(),
teaserColor = institution[KEYS.teaserColor].let { teaserColor = institution[MB.institutionTeaserColor.localName].let {
if (it == null) { if (it == null) {
log.error("No teaser colour found for institution $id.") log.warn("No teaser colour found for institution $id.")
"" ""
} else } else
it as String it as String
}, },
teaserColorComputed = institution[KEYS.teaserColorComputed].let { teaserColorComputed = institution[MB.institutionComputedTeaserColor.localName].let {
if (it == null) { if (it == null) {
log.error("No computed teaser colour found for institution $id.") log.warn("No computed teaser colour found for institution $id.")
"" ""
} else } else
it as String it as String
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment