From 6b5d054d96621e386c6e6f2c7084bcd8cfa392ea Mon Sep 17 00:00:00 2001 From: bischoffz Date: Sat, 16 Mar 2024 23:18:28 -0400 Subject: [PATCH] add vrsions to simstate and expparamdata --- .../ms/gcm/nucleus/ExperimentParameterData.java | 16 ++++++++++++++++ .../hhs/aspr/ms/gcm/nucleus/SimulationState.java | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/simulation/src/main/java/gov/hhs/aspr/ms/gcm/nucleus/ExperimentParameterData.java b/simulation/src/main/java/gov/hhs/aspr/ms/gcm/nucleus/ExperimentParameterData.java index 10e5af37f..cfc64c57a 100644 --- a/simulation/src/main/java/gov/hhs/aspr/ms/gcm/nucleus/ExperimentParameterData.java +++ b/simulation/src/main/java/gov/hhs/aspr/ms/gcm/nucleus/ExperimentParameterData.java @@ -271,6 +271,22 @@ public Set getExplicitScenarioIds() { return new LinkedHashSet<>(data.explicitScenarioIds); } + /** + * Returns the current version of this Simulation Plugin, which is equal to the + * version of the GCM Simulation + */ + public String getVersion() { + return StandardVersioning.VERSION; + } + + /** + * Given a version string, returns whether the version is a supported version or + * not. + */ + public static boolean checkVersionSupported(String version) { + return StandardVersioning.checkVersionSupported(version); + } + @Override public int hashCode() { return Objects.hash(data); diff --git a/simulation/src/main/java/gov/hhs/aspr/ms/gcm/nucleus/SimulationState.java b/simulation/src/main/java/gov/hhs/aspr/ms/gcm/nucleus/SimulationState.java index c29669391..c79af241d 100644 --- a/simulation/src/main/java/gov/hhs/aspr/ms/gcm/nucleus/SimulationState.java +++ b/simulation/src/main/java/gov/hhs/aspr/ms/gcm/nucleus/SimulationState.java @@ -130,6 +130,22 @@ public LocalDate getBaseDate() { return data.baseDate; } + /** + * Returns the current version of this Simulation Plugin, which is equal to the + * version of the GCM Simulation + */ + public String getVersion() { + return StandardVersioning.VERSION; + } + + /** + * Given a version string, returns whether the version is a supported version or + * not. + */ + public static boolean checkVersionSupported(String version) { + return StandardVersioning.checkVersionSupported(version); + } + @Override public int hashCode() { final int prime = 31;