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

Add some docu

parent 3c0a7eb5
Pipeline #14019 passed with stages
in 5 minutes and 20 seconds
......@@ -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) -> {
......
......@@ -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")
......
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