Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
memoriav
Memobase 2020
services
Elasticsearch Services
Search Doc Service
Commits
0111e4c8
Commit
0111e4c8
authored
Nov 10, 2020
by
Jonas Waeber
Browse files
Fix date container builder.
parent
329971b5
Pipeline
#16848
passed with stages
in 5 minutes and 55 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/main/kotlin/builders/DateContainerBuilder.kt
View file @
0111e4c8
...
...
@@ -35,12 +35,12 @@ class DateContainerBuilder(private val containedIds: List<String>) : IFieldBuild
}
val
qualifier
=
when
(
val
value
=
jsonObject
[
"dateQualifier"
])
{
is
String
->
listOf
(
value
)
is
JsonArray
<
*
>
->
value
.
mapNotNull
{
value
as
String
?
}
is
JsonArray
<
*
>
->
value
.
mapNotNull
{
it
as
String
?
}
else
->
emptyList
()
}
val
certainty
=
when
(
val
value
=
jsonObject
[
"certainty"
])
{
is
String
->
listOf
(
value
)
is
JsonArray
<
*
>
->
value
.
mapNotNull
{
value
as
String
?
}
is
JsonArray
<
*
>
->
value
.
mapNotNull
{
it
as
String
?
}
else
->
emptyList
()
}
val
facetList
=
when
(
jsonObject
[
"@type"
]
as
String
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment