In order to mitigate against the brute force attacks against Gitlab accounts, we are moving to all edu-ID Logins. We would like to remind you to link your account with your edu-id. Login will be possible only by edu-ID after November 30, 2021. Here you can find the instructions for linking your account.

If you don't have a SWITCH edu-ID, you can create one with this guide here

kind regards

Commit c2b40a35 authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Code style changes

parent e50042a0
......@@ -31,13 +31,13 @@ import org.memobase.builders.PersonFacetBuilder
import org.memobase.builders.PlaceFacetBuilder
import org.memobase.builders.SuggestContainerBuilder
import org.memobase.helpers.AspectRatio
import org.memobase.helpers.Constants
import org.memobase.helpers.ElasticSearchWrapper
import org.memobase.helpers.Extract
import org.memobase.helpers.FacetBuildHelpers
import org.memobase.helpers.Filter
import org.memobase.helpers.InstitutionAndRecordSetExtractionHelper.extractInstitution
import org.memobase.helpers.InstitutionAndRecordSetExtractionHelper.extractRecordSet
import org.memobase.helpers.Constants
import org.memobase.helpers.JsonUtility
import org.memobase.helpers.TranslationMappers
import org.memobase.model.DocumentsSearchDoc
......@@ -57,9 +57,11 @@ class DocumentsSearchDocBuilder(
val record = input[JsonUtility.recordTag] ?: throw InvalidInputException("No record defined in the message.")
val digitalObject =
input.values.firstOrNull { it[Constants.atType] == RICO.Instantiation.uri && it[RICO.type.localName] == RICO.Types.Instantiation.digitalObject }
input.values.firstOrNull { it[Constants.atType] == RICO.Instantiation.uri
&& it[RICO.type.localName] == RICO.Types.Instantiation.digitalObject }
val physicalObject =
input.values.firstOrNull { it[Constants.atType] == RICO.Instantiation.uri && it[RICO.type.localName] == RICO.Types.Instantiation.physicalObject }
input.values.firstOrNull { it[Constants.atType] == RICO.Instantiation.uri
&& it[RICO.type.localName] == RICO.Types.Instantiation.physicalObject }
val keywordIds = Extract.identifiers(record[Constants.hasSubject])
val genreIds = Extract.identifiers(record[Constants.hasGenre])
......@@ -75,7 +77,8 @@ class DocumentsSearchDocBuilder(
val subjectPersonBuilder = AgentContainerBuilder(keywordIds, Constants.Person, null, input)
val publisherPersonBuilder = AgentContainerBuilder(publishedByIds, Constants.Person, null, input)
val producersPersonBuilder = AgentContainerBuilder(producerIds, Constants.Person, null, input)
val contributorPersonBuilder = AgentContainerBuilder(emptyList(), Constants.Person, Constants.contributor, input)
val contributorPersonBuilder =
AgentContainerBuilder(emptyList(), Constants.Person, Constants.contributor, input)
val creatorPersonBuilder = AgentContainerBuilder(emptyList(), Constants.Person, Constants.creator, input)
val subjectCorporateBodyBuilder = AgentContainerBuilder(keywordIds, Constants.CorporateBody, null, input)
......@@ -83,7 +86,8 @@ class DocumentsSearchDocBuilder(
val producersCorporateBodyBuilder = AgentContainerBuilder(producerIds, Constants.CorporateBody, null, input)
val contributorCorporateBodyBuilder =
AgentContainerBuilder(emptyList(), Constants.CorporateBody, Constants.contributor, input)
val creatorCorporateBodyBuilder = AgentContainerBuilder(emptyList(), Constants.CorporateBody, Constants.creator, input)
val creatorCorporateBodyBuilder =
AgentContainerBuilder(emptyList(), Constants.CorporateBody, Constants.creator, input)
val subjectAgentBuilder = AgentContainerBuilder(keywordIds, Constants.Agent, null, input)
val publisherAgentBuilder = AgentContainerBuilder(publishedByIds, Constants.Agent, null, input)
......@@ -91,7 +95,8 @@ class DocumentsSearchDocBuilder(
val contributorAgentBuilder = AgentContainerBuilder(emptyList(), Constants.Agent, Constants.contributor, input)
val creatorAgentBuilder = AgentContainerBuilder(emptyList(), Constants.Agent, Constants.creator, input)
val placesRelatedBuilder = FacettedContainerBuilder(spatialIds, Constants.Place, Constants.name, FacetBuildHelpers::place)
val placesRelatedBuilder =
FacettedContainerBuilder(spatialIds, Constants.Place, Constants.name, FacetBuildHelpers::place)
val placeCapturedBuilder =
FacettedContainerBuilder(placeOfCaptureIds, Constants.Place, Constants.name, FacetBuildHelpers::place)
......
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