From c5c553f817d166d2ee5b68bec04d6c3794135de7 Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Sun, 6 Apr 2025 13:43:58 +0200 Subject: [PATCH] refactor: move CustomMediaType into types.kt (#105) --- .../dev/dnpm/etl/processor/extensions.kt | 35 ------------------- .../kotlin/dev/dnpm/etl/processor/types.kt | 18 ++++++++-- 2 files changed, 16 insertions(+), 37 deletions(-) delete mode 100644 src/main/kotlin/dev/dnpm/etl/processor/extensions.kt diff --git a/src/main/kotlin/dev/dnpm/etl/processor/extensions.kt b/src/main/kotlin/dev/dnpm/etl/processor/extensions.kt deleted file mode 100644 index 060ecb2..0000000 --- a/src/main/kotlin/dev/dnpm/etl/processor/extensions.kt +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This file is part of ETL-Processor - * - * Copyright (c) 2025 Comprehensive Cancer Center Mainfranken, Datenintegrationszentrum Philipps-Universität Marburg and Contributors - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -package dev.dnpm.etl.processor - -import org.springframework.http.MediaType - -/** - * Custom MediaTypes - * - * @since 0.11.0 - */ -object CustomMediaType { - val APPLICATION_VND_DNPM_V2_MTB_JSON = MediaType("application", "vnd.dnpm.v2.mtb+json") - const val APPLICATION_VND_DNPM_V2_MTB_JSON_VALUE = "application/vnd.dnpm.v2.mtb+json" - - val APPLICATION_VND_DNPM_V2_RD_JSON = MediaType("application", "vnd.dnpm.v2.rd+json") - const val APPLICATION_VND_DNPM_V2_RD_JSON_VALUE = "application/vnd.dnpm.v2.rd+json" -} diff --git a/src/main/kotlin/dev/dnpm/etl/processor/types.kt b/src/main/kotlin/dev/dnpm/etl/processor/types.kt index b2f13ef..90fa7cb 100644 --- a/src/main/kotlin/dev/dnpm/etl/processor/types.kt +++ b/src/main/kotlin/dev/dnpm/etl/processor/types.kt @@ -1,7 +1,7 @@ /* * This file is part of ETL-Processor * - * Copyright (c) 2024 Comprehensive Cancer Center Mainfranken, Datenintegrationszentrum Philipps-Universität Marburg and Contributors + * Copyright (c) 2025 Comprehensive Cancer Center Mainfranken, Datenintegrationszentrum Philipps-Universität Marburg and Contributors * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published @@ -19,6 +19,7 @@ package dev.dnpm.etl.processor +import org.springframework.http.MediaType import java.util.* class Fingerprint(val value: String) { @@ -46,4 +47,17 @@ value class PatientId(val value: String) @JvmInline value class PatientPseudonym(val value: String) -fun emptyPatientPseudonym() = PatientPseudonym("") \ No newline at end of file +fun emptyPatientPseudonym() = PatientPseudonym("") + +/** + * Custom MediaTypes + * + * @since 0.11.0 + */ +object CustomMediaType { + val APPLICATION_VND_DNPM_V2_MTB_JSON = MediaType("application", "vnd.dnpm.v2.mtb+json") + const val APPLICATION_VND_DNPM_V2_MTB_JSON_VALUE = "application/vnd.dnpm.v2.mtb+json" + + val APPLICATION_VND_DNPM_V2_RD_JSON = MediaType("application", "vnd.dnpm.v2.rd+json") + const val APPLICATION_VND_DNPM_V2_RD_JSON_VALUE = "application/vnd.dnpm.v2.rd+json" +}