-
Notifications
You must be signed in to change notification settings - Fork 4
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 #703 from overture-stack/rc/4.4.0
Release Candidate 4.4.0
- Loading branch information
Showing
51 changed files
with
1,191 additions
and
189 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
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
21 changes: 21 additions & 0 deletions
21
song-core/src/main/java/bio/overture/song/core/model/AnalysisStateChange.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,21 @@ | ||
package bio.overture.song.core.model; | ||
|
||
import java.time.LocalDateTime; | ||
import lombok.*; | ||
|
||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@ToString(callSuper = true) | ||
@EqualsAndHashCode(callSuper = true) | ||
public class AnalysisStateChange extends DynamicData implements Comparable<AnalysisStateChange> { | ||
private String initialState; | ||
private String updatedState; | ||
private LocalDateTime updatedAt; | ||
|
||
@Override | ||
public int compareTo(AnalysisStateChange o) { | ||
return this.getUpdatedAt().compareTo(o.getUpdatedAt()); | ||
} | ||
} |
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
43 changes: 43 additions & 0 deletions
43
song-core/src/main/java/bio/overture/song/core/model/enums/AnalysisActions.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,43 @@ | ||
package bio.overture.song.core.model.enums; | ||
|
||
import static java.lang.String.format; | ||
import static java.util.Arrays.stream; | ||
import static java.util.stream.Collectors.toUnmodifiableSet; | ||
|
||
import bio.overture.song.core.utils.Streams; | ||
import java.util.Collection; | ||
import java.util.Set; | ||
import lombok.NonNull; | ||
|
||
public enum AnalysisActions { | ||
PUBLISH, | ||
UNPUBLISH, | ||
SUPPRESS, | ||
CREATE; | ||
|
||
private static final Set<String> SET = | ||
Streams.stream(values()).map(AnalysisActions::toString).collect(toUnmodifiableSet()); | ||
|
||
public String toString() { | ||
return this.name(); | ||
} | ||
|
||
public static AnalysisActions resolveAnalysisActions(@NonNull String analysisAction) { | ||
return Streams.stream(values()) | ||
.filter(x -> x.toString().equals(analysisAction)) | ||
.findFirst() | ||
.orElseThrow( | ||
() -> | ||
new IllegalStateException( | ||
format("The analysis action '%s' cannot be resolved", analysisAction))); | ||
} | ||
|
||
public static String[] toStringArray() { | ||
return stream(values()).map(Enum::name).toArray(String[]::new); | ||
} | ||
|
||
public static Set<String> findIncorrectAnalysisActions( | ||
@NonNull Collection<String> analysisActions) { | ||
return analysisActions.stream().filter(x -> !SET.contains(x)).collect(toUnmodifiableSet()); | ||
} | ||
} |
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
Oops, something went wrong.