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

Rename StringFieldMapper to SimpleFieldMapper

parent 86668495
......@@ -36,7 +36,7 @@ import org.memobase.mapping.mappers.ListFieldMapper
import org.memobase.mapping.mappers.PlaceFieldMapper
import org.memobase.mapping.mappers.RuleFieldMapper
import org.memobase.mapping.mappers.SkosConceptFieldMapper
import org.memobase.mapping.mappers.StringFieldMapper
import org.memobase.mapping.mappers.SimpleFieldMapper
import org.memobase.mapping.mappers.TitleFieldMapper
import org.memobase.mapping.mappers.TypeFieldMapper
import org.memobase.rdf.SKOS
......@@ -214,7 +214,7 @@ class MappingConfig(directory: String) {
@Suppress("UNCHECKED_CAST")
private fun buildSimpleMappers(value: Any?): IFieldMapper {
return when (val field = parseField(value as Map.Entry<String, Any>)) {
is SimpleField -> StringFieldMapper(field)
is SimpleField -> SimpleFieldMapper(field)
is ConstField -> ConstantFieldMapper(field)
is ListField -> ListFieldMapper(field)
is LanguageField -> LanguageFieldMapper(field)
......
......@@ -21,7 +21,7 @@ package org.memobase.mapping.mappers
import org.memobase.builder.IResource
import org.memobase.mapping.fields.SimpleField
class StringFieldMapper(private val simpleField: SimpleField) : IFieldMapper {
class SimpleFieldMapper(private val simpleField: SimpleField) : IFieldMapper {
override fun apply(source: Map<String, String>, subject: IResource) {
source[simpleField.field].let {
if (it != null) {
......
Supports Markdown
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