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
30282701
Commit
30282701
authored
Nov 20, 2020
by
Jonas Waeber
Browse files
[WIP] Enriched Facet Containers
parent
c020242d
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/kotlin/DocumentsSearchDocBuilder.kt
View file @
30282701
...
...
@@ -199,10 +199,14 @@ class DocumentsSearchDocBuilder(private val mediaUrl: String) {
placeFacet
=
placeFacetBuilder
.
build
(),
rightsHolder
=
Extract
.
typedEntityByType
(
recordRules
,
"type"
,
"holder"
,
"name"
),
memoriavClaim
=
record
[
"P60451"
]
!=
null
,
languageCaption
=
Extract
.
typedEntityByType
(
recordLanguages
,
"type"
,
"caption"
,
"name"
),
languageContent
=
Extract
.
typedEntityByType
(
recordLanguages
,
"type"
,
"content"
,
"name"
),
format
=
format
,
language
=
Extract
.
facetEntity
(
recordLanguages
,
"name"
),
genre
=
Extract
.
facetEntity
(
genre
,
"prefLabel"
),
keywords
=
Extract
.
facetEntity
(
subjects
,
"prefLabel"
),
personSubject
=
subjectPersonBuilder
.
build
(),
...
...
@@ -258,7 +262,6 @@ class DocumentsSearchDocBuilder(private val mediaUrl: String) {
usagePhysical
=
Extract
.
typedEntityByType
(
physicalRules
,
"type"
,
"usage"
,
"sameAs"
).
flatMap
{
it
.
toList
()
},
callNumber
=
Extract
.
typedEntityByType
(
physicalIdentifiers
,
"type"
,
"callNumber"
,
"identifier"
)
.
flatMap
{
it
.
toList
()
},
format
=
format
,
published
=
(
record
[
KEYS
.
isPublished
]
as
Boolean
?)
?:
false
,
suggest
=
suggestContainerBuilder
.
build
()[
0
]
)
...
...
src/main/kotlin/helpers/CarrierType.kt
View file @
30282701
...
...
@@ -35,3 +35,9 @@ object CarrierType {
}
}
}
object
EnrichedFacetContainers
{
}
\ No newline at end of file
src/main/kotlin/model/EnrichedFacetContainer.kt
0 → 100644
View file @
30282701
package
org.memobase.model
import
com.fasterxml.jackson.annotation.JsonInclude
@JsonInclude
(
JsonInclude
.
Include
.
NON_EMPTY
)
data class
EnrichedFacetContainer
(
val
displayLabel
:
LanguageContainer
,
val
facetLabel
:
LanguageContainer
,
val
type
:
String
?
)
\ No newline at end of file
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