-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2064 from aehrc/release/7.1.0
v7.1.0
- Loading branch information
Showing
24 changed files
with
257 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
fhir-server/src/main/java/au/csiro/pathling/update/ImportFormat.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
* Copyright 2025 Commonwealth Scientific and Industrial Research | ||
* Organisation (CSIRO) ABN 41 687 119 230. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package au.csiro.pathling.update; | ||
|
||
import lombok.Getter; | ||
|
||
/** | ||
* Represents the supported formats for resource import. | ||
*/ | ||
@Getter | ||
public enum ImportFormat { | ||
/** | ||
* Newline-delimited JSON (NDJSON) format. | ||
*/ | ||
NDJSON("ndjson"), | ||
/** | ||
* Parquet format. | ||
*/ | ||
PARQUET("parquet"), | ||
/** | ||
* Delta Lake format. | ||
*/ | ||
DELTA("delta"); | ||
|
||
private final String code; | ||
|
||
ImportFormat(final String code) { | ||
this.code = code; | ||
} | ||
|
||
/** | ||
* Resolve an ImportFormat enum from its string code. | ||
* | ||
* @param code The string code to resolve. | ||
* @return An ImportFormat if a match is found. | ||
* @throws IllegalArgumentException if no match can be found. | ||
*/ | ||
public static ImportFormat fromCode(final String code) { | ||
for (final ImportFormat format : ImportFormat.values()) { | ||
if (format.getCode().equalsIgnoreCase(code)) { | ||
return format; | ||
} | ||
} | ||
throw new IllegalArgumentException("Unsupported format: " + code); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.