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
bc25572e
Commit
bc25572e
authored
Sep 09, 2020
by
Jonas Waeber
Browse files
Add some docu
parent
3c0a7eb5
Pipeline
#14019
passed with stages
in 5 minutes and 20 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/main/kotlin/helpers/FacetBuildHelpers.kt
View file @
bc25572e
...
...
@@ -21,6 +21,9 @@ package org.memobase.helpers
import
com.beust.klaxon.JsonObject
import
org.memobase.KEYS
/**
* Helper functions to build hierarchical facet values for places and persons.
*/
object
FacetBuildHelpers
{
private
const
val
separator
=
"~"
...
...
@@ -29,6 +32,11 @@ object FacetBuildHelpers {
private
const
val
level2
=
"1"
private
val
isAlphaChar
=
Regex
(
"[A-Za-z]"
)
/**
* Create the filter and facet value for a person.
*
* @return Pair of Filter? and Facets
*/
fun
person
(
jsonObject
:
JsonObject
):
Pair
<
String
?
,
List
<
String
>>
{
val
name
=
when
{
jsonObject
.
containsKey
(
KEYS
.
lastName
)
->
{
...
...
src/main/kotlin/helpers/Meta.kt
View file @
bc25572e
...
...
@@ -7,6 +7,9 @@ import org.memobase.model.FacettedContainer
import
org.memobase.model.LanguageContainer
import
org.memobase.rdf.NS
/**
Extraction helpers for institutions and record sets.
*/
object
Meta
{
private
val
log
=
LogManager
.
getLogger
(
"InstitutionExtraction"
)
...
...
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