-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
61 additions
and
51 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
40 changes: 40 additions & 0 deletions
40
src/main/java/eu/dissco/orchestration/backend/domain/SourceDataStandard.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,40 @@ | ||
package eu.dissco.orchestration.backend.domain; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.extern.slf4j.Slf4j; | ||
|
||
@Slf4j | ||
public enum SourceDataStandard { | ||
@JsonProperty("dwc") DWC("dwc"), | ||
@JsonProperty("abcd") ABCD("abcd"), | ||
@JsonProperty("abcdefg") ABCDEFG("abcdefg"); | ||
|
||
final String standard; | ||
|
||
SourceDataStandard(String s){ | ||
standard = s; | ||
} | ||
@Override | ||
public String toString(){ | ||
return standard; | ||
} | ||
|
||
public static SourceDataStandard fromString(String standard){ | ||
switch (standard) { | ||
case "dwc" -> { | ||
return DWC; | ||
} | ||
case "abcd" -> { | ||
return ABCD; | ||
} | ||
case "abcdefg" -> { | ||
return ABCDEFG; | ||
} | ||
default -> { | ||
log.error("Invalid source data standard: {}", standard); | ||
throw new IllegalStateException(); | ||
} | ||
} | ||
|
||
} | ||
} |
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
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