diff --git a/.github/workflows/create_release_on_tag.yml b/.github/workflows/create_release_on_tag.yml index 42de27e..a9e726d 100644 --- a/.github/workflows/create_release_on_tag.yml +++ b/.github/workflows/create_release_on_tag.yml @@ -43,12 +43,12 @@ jobs: java-version: '17' distribution: 'temurin' cache: maven - - name: Build Taskit + - name: Build Util run: mvn clean install -DskipTests --file util/pom.xml - - name: Build Taskit - run: mvn clean install -DskipTests --file taskit/pom.xml - name: Build GCM run: mvn clean install -DskipTests --file gcm/gcm/pom.xml + - name: Build Taskit + run: mvn clean install -DskipTests --file taskit/pom.xml - name: Build GCM Taskit run: mvn clean install -Prelease --file protobuf/pom.xml - name: Get Version diff --git a/.github/workflows/dev-pre-mavencentral.yml b/.github/workflows/dev-pre-mavencentral.yml index 7c3c035..390c97b 100644 --- a/.github/workflows/dev-pre-mavencentral.yml +++ b/.github/workflows/dev-pre-mavencentral.yml @@ -10,12 +10,12 @@ name: Development Build Pre Maven Central on: push: - branches: [ "dev_temp" ] + branches: [ "dev" ] paths: - '**.xml' - '**.java' pull_request: - branches: [ "dev", "main" ] + branches: [ "dev" ] jobs: build: @@ -33,7 +33,7 @@ jobs: with: repository: HHS/ASPR-ms-util path: util - - name: Checkout Util + - name: Checkout GCM uses: actions/checkout@v3 with: repository: HHS/ASPR-8 @@ -46,10 +46,10 @@ jobs: cache: maven - name: Build Util run: mvn clean install -DskipTests --file util/pom.xml - - name: Build Taskit - run: mvn clean install -DskipTests --file taskit/pom.xml - name: Build GCM run: mvn clean install -DskipTests --file gcm/gcm/pom.xml + - name: Build Taskit + run: mvn clean install -DskipTests --file taskit/pom.xml - name: Build GCM Taskit run: mvn clean install --file protobuf/pom.xml diff --git a/.github/workflows/pr_for_main.yml b/.github/workflows/pr_for_main.yml new file mode 100644 index 0000000..c981d2d --- /dev/null +++ b/.github/workflows/pr_for_main.yml @@ -0,0 +1,51 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Pull Request for Main Build + +on: + pull_request: + branches: [ "main" ] + +jobs: + main-build: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout GCM Taskit + uses: actions/checkout@v3 + - name: Checkout Taskit + uses: actions/checkout@v3 + with: + repository: HHS/ASPR-ms-taskit + path: taskit + - name: Checkout Util + uses: actions/checkout@v3 + with: + repository: HHS/ASPR-ms-util + path: util + - name: Checkout GCM + uses: actions/checkout@v3 + with: + repository: HHS/ASPR-8 + path: gcm + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + - name: Build Util + run: mvn clean install -DskipTests --file util/pom.xml + - name: Build GCM + run: mvn clean install -DskipTests --file gcm/gcm/pom.xml + - name: Build Taskit + run: mvn clean install -DskipTests --file taskit/pom.xml + - name: Build GCM Taskit + run: mvn clean install -Prelease --file protobuf/pom.xml \ No newline at end of file diff --git a/protobuf/pom.xml b/protobuf/pom.xml index 9f9e98b..03a268d 100644 --- a/protobuf/pom.xml +++ b/protobuf/pom.xml @@ -40,7 +40,7 @@ - 2.4.0 + 2.5.0 UTF-8 17 17 @@ -58,7 +58,7 @@ 3.5.0 - 2.4.0 + 3.0.0 1.12.0 4.0.0 3.21.12 diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/PlanDataTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/PlanDataTranslationSpec.java index 6bc08db..034d35b 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/PlanDataTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/PlanDataTranslationSpec.java @@ -1,8 +1,8 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.translationSpecs; +import gov.hhs.aspr.ms.gcm.nucleus.PlanData; import gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.input.PlanDataInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.nucleus.PlanData; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/PlanQueueDataTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/PlanQueueDataTranslationSpec.java index a0d9830..22336e4 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/PlanQueueDataTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/PlanQueueDataTranslationSpec.java @@ -10,8 +10,7 @@ /** * TranslationSpec that defines how to convert between - * {@linkplain PlanQueueDataInput} and - * {@linkplain PlanQueueData} + * {@linkplain PlanQueueDataInput} and {@linkplain PlanQueueData} */ public class PlanQueueDataTranslationSpec extends ProtobufTranslationSpec { @@ -43,8 +42,7 @@ protected PlanQueueData convertInputObject(PlanQueueDataInput inputObject) { protected PlanQueueDataInput convertAppObject(PlanQueueData appObject) { PlanQueueDataInput.Builder builder = PlanQueueDataInput.newBuilder(); - builder - .setActive(appObject.isActive()) + builder.setActive(appObject.isActive()) .setArrivalId(appObject.getArrivalId()) .setPlannerId(appObject.getPlannerId()) .setTime(appObject.getTime()); diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/PlannerTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/PlannerTranslationSpec.java index 280e38e..0a5b0c6 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/PlannerTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/PlannerTranslationSpec.java @@ -1,8 +1,8 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.translationSpecs; +import gov.hhs.aspr.ms.gcm.nucleus.Planner; import gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.input.PlannerInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.nucleus.Planner; /** * TranslationSpec that defines how to convert between {@linkplain PlannerInput} diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/SimulationStateTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/SimulationStateTranslationSpec.java index d765e8c..e4d0a3e 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/SimulationStateTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/SimulationStateTranslationSpec.java @@ -12,8 +12,7 @@ /** * TranslationSpec that defines how to convert between - * {@linkplain SimulationStateInput} and - * {@linkplain SimulationState} + * {@linkplain SimulationStateInput} and {@linkplain SimulationState} */ public class SimulationStateTranslationSpec extends ProtobufTranslationSpec { diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/GlobalPropertiesPluginDataTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/GlobalPropertiesPluginDataTranslationSpec.java index fe73356..c42fe37 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/GlobalPropertiesPluginDataTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/GlobalPropertiesPluginDataTranslationSpec.java @@ -2,14 +2,14 @@ import com.google.protobuf.Any; +import gov.hhs.aspr.ms.gcm.plugins.globalproperties.datamanagers.GlobalPropertiesPluginData; +import gov.hhs.aspr.ms.gcm.plugins.globalproperties.support.GlobalPropertyId; +import gov.hhs.aspr.ms.gcm.plugins.util.properties.PropertyDefinition; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.globalproperties.data.input.GlobalPropertiesPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.support.input.PropertyDefinitionInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.support.input.PropertyDefinitionMapInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.support.input.PropertyValueMapInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.globalproperties.datamanagers.GlobalPropertiesPluginData; -import gov.hhs.aspr.ms.gcm.plugins.globalproperties.support.GlobalPropertyId; -import gov.hhs.aspr.ms.gcm.plugins.util.properties.PropertyDefinition; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/GlobalPropertyDimensionTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/GlobalPropertyDimensionTranslationSpec.java index 62ac347..36088f6 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/GlobalPropertyDimensionTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/GlobalPropertyDimensionTranslationSpec.java @@ -2,11 +2,11 @@ import com.google.protobuf.Any; +import gov.hhs.aspr.ms.gcm.plugins.globalproperties.support.GlobalPropertyDimension; +import gov.hhs.aspr.ms.gcm.plugins.globalproperties.support.GlobalPropertyId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.globalproperties.support.input.GlobalPropertyDimensionInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.globalproperties.support.input.GlobalPropertyIdInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.globalproperties.support.GlobalPropertyDimension; -import gov.hhs.aspr.ms.gcm.plugins.globalproperties.support.GlobalPropertyId; public class GlobalPropertyDimensionTranslationSpec extends ProtobufTranslationSpec { diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/GlobalPropertyIdTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/GlobalPropertyIdTranslationSpec.java index 7ffe1e1..12d2f1b 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/GlobalPropertyIdTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/GlobalPropertyIdTranslationSpec.java @@ -1,8 +1,8 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.globalproperties.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.globalproperties.support.GlobalPropertyId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.globalproperties.support.input.GlobalPropertyIdInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.globalproperties.support.GlobalPropertyId; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/GlobalPropertyReportPluginDataTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/GlobalPropertyReportPluginDataTranslationSpec.java index e2a72b9..10ad99a 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/GlobalPropertyReportPluginDataTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/GlobalPropertyReportPluginDataTranslationSpec.java @@ -1,12 +1,12 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.globalproperties.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.globalproperties.reports.GlobalPropertyReportPluginData; +import gov.hhs.aspr.ms.gcm.plugins.globalproperties.support.GlobalPropertyId; +import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.globalproperties.reports.input.GlobalPropertyReportPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.globalproperties.support.input.GlobalPropertyIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.support.input.ReportLabelInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.globalproperties.reports.GlobalPropertyReportPluginData; -import gov.hhs.aspr.ms.gcm.plugins.globalproperties.support.GlobalPropertyId; -import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/TestGlobalPropertyIdTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/TestGlobalPropertyIdTranslationSpec.java index d9960ae..acaeb27 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/TestGlobalPropertyIdTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/TestGlobalPropertyIdTranslationSpec.java @@ -1,8 +1,8 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.globalproperties.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.globalproperties.testsupport.TestGlobalPropertyId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.globalproperties.testsupport.input.TestGlobalPropertyIdInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.globalproperties.testsupport.TestGlobalPropertyId; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupIdTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupIdTranslationSpec.java index 383d9d3..faa1048 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupIdTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupIdTranslationSpec.java @@ -1,8 +1,8 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupIdInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupId; /** * TranslationSpec that defines how to convert between {@linkplain GroupIdInput} diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupMemberFilterTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupMemberFilterTranslationSpec.java index e802350..13ed7d3 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupMemberFilterTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupMemberFilterTranslationSpec.java @@ -1,9 +1,9 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupMemberFilter; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupMemberFilterInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupMemberFilter; public class GroupMemberFilterTranslationSpec extends ProtobufTranslationSpec { diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupPropertyDimensionTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupPropertyDimensionTranslationSpec.java index 773abd7..9f645cb 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupPropertyDimensionTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupPropertyDimensionTranslationSpec.java @@ -2,13 +2,13 @@ import com.google.protobuf.Any; +import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupId; +import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupPropertyDimension; +import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupPropertyId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupPropertyDimensionInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupPropertyIdInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupId; -import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupPropertyDimension; -import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupPropertyId; public class GroupPropertyDimensionTranslationSpec extends ProtobufTranslationSpec { diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupPropertyIdTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupPropertyIdTranslationSpec.java index 2292e66..e74c525 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupPropertyIdTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupPropertyIdTranslationSpec.java @@ -6,8 +6,7 @@ /** * TranslationSpec that defines how to convert between - * {@linkplain GroupPropertyIdInput} and - * {@linkplain GroupPropertyId} + * {@linkplain GroupPropertyIdInput} and {@linkplain GroupPropertyId} */ public class GroupPropertyIdTranslationSpec extends ProtobufTranslationSpec { @@ -18,8 +17,7 @@ protected GroupPropertyId convertInputObject(GroupPropertyIdInput inputObject) { @Override protected GroupPropertyIdInput convertAppObject(GroupPropertyId appObject) { - return GroupPropertyIdInput.newBuilder() - .setId(this.translationEngine.getAnyFromObject(appObject)).build(); + return GroupPropertyIdInput.newBuilder().setId(this.translationEngine.getAnyFromObject(appObject)).build(); } @Override diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupPropertyReportPluginDataTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupPropertyReportPluginDataTranslationSpec.java index fed8d26..c91858b 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupPropertyReportPluginDataTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupPropertyReportPluginDataTranslationSpec.java @@ -1,15 +1,15 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.groups.reports.GroupPropertyReportPluginData; +import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupPropertyId; +import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupTypeId; +import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.reports.input.GroupPropertyReportPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.reports.input.GroupPropertyReportPropertyMap; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupPropertyIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupTypeIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.support.input.ReportLabelInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.groups.reports.GroupPropertyReportPluginData; -import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupPropertyId; -import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupTypeId; -import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupTypeIdTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupTypeIdTranslationSpec.java index 0d32aec..3b6aab4 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupTypeIdTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupTypeIdTranslationSpec.java @@ -1,8 +1,8 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupTypeId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupTypeIdInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupTypeId; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupsForPersonAndGroupTypeFilterTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupsForPersonAndGroupTypeFilterTranslationSpec.java index 0f3f38f..7ca1a2f 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupsForPersonAndGroupTypeFilterTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupsForPersonAndGroupTypeFilterTranslationSpec.java @@ -1,12 +1,12 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupTypeId; +import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupsForPersonAndGroupTypeFilter; +import gov.hhs.aspr.ms.gcm.plugins.partitions.support.Equality; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupTypeIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupsForPersonAndGroupTypeFilterInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.support.input.EqualityInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupTypeId; -import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupsForPersonAndGroupTypeFilter; -import gov.hhs.aspr.ms.gcm.plugins.partitions.support.Equality; public class GroupsForPersonAndGroupTypeFilterTranslationSpec extends ProtobufTranslationSpec { diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupsPluginDataTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupsPluginDataTranslationSpec.java index fa8dea3..d8d8d77 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupsPluginDataTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/GroupsPluginDataTranslationSpec.java @@ -3,25 +3,25 @@ import java.util.List; import java.util.Set; +import gov.hhs.aspr.ms.gcm.plugins.groups.datamanagers.GroupsPluginData; +import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupId; +import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupPropertyId; +import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupPropertyValue; +import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupTypeId; +import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonId; +import gov.hhs.aspr.ms.gcm.plugins.util.properties.PropertyDefinition; +import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.data.input.GroupsPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupPropertyDefinitionMapInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupPropertyValueMapInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupToPersonMembershipInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupTypeIdInput; -import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.data.input.GroupsPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.PersonToGroupMembershipInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.support.input.PropertyDefinitionInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.support.input.PropertyDefinitionMapInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.support.input.PropertyValueMapInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.groups.datamanagers.GroupsPluginData; -import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupId; -import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupPropertyId; -import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupPropertyValue; -import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupTypeId; -import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonId; -import gov.hhs.aspr.ms.gcm.plugins.util.properties.PropertyDefinition; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/TestGroupPropertyIdTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/TestGroupPropertyIdTranslationSpec.java index 3200baa..1f9966c 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/TestGroupPropertyIdTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/TestGroupPropertyIdTranslationSpec.java @@ -1,8 +1,8 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.groups.testsupport.TestGroupPropertyId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.testsupport.input.TestGroupPropertyIdInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.groups.testsupport.TestGroupPropertyId; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/TestGroupTypeIdTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/TestGroupTypeIdTranslationSpec.java index 8467763..3210f1b 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/TestGroupTypeIdTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/TestGroupTypeIdTranslationSpec.java @@ -1,8 +1,8 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.groups.testsupport.TestGroupTypeId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.testsupport.input.TestGroupTypeIdInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.groups.testsupport.TestGroupTypeId; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/MaterialsTranslator.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/MaterialsTranslator.java index 8c3ebc0..0c1c001 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/MaterialsTranslator.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/MaterialsTranslator.java @@ -1,9 +1,5 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials; -import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.taskit.core.TranslationSpec; -import gov.hhs.aspr.ms.taskit.core.Translator; - import java.util.ArrayList; import java.util.List; @@ -28,6 +24,9 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslatorId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslatorId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.ResourcesTranslatorId; +import gov.hhs.aspr.ms.taskit.core.TranslationSpec; +import gov.hhs.aspr.ms.taskit.core.Translator; +import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; /** * Translator for the Materials Plugin. diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/BatchPropertyIdTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/BatchPropertyIdTranslationSpec.java index 76a3642..4585fb1 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/BatchPropertyIdTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/BatchPropertyIdTranslationSpec.java @@ -1,8 +1,8 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.materials.support.BatchPropertyId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.support.input.BatchPropertyIdInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.materials.support.BatchPropertyId; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/MaterialIdTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/MaterialIdTranslationSpec.java index d6937e0..140d307 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/MaterialIdTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/MaterialIdTranslationSpec.java @@ -1,8 +1,8 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.materials.support.MaterialId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.support.input.MaterialIdInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.materials.support.MaterialId; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/MaterialsPluginDataTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/MaterialsPluginDataTranslationSpec.java index 5e215a8..c11633f 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/MaterialsPluginDataTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/MaterialsPluginDataTranslationSpec.java @@ -3,12 +3,21 @@ import java.util.Map; import java.util.Set; +import gov.hhs.aspr.ms.gcm.plugins.materials.datamangers.MaterialsPluginData; +import gov.hhs.aspr.ms.gcm.plugins.materials.support.BatchId; +import gov.hhs.aspr.ms.gcm.plugins.materials.support.BatchPropertyId; +import gov.hhs.aspr.ms.gcm.plugins.materials.support.MaterialId; +import gov.hhs.aspr.ms.gcm.plugins.materials.support.MaterialsProducerId; +import gov.hhs.aspr.ms.gcm.plugins.materials.support.MaterialsProducerPropertyId; +import gov.hhs.aspr.ms.gcm.plugins.materials.support.StageId; +import gov.hhs.aspr.ms.gcm.plugins.resources.support.ResourceId; +import gov.hhs.aspr.ms.gcm.plugins.util.properties.PropertyDefinition; +import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.data.input.MaterialsPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.support.input.BatchIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.support.input.BatchInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.support.input.BatchPropertyDefinitionMapInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.support.input.BatchPropertyValueInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.support.input.MaterialIdInput; -import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.data.input.MaterialsPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.support.input.MaterialsProducerIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.support.input.MaterialsProducerInventoryBatchesInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.support.input.MaterialsProducerPropertyValueMapInput; @@ -22,15 +31,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.support.input.PropertyValueMapInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.support.input.ResourceInitializationInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.materials.datamangers.MaterialsPluginData; -import gov.hhs.aspr.ms.gcm.plugins.materials.support.BatchId; -import gov.hhs.aspr.ms.gcm.plugins.materials.support.BatchPropertyId; -import gov.hhs.aspr.ms.gcm.plugins.materials.support.MaterialId; -import gov.hhs.aspr.ms.gcm.plugins.materials.support.MaterialsProducerId; -import gov.hhs.aspr.ms.gcm.plugins.materials.support.MaterialsProducerPropertyId; -import gov.hhs.aspr.ms.gcm.plugins.materials.support.StageId; -import gov.hhs.aspr.ms.gcm.plugins.resources.support.ResourceId; -import gov.hhs.aspr.ms.gcm.plugins.util.properties.PropertyDefinition; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/MaterialsProducerIdTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/MaterialsProducerIdTranslationSpec.java index efe7ffb..d175282 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/MaterialsProducerIdTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/MaterialsProducerIdTranslationSpec.java @@ -6,8 +6,7 @@ /** * TranslationSpec that defines how to convert between - * {@linkplain MaterialsProducerIdInput} and - * {@linkplain MaterialsProducerId} + * {@linkplain MaterialsProducerIdInput} and {@linkplain MaterialsProducerId} */ public class MaterialsProducerIdTranslationSpec extends ProtobufTranslationSpec { diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/MaterialsProducerPropertyIdTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/MaterialsProducerPropertyIdTranslationSpec.java index bd49149..01a4661 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/MaterialsProducerPropertyIdTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/MaterialsProducerPropertyIdTranslationSpec.java @@ -1,8 +1,8 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.materials.support.MaterialsProducerPropertyId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.support.input.MaterialsProducerPropertyIdInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.materials.support.MaterialsProducerPropertyId; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/MaterialsProducerPropertyReportPluginDataTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/MaterialsProducerPropertyReportPluginDataTranslationSpec.java index fbb0e0f..564ff78 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/MaterialsProducerPropertyReportPluginDataTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/MaterialsProducerPropertyReportPluginDataTranslationSpec.java @@ -1,10 +1,10 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.materials.reports.MaterialsProducerPropertyReportPluginData; +import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.reports.input.MaterialsProducerPropertyReportPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.support.input.ReportLabelInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.materials.reports.MaterialsProducerPropertyReportPluginData; -import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/MaterialsProducerResourceReportPluginDataTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/MaterialsProducerResourceReportPluginDataTranslationSpec.java index 85c65ff..49820ba 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/MaterialsProducerResourceReportPluginDataTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/MaterialsProducerResourceReportPluginDataTranslationSpec.java @@ -1,10 +1,10 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.materials.reports.MaterialsProducerResourceReportPluginData; +import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.reports.input.MaterialsProducerResourceReportPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.support.input.ReportLabelInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.materials.reports.MaterialsProducerResourceReportPluginData; -import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/StageIdTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/StageIdTranslationSpec.java index 5988dbb..eae3d14 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/StageIdTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/StageIdTranslationSpec.java @@ -1,8 +1,8 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.materials.support.StageId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.support.input.StageIdInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.materials.support.StageId; /** * TranslationSpec that defines how to convert between {@linkplain StageIdInput} diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/TestMaterialIdTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/TestMaterialIdTranslationSpec.java index 8b13ad6..6b764d4 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/TestMaterialIdTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/TestMaterialIdTranslationSpec.java @@ -6,11 +6,9 @@ /** * TranslationSpec that defines how to convert between - * {@linkplain TestMaterialIdInput} and - * {@linkplain TestMaterialId} + * {@linkplain TestMaterialIdInput} and {@linkplain TestMaterialId} */ -public class TestMaterialIdTranslationSpec - extends ProtobufTranslationSpec { +public class TestMaterialIdTranslationSpec extends ProtobufTranslationSpec { @Override protected TestMaterialId convertInputObject(TestMaterialIdInput inputObject) { diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/TestMaterialsProducerIdTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/TestMaterialsProducerIdTranslationSpec.java index f11743d..39d65ea 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/TestMaterialsProducerIdTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/TestMaterialsProducerIdTranslationSpec.java @@ -1,8 +1,8 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.materials.testsupport.TestMaterialsProducerId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.testsupport.input.TestMaterialsProducerIdInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.materials.testsupport.TestMaterialsProducerId; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AndFilterTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AndFilterTranslationSpec.java index 517adca..5d79a62 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AndFilterTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AndFilterTranslationSpec.java @@ -1,10 +1,10 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.partitions.support.filters.AndFilter; +import gov.hhs.aspr.ms.gcm.plugins.partitions.support.filters.Filter; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.support.filters.input.AndFilterInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.support.filters.input.FilterInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.partitions.support.filters.AndFilter; -import gov.hhs.aspr.ms.gcm.plugins.partitions.support.filters.Filter; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AttributeIdTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AttributeIdTranslationSpec.java index b0e54ce..c04ff4e 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AttributeIdTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AttributeIdTranslationSpec.java @@ -1,8 +1,8 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.partitions.testsupport.attributes.support.AttributeId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.support.attributes.input.AttributeIdInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.partitions.testsupport.attributes.support.AttributeId; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/EqualityTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/EqualityTranslationSpec.java index a84e6db..56ea8c4 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/EqualityTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/EqualityTranslationSpec.java @@ -1,8 +1,8 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.partitions.support.Equality; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.support.input.EqualityInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.partitions.support.Equality; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/FalseFilterTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/FalseFilterTranslationSpec.java index c40c6e0..18076ac 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/FalseFilterTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/FalseFilterTranslationSpec.java @@ -1,8 +1,8 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.partitions.support.filters.FalseFilter; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.support.filters.input.FalseFilterInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.partitions.support.filters.FalseFilter; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/FilterTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/FilterTranslationSpec.java index 3291d76..4a2b412 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/FilterTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/FilterTranslationSpec.java @@ -1,8 +1,8 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.partitions.support.filters.Filter; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.support.filters.input.FilterInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.partitions.support.filters.Filter; /** * TranslationSpec that defines how to convert between {@linkplain FilterInput} diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/LabelerTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/LabelerTranslationSpec.java index fc425c3..3058e6b 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/LabelerTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/LabelerTranslationSpec.java @@ -1,8 +1,8 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.partitions.support.Labeler; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.support.input.LabelerInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.partitions.support.Labeler; /** * TranslationSpec that defines how to convert between {@linkplain LabelerInput} diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/NotFilterTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/NotFilterTranslationSpec.java index d873e48..4dbed79 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/NotFilterTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/NotFilterTranslationSpec.java @@ -1,10 +1,10 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.partitions.support.filters.Filter; +import gov.hhs.aspr.ms.gcm.plugins.partitions.support.filters.NotFilter; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.support.filters.input.FilterInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.support.filters.input.NotFilterInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.partitions.support.filters.Filter; -import gov.hhs.aspr.ms.gcm.plugins.partitions.support.filters.NotFilter; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/OrFilterTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/OrFilterTranslationSpec.java index 7e7250e..dc18fcf 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/OrFilterTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/OrFilterTranslationSpec.java @@ -1,10 +1,10 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.partitions.support.filters.Filter; +import gov.hhs.aspr.ms.gcm.plugins.partitions.support.filters.OrFilter; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.support.filters.input.FilterInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.support.filters.input.OrFilterInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.partitions.support.filters.Filter; -import gov.hhs.aspr.ms.gcm.plugins.partitions.support.filters.OrFilter; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/PartitionTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/PartitionTranslationSpec.java index 7c8e374..5629b8d 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/PartitionTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/PartitionTranslationSpec.java @@ -1,12 +1,12 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.partitions.support.Labeler; +import gov.hhs.aspr.ms.gcm.plugins.partitions.support.Partition; +import gov.hhs.aspr.ms.gcm.plugins.partitions.support.filters.Filter; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.support.filters.input.FilterInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.support.input.LabelerInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.support.input.PartitionInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.partitions.support.Labeler; -import gov.hhs.aspr.ms.gcm.plugins.partitions.support.Partition; -import gov.hhs.aspr.ms.gcm.plugins.partitions.support.filters.Filter; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/PartitionsPluginDataTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/PartitionsPluginDataTranslationSpec.java index fa1c4ac..e004178 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/PartitionsPluginDataTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/PartitionsPluginDataTranslationSpec.java @@ -1,8 +1,8 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.partitions.datamanagers.PartitionsPluginData; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.data.input.PartitionsPluginDataInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.partitions.datamanagers.PartitionsPluginData; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/TestAttributeIdTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/TestAttributeIdTranslationSpec.java index 47acdb2..958e39c 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/TestAttributeIdTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/TestAttributeIdTranslationSpec.java @@ -6,8 +6,7 @@ /** * TranslationSpec that defines how to convert between - * {@linkplain TestAttributeIdInput} and - * {@linkplain TestAttributeId} + * {@linkplain TestAttributeIdInput} and {@linkplain TestAttributeId} */ public class TestAttributeIdTranslationSpec extends ProtobufTranslationSpec { diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/TrueFilterTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/TrueFilterTranslationSpec.java index 67194f0..78164d3 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/TrueFilterTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/TrueFilterTranslationSpec.java @@ -1,8 +1,8 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.partitions.support.filters.TrueFilter; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.support.filters.input.TrueFilterInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.partitions.support.filters.TrueFilter; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/people/translationSpecs/PeoplePluginDataTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/people/translationSpecs/PeoplePluginDataTranslationSpec.java index 93a52b2..129cc0e 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/people/translationSpecs/PeoplePluginDataTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/people/translationSpecs/PeoplePluginDataTranslationSpec.java @@ -1,10 +1,10 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.people.datamanagers.PeoplePluginData; +import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonRange; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.data.input.PeoplePluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.support.input.PersonRangeInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.people.datamanagers.PeoplePluginData; -import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonRange; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/people/translationSpecs/PersonIdTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/people/translationSpecs/PersonIdTranslationSpec.java index 56da0f5..3475c8a 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/people/translationSpecs/PersonIdTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/people/translationSpecs/PersonIdTranslationSpec.java @@ -1,8 +1,8 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.support.input.PersonIdInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonId; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/people/translationSpecs/PersonRangeTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/people/translationSpecs/PersonRangeTranslationSpec.java index 50d2c14..d825cc5 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/people/translationSpecs/PersonRangeTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/people/translationSpecs/PersonRangeTranslationSpec.java @@ -1,8 +1,8 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonRange; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.support.input.PersonRangeInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonRange; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/PersonPropertiesTranslator.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/PersonPropertiesTranslator.java index 49eea8c..630c3d3 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/PersonPropertiesTranslator.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/PersonPropertiesTranslator.java @@ -1,9 +1,5 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.personproperties; -import gov.hhs.aspr.ms.taskit.core.TranslationSpec; -import gov.hhs.aspr.ms.taskit.core.Translator; -import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; - import java.util.ArrayList; import java.util.List; @@ -18,6 +14,9 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.personproperties.translationSpecs.TestPersonPropertyIdTranslationSpec; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslatorId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslatorId; +import gov.hhs.aspr.ms.taskit.core.TranslationSpec; +import gov.hhs.aspr.ms.taskit.core.Translator; +import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; /** * Translator for the PersonProperties Plugin. diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/PersonPropertiesPluginDataTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/PersonPropertiesPluginDataTranslationSpec.java index 114c5ee..c99d8a6 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/PersonPropertiesPluginDataTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/PersonPropertiesPluginDataTranslationSpec.java @@ -1,9 +1,15 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.personproperties.translationSpecs; -import java.util.ArrayList; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import com.google.protobuf.Any; + +import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonId; +import gov.hhs.aspr.ms.gcm.plugins.personproperties.datamanagers.PersonPropertiesPluginData; +import gov.hhs.aspr.ms.gcm.plugins.personproperties.support.PersonPropertyId; +import gov.hhs.aspr.ms.gcm.plugins.util.properties.PropertyDefinition; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.personproperties.data.input.PersonPropertiesPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.personproperties.support.input.PersonPropertyIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.personproperties.support.input.PersonPropertyTimeInput; @@ -13,10 +19,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.support.input.PropertyDefinitionInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.support.input.PropertyDefinitionMapInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonId; -import gov.hhs.aspr.ms.gcm.plugins.personproperties.datamanagers.PersonPropertiesPluginData; -import gov.hhs.aspr.ms.gcm.plugins.personproperties.support.PersonPropertyId; -import gov.hhs.aspr.ms.gcm.plugins.util.properties.PropertyDefinition; /** * TranslationSpec that defines how to convert between @@ -30,9 +32,14 @@ public class PersonPropertiesPluginDataTranslationSpec protected PersonPropertiesPluginData convertInputObject(PersonPropertiesPluginDataInput inputObject) { PersonPropertiesPluginData.Builder builder = PersonPropertiesPluginData.builder(); - for (PropertyDefinitionMapInput propertyDefinitionMapInput : inputObject.getPersonPropertyDefinitionsList()) { + Map personPropIdMap = new LinkedHashMap<>(); + + for (PropertyDefinitionMapInput propertyDefinitionMapInput : inputObject + .getPersonPropertyDefinitionsList()) { PersonPropertyId propertyId = this.translationEngine .getObjectFromAny(propertyDefinitionMapInput.getPropertyId()); + personPropIdMap.put(propertyDefinitionMapInput.getPropertyId(), propertyId); + PropertyDefinition propertyDefinition = this.translationEngine .convertObject(propertyDefinitionMapInput.getPropertyDefinition()); @@ -41,27 +48,32 @@ protected PersonPropertiesPluginData convertInputObject(PersonPropertiesPluginDa propertyDefinitionMapInput.getPropertyTrackingPolicy()); } - for (PersonPropertyValueMapInput personPropertyValueMapInput : inputObject.getPersonPropertyValuesList()) { - PersonPropertyId propertyId = this.translationEngine - .convertObject(personPropertyValueMapInput.getPersonPropertyId()); + for (PersonPropertyValueMapInput personPropertyValueMapInput : inputObject + .getPersonPropertyValuesList()) { + PersonPropertyId propertyId = personPropIdMap + .get(personPropertyValueMapInput.getPersonPropertyId().getId()); for (PersonPropertyValueInput personPropertyValueInput : personPropertyValueMapInput .getPropertyValuesList()) { - PersonId personId = new PersonId(personPropertyValueInput.getPId()); - Object value = this.translationEngine.getObjectFromAny(personPropertyValueInput.getValue()); - builder.setPersonPropertyValue(personId, propertyId, value); + for (int pId : personPropertyValueInput.getPIdList()) { + builder.setPersonPropertyValue(new PersonId(pId), propertyId, + this.translationEngine.getObjectFromAny(personPropertyValueInput.getValue())); + } } } for (PersonPropertyTimeMapInput personPropertyTimeMapInput : inputObject.getPersonPropertyTimesList()) { - PersonPropertyId propertyId = this.translationEngine - .convertObject(personPropertyTimeMapInput.getPersonPropertyId()); + PersonPropertyId propertyId = personPropIdMap.get(personPropertyTimeMapInput.getPersonPropertyId().getId()); for (PersonPropertyTimeInput personPropertyTimeInput : personPropertyTimeMapInput.getPropertyTimesList()) { - PersonId personId = new PersonId(personPropertyTimeInput.getPId()); - - builder.setPersonPropertyTime(personId, propertyId, personPropertyTimeInput.getPropertyValueTime()); + for (int pId : personPropertyTimeInput.getPIdList()) { + builder.setPersonPropertyTime(new PersonId(pId), propertyId, + personPropertyTimeInput.getPropertyValueTime()); + } } + + personPropertyTimeMapInput = null; } + return builder.build(); } @@ -95,21 +107,23 @@ protected PersonPropertiesPluginDataInput convertAppObject(PersonPropertiesPlugi // Person Prop Values for (PersonPropertyId personPropertyId : personPropertyValues.keySet()) { - List personPropertyInputBuilders = new ArrayList<>(); + Map personPropertyInputBuildersMap = new LinkedHashMap<>(); List propertyValues = personPropertyValues.get(personPropertyId); - for (int i = 0; i < propertyValues.size(); i++) { - personPropertyInputBuilders.add(null); - } for (int i = 0; i < propertyValues.size(); i++) { if (propertyValues.get(i) != null) { - PersonPropertyValueInput.Builder personPropertyValueInputBuilder = PersonPropertyValueInput - .newBuilder() - .setPId(i) - .setValue(this.translationEngine.getAnyFromObject(propertyValues.get(i))); + PersonPropertyValueInput.Builder personPropertyValueInputBuilder = personPropertyInputBuildersMap + .get(propertyValues.get(i)); + + if (personPropertyValueInputBuilder == null) { + personPropertyValueInputBuilder = PersonPropertyValueInput.newBuilder() + .setValue(this.translationEngine.getAnyFromObject(propertyValues.get(i))); - personPropertyInputBuilders.set(i, personPropertyValueInputBuilder); + personPropertyInputBuildersMap.put(propertyValues.get(i), personPropertyValueInputBuilder); + } + + personPropertyValueInputBuilder.addPId(i); } } @@ -117,7 +131,8 @@ protected PersonPropertiesPluginDataInput convertAppObject(PersonPropertiesPlugi .setPersonPropertyId((PersonPropertyIdInput) this.translationEngine .convertObjectAsSafeClass(personPropertyId, PersonPropertyId.class)); - for (PersonPropertyValueInput.Builder personPropertyValueInputBuilder : personPropertyInputBuilders) { + for (PersonPropertyValueInput.Builder personPropertyValueInputBuilder : personPropertyInputBuildersMap + .values()) { if (personPropertyValueInputBuilder != null) { valueMapInputBuilder.addPropertyValues(personPropertyValueInputBuilder.build()); } @@ -128,21 +143,25 @@ protected PersonPropertiesPluginDataInput convertAppObject(PersonPropertiesPlugi // Person Prop Times for (PersonPropertyId personPropertyId : personPropertyTimes.keySet()) { - List personPropertyInputBuilders = new ArrayList<>(); + + Map personPropertyInputBuildersMap = new LinkedHashMap<>(); List propertyTimes = personPropertyTimes.get(personPropertyId); - for (int i = 0; i < propertyTimes.size(); i++) { - personPropertyInputBuilders.add(null); - } for (int i = 0; i < propertyTimes.size(); i++) { if (propertyTimes.get(i) != null) { - PersonPropertyTimeInput.Builder personPropertyTimeInputBuilder = PersonPropertyTimeInput - .newBuilder() - .setPId(i) - .setPropertyValueTime(propertyTimes.get(i)); + PersonPropertyTimeInput.Builder personPropertyTimeInputBuilder = personPropertyInputBuildersMap + .get(propertyTimes.get(i)); + + if (personPropertyTimeInputBuilder == null) { + personPropertyTimeInputBuilder = PersonPropertyTimeInput.newBuilder() + .setPropertyValueTime(propertyTimes.get(i)); + + personPropertyInputBuildersMap.put(propertyTimes.get(i), personPropertyTimeInputBuilder); + } + + personPropertyTimeInputBuilder.addPId(i); - personPropertyInputBuilders.set(i, personPropertyTimeInputBuilder); } } @@ -150,7 +169,8 @@ protected PersonPropertiesPluginDataInput convertAppObject(PersonPropertiesPlugi .setPersonPropertyId((PersonPropertyIdInput) this.translationEngine .convertObjectAsSafeClass(personPropertyId, PersonPropertyId.class)); - for (PersonPropertyTimeInput.Builder personPropertyTimeInputBuilder : personPropertyInputBuilders) { + for (PersonPropertyTimeInput.Builder personPropertyTimeInputBuilder : personPropertyInputBuildersMap + .values()) { if (personPropertyTimeInputBuilder != null) { timeMapInputBuilder.addPropertyTimes(personPropertyTimeInputBuilder.build()); } diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/PersonPropertyDimensionTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/PersonPropertyDimensionTranslationSpec.java index b0a0b1b..d627da9 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/PersonPropertyDimensionTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/PersonPropertyDimensionTranslationSpec.java @@ -2,11 +2,11 @@ import com.google.protobuf.Any; +import gov.hhs.aspr.ms.gcm.plugins.personproperties.support.PersonPropertyDimension; +import gov.hhs.aspr.ms.gcm.plugins.personproperties.support.PersonPropertyId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.personproperties.support.input.PersonPropertyDimensionInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.personproperties.support.input.PersonPropertyIdInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.personproperties.support.PersonPropertyDimension; -import gov.hhs.aspr.ms.gcm.plugins.personproperties.support.PersonPropertyId; public class PersonPropertyDimensionTranslationSpec extends ProtobufTranslationSpec { diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/PersonPropertyIdTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/PersonPropertyIdTranslationSpec.java index d7c8926..ccc3328 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/PersonPropertyIdTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/PersonPropertyIdTranslationSpec.java @@ -6,8 +6,7 @@ /** * TranslationSpec that defines how to convert between - * {@linkplain PersonPropertyIdInput} and - * {@linkplain PersonPropertyId} + * {@linkplain PersonPropertyIdInput} and {@linkplain PersonPropertyId} */ public class PersonPropertyIdTranslationSpec extends ProtobufTranslationSpec { @@ -18,8 +17,7 @@ protected PersonPropertyId convertInputObject(PersonPropertyIdInput inputObject) @Override protected PersonPropertyIdInput convertAppObject(PersonPropertyId appObject) { - return PersonPropertyIdInput.newBuilder().setId(this.translationEngine.getAnyFromObject(appObject)) - .build(); + return PersonPropertyIdInput.newBuilder().setId(this.translationEngine.getAnyFromObject(appObject)).build(); } @Override diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/PersonPropertyInteractionReportPluginDataTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/PersonPropertyInteractionReportPluginDataTranslationSpec.java index 0976ed4..e92283f 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/PersonPropertyInteractionReportPluginDataTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/PersonPropertyInteractionReportPluginDataTranslationSpec.java @@ -1,14 +1,14 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.personproperties.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.personproperties.reports.PersonPropertyInteractionReportPluginData; +import gov.hhs.aspr.ms.gcm.plugins.personproperties.support.PersonPropertyId; +import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; +import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportPeriod; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.personproperties.reports.input.PersonPropertyInteractionReportPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.personproperties.support.input.PersonPropertyIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.support.input.ReportLabelInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.support.input.ReportPeriodInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.personproperties.reports.PersonPropertyInteractionReportPluginData; -import gov.hhs.aspr.ms.gcm.plugins.personproperties.support.PersonPropertyId; -import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; -import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportPeriod; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/PersonPropertyReportPluginDataTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/PersonPropertyReportPluginDataTranslationSpec.java index 51a913f..22fe549 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/PersonPropertyReportPluginDataTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/PersonPropertyReportPluginDataTranslationSpec.java @@ -51,22 +51,19 @@ protected PersonPropertyReportPluginDataInput convertAppObject(PersonPropertyRep ReportLabel.class); ReportPeriodInput reportPeriodInput = this.translationEngine.convertObject(appObject.getReportPeriod()); - builder - .setDefaultInclusionPolicy(appObject.getDefaultInclusionPolicy()) + builder.setDefaultInclusionPolicy(appObject.getDefaultInclusionPolicy()) .setReportLabel(reportLabelInput) .setReportPeriod(reportPeriodInput); for (PersonPropertyId personPropertyId : appObject.getIncludedProperties()) { - PersonPropertyIdInput personPropertyIdInput = this.translationEngine.convertObjectAsSafeClass( - personPropertyId, - PersonPropertyId.class); + PersonPropertyIdInput personPropertyIdInput = this.translationEngine + .convertObjectAsSafeClass(personPropertyId, PersonPropertyId.class); builder.addIncludedProperties(personPropertyIdInput); } for (PersonPropertyId personPropertyId : appObject.getExcludedProperties()) { - PersonPropertyIdInput personPropertyIdInput = this.translationEngine.convertObjectAsSafeClass( - personPropertyId, - PersonPropertyId.class); + PersonPropertyIdInput personPropertyIdInput = this.translationEngine + .convertObjectAsSafeClass(personPropertyId, PersonPropertyId.class); builder.addExcludedProperties(personPropertyIdInput); } diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/TestPersonPropertyIdTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/TestPersonPropertyIdTranslationSpec.java index 27f6d2a..eb56162 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/TestPersonPropertyIdTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/TestPersonPropertyIdTranslationSpec.java @@ -1,8 +1,8 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.personproperties.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.personproperties.testsupport.TestPersonPropertyId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.personproperties.testsupport.input.TestPersonPropertyIdInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.personproperties.testsupport.TestPersonPropertyId; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/properties/translationSpecs/PropertyDefinitionTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/properties/translationSpecs/PropertyDefinitionTranslationSpec.java index 11f2f39..3804c4f 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/properties/translationSpecs/PropertyDefinitionTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/properties/translationSpecs/PropertyDefinitionTranslationSpec.java @@ -8,8 +8,7 @@ /** * TranslationSpec that defines how to convert between - * {@linkplain PropertyDefinitionInput} and - * {@linkplain PropertyDefinition} + * {@linkplain PropertyDefinitionInput} and {@linkplain PropertyDefinition} */ public class PropertyDefinitionTranslationSpec extends ProtobufTranslationSpec { diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/RegionsTranslator.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/RegionsTranslator.java index dfe819d..fe56c86 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/RegionsTranslator.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/RegionsTranslator.java @@ -1,9 +1,5 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions; -import gov.hhs.aspr.ms.taskit.core.TranslationSpec; -import gov.hhs.aspr.ms.taskit.core.Translator; -import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; - import java.util.ArrayList; import java.util.List; @@ -22,6 +18,9 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.translationSpecs.TestRegionIdTranslationSpec; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.translationSpecs.TestRegionPropertyIdTranslationSpec; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslatorId; +import gov.hhs.aspr.ms.taskit.core.TranslationSpec; +import gov.hhs.aspr.ms.taskit.core.Translator; +import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; /** * Translator for the Regions Plugin. diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/RegionFilterTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/RegionFilterTranslationSpec.java index 4fa1f3a..1d54cb0 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/RegionFilterTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/RegionFilterTranslationSpec.java @@ -3,11 +3,11 @@ import java.util.ArrayList; import java.util.List; +import gov.hhs.aspr.ms.gcm.plugins.regions.support.RegionFilter; +import gov.hhs.aspr.ms.gcm.plugins.regions.support.RegionId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.support.input.RegionFilterInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.support.input.RegionIdInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.regions.support.RegionFilter; -import gov.hhs.aspr.ms.gcm.plugins.regions.support.RegionId; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/RegionPropertyDimensionTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/RegionPropertyDimensionTranslationSpec.java index 9fa2a15..d740084 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/RegionPropertyDimensionTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/RegionPropertyDimensionTranslationSpec.java @@ -2,13 +2,13 @@ import com.google.protobuf.Any; +import gov.hhs.aspr.ms.gcm.plugins.regions.support.RegionId; +import gov.hhs.aspr.ms.gcm.plugins.regions.support.RegionPropertyDimension; +import gov.hhs.aspr.ms.gcm.plugins.regions.support.RegionPropertyId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.support.input.RegionIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.support.input.RegionPropertyDimensionInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.support.input.RegionPropertyIdInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.regions.support.RegionId; -import gov.hhs.aspr.ms.gcm.plugins.regions.support.RegionPropertyDimension; -import gov.hhs.aspr.ms.gcm.plugins.regions.support.RegionPropertyId; public class RegionPropertyDimensionTranslationSpec extends ProtobufTranslationSpec { diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/RegionPropertyIdTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/RegionPropertyIdTranslationSpec.java index 84d622d..8bcf937 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/RegionPropertyIdTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/RegionPropertyIdTranslationSpec.java @@ -6,8 +6,7 @@ /** * TranslationSpec that defines how to convert between - * {@linkplain RegionPropertyIdInput} and - * {@linkplain RegionPropertyId} + * {@linkplain RegionPropertyIdInput} and {@linkplain RegionPropertyId} */ public class RegionPropertyIdTranslationSpec extends ProtobufTranslationSpec { diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/RegionPropertyReportPluginDataTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/RegionPropertyReportPluginDataTranslationSpec.java index aab12a8..9fe81be 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/RegionPropertyReportPluginDataTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/RegionPropertyReportPluginDataTranslationSpec.java @@ -1,12 +1,12 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.regions.reports.RegionPropertyReportPluginData; +import gov.hhs.aspr.ms.gcm.plugins.regions.support.RegionPropertyId; +import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.reports.input.RegionPropertyReportPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.support.input.RegionPropertyIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.support.input.ReportLabelInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.regions.reports.RegionPropertyReportPluginData; -import gov.hhs.aspr.ms.gcm.plugins.regions.support.RegionPropertyId; -import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/RegionsPluginDataTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/RegionsPluginDataTranslationSpec.java index 7bffd16..0456cee 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/RegionsPluginDataTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/RegionsPluginDataTranslationSpec.java @@ -22,8 +22,7 @@ /** * TranslationSpec that defines how to convert between - * {@linkplain RegionsPluginDataInput} and - * {@linkplain RegionsPluginData} + * {@linkplain RegionsPluginDataInput} and {@linkplain RegionsPluginData} */ public class RegionsPluginDataTranslationSpec extends ProtobufTranslationSpec { @@ -97,8 +96,7 @@ protected RegionsPluginDataInput convertAppObject(RegionsPluginData appObject) { PropertyDefinitionInput propertyDefinitionInput = this.translationEngine .convertObject(appObject.getRegionPropertyDefinition(regionPropertyId)); - PropertyDefinitionMapInput propertyDefinitionMapInput = PropertyDefinitionMapInput - .newBuilder() + PropertyDefinitionMapInput propertyDefinitionMapInput = PropertyDefinitionMapInput.newBuilder() .setPropertyId(this.translationEngine.getAnyFromObject(regionPropertyId)) .setPropertyDefinition(propertyDefinitionInput) .build(); @@ -110,15 +108,13 @@ protected RegionsPluginDataInput convertAppObject(RegionsPluginData appObject) { RegionIdInput regionIdInput = this.translationEngine.convertObjectAsSafeClass(regionId, RegionId.class); for (RegionPropertyId regionPropertyId : appObject.getRegionPropertyValues(regionId).keySet()) { - PropertyValueMapInput propertyValueMapInput = PropertyValueMapInput - .newBuilder() + PropertyValueMapInput propertyValueMapInput = PropertyValueMapInput.newBuilder() .setPropertyId(this.translationEngine.getAnyFromObject(regionPropertyId)) .setPropertyValue(this.translationEngine .getAnyFromObject(appObject.getRegionPropertyValues(regionId).get(regionPropertyId))) .build(); - RegionPropertyValueMapInput regionPropertyValueMapInput = RegionPropertyValueMapInput - .newBuilder() + RegionPropertyValueMapInput regionPropertyValueMapInput = RegionPropertyValueMapInput.newBuilder() .setRegionId(regionIdInput) .addPropertyValueMap(propertyValueMapInput) .build(); @@ -145,8 +141,7 @@ protected RegionsPluginDataInput convertAppObject(RegionsPluginData appObject) { regionMembershipMap.put(regionIdInput, peopleInRegion); } - RegionPersonInfo.Builder regionPersonInfoBuilder = RegionPersonInfo.newBuilder() - .setPersonId(i); + RegionPersonInfo.Builder regionPersonInfoBuilder = RegionPersonInfo.newBuilder().setPersonId(i); if (trackRegionArrivalTimes) { // can safely assume this because the person region exists regionPersonInfoBuilder.setArrivalTime(appObject.getPersonRegionArrivalTime(personId).get()); diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/SimpleRegionIdTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/SimpleRegionIdTranslationSpec.java index 9d7df54..66ddd42 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/SimpleRegionIdTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/SimpleRegionIdTranslationSpec.java @@ -6,8 +6,7 @@ /** * TranslationSpec that defines how to convert between - * {@linkplain SimpleRegionIdInput} and - * {@linkplain SimpleRegionId} + * {@linkplain SimpleRegionIdInput} and {@linkplain SimpleRegionId} */ public class SimpleRegionIdTranslationSpec extends ProtobufTranslationSpec { @@ -18,7 +17,8 @@ protected SimpleRegionId convertInputObject(SimpleRegionIdInput inputObject) { @Override protected SimpleRegionIdInput convertAppObject(SimpleRegionId appObject) { - return SimpleRegionIdInput.newBuilder().setValue(this.translationEngine.getAnyFromObject(appObject.getValue())) + return SimpleRegionIdInput.newBuilder() + .setValue(this.translationEngine.getAnyFromObject(appObject.getValue())) .build(); } diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/TestRegionIdTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/TestRegionIdTranslationSpec.java index 5beedbe..232fe72 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/TestRegionIdTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/TestRegionIdTranslationSpec.java @@ -6,8 +6,7 @@ /** * TranslationSpec that defines how to convert between - * {@linkplain TestRegionIdInput} and - * {@linkplain TestRegionId} + * {@linkplain TestRegionIdInput} and {@linkplain TestRegionId} */ public class TestRegionIdTranslationSpec extends ProtobufTranslationSpec { diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/TestRegionPropertyIdTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/TestRegionPropertyIdTranslationSpec.java index c675f45..729b834 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/TestRegionPropertyIdTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/TestRegionPropertyIdTranslationSpec.java @@ -6,8 +6,7 @@ /** * TranslationSpec that defines how to convert between - * {@linkplain TestRegionPropertyIdInput} and - * {@linkplain TestRegionPropertyId} + * {@linkplain TestRegionPropertyIdInput} and {@linkplain TestRegionPropertyId} */ public class TestRegionPropertyIdTranslationSpec extends ProtobufTranslationSpec { diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/ReportsTranslator.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/ReportsTranslator.java index 2d6f2a1..d0ee0c8 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/ReportsTranslator.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/ReportsTranslator.java @@ -3,14 +3,14 @@ import java.util.ArrayList; import java.util.List; +import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; +import gov.hhs.aspr.ms.gcm.plugins.reports.support.SimpleReportLabel; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.translationSpecs.ReportLabelTranslationSpec; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.translationSpecs.ReportPeriodTranslationSpec; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.translationSpecs.SimpleReportLabelTranslationSpec; import gov.hhs.aspr.ms.taskit.core.TranslationSpec; import gov.hhs.aspr.ms.taskit.core.Translator; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; -import gov.hhs.aspr.ms.gcm.plugins.reports.support.SimpleReportLabel; /** * Translator for the Reports Plugin. @@ -43,7 +43,8 @@ private static Translator.Builder builder() { translationEngineBuilder.addTranslationSpec(translationSpec); } - translatorContext.addParentChildClassRelationship(SimpleReportLabel.class, ReportLabel.class); + translationEngineBuilder.addParentChildClassRelationship(SimpleReportLabel.class, + ReportLabel.class); }); return builder; diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/translationSpecs/ReportLabelTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/translationSpecs/ReportLabelTranslationSpec.java index e4ec1f4..bd0aa69 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/translationSpecs/ReportLabelTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/translationSpecs/ReportLabelTranslationSpec.java @@ -1,8 +1,8 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.support.input.ReportLabelInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/translationSpecs/ReportPeriodTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/translationSpecs/ReportPeriodTranslationSpec.java index f4f6ac1..0452bb5 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/translationSpecs/ReportPeriodTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/translationSpecs/ReportPeriodTranslationSpec.java @@ -1,8 +1,8 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportPeriod; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.support.input.ReportPeriodInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportPeriod; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/translationSpecs/SimpleReportLabelTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/translationSpecs/SimpleReportLabelTranslationSpec.java index 0009d64..4f8c226 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/translationSpecs/SimpleReportLabelTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/translationSpecs/SimpleReportLabelTranslationSpec.java @@ -6,8 +6,7 @@ /** * TranslationSpec that defines how to convert between - * {@linkplain SimpleReportLabelInput} and - * {@linkplain SimpleReportLabel} + * {@linkplain SimpleReportLabelInput} and {@linkplain SimpleReportLabel} */ public class SimpleReportLabelTranslationSpec extends ProtobufTranslationSpec { @@ -20,7 +19,8 @@ protected SimpleReportLabel convertInputObject(SimpleReportLabelInput inputObjec @Override protected SimpleReportLabelInput convertAppObject(SimpleReportLabel appObject) { return SimpleReportLabelInput.newBuilder() - .setValue(this.translationEngine.getAnyFromObject(appObject.getValue())).build(); + .setValue(this.translationEngine.getAnyFromObject(appObject.getValue())) + .build(); } @Override diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/PersonResourceReportPluginDataTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/PersonResourceReportPluginDataTranslationSpec.java index 78b4978..533ce83 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/PersonResourceReportPluginDataTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/PersonResourceReportPluginDataTranslationSpec.java @@ -1,14 +1,14 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.translationSpecs; -import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.support.input.ReportLabelInput; -import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.support.input.ReportPeriodInput; -import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.reports.input.PersonResourceReportPluginDataInput; -import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.support.input.ResourceIdInput; import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportPeriod; import gov.hhs.aspr.ms.gcm.plugins.resources.reports.PersonResourceReportPluginData; import gov.hhs.aspr.ms.gcm.plugins.resources.support.ResourceId; +import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.support.input.ReportLabelInput; +import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.support.input.ReportPeriodInput; +import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.reports.input.PersonResourceReportPluginDataInput; +import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.support.input.ResourceIdInput; +import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/ResourceFilterTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/ResourceFilterTranslationSpec.java index 10c1db1..6854f1f 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/ResourceFilterTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/ResourceFilterTranslationSpec.java @@ -1,12 +1,12 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.partitions.support.Equality; +import gov.hhs.aspr.ms.gcm.plugins.resources.support.ResourceFilter; +import gov.hhs.aspr.ms.gcm.plugins.resources.support.ResourceId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.support.input.EqualityInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.support.input.ResourceFilterInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.support.input.ResourceIdInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.partitions.support.Equality; -import gov.hhs.aspr.ms.gcm.plugins.resources.support.ResourceFilter; -import gov.hhs.aspr.ms.gcm.plugins.resources.support.ResourceId; public class ResourceFilterTranslationSpec extends ProtobufTranslationSpec { diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/ResourceIdTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/ResourceIdTranslationSpec.java index 7d2e1b3..30d7618 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/ResourceIdTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/ResourceIdTranslationSpec.java @@ -1,8 +1,8 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.resources.support.ResourceId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.support.input.ResourceIdInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.resources.support.ResourceId; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/ResourceInitializationTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/ResourceInitializationTranslationSpec.java index 9bec3eb..a74b509 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/ResourceInitializationTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/ResourceInitializationTranslationSpec.java @@ -1,9 +1,9 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.translationSpecs; -import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.support.input.ResourceInitializationInput; -import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; import gov.hhs.aspr.ms.gcm.plugins.resources.support.ResourceId; import gov.hhs.aspr.ms.gcm.plugins.resources.support.ResourceInitialization; +import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.support.input.ResourceInitializationInput; +import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/ResourcePropertyIdTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/ResourcePropertyIdTranslationSpec.java index 7fbe67d..70d434d 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/ResourcePropertyIdTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/ResourcePropertyIdTranslationSpec.java @@ -6,8 +6,7 @@ /** * TranslationSpec that defines how to convert between - * {@linkplain ResourcePropertyIdInput} and - * {@linkplain ResourcePropertyId} + * {@linkplain ResourcePropertyIdInput} and {@linkplain ResourcePropertyId} */ public class ResourcePropertyIdTranslationSpec extends ProtobufTranslationSpec { diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/ResourcePropertyReportPluginDataTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/ResourcePropertyReportPluginDataTranslationSpec.java index 8c4c159..e796065 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/ResourcePropertyReportPluginDataTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/ResourcePropertyReportPluginDataTranslationSpec.java @@ -1,10 +1,10 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; +import gov.hhs.aspr.ms.gcm.plugins.resources.reports.ResourcePropertyReportPluginData; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.support.input.ReportLabelInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.reports.input.ResourcePropertyReportPluginDataInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; -import gov.hhs.aspr.ms.gcm.plugins.resources.reports.ResourcePropertyReportPluginData; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/ResourceReportPluginDataTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/ResourceReportPluginDataTranslationSpec.java index c090f8e..1c67d98 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/ResourceReportPluginDataTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/ResourceReportPluginDataTranslationSpec.java @@ -25,7 +25,8 @@ protected ResourceReportPluginData convertInputObject(ResourceReportPluginDataIn ReportLabel reportLabel = this.translationEngine.convertObject(inputObject.getReportLabel()); ReportPeriod reportPeriod = this.translationEngine.convertObject(inputObject.getReportPeriod()); - builder.setReportLabel(reportLabel).setReportPeriod(reportPeriod) + builder.setReportLabel(reportLabel) + .setReportPeriod(reportPeriod) .setDefaultInclusion(inputObject.getDefaultInclusionPolicy()); for (ResourceIdInput resourceIdInput : inputObject.getIncludedPropertiesList()) { @@ -49,8 +50,7 @@ protected ResourceReportPluginDataInput convertAppObject(ResourceReportPluginDat ReportLabel.class); ReportPeriodInput reportPeriodInput = this.translationEngine.convertObject(appObject.getReportPeriod()); - builder - .setDefaultInclusionPolicy(appObject.getDefaultInclusionPolicy()) + builder.setDefaultInclusionPolicy(appObject.getDefaultInclusionPolicy()) .setReportPeriod(reportPeriodInput) .setReportLabel(reportLabelInput); diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/ResourcesPluginDataTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/ResourcesPluginDataTranslationSpec.java index fd1d790..90469c3 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/ResourcesPluginDataTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/ResourcesPluginDataTranslationSpec.java @@ -4,10 +4,18 @@ import java.util.List; import java.util.Map; +import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonId; +import gov.hhs.aspr.ms.gcm.plugins.regions.support.RegionId; +import gov.hhs.aspr.ms.gcm.plugins.resources.datamanagers.ResourcesPluginData; +import gov.hhs.aspr.ms.gcm.plugins.resources.support.ResourceId; +import gov.hhs.aspr.ms.gcm.plugins.resources.support.ResourceInitialization; +import gov.hhs.aspr.ms.gcm.plugins.resources.support.ResourcePropertyId; +import gov.hhs.aspr.ms.gcm.plugins.util.properties.PropertyDefinition; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.support.input.PropertyDefinitionInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.support.input.PropertyDefinitionMapInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.support.input.PropertyValueMapInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.support.input.RegionIdInput; +import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.data.input.ResourcesPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.support.input.PersonResourceLevelInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.support.input.PersonResourceLevelMapInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.support.input.PersonResourceTimeInput; @@ -18,15 +26,7 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.support.input.ResourceInitializationInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.support.input.ResourcePropertyDefinitionMapInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.support.input.ResourcePropertyValueMapInput; -import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.data.input.ResourcesPluginDataInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonId; -import gov.hhs.aspr.ms.gcm.plugins.regions.support.RegionId; -import gov.hhs.aspr.ms.gcm.plugins.resources.datamanagers.ResourcesPluginData; -import gov.hhs.aspr.ms.gcm.plugins.resources.support.ResourceId; -import gov.hhs.aspr.ms.gcm.plugins.resources.support.ResourceInitialization; -import gov.hhs.aspr.ms.gcm.plugins.resources.support.ResourcePropertyId; -import gov.hhs.aspr.ms.gcm.plugins.util.properties.PropertyDefinition; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/TestResourceIdTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/TestResourceIdTranslationSpec.java index 640b00f..1e2968c 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/TestResourceIdTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/TestResourceIdTranslationSpec.java @@ -1,8 +1,8 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.resources.testsupport.TestResourceId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.testsupport.input.TestResourceIdInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.resources.testsupport.TestResourceId; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/translationSpecs/RandomNumberGeneratorIdTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/translationSpecs/RandomNumberGeneratorIdTranslationSpec.java index 5121110..630e092 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/translationSpecs/RandomNumberGeneratorIdTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/translationSpecs/RandomNumberGeneratorIdTranslationSpec.java @@ -1,8 +1,8 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.stochastics.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.stochastics.support.RandomNumberGeneratorId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.stochastics.support.input.RandomNumberGeneratorIdInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.stochastics.support.RandomNumberGeneratorId; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/translationSpecs/StochasticsPluginDataTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/translationSpecs/StochasticsPluginDataTranslationSpec.java index 2a03f08..b56ecb9 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/translationSpecs/StochasticsPluginDataTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/translationSpecs/StochasticsPluginDataTranslationSpec.java @@ -1,13 +1,13 @@ package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.stochastics.translationSpecs; +import gov.hhs.aspr.ms.gcm.plugins.stochastics.datamanagers.StochasticsPluginData; +import gov.hhs.aspr.ms.gcm.plugins.stochastics.support.RandomNumberGeneratorId; +import gov.hhs.aspr.ms.gcm.plugins.stochastics.support.WellState; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.stochastics.data.input.StochasticsPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.stochastics.support.input.RandomNumberGeneratorIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.stochastics.support.input.RandomNumberGeneratorMapInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.stochastics.support.input.WellStateInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.stochastics.datamanagers.StochasticsPluginData; -import gov.hhs.aspr.ms.gcm.plugins.stochastics.support.RandomNumberGeneratorId; -import gov.hhs.aspr.ms.gcm.plugins.stochastics.support.WellState; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/translationSpecs/WellStateTranslationSpec.java b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/translationSpecs/WellStateTranslationSpec.java index 71ef7fe..ab5fff7 100644 --- a/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/translationSpecs/WellStateTranslationSpec.java +++ b/protobuf/src/main/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/translationSpecs/WellStateTranslationSpec.java @@ -5,9 +5,9 @@ import com.google.gson.JsonParser; import com.google.protobuf.ByteString; +import gov.hhs.aspr.ms.gcm.plugins.stochastics.support.WellState; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.stochastics.support.input.WellStateInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec; -import gov.hhs.aspr.ms.gcm.plugins.stochastics.support.WellState; /** * TranslationSpec that defines how to convert between diff --git a/protobuf/src/main/proto/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/support.proto b/protobuf/src/main/proto/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/support.proto index e2317a7..2e10212 100644 --- a/protobuf/src/main/proto/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/support.proto +++ b/protobuf/src/main/proto/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/support.proto @@ -13,7 +13,7 @@ message PersonPropertyIdInput { } message PersonPropertyValueInput { - int32 pId = 1; + repeated int32 pId = 1; optional google.protobuf.Any value = 2; } @@ -23,7 +23,7 @@ message PersonPropertyValueMapInput { } message PersonPropertyTimeInput { - int32 pId = 1; + repeated int32 pId = 1; double propertyValueTime = 2; } diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/IT_NucleusTranslator.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/IT_NucleusTranslator.java index b784ab8..378d3dc 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/IT_NucleusTranslator.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/IT_NucleusTranslator.java @@ -8,14 +8,15 @@ import org.apache.commons.math3.random.RandomGenerator; import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.nucleus.PlanQueueData; +import gov.hhs.aspr.ms.gcm.nucleus.Planner; +import gov.hhs.aspr.ms.gcm.nucleus.SimulationState; import gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.input.SimulationStateInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.testsupport.ExamplePlanData; import gov.hhs.aspr.ms.taskit.core.TranslationController; +import gov.hhs.aspr.ms.taskit.core.TranslationEngineType; import gov.hhs.aspr.ms.taskit.core.testsupport.TestResourceHelper; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.nucleus.PlanQueueData; -import gov.hhs.aspr.ms.gcm.nucleus.Planner; -import gov.hhs.aspr.ms.gcm.nucleus.SimulationState; import util.annotations.UnitTestForCoverage; import util.random.RandomGeneratorProvider; @@ -31,10 +32,11 @@ public void testSimulationStateTranslator() { TestResourceHelper.createTestOutputFile(filePath, fileName); TranslationController translatorController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) - .addTranslator(NucleusTranslator.getTranslator()) - .addInputFilePath(filePath.resolve(fileName), SimulationStateInput.class) - .addOutputFilePath(filePath.resolve(fileName), SimulationState.class) + .addTranslationEngine( + ProtobufTranslationEngine.builder().addTranslator(NucleusTranslator.getTranslator()).build()) + .addInputFilePath(filePath.resolve(fileName), SimulationStateInput.class, + TranslationEngineType.PROTOBUF) + .addOutputFilePath(filePath.resolve(fileName), SimulationState.class, TranslationEngineType.PROTOBUF) .build(); RandomGenerator randomGenerator = RandomGeneratorProvider.getRandomGenerator(6625494580697137579L); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/testsupport/translationSpecs/AT_ExampleDimensionTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/testsupport/translationSpecs/AT_ExampleDimensionTranslationSpec.java index 246a3e5..45111ee 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/testsupport/translationSpecs/AT_ExampleDimensionTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/testsupport/translationSpecs/AT_ExampleDimensionTranslationSpec.java @@ -8,7 +8,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.NucleusTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.testsupport.ExampleDimension; import gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.testsupport.input.ExampleDimensionInput; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -25,14 +24,11 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(NucleusTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - ExampleDimensionTranslationSpec translationSpec = new ExampleDimensionTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/testsupport/translationSpecs/AT_ExamplePlanDataTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/testsupport/translationSpecs/AT_ExamplePlanDataTranslationSpec.java index d59513b..52d2d2e 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/testsupport/translationSpecs/AT_ExamplePlanDataTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/testsupport/translationSpecs/AT_ExamplePlanDataTranslationSpec.java @@ -6,9 +6,8 @@ import org.junit.jupiter.api.Test; import gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.NucleusTranslator; -import gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.testsupport.input.ExamplePlanDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.testsupport.ExamplePlanData; -import gov.hhs.aspr.ms.taskit.core.TranslationController; +import gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.testsupport.input.ExamplePlanDataInput; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -25,14 +24,10 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(NucleusTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - ExamplePlanDataTranslationSpec translationSpec = new ExamplePlanDataTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/AT_DimensionTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/AT_DimensionTranslationSpec.java index 388f96e..fa35b50 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/AT_DimensionTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/AT_DimensionTranslationSpec.java @@ -5,12 +5,11 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.nucleus.Dimension; import gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.NucleusTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.input.DimensionInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.testsupport.ExampleDimension; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.nucleus.Dimension; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -26,14 +25,10 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(NucleusTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - DimensionTranslationSpec translationSpec = new DimensionTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/AT_ExperimentParameterDataTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/AT_ExperimentParameterDataTranslationSpec.java index d0fccf3..4868e47 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/AT_ExperimentParameterDataTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/AT_ExperimentParameterDataTranslationSpec.java @@ -10,7 +10,6 @@ import gov.hhs.aspr.ms.gcm.nucleus.ExperimentParameterData; import gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.NucleusTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.input.ExperimentParameterDataInput; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -27,14 +26,10 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(NucleusTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - ExperimentParameterDataTranslationSpec translationSpec = new ExperimentParameterDataTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/AT_PlanDataTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/AT_PlanDataTranslationSpec.java index ceb7533..4a65f0d 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/AT_PlanDataTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/AT_PlanDataTranslationSpec.java @@ -5,12 +5,11 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.nucleus.PlanData; import gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.NucleusTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.input.PlanDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.testsupport.ExamplePlanData; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.nucleus.PlanData; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -26,14 +25,10 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(NucleusTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - PlanDataTranslationSpec translationSpec = new PlanDataTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/AT_PlanQueueDataTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/AT_PlanQueueDataTranslationSpec.java index 6ea35f0..b9fabf6 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/AT_PlanQueueDataTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/AT_PlanQueueDataTranslationSpec.java @@ -6,13 +6,12 @@ import org.apache.commons.math3.random.RandomGenerator; import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.nucleus.PlanQueueData; +import gov.hhs.aspr.ms.gcm.nucleus.Planner; import gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.NucleusTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.input.PlanQueueDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.testsupport.ExamplePlanData; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.nucleus.PlanQueueData; -import gov.hhs.aspr.ms.gcm.nucleus.Planner; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -29,14 +28,10 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(NucleusTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - PlanQueueDataTranslationSpec translationSpec = new PlanQueueDataTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/AT_PlannerTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/AT_PlannerTranslationSpec.java index 99ab631..fd6d605 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/AT_PlannerTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/AT_PlannerTranslationSpec.java @@ -5,11 +5,10 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.nucleus.Planner; import gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.NucleusTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.input.PlannerInput; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.nucleus.Planner; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -25,14 +24,10 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(NucleusTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - PlannerTranslationSpec translationSpec = new PlannerTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/AT_SimulationStateTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/AT_SimulationStateTranslationSpec.java index 9d6c342..ea7a2a1 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/AT_SimulationStateTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/nucleus/translationSpecs/AT_SimulationStateTranslationSpec.java @@ -8,14 +8,13 @@ import org.apache.commons.math3.random.RandomGenerator; import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.nucleus.PlanQueueData; +import gov.hhs.aspr.ms.gcm.nucleus.Planner; +import gov.hhs.aspr.ms.gcm.nucleus.SimulationState; import gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.NucleusTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.input.SimulationStateInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.testsupport.ExamplePlanData; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.nucleus.PlanQueueData; -import gov.hhs.aspr.ms.gcm.nucleus.Planner; -import gov.hhs.aspr.ms.gcm.nucleus.SimulationState; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -32,14 +31,10 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(NucleusTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - SimulationStateTranslationSpec translationSpec = new SimulationStateTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/IT_GlobalPropertiesTranslator.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/IT_GlobalPropertiesTranslator.java index bc30e8f..a674bb7 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/IT_GlobalPropertiesTranslator.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/IT_GlobalPropertiesTranslator.java @@ -18,6 +18,7 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.taskit.core.TranslationController; +import gov.hhs.aspr.ms.taskit.core.TranslationEngineType; import gov.hhs.aspr.ms.taskit.core.testsupport.TestResourceHelper; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestForCoverage; @@ -34,13 +35,18 @@ public void testGlobalPropertiesPluginDataIntegration() { TestResourceHelper.createTestOutputFile(filePath, fileName); - TranslationController translatorController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(GlobalPropertiesTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) - .addInputFilePath(filePath.resolve(fileName), GlobalPropertiesPluginDataInput.class) - .addOutputFilePath(filePath.resolve(fileName), GlobalPropertiesPluginData.class) + .build(); + + TranslationController translatorController = TranslationController.builder() + .addTranslationEngine(protobufTranslationEngine) + .addInputFilePath(filePath.resolve(fileName), GlobalPropertiesPluginDataInput.class, + TranslationEngineType.PROTOBUF) + .addOutputFilePath(filePath.resolve(fileName), GlobalPropertiesPluginData.class, + TranslationEngineType.PROTOBUF) .build(); GlobalPropertiesPluginData expectedPluginData = GlobalPropertiesTestPluginFactory @@ -65,13 +71,18 @@ public void testGlobalPropertyReportPluginDataIntegration() { TestResourceHelper.createTestOutputFile(filePath, fileName); - TranslationController translatorController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(GlobalPropertiesTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) - .addInputFilePath(filePath.resolve(fileName), GlobalPropertyReportPluginDataInput.class) - .addOutputFilePath(filePath.resolve(fileName), GlobalPropertyReportPluginData.class) + .build(); + + TranslationController translatorController = TranslationController.builder() + .addTranslationEngine(protobufTranslationEngine) + .addInputFilePath(filePath.resolve(fileName), GlobalPropertyReportPluginDataInput.class, + TranslationEngineType.PROTOBUF) + .addOutputFilePath(filePath.resolve(fileName), GlobalPropertyReportPluginData.class, + TranslationEngineType.PROTOBUF) .build(); RandomGenerator randomGenerator = RandomGeneratorProvider.getRandomGenerator(524805676405822016L); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/AT_GlobalPropertiesPluginDataTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/AT_GlobalPropertiesPluginDataTranslationSpec.java index 7bc2cf5..2574e0f 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/AT_GlobalPropertiesPluginDataTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/AT_GlobalPropertiesPluginDataTranslationSpec.java @@ -11,7 +11,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.globalproperties.data.input.GlobalPropertiesPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -28,16 +27,13 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(GlobalPropertiesTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - GlobalPropertiesPluginDataTranslationSpec translationSpec = new GlobalPropertiesPluginDataTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/AT_GlobalPropertyDimensionTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/AT_GlobalPropertyDimensionTranslationSpec.java index 77df90b..b9c40f3 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/AT_GlobalPropertyDimensionTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/AT_GlobalPropertyDimensionTranslationSpec.java @@ -11,7 +11,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.globalproperties.support.input.GlobalPropertyDimensionInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -28,21 +27,22 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(GlobalPropertiesTranslator.getTranslator()) - .addTranslator(PropertiesTranslator.getTranslator()).addTranslator(ReportsTranslator.getTranslator()) + .addTranslator(PropertiesTranslator.getTranslator()) + .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - GlobalPropertyDimensionTranslationSpec translationSpec = new GlobalPropertyDimensionTranslationSpec(); translationSpec.init(protobufTranslationEngine); - GlobalPropertyDimension expectedAppValue = GlobalPropertyDimension.builder().setAssignmentTime(0) - .setGlobalPropertyId(TestGlobalPropertyId.GLOBAL_PROPERTY_3_DOUBLE_MUTABLE).addValue(10.0) - .addValue(1250.2).addValue(15000.5).build(); + GlobalPropertyDimension expectedAppValue = GlobalPropertyDimension.builder() + .setAssignmentTime(0) + .setGlobalPropertyId(TestGlobalPropertyId.GLOBAL_PROPERTY_3_DOUBLE_MUTABLE) + .addValue(10.0) + .addValue(1250.2) + .addValue(15000.5) + .build(); GlobalPropertyDimensionInput inputValue = translationSpec.convertAppObject(expectedAppValue); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/AT_GlobalPropertyIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/AT_GlobalPropertyIdTranslationSpec.java index 19617b2..c97bf06 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/AT_GlobalPropertyIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/AT_GlobalPropertyIdTranslationSpec.java @@ -5,14 +5,13 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.globalproperties.support.GlobalPropertyId; +import gov.hhs.aspr.ms.gcm.plugins.globalproperties.testsupport.TestGlobalPropertyId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.globalproperties.GlobalPropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.globalproperties.support.input.GlobalPropertyIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.globalproperties.support.GlobalPropertyId; -import gov.hhs.aspr.ms.gcm.plugins.globalproperties.testsupport.TestGlobalPropertyId; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -28,16 +27,12 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(GlobalPropertiesTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - GlobalPropertyIdTranslationSpec translationSpec = new GlobalPropertyIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/AT_GlobalPropertyReportPluginDataTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/AT_GlobalPropertyReportPluginDataTranslationSpec.java index caee8de..7f1a3f3 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/AT_GlobalPropertyReportPluginDataTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/AT_GlobalPropertyReportPluginDataTranslationSpec.java @@ -14,7 +14,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.globalproperties.reports.input.GlobalPropertyReportPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -32,16 +31,12 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(GlobalPropertiesTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - GlobalPropertyReportPluginDataTranslationSpec translationSpec = new GlobalPropertyReportPluginDataTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/AT_TestGlobalPropertyIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/AT_TestGlobalPropertyIdTranslationSpec.java index 8b0db82..6c892c7 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/AT_TestGlobalPropertyIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/globalproperties/translationSpecs/AT_TestGlobalPropertyIdTranslationSpec.java @@ -10,7 +10,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.globalproperties.testsupport.input.TestGlobalPropertyIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -27,15 +26,12 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(GlobalPropertiesTranslator.getTranslator()) - .addTranslator(PropertiesTranslator.getTranslator()).addTranslator(ReportsTranslator.getTranslator()) + .addTranslator(PropertiesTranslator.getTranslator()) + .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - TestGlobalPropertyIdTranslationSpec translationSpec = new TestGlobalPropertyIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/IT_GroupsTranslator.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/IT_GroupsTranslator.java index 4d06be8..082057b 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/IT_GroupsTranslator.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/IT_GroupsTranslator.java @@ -26,6 +26,7 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.taskit.core.TranslationController; +import gov.hhs.aspr.ms.taskit.core.TranslationEngineType; import gov.hhs.aspr.ms.taskit.core.testsupport.TestResourceHelper; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestForCoverage; @@ -42,14 +43,18 @@ public void testGroupsTranslator() { TestResourceHelper.createTestOutputFile(filePath, fileName); - TranslationController translatorController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(GroupsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) - .addInputFilePath(filePath.resolve(fileName), GroupsPluginDataInput.class) - .addOutputFilePath(filePath.resolve(fileName), GroupsPluginData.class) + .build(); + + TranslationController translatorController = TranslationController.builder() + .addTranslationEngine(protobufTranslationEngine) + .addInputFilePath(filePath.resolve(fileName), GroupsPluginDataInput.class, + TranslationEngineType.PROTOBUF) + .addOutputFilePath(filePath.resolve(fileName), GroupsPluginData.class, TranslationEngineType.PROTOBUF) .build(); long seed = 524805676405822016L; @@ -96,14 +101,19 @@ public void testGroupPropertyReportTranslatorSpec() { TestResourceHelper.createTestOutputFile(filePath, fileName); - TranslationController translatorController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(GroupsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) - .addInputFilePath(filePath.resolve(fileName), GroupPropertyReportPluginDataInput.class) - .addOutputFilePath(filePath.resolve(fileName), GroupPropertyReportPluginData.class) + .build(); + + TranslationController translatorController = TranslationController.builder() + .addTranslationEngine(protobufTranslationEngine) + .addInputFilePath(filePath.resolve(fileName), GroupPropertyReportPluginDataInput.class, + TranslationEngineType.PROTOBUF) + .addOutputFilePath(filePath.resolve(fileName), GroupPropertyReportPluginData.class, + TranslationEngineType.PROTOBUF) .build(); RandomGenerator randomGenerator = RandomGeneratorProvider.getRandomGenerator(524805676405822016L); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupIdTranslationSpec.java index 265666a..f3ff6a2 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupIdTranslationSpec.java @@ -5,14 +5,13 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.GroupsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupId; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -28,17 +27,13 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(GroupsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - GroupIdTranslationSpec translationSpec = new GroupIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupMemberFilterTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupMemberFilterTranslationSpec.java index 31d750d..deb6e8c 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupMemberFilterTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupMemberFilterTranslationSpec.java @@ -5,16 +5,15 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupId; +import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupMemberFilter; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.GroupsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupMemberFilterInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.PartitionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupId; -import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupMemberFilter; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -30,18 +29,14 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(GroupsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) - .addTranslator(PartitionsTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) + .addTranslator(PartitionsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - GroupMemberFilterTranslationSpec translationSpec = new GroupMemberFilterTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupPopulationReportPluginDataTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupPopulationReportPluginDataTranslationSpec.java index cb6a69e..f7e3af3 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupPopulationReportPluginDataTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupPopulationReportPluginDataTranslationSpec.java @@ -14,7 +14,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -31,17 +30,13 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(GroupsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - GroupPopulationReportPluginDataTranslationSpec translationSpec = new GroupPopulationReportPluginDataTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupPropertyDimensionTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupPropertyDimensionTranslationSpec.java index c021c19..2cf7a27 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupPropertyDimensionTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupPropertyDimensionTranslationSpec.java @@ -13,7 +13,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -30,21 +29,23 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) - .addTranslator(GroupsTranslator.getTranslator()).addTranslator(PropertiesTranslator.getTranslator()) - .addTranslator(PeopleTranslator.getTranslator()).addTranslator(ReportsTranslator.getTranslator()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() + .addTranslator(GroupsTranslator.getTranslator()) + .addTranslator(PropertiesTranslator.getTranslator()) + .addTranslator(PeopleTranslator.getTranslator()) + .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - GroupPropertyDimensionTranslationSpec translationSpec = new GroupPropertyDimensionTranslationSpec(); translationSpec.init(protobufTranslationEngine); - GroupPropertyDimension expectedAppValue = GroupPropertyDimension.builder().setGroupId(new GroupId(0)) - .setGroupPropertyId(TestGroupPropertyId.GROUP_PROPERTY_1_3_DOUBLE_MUTABLE_NO_TRACK).addValue(10.0) - .addValue(1250.2).addValue(15000.5).build(); + GroupPropertyDimension expectedAppValue = GroupPropertyDimension.builder() + .setGroupId(new GroupId(0)) + .setGroupPropertyId(TestGroupPropertyId.GROUP_PROPERTY_1_3_DOUBLE_MUTABLE_NO_TRACK) + .addValue(10.0) + .addValue(1250.2) + .addValue(15000.5) + .build(); GroupPropertyDimensionInput inputValue = translationSpec.convertAppObject(expectedAppValue); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupPropertyIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupPropertyIdTranslationSpec.java index 5d0acd4..64d5d60 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupPropertyIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupPropertyIdTranslationSpec.java @@ -12,7 +12,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -29,15 +28,13 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) - .addTranslator(GroupsTranslator.getTranslator()).addTranslator(PropertiesTranslator.getTranslator()) - .addTranslator(PeopleTranslator.getTranslator()).addTranslator(ReportsTranslator.getTranslator()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() + .addTranslator(GroupsTranslator.getTranslator()) + .addTranslator(PropertiesTranslator.getTranslator()) + .addTranslator(PeopleTranslator.getTranslator()) + .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - GroupPropertyIdTranslationSpec translationSpec = new GroupPropertyIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupPropertyReportPluginDataTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupPropertyReportPluginDataTranslationSpec.java index 3459147..c26c362 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupPropertyReportPluginDataTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupPropertyReportPluginDataTranslationSpec.java @@ -17,7 +17,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -35,17 +34,13 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(GroupsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - GroupPropertyReportPluginDataTranslationSpec translationSpec = new GroupPropertyReportPluginDataTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupTypeIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupTypeIdTranslationSpec.java index aae4355..55ae3f7 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupTypeIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupTypeIdTranslationSpec.java @@ -5,15 +5,14 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupTypeId; +import gov.hhs.aspr.ms.gcm.plugins.groups.testsupport.TestGroupTypeId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.GroupsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupTypeIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupTypeId; -import gov.hhs.aspr.ms.gcm.plugins.groups.testsupport.TestGroupTypeId; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -29,17 +28,13 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(GroupsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - GroupTypeIdTranslationSpec translationSpec = new GroupTypeIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupTypesForPersonFilterTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupTypesForPersonFilterTranslationSpec.java index 51b5fb1..93f8347 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupTypesForPersonFilterTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupTypesForPersonFilterTranslationSpec.java @@ -5,16 +5,15 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupTypesForPersonFilter; +import gov.hhs.aspr.ms.gcm.plugins.partitions.support.Equality; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.GroupsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupTypesForPersonFilterInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.PartitionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupTypesForPersonFilter; -import gov.hhs.aspr.ms.gcm.plugins.partitions.support.Equality; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -30,18 +29,14 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(GroupsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) - .addTranslator(PartitionsTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) + .addTranslator(PartitionsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - GroupTypesForPersonFilterTranslationSpec translationSpec = new GroupTypesForPersonFilterTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupsForPersonAndGroupTypeFilterTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupsForPersonAndGroupTypeFilterTranslationSpec.java index 9ae1b05..643978b 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupsForPersonAndGroupTypeFilterTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupsForPersonAndGroupTypeFilterTranslationSpec.java @@ -14,7 +14,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -31,14 +30,13 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) - .addTranslator(GroupsTranslator.getTranslator()).addTranslator(PropertiesTranslator.getTranslator()) - .addTranslator(PeopleTranslator.getTranslator()).addTranslator(PartitionsTranslator.getTranslator()) - .addTranslator(ReportsTranslator.getTranslator()).build(); - - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() + .addTranslator(GroupsTranslator.getTranslator()) + .addTranslator(PropertiesTranslator.getTranslator()) + .addTranslator(PeopleTranslator.getTranslator()) + .addTranslator(ReportsTranslator.getTranslator()) + .addTranslator(PartitionsTranslator.getTranslator()) + .build(); GroupsForPersonAndGroupTypeFilterTranslationSpec translationSpec = new GroupsForPersonAndGroupTypeFilterTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupsForPersonFilterTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupsForPersonFilterTranslationSpec.java index d26ba92..8179a17 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupsForPersonFilterTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupsForPersonFilterTranslationSpec.java @@ -13,7 +13,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -30,14 +29,13 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) - .addTranslator(GroupsTranslator.getTranslator()).addTranslator(PropertiesTranslator.getTranslator()) - .addTranslator(PeopleTranslator.getTranslator()).addTranslator(PartitionsTranslator.getTranslator()) - .addTranslator(ReportsTranslator.getTranslator()).build(); - - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() + .addTranslator(GroupsTranslator.getTranslator()) + .addTranslator(PropertiesTranslator.getTranslator()) + .addTranslator(PeopleTranslator.getTranslator()) + .addTranslator(ReportsTranslator.getTranslator()) + .addTranslator(PartitionsTranslator.getTranslator()) + .build(); GroupsForPersonFilterTranslationSpec translationSpec = new GroupsForPersonFilterTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupsPluginDataTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupsPluginDataTranslationSpec.java index f20eaf7..3accde5 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupsPluginDataTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_GroupsPluginDataTranslationSpec.java @@ -8,18 +8,17 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.groups.datamanagers.GroupsPluginData; +import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupId; +import gov.hhs.aspr.ms.gcm.plugins.groups.testsupport.GroupsTestPluginFactory; +import gov.hhs.aspr.ms.gcm.plugins.groups.testsupport.TestGroupTypeId; +import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.GroupsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.data.input.GroupsPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.groups.datamanagers.GroupsPluginData; -import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupId; -import gov.hhs.aspr.ms.gcm.plugins.groups.testsupport.GroupsTestPluginFactory; -import gov.hhs.aspr.ms.gcm.plugins.groups.testsupport.TestGroupTypeId; -import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonId; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -35,17 +34,13 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(GroupsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - GroupsPluginDataTranslationSpec translationSpec = new GroupsPluginDataTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_TestGroupPropertyIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_TestGroupPropertyIdTranslationSpec.java index 46f8aa2..59df8ee 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_TestGroupPropertyIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_TestGroupPropertyIdTranslationSpec.java @@ -5,14 +5,13 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.groups.testsupport.TestGroupPropertyId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.GroupsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.testsupport.input.TestGroupPropertyIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.groups.testsupport.TestGroupPropertyId; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -28,17 +27,13 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(GroupsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - TestGroupPropertyIdTranslationSpec translationSpec = new TestGroupPropertyIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_TestGroupTypeIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_TestGroupTypeIdTranslationSpec.java index 6cff123..2376f23 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_TestGroupTypeIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/groups/translationSpecs/AT_TestGroupTypeIdTranslationSpec.java @@ -11,7 +11,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -28,15 +27,13 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) - .addTranslator(GroupsTranslator.getTranslator()).addTranslator(PropertiesTranslator.getTranslator()) - .addTranslator(PeopleTranslator.getTranslator()).addTranslator(ReportsTranslator.getTranslator()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() + .addTranslator(GroupsTranslator.getTranslator()) + .addTranslator(PropertiesTranslator.getTranslator()) + .addTranslator(PeopleTranslator.getTranslator()) + .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - TestGroupTypeIdTranslationSpec translationSpec = new TestGroupTypeIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/IT_MaterialsTranslator.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/IT_MaterialsTranslator.java index 42c486e..5aaf0a8 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/IT_MaterialsTranslator.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/IT_MaterialsTranslator.java @@ -6,6 +6,14 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.materials.datamangers.MaterialsPluginData; +import gov.hhs.aspr.ms.gcm.plugins.materials.reports.BatchStatusReportPluginData; +import gov.hhs.aspr.ms.gcm.plugins.materials.reports.MaterialsProducerPropertyReportPluginData; +import gov.hhs.aspr.ms.gcm.plugins.materials.reports.MaterialsProducerResourceReportPluginData; +import gov.hhs.aspr.ms.gcm.plugins.materials.reports.StageReportPluginData; +import gov.hhs.aspr.ms.gcm.plugins.materials.testsupport.MaterialsTestPluginFactory; +import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; +import gov.hhs.aspr.ms.gcm.plugins.reports.support.SimpleReportLabel; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.data.input.MaterialsPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.reports.input.BatchStatusReportPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.reports.input.MaterialsProducerPropertyReportPluginDataInput; @@ -17,16 +25,9 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.ResourcesTranslator; import gov.hhs.aspr.ms.taskit.core.TranslationController; +import gov.hhs.aspr.ms.taskit.core.TranslationEngineType; import gov.hhs.aspr.ms.taskit.core.testsupport.TestResourceHelper; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.materials.datamangers.MaterialsPluginData; -import gov.hhs.aspr.ms.gcm.plugins.materials.reports.BatchStatusReportPluginData; -import gov.hhs.aspr.ms.gcm.plugins.materials.reports.MaterialsProducerPropertyReportPluginData; -import gov.hhs.aspr.ms.gcm.plugins.materials.reports.MaterialsProducerResourceReportPluginData; -import gov.hhs.aspr.ms.gcm.plugins.materials.reports.StageReportPluginData; -import gov.hhs.aspr.ms.gcm.plugins.materials.testsupport.MaterialsTestPluginFactory; -import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; -import gov.hhs.aspr.ms.gcm.plugins.reports.support.SimpleReportLabel; import util.annotations.UnitTestForCoverage; public class IT_MaterialsTranslator { @@ -41,15 +42,18 @@ public void testMaterialsTranslator() { TestResourceHelper.createTestOutputFile(filePath, fileName); TranslationController translatorController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) - .addTranslator(MaterialsTranslator.getTranslator()) - .addTranslator(PropertiesTranslator.getTranslator()) - .addTranslator(ResourcesTranslator.getTranslator()) - .addTranslator(RegionsTranslator.getTranslator()) - .addTranslator(PeopleTranslator.getTranslator()) - .addTranslator(ReportsTranslator.getTranslator()) - .addInputFilePath(filePath.resolve(fileName), MaterialsPluginDataInput.class) - .addOutputFilePath(filePath.resolve(fileName), MaterialsPluginData.class) + .addTranslationEngine(ProtobufTranslationEngine.builder() + .addTranslator(MaterialsTranslator.getTranslator()) + .addTranslator(PropertiesTranslator.getTranslator()) + .addTranslator(ResourcesTranslator.getTranslator()) + .addTranslator(RegionsTranslator.getTranslator()) + .addTranslator(PeopleTranslator.getTranslator()) + .addTranslator(ReportsTranslator.getTranslator()) + .build()) + .addInputFilePath(filePath.resolve(fileName), MaterialsPluginDataInput.class, + TranslationEngineType.PROTOBUF) + .addOutputFilePath(filePath.resolve(fileName), MaterialsPluginData.class, + TranslationEngineType.PROTOBUF) .build(); int numBatches = 50; @@ -76,15 +80,18 @@ public void testBatchStatusReportPluginDataTranslatorSpec() { TestResourceHelper.createTestOutputFile(filePath, fileName); TranslationController translatorController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) - .addTranslator(MaterialsTranslator.getTranslator()) - .addTranslator(ReportsTranslator.getTranslator()) - .addTranslator(PropertiesTranslator.getTranslator()) - .addTranslator(ResourcesTranslator.getTranslator()) - .addTranslator(RegionsTranslator.getTranslator()) - .addTranslator(PeopleTranslator.getTranslator()) - .addInputFilePath(filePath.resolve(fileName), BatchStatusReportPluginDataInput.class) - .addOutputFilePath(filePath.resolve(fileName), BatchStatusReportPluginData.class) + .addTranslationEngine(ProtobufTranslationEngine.builder() + .addTranslator(MaterialsTranslator.getTranslator()) + .addTranslator(ReportsTranslator.getTranslator()) + .addTranslator(PropertiesTranslator.getTranslator()) + .addTranslator(ResourcesTranslator.getTranslator()) + .addTranslator(RegionsTranslator.getTranslator()) + .addTranslator(PeopleTranslator.getTranslator()) + .build()) + .addInputFilePath(filePath.resolve(fileName), BatchStatusReportPluginDataInput.class, + TranslationEngineType.PROTOBUF) + .addOutputFilePath(filePath.resolve(fileName), BatchStatusReportPluginData.class, + TranslationEngineType.PROTOBUF) .build(); BatchStatusReportPluginData.Builder builder = BatchStatusReportPluginData.builder(); @@ -114,15 +121,18 @@ public void testMaterialsProducerPropertyReportPluginDataTranslatorSpec() { TestResourceHelper.createTestOutputFile(filePath, fileName); TranslationController translatorController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) - .addTranslator(MaterialsTranslator.getTranslator()) - .addTranslator(ReportsTranslator.getTranslator()) - .addTranslator(PropertiesTranslator.getTranslator()) - .addTranslator(ResourcesTranslator.getTranslator()) - .addTranslator(RegionsTranslator.getTranslator()) - .addTranslator(PeopleTranslator.getTranslator()) - .addInputFilePath(filePath.resolve(fileName), MaterialsProducerPropertyReportPluginDataInput.class) - .addOutputFilePath(filePath.resolve(fileName), MaterialsProducerPropertyReportPluginData.class) + .addTranslationEngine(ProtobufTranslationEngine.builder() + .addTranslator(MaterialsTranslator.getTranslator()) + .addTranslator(ReportsTranslator.getTranslator()) + .addTranslator(PropertiesTranslator.getTranslator()) + .addTranslator(ResourcesTranslator.getTranslator()) + .addTranslator(RegionsTranslator.getTranslator()) + .addTranslator(PeopleTranslator.getTranslator()) + .build()) + .addInputFilePath(filePath.resolve(fileName), MaterialsProducerPropertyReportPluginDataInput.class, + TranslationEngineType.PROTOBUF) + .addOutputFilePath(filePath.resolve(fileName), MaterialsProducerPropertyReportPluginData.class, + TranslationEngineType.PROTOBUF) .build(); MaterialsProducerPropertyReportPluginData.Builder builder = MaterialsProducerPropertyReportPluginData.builder(); @@ -151,15 +161,18 @@ public void testMaterialsProducerResourceReportPluginDataTranslatorSpec() { TestResourceHelper.createTestOutputFile(filePath, fileName); TranslationController translatorController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) - .addTranslator(MaterialsTranslator.getTranslator()) - .addTranslator(ReportsTranslator.getTranslator()) - .addTranslator(PropertiesTranslator.getTranslator()) - .addTranslator(ResourcesTranslator.getTranslator()) - .addTranslator(RegionsTranslator.getTranslator()) - .addTranslator(PeopleTranslator.getTranslator()) - .addInputFilePath(filePath.resolve(fileName), MaterialsProducerResourceReportPluginDataInput.class) - .addOutputFilePath(filePath.resolve(fileName), MaterialsProducerResourceReportPluginData.class) + .addTranslationEngine(ProtobufTranslationEngine.builder() + .addTranslator(MaterialsTranslator.getTranslator()) + .addTranslator(ReportsTranslator.getTranslator()) + .addTranslator(PropertiesTranslator.getTranslator()) + .addTranslator(ResourcesTranslator.getTranslator()) + .addTranslator(RegionsTranslator.getTranslator()) + .addTranslator(PeopleTranslator.getTranslator()) + .build()) + .addInputFilePath(filePath.resolve(fileName), MaterialsProducerResourceReportPluginDataInput.class, + TranslationEngineType.PROTOBUF) + .addOutputFilePath(filePath.resolve(fileName), MaterialsProducerResourceReportPluginData.class, + TranslationEngineType.PROTOBUF) .build(); MaterialsProducerResourceReportPluginData.Builder builder = MaterialsProducerResourceReportPluginData.builder(); @@ -188,15 +201,18 @@ public void testStageReportPluginDataTranslatorSpec() { TestResourceHelper.createTestOutputFile(filePath, fileName); TranslationController translatorController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) - .addTranslator(MaterialsTranslator.getTranslator()) - .addTranslator(ReportsTranslator.getTranslator()) - .addTranslator(PropertiesTranslator.getTranslator()) - .addTranslator(ResourcesTranslator.getTranslator()) - .addTranslator(RegionsTranslator.getTranslator()) - .addTranslator(PeopleTranslator.getTranslator()) - .addInputFilePath(filePath.resolve(fileName), StageReportPluginDataInput.class) - .addOutputFilePath(filePath.resolve(fileName), StageReportPluginData.class) + .addTranslationEngine(ProtobufTranslationEngine.builder() + .addTranslator(MaterialsTranslator.getTranslator()) + .addTranslator(ReportsTranslator.getTranslator()) + .addTranslator(PropertiesTranslator.getTranslator()) + .addTranslator(ResourcesTranslator.getTranslator()) + .addTranslator(RegionsTranslator.getTranslator()) + .addTranslator(PeopleTranslator.getTranslator()) + .build()) + .addInputFilePath(filePath.resolve(fileName), StageReportPluginDataInput.class, + TranslationEngineType.PROTOBUF) + .addOutputFilePath(filePath.resolve(fileName), StageReportPluginData.class, + TranslationEngineType.PROTOBUF) .build(); StageReportPluginData.Builder builder = StageReportPluginData.builder(); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_BatchIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_BatchIdTranslationSpec.java index 4a33055..ea6b5a1 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_BatchIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_BatchIdTranslationSpec.java @@ -13,7 +13,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.ResourcesTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -30,16 +29,15 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) - .addTranslator(MaterialsTranslator.getTranslator()).addTranslator(ReportsTranslator.getTranslator()) - .addTranslator(PropertiesTranslator.getTranslator()).addTranslator(ResourcesTranslator.getTranslator()) - .addTranslator(RegionsTranslator.getTranslator()).addTranslator(PeopleTranslator.getTranslator()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() + .addTranslator(MaterialsTranslator.getTranslator()) + .addTranslator(ReportsTranslator.getTranslator()) + .addTranslator(PropertiesTranslator.getTranslator()) + .addTranslator(ResourcesTranslator.getTranslator()) + .addTranslator(RegionsTranslator.getTranslator()) + .addTranslator(PeopleTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - BatchIdTranslationSpec translationSpec = new BatchIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_BatchPropertyIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_BatchPropertyIdTranslationSpec.java index 6ee0924..39fee12 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_BatchPropertyIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_BatchPropertyIdTranslationSpec.java @@ -5,6 +5,8 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.materials.support.BatchPropertyId; +import gov.hhs.aspr.ms.gcm.plugins.materials.testsupport.TestBatchPropertyId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.MaterialsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.support.input.BatchPropertyIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; @@ -12,10 +14,7 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.ResourcesTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.materials.support.BatchPropertyId; -import gov.hhs.aspr.ms.gcm.plugins.materials.testsupport.TestBatchPropertyId; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -31,8 +30,7 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(MaterialsTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) @@ -41,9 +39,6 @@ public void testConvertObject() { .addTranslator(PeopleTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - BatchPropertyIdTranslationSpec translationSpec = new BatchPropertyIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_BatchStatusReportPluginDataTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_BatchStatusReportPluginDataTranslationSpec.java index 4ee0b43..7bb6135 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_BatchStatusReportPluginDataTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_BatchStatusReportPluginDataTranslationSpec.java @@ -15,7 +15,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.ResourcesTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -32,8 +31,7 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(MaterialsTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) @@ -42,9 +40,6 @@ public void testConvertObject() { .addTranslator(PeopleTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - BatchStatusReportPluginDataTranslationSpec translationSpec = new BatchStatusReportPluginDataTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_MaterialIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_MaterialIdTranslationSpec.java index 8d0c43e..ba0daba 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_MaterialIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_MaterialIdTranslationSpec.java @@ -14,7 +14,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.ResourcesTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -31,8 +30,7 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(MaterialsTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) @@ -41,9 +39,6 @@ public void testConvertObject() { .addTranslator(PeopleTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - MaterialIdTranslationSpec translationSpec = new MaterialIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_MaterialsPluginDataTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_MaterialsPluginDataTranslationSpec.java index 4dcec2b..db90fc1 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_MaterialsPluginDataTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_MaterialsPluginDataTranslationSpec.java @@ -14,7 +14,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.ResourcesTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -31,8 +30,7 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(MaterialsTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) @@ -41,9 +39,6 @@ public void testConvertObject() { .addTranslator(PeopleTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - MaterialsPluginDataTranslationSpec translationSpec = new MaterialsPluginDataTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_MaterialsProducerIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_MaterialsProducerIdTranslationSpec.java index 1cfdaee..32fea0e 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_MaterialsProducerIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_MaterialsProducerIdTranslationSpec.java @@ -5,6 +5,8 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.materials.support.MaterialsProducerId; +import gov.hhs.aspr.ms.gcm.plugins.materials.testsupport.TestMaterialsProducerId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.MaterialsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.support.input.MaterialsProducerIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; @@ -12,10 +14,7 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.ResourcesTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.materials.support.MaterialsProducerId; -import gov.hhs.aspr.ms.gcm.plugins.materials.testsupport.TestMaterialsProducerId; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -31,8 +30,7 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(MaterialsTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) @@ -41,9 +39,6 @@ public void testConvertObject() { .addTranslator(PeopleTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - MaterialsProducerIdTranslationSpec translationSpec = new MaterialsProducerIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_MaterialsProducerPropertyIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_MaterialsProducerPropertyIdTranslationSpec.java index 2822786..a5b94de 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_MaterialsProducerPropertyIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_MaterialsProducerPropertyIdTranslationSpec.java @@ -14,7 +14,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.ResourcesTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -31,8 +30,7 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(MaterialsTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) @@ -41,9 +39,6 @@ public void testConvertObject() { .addTranslator(PeopleTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - MaterialsProducerPropertyIdTranslationSpec translationSpec = new MaterialsProducerPropertyIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_MaterialsProducerPropertyReportPluginDataTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_MaterialsProducerPropertyReportPluginDataTranslationSpec.java index 2c9e164..78238c3 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_MaterialsProducerPropertyReportPluginDataTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_MaterialsProducerPropertyReportPluginDataTranslationSpec.java @@ -5,6 +5,9 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.materials.reports.MaterialsProducerPropertyReportPluginData; +import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; +import gov.hhs.aspr.ms.gcm.plugins.reports.support.SimpleReportLabel; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.MaterialsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.reports.input.MaterialsProducerPropertyReportPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; @@ -12,11 +15,7 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.ResourcesTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.materials.reports.MaterialsProducerPropertyReportPluginData; -import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; -import gov.hhs.aspr.ms.gcm.plugins.reports.support.SimpleReportLabel; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -32,8 +31,7 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(MaterialsTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) @@ -42,9 +40,6 @@ public void testConvertObject() { .addTranslator(PeopleTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - MaterialsProducerPropertyReportPluginDataTranslationSpec translationSpec = new MaterialsProducerPropertyReportPluginDataTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_MaterialsProducerResourceReportPluginDataTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_MaterialsProducerResourceReportPluginDataTranslationSpec.java index bd8ed2c..1255b76 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_MaterialsProducerResourceReportPluginDataTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_MaterialsProducerResourceReportPluginDataTranslationSpec.java @@ -15,7 +15,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.ResourcesTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -32,8 +31,7 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(MaterialsTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) @@ -42,9 +40,6 @@ public void testConvertObject() { .addTranslator(PeopleTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - MaterialsProducerResourceReportPluginDataTranslationSpec translationSpec = new MaterialsProducerResourceReportPluginDataTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_StageIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_StageIdTranslationSpec.java index 04cf179..b878c2d 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_StageIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_StageIdTranslationSpec.java @@ -13,7 +13,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.ResourcesTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -30,8 +29,7 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(MaterialsTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) @@ -40,9 +38,6 @@ public void testConvertObject() { .addTranslator(PeopleTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - StageIdTranslationSpec translationSpec = new StageIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_StageReportPluginDataTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_StageReportPluginDataTranslationSpec.java index 1f9c888..24fd017 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_StageReportPluginDataTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_StageReportPluginDataTranslationSpec.java @@ -5,6 +5,9 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.materials.reports.StageReportPluginData; +import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; +import gov.hhs.aspr.ms.gcm.plugins.reports.support.SimpleReportLabel; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.MaterialsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.reports.input.StageReportPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; @@ -12,11 +15,7 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.ResourcesTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.materials.reports.StageReportPluginData; -import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; -import gov.hhs.aspr.ms.gcm.plugins.reports.support.SimpleReportLabel; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -32,8 +31,7 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(MaterialsTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) @@ -42,9 +40,6 @@ public void testConvertObject() { .addTranslator(PeopleTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - StageReportPluginDataTranslationSpec translationSpec = new StageReportPluginDataTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_TestBatchPropertyIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_TestBatchPropertyIdTranslationSpec.java index 602a696..9148d1e 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_TestBatchPropertyIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_TestBatchPropertyIdTranslationSpec.java @@ -5,6 +5,7 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.materials.testsupport.TestBatchPropertyId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.MaterialsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.testsupport.input.TestBatchPropertyIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; @@ -12,9 +13,7 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.ResourcesTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.materials.testsupport.TestBatchPropertyId; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -30,8 +29,7 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(MaterialsTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) @@ -40,9 +38,6 @@ public void testConvertObject() { .addTranslator(PeopleTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - TestBatchPropertyIdTranslationSpec translationSpec = new TestBatchPropertyIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_TestMaterialIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_TestMaterialIdTranslationSpec.java index df0bed2..57d6e03 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_TestMaterialIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_TestMaterialIdTranslationSpec.java @@ -13,7 +13,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.ResourcesTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -30,8 +29,7 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(MaterialsTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) @@ -40,9 +38,6 @@ public void testConvertObject() { .addTranslator(PeopleTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - TestMaterialIdTranslationSpec translationSpec = new TestMaterialIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_TestMaterialsProducerIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_TestMaterialsProducerIdTranslationSpec.java index e6c2dd8..dc9b273 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_TestMaterialsProducerIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_TestMaterialsProducerIdTranslationSpec.java @@ -13,7 +13,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.ResourcesTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -30,8 +29,7 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(MaterialsTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) @@ -40,9 +38,6 @@ public void testConvertObject() { .addTranslator(PeopleTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - TestMaterialsProducerIdTranslationSpec translationSpec = new TestMaterialsProducerIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_TestMaterialsProducerPropertyIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_TestMaterialsProducerPropertyIdTranslationSpec.java index 849b35b..2fdc194 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_TestMaterialsProducerPropertyIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/materials/translationSpecs/AT_TestMaterialsProducerPropertyIdTranslationSpec.java @@ -5,6 +5,7 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.materials.testsupport.TestMaterialsProducerPropertyId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.MaterialsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.materials.testsupport.input.TestMaterialsProducerPropertyIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; @@ -12,9 +13,7 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.ResourcesTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.materials.testsupport.TestMaterialsProducerPropertyId; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -30,8 +29,7 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(MaterialsTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) @@ -40,9 +38,6 @@ public void testConvertObject() { .addTranslator(PeopleTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - TestMaterialsProducerPropertyIdTranslationSpec translationSpec = new TestMaterialsProducerPropertyIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/IT_PartitionsTranslator.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/IT_PartitionsTranslator.java index bba7272..f3cfe13 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/IT_PartitionsTranslator.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/IT_PartitionsTranslator.java @@ -11,6 +11,7 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.translationSpecs.TestFilterTranslationSpec; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.translationSpecs.TestLabelerTranslationSpec; import gov.hhs.aspr.ms.taskit.core.TranslationController; +import gov.hhs.aspr.ms.taskit.core.TranslationEngineType; import gov.hhs.aspr.ms.taskit.core.testsupport.TestResourceHelper; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestForCoverage; @@ -27,12 +28,16 @@ public void testGroupsTranslator() { TestResourceHelper.createTestOutputFile(filePath, fileName); TranslationController translatorController = TranslationController.builder() - .setTranslationEngineBuilder( - ProtobufTranslationEngine.builder().addTranslationSpec(new TestFilterTranslationSpec()) - .addTranslationSpec(new TestLabelerTranslationSpec())) - .addTranslator(PartitionsTranslator.getTranslator()) - .addInputFilePath(filePath.resolve(fileName), PartitionsPluginDataInput.class) - .addOutputFilePath(filePath.resolve(fileName), PartitionsPluginData.class).build(); + .addTranslationEngine(ProtobufTranslationEngine.builder() + .addTranslationSpec(new TestFilterTranslationSpec()) + .addTranslationSpec(new TestLabelerTranslationSpec()) + .addTranslator(PartitionsTranslator.getTranslator()) + .build()) + .addInputFilePath(filePath.resolve(fileName), PartitionsPluginDataInput.class, + TranslationEngineType.PROTOBUF) + .addOutputFilePath(filePath.resolve(fileName), PartitionsPluginData.class, + TranslationEngineType.PROTOBUF) + .build(); PartitionsPluginData expectedPluginData = PartitionsPluginData.builder().setRunContinuitySupport(true).build(); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/testsupport/translationSpecs/AT_TestFilterTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/testsupport/translationSpecs/AT_TestFilterTranslationSpec.java index 2aa2e57..6da5156 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/testsupport/translationSpecs/AT_TestFilterTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/testsupport/translationSpecs/AT_TestFilterTranslationSpec.java @@ -8,7 +8,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.PartitionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.TestFilter; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.input.TestFilterInput; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -25,16 +24,12 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder() - .addTranslationSpec(new TestFilterTranslationSpec()) - .addTranslationSpec(new TestLabelerTranslationSpec())) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() + .addTranslationSpec(new TestFilterTranslationSpec()) + .addTranslationSpec(new TestLabelerTranslationSpec()) .addTranslator(PartitionsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - TestFilterTranslationSpec translationSpec = new TestFilterTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/testsupport/translationSpecs/AT_TestLabelerTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/testsupport/translationSpecs/AT_TestLabelerTranslationSpec.java index cb99b83..92579a3 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/testsupport/translationSpecs/AT_TestLabelerTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/testsupport/translationSpecs/AT_TestLabelerTranslationSpec.java @@ -8,7 +8,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.PartitionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.TestLabeler; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.input.TestLabelerInput; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -25,16 +24,12 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder() - .addTranslationSpec(new TestFilterTranslationSpec()) - .addTranslationSpec(new TestLabelerTranslationSpec())) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() + .addTranslationSpec(new TestFilterTranslationSpec()) + .addTranslationSpec(new TestLabelerTranslationSpec()) .addTranslator(PartitionsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - TestLabelerTranslationSpec translationSpec = new TestLabelerTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_AndFilterTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_AndFilterTranslationSpec.java index 13df1c6..0e12e42 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_AndFilterTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_AndFilterTranslationSpec.java @@ -5,15 +5,14 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.partitions.support.filters.AndFilter; +import gov.hhs.aspr.ms.gcm.plugins.partitions.support.filters.Filter; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.PartitionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.support.filters.input.AndFilterInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.TestFilter; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.translationSpecs.TestFilterTranslationSpec; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.translationSpecs.TestLabelerTranslationSpec; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.partitions.support.filters.AndFilter; -import gov.hhs.aspr.ms.gcm.plugins.partitions.support.filters.Filter; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -29,16 +28,12 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder() - .addTranslationSpec(new TestFilterTranslationSpec()) - .addTranslationSpec(new TestLabelerTranslationSpec())) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() + .addTranslationSpec(new TestFilterTranslationSpec()) + .addTranslationSpec(new TestLabelerTranslationSpec()) .addTranslator(PartitionsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - AndFilterTranslationSpec translationSpec = new AndFilterTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_AttributeFilterTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_AttributeFilterTranslationSpec.java index affedc5..124ca30 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_AttributeFilterTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_AttributeFilterTranslationSpec.java @@ -12,7 +12,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.support.attributes.input.AttributeFilterInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.translationSpecs.TestFilterTranslationSpec; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.translationSpecs.TestLabelerTranslationSpec; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -29,16 +28,12 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder() - .addTranslationSpec(new TestFilterTranslationSpec()) - .addTranslationSpec(new TestLabelerTranslationSpec())) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() + .addTranslationSpec(new TestFilterTranslationSpec()) + .addTranslationSpec(new TestLabelerTranslationSpec()) .addTranslator(PartitionsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - AttributeFilterTranslationSpec translationSpec = new AttributeFilterTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_AttributeIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_AttributeIdTranslationSpec.java index 768ea9f..225622b 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_AttributeIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_AttributeIdTranslationSpec.java @@ -5,14 +5,13 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.partitions.testsupport.attributes.support.AttributeId; +import gov.hhs.aspr.ms.gcm.plugins.partitions.testsupport.attributes.support.TestAttributeId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.PartitionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.support.attributes.input.AttributeIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.translationSpecs.TestFilterTranslationSpec; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.translationSpecs.TestLabelerTranslationSpec; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.partitions.testsupport.attributes.support.AttributeId; -import gov.hhs.aspr.ms.gcm.plugins.partitions.testsupport.attributes.support.TestAttributeId; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -28,16 +27,12 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder() - .addTranslationSpec(new TestFilterTranslationSpec()) - .addTranslationSpec(new TestLabelerTranslationSpec())) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() + .addTranslationSpec(new TestFilterTranslationSpec()) + .addTranslationSpec(new TestLabelerTranslationSpec()) .addTranslator(PartitionsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - AttributeIdTranslationSpec translationSpec = new AttributeIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_EqualityTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_EqualityTranslationSpec.java index 97e0713..c1dacf8 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_EqualityTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_EqualityTranslationSpec.java @@ -5,13 +5,12 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.partitions.support.Equality; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.PartitionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.support.input.EqualityInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.translationSpecs.TestFilterTranslationSpec; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.translationSpecs.TestLabelerTranslationSpec; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.partitions.support.Equality; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -27,16 +26,12 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder() - .addTranslationSpec(new TestFilterTranslationSpec()) - .addTranslationSpec(new TestLabelerTranslationSpec())) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() + .addTranslationSpec(new TestFilterTranslationSpec()) + .addTranslationSpec(new TestLabelerTranslationSpec()) .addTranslator(PartitionsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - EqualityTranslationSpec translationSpec = new EqualityTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_FalseFilterTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_FalseFilterTranslationSpec.java index 2674d3d..aeab0c7 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_FalseFilterTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_FalseFilterTranslationSpec.java @@ -5,13 +5,12 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.partitions.support.filters.FalseFilter; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.PartitionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.support.filters.input.FalseFilterInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.translationSpecs.TestFilterTranslationSpec; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.translationSpecs.TestLabelerTranslationSpec; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.partitions.support.filters.FalseFilter; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -27,16 +26,12 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder() - .addTranslationSpec(new TestFilterTranslationSpec()) - .addTranslationSpec(new TestLabelerTranslationSpec())) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() + .addTranslationSpec(new TestFilterTranslationSpec()) + .addTranslationSpec(new TestLabelerTranslationSpec()) .addTranslator(PartitionsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - FalseFilterTranslationSpec translationSpec = new FalseFilterTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_FilterTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_FilterTranslationSpec.java index 22f035e..8c429be 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_FilterTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_FilterTranslationSpec.java @@ -5,14 +5,13 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.partitions.support.filters.Filter; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.PartitionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.support.filters.input.FilterInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.TestFilter; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.translationSpecs.TestFilterTranslationSpec; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.translationSpecs.TestLabelerTranslationSpec; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.partitions.support.filters.Filter; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -28,16 +27,12 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder() - .addTranslationSpec(new TestFilterTranslationSpec()) - .addTranslationSpec(new TestLabelerTranslationSpec())) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() + .addTranslationSpec(new TestFilterTranslationSpec()) + .addTranslationSpec(new TestLabelerTranslationSpec()) .addTranslator(PartitionsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - FilterTranslationSpec translationSpec = new FilterTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_LabelerTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_LabelerTranslationSpec.java index f4cb287..7b2d4fa 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_LabelerTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_LabelerTranslationSpec.java @@ -5,14 +5,13 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.partitions.support.Labeler; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.PartitionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.support.input.LabelerInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.TestLabeler; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.translationSpecs.TestFilterTranslationSpec; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.translationSpecs.TestLabelerTranslationSpec; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.partitions.support.Labeler; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -28,16 +27,12 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder() - .addTranslationSpec(new TestFilterTranslationSpec()) - .addTranslationSpec(new TestLabelerTranslationSpec())) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() + .addTranslationSpec(new TestFilterTranslationSpec()) + .addTranslationSpec(new TestLabelerTranslationSpec()) .addTranslator(PartitionsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - LabelerTranslationSpec translationSpec = new LabelerTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_NotFilterTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_NotFilterTranslationSpec.java index eca4d1c..8073fd2 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_NotFilterTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_NotFilterTranslationSpec.java @@ -12,7 +12,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.TestFilter; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.translationSpecs.TestFilterTranslationSpec; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.translationSpecs.TestLabelerTranslationSpec; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -29,16 +28,12 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder() - .addTranslationSpec(new TestFilterTranslationSpec()) - .addTranslationSpec(new TestLabelerTranslationSpec())) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() + .addTranslationSpec(new TestFilterTranslationSpec()) + .addTranslationSpec(new TestLabelerTranslationSpec()) .addTranslator(PartitionsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - NotFilterTranslationSpec translationSpec = new NotFilterTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_OrFilterTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_OrFilterTranslationSpec.java index be21e81..e7f9824 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_OrFilterTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_OrFilterTranslationSpec.java @@ -12,7 +12,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.TestFilter; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.translationSpecs.TestFilterTranslationSpec; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.translationSpecs.TestLabelerTranslationSpec; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -29,16 +28,12 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder() - .addTranslationSpec(new TestFilterTranslationSpec()) - .addTranslationSpec(new TestLabelerTranslationSpec())) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() + .addTranslationSpec(new TestFilterTranslationSpec()) + .addTranslationSpec(new TestLabelerTranslationSpec()) .addTranslator(PartitionsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - OrFilterTranslationSpec translationSpec = new OrFilterTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_PartitionTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_PartitionTranslationSpec.java index cabb81e..fff3ea1 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_PartitionTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_PartitionTranslationSpec.java @@ -14,7 +14,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.TestLabeler; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.translationSpecs.TestFilterTranslationSpec; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.translationSpecs.TestLabelerTranslationSpec; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -31,16 +30,12 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder() - .addTranslationSpec(new TestFilterTranslationSpec()) - .addTranslationSpec(new TestLabelerTranslationSpec())) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() + .addTranslationSpec(new TestFilterTranslationSpec()) + .addTranslationSpec(new TestLabelerTranslationSpec()) .addTranslator(PartitionsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - PartitionTranslationSpec translationSpec = new PartitionTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_PartitionsPluginDataTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_PartitionsPluginDataTranslationSpec.java index 613bccc..5d529a5 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_PartitionsPluginDataTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_PartitionsPluginDataTranslationSpec.java @@ -10,7 +10,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.data.input.PartitionsPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.translationSpecs.TestFilterTranslationSpec; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.translationSpecs.TestLabelerTranslationSpec; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -27,16 +26,12 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder() - .addTranslationSpec(new TestFilterTranslationSpec()) - .addTranslationSpec(new TestLabelerTranslationSpec())) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() + .addTranslationSpec(new TestFilterTranslationSpec()) + .addTranslationSpec(new TestLabelerTranslationSpec()) .addTranslator(PartitionsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - PartitionsPluginDataTranslationSpec translationSpec = new PartitionsPluginDataTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_TestAttributeIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_TestAttributeIdTranslationSpec.java index 0c2373d..14949f4 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_TestAttributeIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_TestAttributeIdTranslationSpec.java @@ -5,13 +5,12 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.partitions.testsupport.attributes.support.TestAttributeId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.PartitionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.input.TestAttributeIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.translationSpecs.TestFilterTranslationSpec; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.translationSpecs.TestLabelerTranslationSpec; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.partitions.testsupport.attributes.support.TestAttributeId; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -27,16 +26,12 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder() - .addTranslationSpec(new TestFilterTranslationSpec()) - .addTranslationSpec(new TestLabelerTranslationSpec())) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() + .addTranslationSpec(new TestFilterTranslationSpec()) + .addTranslationSpec(new TestLabelerTranslationSpec()) .addTranslator(PartitionsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - TestAttributeIdTranslationSpec translationSpec = new TestAttributeIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_TrueFilterTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_TrueFilterTranslationSpec.java index 392bc7c..e0d326e 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_TrueFilterTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/partitions/translationSpecs/AT_TrueFilterTranslationSpec.java @@ -10,7 +10,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.support.filters.input.TrueFilterInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.translationSpecs.TestFilterTranslationSpec; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.testsupport.translationSpecs.TestLabelerTranslationSpec; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -27,16 +26,12 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder() - .addTranslationSpec(new TestFilterTranslationSpec()) - .addTranslationSpec(new TestLabelerTranslationSpec())) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() + .addTranslationSpec(new TestFilterTranslationSpec()) + .addTranslationSpec(new TestLabelerTranslationSpec()) .addTranslator(PartitionsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - TrueFilterTranslationSpec translationSpec = new TrueFilterTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/people/IT_PeopleTranslator.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/people/IT_PeopleTranslator.java index cf16c5c..249fdc3 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/people/IT_PeopleTranslator.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/people/IT_PeopleTranslator.java @@ -11,6 +11,7 @@ import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonRange; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.data.input.PeoplePluginDataInput; import gov.hhs.aspr.ms.taskit.core.TranslationController; +import gov.hhs.aspr.ms.taskit.core.TranslationEngineType; import gov.hhs.aspr.ms.taskit.core.testsupport.TestResourceHelper; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestForCoverage; @@ -28,10 +29,11 @@ public void testPeopleTranslator() { TestResourceHelper.createTestOutputFile(filePath, fileName); TranslationController translatorController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) - .addTranslator(PeopleTranslator.getTranslator()) - .addInputFilePath(filePath.resolve(fileName), PeoplePluginDataInput.class) - .addOutputFilePath(filePath.resolve(fileName), PeoplePluginData.class) + .addTranslationEngine( + ProtobufTranslationEngine.builder().addTranslator(PeopleTranslator.getTranslator()).build()) + .addInputFilePath(filePath.resolve(fileName), PeoplePluginDataInput.class, + TranslationEngineType.PROTOBUF) + .addOutputFilePath(filePath.resolve(fileName), PeoplePluginData.class, TranslationEngineType.PROTOBUF) .build(); PeoplePluginData.Builder builder = PeoplePluginData.builder(); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/people/translationSpecs/AT_PeoplePluginDataTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/people/translationSpecs/AT_PeoplePluginDataTranslationSpec.java index ac7f914..4161979 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/people/translationSpecs/AT_PeoplePluginDataTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/people/translationSpecs/AT_PeoplePluginDataTranslationSpec.java @@ -6,12 +6,11 @@ import org.apache.commons.math3.random.RandomGenerator; import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.people.datamanagers.PeoplePluginData; +import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonRange; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.data.input.PeoplePluginDataInput; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.people.datamanagers.PeoplePluginData; -import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonRange; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -28,14 +27,10 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(PeopleTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - PeoplePluginDataTranslationSpec translationSpec = new PeoplePluginDataTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/people/translationSpecs/AT_PersonIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/people/translationSpecs/AT_PersonIdTranslationSpec.java index cc0ffc8..def17b6 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/people/translationSpecs/AT_PersonIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/people/translationSpecs/AT_PersonIdTranslationSpec.java @@ -5,11 +5,10 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.support.input.PersonIdInput; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonId; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -25,14 +24,10 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(PeopleTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - PersonIdTranslationSpec translationSpec = new PersonIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/people/translationSpecs/AT_PersonRangeTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/people/translationSpecs/AT_PersonRangeTranslationSpec.java index 8e8165f..7eaf5dc 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/people/translationSpecs/AT_PersonRangeTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/people/translationSpecs/AT_PersonRangeTranslationSpec.java @@ -5,11 +5,10 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonRange; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.support.input.PersonRangeInput; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonRange; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -25,14 +24,10 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(PeopleTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - PersonRangeTranslationSpec translationSpec = new PersonRangeTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/IT_PersonPropertiesTranslator.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/IT_PersonPropertiesTranslator.java index fff5a06..63eb9f7 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/IT_PersonPropertiesTranslator.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/IT_PersonPropertiesTranslator.java @@ -28,6 +28,7 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.taskit.core.TranslationController; +import gov.hhs.aspr.ms.taskit.core.TranslationEngineType; import gov.hhs.aspr.ms.taskit.core.testsupport.TestResourceHelper; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestForCoverage; @@ -45,12 +46,17 @@ public void testPersonPropertiesTranslator() { TestResourceHelper.createTestOutputFile(filePath, fileName); TranslationController translatorController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) - .addTranslator(PersonPropertiesTranslator.getTranslator()) - .addTranslator(PropertiesTranslator.getTranslator()).addTranslator(PeopleTranslator.getTranslator()) - .addTranslator(ReportsTranslator.getTranslator()) - .addInputFilePath(filePath.resolve(fileName), PersonPropertiesPluginDataInput.class) - .addOutputFilePath(filePath.resolve(fileName), PersonPropertiesPluginData.class).build(); + .addTranslationEngine(ProtobufTranslationEngine.builder() + .addTranslator(PersonPropertiesTranslator.getTranslator()) + .addTranslator(PropertiesTranslator.getTranslator()) + .addTranslator(PeopleTranslator.getTranslator()) + .addTranslator(ReportsTranslator.getTranslator()) + .build()) + .addInputFilePath(filePath.resolve(fileName), PersonPropertiesPluginDataInput.class, + TranslationEngineType.PROTOBUF) + .addOutputFilePath(filePath.resolve(fileName), PersonPropertiesPluginData.class, + TranslationEngineType.PROTOBUF) + .build(); long seed = 4684903523797799712L; int initialPoptulation = 100; @@ -81,12 +87,17 @@ public void testPersonPropertyReportTranslatorSpec() { TestResourceHelper.createTestOutputFile(filePath, fileName); TranslationController translatorController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) - .addTranslator(PersonPropertiesTranslator.getTranslator()) - .addTranslator(PropertiesTranslator.getTranslator()).addTranslator(PeopleTranslator.getTranslator()) - .addTranslator(ReportsTranslator.getTranslator()) - .addInputFilePath(filePath.resolve(fileName), PersonPropertyReportPluginDataInput.class) - .addOutputFilePath(filePath.resolve(fileName), PersonPropertyReportPluginData.class).build(); + .addTranslationEngine(ProtobufTranslationEngine.builder() + .addTranslator(PersonPropertiesTranslator.getTranslator()) + .addTranslator(PropertiesTranslator.getTranslator()) + .addTranslator(PeopleTranslator.getTranslator()) + .addTranslator(ReportsTranslator.getTranslator()) + .build()) + .addInputFilePath(filePath.resolve(fileName), PersonPropertyReportPluginDataInput.class, + TranslationEngineType.PROTOBUF) + .addOutputFilePath(filePath.resolve(fileName), PersonPropertyReportPluginData.class, + TranslationEngineType.PROTOBUF) + .build(); long seed = 4684903523797799712L; @@ -129,12 +140,17 @@ public void testPersonInteractionReportTranslatorSpec() { TestResourceHelper.createTestOutputFile(filePath, fileName); TranslationController translatorController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) - .addTranslator(PersonPropertiesTranslator.getTranslator()) - .addTranslator(PropertiesTranslator.getTranslator()).addTranslator(PeopleTranslator.getTranslator()) - .addTranslator(ReportsTranslator.getTranslator()) - .addInputFilePath(filePath.resolve(fileName), PersonPropertyInteractionReportPluginDataInput.class) - .addOutputFilePath(filePath.resolve(fileName), PersonPropertyInteractionReportPluginData.class).build(); + .addTranslationEngine(ProtobufTranslationEngine.builder() + .addTranslator(PersonPropertiesTranslator.getTranslator()) + .addTranslator(PropertiesTranslator.getTranslator()) + .addTranslator(PeopleTranslator.getTranslator()) + .addTranslator(ReportsTranslator.getTranslator()) + .build()) + .addInputFilePath(filePath.resolve(fileName), PersonPropertyInteractionReportPluginDataInput.class, + TranslationEngineType.PROTOBUF) + .addOutputFilePath(filePath.resolve(fileName), PersonPropertyInteractionReportPluginData.class, + TranslationEngineType.PROTOBUF) + .build(); long seed = 4684903523797799712L; RandomGenerator randomGenerator = RandomGeneratorProvider.getRandomGenerator(seed); @@ -143,7 +159,8 @@ public void testPersonInteractionReportTranslatorSpec() { ReportPeriod reportPeriod = ReportPeriod.DAILY; PersonPropertyInteractionReportPluginData.Builder builder = PersonPropertyInteractionReportPluginData.builder() - .setReportLabel(reportLabel).setReportPeriod(reportPeriod); + .setReportLabel(reportLabel) + .setReportPeriod(reportPeriod); Set expectedPersonPropertyIds = EnumSet.allOf(TestPersonPropertyId.class); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/MT_PersonPropertiesTranslator.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/MT_PersonPropertiesTranslator.java new file mode 100644 index 0000000..1a08f58 --- /dev/null +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/MT_PersonPropertiesTranslator.java @@ -0,0 +1,122 @@ +package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.personproperties; + +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.List; + +import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonId; +import gov.hhs.aspr.ms.gcm.plugins.personproperties.datamanagers.PersonPropertiesPluginData; +import gov.hhs.aspr.ms.gcm.plugins.personproperties.testsupport.PersonPropertiesTestPluginFactory; +import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; +import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.personproperties.data.input.PersonPropertiesPluginDataInput; +import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; +import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; +import gov.hhs.aspr.ms.taskit.core.TranslationController; +import gov.hhs.aspr.ms.taskit.core.TranslationEngineType; +import gov.hhs.aspr.ms.taskit.core.testsupport.TestResourceHelper; +import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; +import util.time.TimeElapser; + +public class MT_PersonPropertiesTranslator { + + long seed = 4684903523797799712L; + String times = ""; + Path basePath = TestResourceHelper.getResourceDir(this.getClass()); + Path filePath = TestResourceHelper.makeTestOutputDir(basePath); + ProtobufTranslationEngine protobufTranslationEngine; + TimeElapser timeElapser = new TimeElapser(); + PersonPropertiesPluginData pluginData; + PersonPropertiesPluginDataInput inputPluginData; + TranslationController translationController; + + private MT_PersonPropertiesTranslator() { + protobufTranslationEngine = ProtobufTranslationEngine.builder() + .addTranslator(PersonPropertiesTranslator.getTranslator()) + .addTranslator(PropertiesTranslator.getTranslator()) + .addTranslator(PeopleTranslator.getTranslator()) + .addTranslator(ReportsTranslator.getTranslator()) + .build(); + } + + private void createPluginData(int population) { + String fileName = "personPropertiesPluginData_mt-" + population + ".json"; + + TestResourceHelper.createTestOutputFile(filePath, fileName); + + this.translationController = TranslationController.builder() + .addTranslationEngine(this.protobufTranslationEngine) + .addInputFilePath(filePath.resolve(fileName), PersonPropertiesPluginDataInput.class, + TranslationEngineType.PROTOBUF) + .addOutputFilePath(filePath.resolve(fileName), PersonPropertiesPluginDataInput.class, + TranslationEngineType.PROTOBUF) + .build(); + + List people = new ArrayList<>(); + for (int i = 0; i < population; i++) { + people.add(new PersonId(i)); + } + + this.timeElapser.reset(); + // generate data + this.pluginData = PersonPropertiesTestPluginFactory.getStandardPersonPropertiesPluginData(people, seed); + double elapsedTime = this.timeElapser.getElapsedMilliSeconds(); + this.times.concat(elapsedTime + ","); + } + + public void convertPluginDataToInput() { + this.timeElapser.reset(); + // convert data + this.inputPluginData = this.protobufTranslationEngine.convertObject(this.pluginData); + double elapsedTime = this.timeElapser.getElapsedMilliSeconds(); + this.times.concat(elapsedTime + ","); + + this.pluginData = null; + System.gc(); + } + + private void writeOutput() { + this.timeElapser.reset(); + + this.translationController.writeOutput(this.inputPluginData); + + double elapsedTime = this.timeElapser.getElapsedMilliSeconds(); + this.times.concat(elapsedTime + ","); + this.inputPluginData = null; + System.gc(); + } + + private void readInput() { + this.timeElapser.reset(); + + this.translationController.readInput(); + double elapsedTime = this.timeElapser.getElapsedMilliSeconds(); + this.times.concat(Double.toString(elapsedTime)); + } + + private void appendToTimeString(Object object) { + this.times.concat(object.toString()); + } + + private void clearTimesString() { + this.times = ""; + } + + public static void main(String[] args) { + MT_PersonPropertiesTranslator test = new MT_PersonPropertiesTranslator(); + + System.out.println("Population,Generating Data,Converting Data,Writing Data,Reading and Converting Data"); + + for (int i = 0; i < 1_000_000; i += 5000) { + if (i == 0) + continue; + test.appendToTimeString(new String(i + ",")); + test.createPluginData(i); + test.convertPluginDataToInput(); + test.writeOutput(); + test.readInput(); + System.out.println(test.times); + test.clearTimesString(); + } + } + +} diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/AT_PersonPropertiesPluginDataTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/AT_PersonPropertiesPluginDataTranslationSpec.java index e7c88b6..50dda66 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/AT_PersonPropertiesPluginDataTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/AT_PersonPropertiesPluginDataTranslationSpec.java @@ -8,16 +8,15 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonId; +import gov.hhs.aspr.ms.gcm.plugins.personproperties.datamanagers.PersonPropertiesPluginData; +import gov.hhs.aspr.ms.gcm.plugins.personproperties.testsupport.PersonPropertiesTestPluginFactory; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.personproperties.PersonPropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.personproperties.data.input.PersonPropertiesPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.people.support.PersonId; -import gov.hhs.aspr.ms.gcm.plugins.personproperties.datamanagers.PersonPropertiesPluginData; -import gov.hhs.aspr.ms.gcm.plugins.personproperties.testsupport.PersonPropertiesTestPluginFactory; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -33,17 +32,13 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(PersonPropertiesTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - PersonPropertiesPluginDataTranslationSpec translationSpec = new PersonPropertiesPluginDataTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/AT_PersonPropertyDimensionTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/AT_PersonPropertyDimensionTranslationSpec.java index 9040b46..8828171 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/AT_PersonPropertyDimensionTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/AT_PersonPropertyDimensionTranslationSpec.java @@ -5,15 +5,14 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.personproperties.support.PersonPropertyDimension; +import gov.hhs.aspr.ms.gcm.plugins.personproperties.testsupport.TestPersonPropertyId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.personproperties.PersonPropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.personproperties.support.input.PersonPropertyDimensionInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.personproperties.support.PersonPropertyDimension; -import gov.hhs.aspr.ms.gcm.plugins.personproperties.testsupport.TestPersonPropertyId; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -29,17 +28,13 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(PersonPropertiesTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - PersonPropertyDimensionTranslationSpec translationSpec = new PersonPropertyDimensionTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/AT_PersonPropertyFilterTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/AT_PersonPropertyFilterTranslationSpec.java index ca0c975..d11c258 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/AT_PersonPropertyFilterTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/AT_PersonPropertyFilterTranslationSpec.java @@ -5,17 +5,16 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.partitions.support.Equality; +import gov.hhs.aspr.ms.gcm.plugins.personproperties.support.PersonPropertyFilter; +import gov.hhs.aspr.ms.gcm.plugins.personproperties.testsupport.TestPersonPropertyId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.PartitionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.personproperties.PersonPropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.personproperties.support.input.PersonPropertyFilterInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.partitions.support.Equality; -import gov.hhs.aspr.ms.gcm.plugins.personproperties.support.PersonPropertyFilter; -import gov.hhs.aspr.ms.gcm.plugins.personproperties.testsupport.TestPersonPropertyId; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -31,8 +30,7 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(PersonPropertiesTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) @@ -40,9 +38,6 @@ public void testConvertObject() { .addTranslator(PartitionsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - PersonPropertyFilterTranslationSpec translationSpec = new PersonPropertyFilterTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/AT_PersonPropertyIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/AT_PersonPropertyIdTranslationSpec.java index cd66176..791faf8 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/AT_PersonPropertyIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/AT_PersonPropertyIdTranslationSpec.java @@ -12,7 +12,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.personproperties.support.input.PersonPropertyIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -29,17 +28,13 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(PersonPropertiesTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - PersonPropertyIdTranslationSpec translationSpec = new PersonPropertyIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/AT_PersonPropertyInteractionReportPluginDataTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/AT_PersonPropertyInteractionReportPluginDataTranslationSpec.java index c5801f9..521fab7 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/AT_PersonPropertyInteractionReportPluginDataTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/AT_PersonPropertyInteractionReportPluginDataTranslationSpec.java @@ -20,7 +20,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.personproperties.reports.input.PersonPropertyInteractionReportPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -38,17 +37,13 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(PersonPropertiesTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - PersonPropertyInteractionReportPluginDataTranslationSpec translationSpec = new PersonPropertyInteractionReportPluginDataTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/AT_PersonPropertyReportPluginDataTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/AT_PersonPropertyReportPluginDataTranslationSpec.java index 0423f12..a5b2f47 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/AT_PersonPropertyReportPluginDataTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/AT_PersonPropertyReportPluginDataTranslationSpec.java @@ -20,7 +20,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.personproperties.reports.input.PersonPropertyReportPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -38,14 +37,12 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(PersonPropertiesTranslator.getTranslator()) - .addTranslator(PropertiesTranslator.getTranslator()).addTranslator(PeopleTranslator.getTranslator()) - .addTranslator(ReportsTranslator.getTranslator()).build(); - - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); + .addTranslator(PropertiesTranslator.getTranslator()) + .addTranslator(PeopleTranslator.getTranslator()) + .addTranslator(ReportsTranslator.getTranslator()) + .build(); PersonPropertyReportPluginDataTranslationSpec translationSpec = new PersonPropertyReportPluginDataTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/AT_TestPersonPropertyIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/AT_TestPersonPropertyIdTranslationSpec.java index 8fdb73a..84ef094 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/AT_TestPersonPropertyIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/personproperties/translationSpecs/AT_TestPersonPropertyIdTranslationSpec.java @@ -5,14 +5,13 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.personproperties.testsupport.TestPersonPropertyId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.personproperties.PersonPropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.personproperties.testsupport.input.TestPersonPropertyIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.personproperties.testsupport.TestPersonPropertyId; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -28,17 +27,13 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(PersonPropertiesTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - TestPersonPropertyIdTranslationSpec translationSpec = new TestPersonPropertyIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/properties/IT_PropertiesTranslator.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/properties/IT_PropertiesTranslator.java index c169c8d..0294577 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/properties/IT_PropertiesTranslator.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/properties/IT_PropertiesTranslator.java @@ -9,6 +9,7 @@ import gov.hhs.aspr.ms.gcm.plugins.util.properties.PropertyDefinition; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.support.input.PropertyDefinitionInput; import gov.hhs.aspr.ms.taskit.core.TranslationController; +import gov.hhs.aspr.ms.taskit.core.TranslationEngineType; import gov.hhs.aspr.ms.taskit.core.testsupport.TestResourceHelper; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestForCoverage; @@ -25,10 +26,11 @@ public void testPropertyValueMapTranslator() { TestResourceHelper.createTestOutputFile(filePath, fileName); TranslationController translatorController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) - .addTranslator(PropertiesTranslator.getTranslator()) - .addInputFilePath(filePath.resolve(fileName), PropertyDefinitionInput.class) - .addOutputFilePath(filePath.resolve(fileName), PropertyDefinition.class) + .addTranslationEngine( + ProtobufTranslationEngine.builder().addTranslator(PropertiesTranslator.getTranslator()).build()) + .addInputFilePath(filePath.resolve(fileName), PropertyDefinitionInput.class, + TranslationEngineType.PROTOBUF) + .addOutputFilePath(filePath.resolve(fileName), PropertyDefinition.class, TranslationEngineType.PROTOBUF) .build(); PropertyDefinition expectedPropertyDefinition = PropertyDefinition.builder() diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/properties/translationSpecs/AT_PropertyDefinitionTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/properties/translationSpecs/AT_PropertyDefinitionTranslationSpec.java index ad6acfc..bf07389 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/properties/translationSpecs/AT_PropertyDefinitionTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/properties/translationSpecs/AT_PropertyDefinitionTranslationSpec.java @@ -6,11 +6,10 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.util.properties.PropertyDefinition; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.support.input.PropertyDefinitionInput; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.util.properties.PropertyDefinition; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -26,14 +25,10 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(PropertiesTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - PropertyDefinitionTranslationSpec translationSpec = new PropertyDefinitionTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/IT_RegionsTranslator.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/IT_RegionsTranslator.java index c90131e..a693f35 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/IT_RegionsTranslator.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/IT_RegionsTranslator.java @@ -29,6 +29,7 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.reports.input.RegionTransferReportPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.taskit.core.TranslationController; +import gov.hhs.aspr.ms.taskit.core.TranslationEngineType; import gov.hhs.aspr.ms.taskit.core.testsupport.TestResourceHelper; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestForCoverage; @@ -46,13 +47,15 @@ public void testRegionsTranslator() { TestResourceHelper.createTestOutputFile(filePath, fileName); TranslationController translatorController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) - .addTranslator(RegionsTranslator.getTranslator()) - .addTranslator(PropertiesTranslator.getTranslator()) - .addTranslator(PeopleTranslator.getTranslator()) - .addTranslator(ReportsTranslator.getTranslator()) - .addInputFilePath(filePath.resolve(fileName), RegionsPluginDataInput.class) - .addOutputFilePath(filePath.resolve(fileName), RegionsPluginData.class) + .addTranslationEngine(ProtobufTranslationEngine.builder() + .addTranslator(RegionsTranslator.getTranslator()) + .addTranslator(PropertiesTranslator.getTranslator()) + .addTranslator(PeopleTranslator.getTranslator()) + .addTranslator(ReportsTranslator.getTranslator()) + .build()) + .addInputFilePath(filePath.resolve(fileName), RegionsPluginDataInput.class, + TranslationEngineType.PROTOBUF) + .addOutputFilePath(filePath.resolve(fileName), RegionsPluginData.class, TranslationEngineType.PROTOBUF) .build(); long seed = 524805676405822016L; @@ -83,13 +86,16 @@ public void testRegionPropertyReportTranslatorSpec() { TestResourceHelper.createTestOutputFile(filePath, fileName); TranslationController translatorController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) - .addTranslator(RegionsTranslator.getTranslator()) - .addTranslator(PropertiesTranslator.getTranslator()) - .addTranslator(PeopleTranslator.getTranslator()) - .addTranslator(ReportsTranslator.getTranslator()) - .addInputFilePath(filePath.resolve(fileName), RegionPropertyReportPluginDataInput.class) - .addOutputFilePath(filePath.resolve(fileName), RegionPropertyReportPluginData.class) + .addTranslationEngine(ProtobufTranslationEngine.builder() + .addTranslator(RegionsTranslator.getTranslator()) + .addTranslator(PropertiesTranslator.getTranslator()) + .addTranslator(PeopleTranslator.getTranslator()) + .addTranslator(ReportsTranslator.getTranslator()) + .build()) + .addInputFilePath(filePath.resolve(fileName), RegionPropertyReportPluginDataInput.class, + TranslationEngineType.PROTOBUF) + .addOutputFilePath(filePath.resolve(fileName), RegionPropertyReportPluginData.class, + TranslationEngineType.PROTOBUF) .build(); long seed = 524805676405822016L; @@ -132,13 +138,16 @@ public void testRegionTransferReportTranslatorSpec() { TestResourceHelper.createTestOutputFile(filePath, fileName); TranslationController translatorController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) - .addTranslator(RegionsTranslator.getTranslator()) - .addTranslator(PropertiesTranslator.getTranslator()) - .addTranslator(PeopleTranslator.getTranslator()) - .addTranslator(ReportsTranslator.getTranslator()) - .addInputFilePath(filePath.resolve(fileName), RegionTransferReportPluginDataInput.class) - .addOutputFilePath(filePath.resolve(fileName), RegionTransferReportPluginData.class) + .addTranslationEngine(ProtobufTranslationEngine.builder() + .addTranslator(RegionsTranslator.getTranslator()) + .addTranslator(PropertiesTranslator.getTranslator()) + .addTranslator(PeopleTranslator.getTranslator()) + .addTranslator(ReportsTranslator.getTranslator()) + .build()) + .addInputFilePath(filePath.resolve(fileName), RegionTransferReportPluginDataInput.class, + TranslationEngineType.PROTOBUF) + .addOutputFilePath(filePath.resolve(fileName), RegionTransferReportPluginData.class, + TranslationEngineType.PROTOBUF) .build(); ReportLabel reportLabel = new SimpleReportLabel("region transfer report label"); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_RegionFilterTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_RegionFilterTranslationSpec.java index 14bb196..47129bd 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_RegionFilterTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_RegionFilterTranslationSpec.java @@ -5,15 +5,14 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.regions.support.RegionFilter; +import gov.hhs.aspr.ms.gcm.plugins.regions.testsupport.TestRegionId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.support.input.RegionFilterInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.regions.support.RegionFilter; -import gov.hhs.aspr.ms.gcm.plugins.regions.testsupport.TestRegionId; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -29,17 +28,13 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(RegionsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - RegionFilterTranslationSpec translationSpec = new RegionFilterTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_RegionIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_RegionIdTranslationSpec.java index 67e1c80..db6ff34 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_RegionIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_RegionIdTranslationSpec.java @@ -5,15 +5,14 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.regions.support.RegionId; +import gov.hhs.aspr.ms.gcm.plugins.regions.testsupport.TestRegionId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.support.input.RegionIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.regions.support.RegionId; -import gov.hhs.aspr.ms.gcm.plugins.regions.testsupport.TestRegionId; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -29,17 +28,13 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(RegionsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - RegionIdTranslationSpec translationSpec = new RegionIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_RegionPropertyDimensionTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_RegionPropertyDimensionTranslationSpec.java index a183956..f82a19e 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_RegionPropertyDimensionTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_RegionPropertyDimensionTranslationSpec.java @@ -5,16 +5,15 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.regions.support.RegionPropertyDimension; +import gov.hhs.aspr.ms.gcm.plugins.regions.testsupport.TestRegionId; +import gov.hhs.aspr.ms.gcm.plugins.regions.testsupport.TestRegionPropertyId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.support.input.RegionPropertyDimensionInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.regions.support.RegionPropertyDimension; -import gov.hhs.aspr.ms.gcm.plugins.regions.testsupport.TestRegionId; -import gov.hhs.aspr.ms.gcm.plugins.regions.testsupport.TestRegionPropertyId; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -30,17 +29,13 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(RegionsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - RegionPropertyDimensionTranslationSpec translationSpec = new RegionPropertyDimensionTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_RegionPropertyIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_RegionPropertyIdTranslationSpec.java index 0f69002..e4a60a3 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_RegionPropertyIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_RegionPropertyIdTranslationSpec.java @@ -12,7 +12,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.support.input.RegionPropertyIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -29,17 +28,13 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(RegionsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - RegionPropertyIdTranslationSpec translationSpec = new RegionPropertyIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_RegionPropertyReportPluginDataTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_RegionPropertyReportPluginDataTranslationSpec.java index 57d416d..3cd4031 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_RegionPropertyReportPluginDataTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_RegionPropertyReportPluginDataTranslationSpec.java @@ -20,7 +20,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.reports.input.RegionPropertyReportPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -38,17 +37,13 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(RegionsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - RegionPropertyReportPluginDataTranslationSpec translationSpec = new RegionPropertyReportPluginDataTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_RegionTransferReportPluginDataTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_RegionTransferReportPluginDataTranslationSpec.java index c9eb811..ead1524 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_RegionTransferReportPluginDataTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_RegionTransferReportPluginDataTranslationSpec.java @@ -5,17 +5,16 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.regions.reports.RegionTransferReportPluginData; +import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; +import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportPeriod; +import gov.hhs.aspr.ms.gcm.plugins.reports.support.SimpleReportLabel; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.reports.input.RegionTransferReportPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.regions.reports.RegionTransferReportPluginData; -import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; -import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportPeriod; -import gov.hhs.aspr.ms.gcm.plugins.reports.support.SimpleReportLabel; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -31,17 +30,13 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(RegionsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - RegionTransferReportPluginDataTranslationSpec translationSpec = new RegionTransferReportPluginDataTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_RegionsPluginDataTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_RegionsPluginDataTranslationSpec.java index d20e89e..166a1d7 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_RegionsPluginDataTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_RegionsPluginDataTranslationSpec.java @@ -16,7 +16,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.data.input.RegionsPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -33,17 +32,13 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(RegionsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - RegionsPluginDataTranslationSpec translationSpec = new RegionsPluginDataTranslationSpec(); translationSpec.init(protobufTranslationEngine); @@ -55,8 +50,7 @@ public void testConvertObject() { people.add(new PersonId(i)); } - RegionsPluginData expectedAppValue = RegionsTestPluginFactory.getStandardRegionsPluginData(people, - true, seed); + RegionsPluginData expectedAppValue = RegionsTestPluginFactory.getStandardRegionsPluginData(people, true, seed); RegionsPluginDataInput inputValue = translationSpec.convertAppObject(expectedAppValue); @@ -65,8 +59,7 @@ public void testConvertObject() { assertEquals(expectedAppValue, actualAppValue); assertEquals(expectedAppValue.toString(), actualAppValue.toString()); - expectedAppValue = RegionsTestPluginFactory.getStandardRegionsPluginData(people, - false, seed); + expectedAppValue = RegionsTestPluginFactory.getStandardRegionsPluginData(people, false, seed); inputValue = translationSpec.convertAppObject(expectedAppValue); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_SimpleRegionIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_SimpleRegionIdTranslationSpec.java index 68104a7..b5d62d9 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_SimpleRegionIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_SimpleRegionIdTranslationSpec.java @@ -5,14 +5,13 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.regions.support.SimpleRegionId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.support.input.SimpleRegionIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.regions.support.SimpleRegionId; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -28,17 +27,13 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(RegionsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - SimpleRegionIdTranslationSpec translationSpec = new SimpleRegionIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_SimpleRegionPropertyIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_SimpleRegionPropertyIdTranslationSpec.java index 7bf9512..544125c 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_SimpleRegionPropertyIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_SimpleRegionPropertyIdTranslationSpec.java @@ -11,7 +11,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.support.input.SimpleRegionPropertyIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -28,17 +27,13 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(RegionsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - SimpleRegionPropertyIdTranslationSpec translationSpec = new SimpleRegionPropertyIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_TestRegionIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_TestRegionIdTranslationSpec.java index 711bf80..f150540 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_TestRegionIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_TestRegionIdTranslationSpec.java @@ -5,14 +5,13 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.regions.testsupport.TestRegionId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.testsupport.input.TestRegionIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.regions.testsupport.TestRegionId; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -28,17 +27,13 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(RegionsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - TestRegionIdTranslationSpec translationSpec = new TestRegionIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_TestRegionPropertyIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_TestRegionPropertyIdTranslationSpec.java index 15a6609..aed7693 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_TestRegionPropertyIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/regions/translationSpecs/AT_TestRegionPropertyIdTranslationSpec.java @@ -5,14 +5,13 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.regions.testsupport.TestRegionPropertyId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.testsupport.input.TestRegionPropertyIdInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.regions.testsupport.TestRegionPropertyId; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -28,17 +27,13 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(RegionsTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - TestRegionPropertyIdTranslationSpec translationSpec = new TestRegionPropertyIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/IT_ReportsTranslator.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/IT_ReportsTranslator.java index a34be26..30f6ebc 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/IT_ReportsTranslator.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/IT_ReportsTranslator.java @@ -10,6 +10,7 @@ import gov.hhs.aspr.ms.gcm.plugins.reports.support.SimpleReportLabel; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.support.input.ReportLabelInput; import gov.hhs.aspr.ms.taskit.core.TranslationController; +import gov.hhs.aspr.ms.taskit.core.TranslationEngineType; import gov.hhs.aspr.ms.taskit.core.testsupport.TestResourceHelper; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestForCoverage; @@ -26,10 +27,10 @@ public void testReportLabelTranslatorSpec() { TestResourceHelper.createTestOutputFile(filePath, fileName); TranslationController translatorController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) - .addTranslator(ReportsTranslator.getTranslator()) - .addInputFilePath(filePath.resolve(fileName), ReportLabelInput.class) - .addOutputFilePath(filePath.resolve(fileName), ReportLabel.class) + .addTranslationEngine( + ProtobufTranslationEngine.builder().addTranslator(ReportsTranslator.getTranslator()).build()) + .addInputFilePath(filePath.resolve(fileName), ReportLabelInput.class, TranslationEngineType.PROTOBUF) + .addOutputFilePath(filePath.resolve(fileName), ReportLabel.class, TranslationEngineType.PROTOBUF) .build(); ReportLabel expecetdReportLabel = new SimpleReportLabel("report label"); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/translationSpecs/AT_ReportLabelTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/translationSpecs/AT_ReportLabelTranslationSpec.java index 324cb7e..5c69d48 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/translationSpecs/AT_ReportLabelTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/translationSpecs/AT_ReportLabelTranslationSpec.java @@ -5,12 +5,11 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; +import gov.hhs.aspr.ms.gcm.plugins.reports.support.SimpleReportLabel; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.support.input.ReportLabelInput; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; -import gov.hhs.aspr.ms.gcm.plugins.reports.support.SimpleReportLabel; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -26,14 +25,10 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - ReportLabelTranslationSpec translationSpec = new ReportLabelTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/translationSpecs/AT_ReportPeriodTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/translationSpecs/AT_ReportPeriodTranslationSpec.java index afda60e..70488fe 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/translationSpecs/AT_ReportPeriodTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/translationSpecs/AT_ReportPeriodTranslationSpec.java @@ -8,7 +8,6 @@ import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportPeriod; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.support.input.ReportPeriodInput; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -25,14 +24,10 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - ReportPeriodTranslationSpec translationSpec = new ReportPeriodTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/translationSpecs/AT_SimpleReportLabelTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/translationSpecs/AT_SimpleReportLabelTranslationSpec.java index aa5a67f..4d30c75 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/translationSpecs/AT_SimpleReportLabelTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/reports/translationSpecs/AT_SimpleReportLabelTranslationSpec.java @@ -8,7 +8,6 @@ import gov.hhs.aspr.ms.gcm.plugins.reports.support.SimpleReportLabel; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.support.input.SimpleReportLabelInput; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -25,14 +24,10 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - SimpleReportLabelTranslationSpec translationSpec = new SimpleReportLabelTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/IT_ResourcesTranslator.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/IT_ResourcesTranslator.java index 9c444c1..5f6e746 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/IT_ResourcesTranslator.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/IT_ResourcesTranslator.java @@ -32,6 +32,7 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.reports.input.ResourcePropertyReportPluginDataInput; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.reports.input.ResourceReportPluginDataInput; import gov.hhs.aspr.ms.taskit.core.TranslationController; +import gov.hhs.aspr.ms.taskit.core.TranslationEngineType; import gov.hhs.aspr.ms.taskit.core.testsupport.TestResourceHelper; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestForCoverage; @@ -49,12 +50,18 @@ public void testResourcesTranslator() { TestResourceHelper.createTestOutputFile(filePath, fileName); TranslationController translatorController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) - .addTranslator(ResourcesTranslator.getTranslator()).addTranslator(PropertiesTranslator.getTranslator()) - .addTranslator(PeopleTranslator.getTranslator()).addTranslator(RegionsTranslator.getTranslator()) - .addTranslator(ReportsTranslator.getTranslator()) - .addInputFilePath(filePath.resolve(fileName), ResourcesPluginDataInput.class) - .addOutputFilePath(filePath.resolve(fileName), ResourcesPluginData.class).build(); + .addTranslationEngine(ProtobufTranslationEngine.builder() + .addTranslator(ResourcesTranslator.getTranslator()) + .addTranslator(PropertiesTranslator.getTranslator()) + .addTranslator(PeopleTranslator.getTranslator()) + .addTranslator(RegionsTranslator.getTranslator()) + .addTranslator(ReportsTranslator.getTranslator()) + .build()) + .addInputFilePath(filePath.resolve(fileName), ResourcesPluginDataInput.class, + TranslationEngineType.PROTOBUF) + .addOutputFilePath(filePath.resolve(fileName), ResourcesPluginData.class, + TranslationEngineType.PROTOBUF) + .build(); long seed = 524805676405822016L; int initialPopulation = 100; @@ -84,12 +91,18 @@ public void testPersonResourceReportTranslatorSpec() { TestResourceHelper.createTestOutputFile(filePath, fileName); TranslationController translatorController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) - .addTranslator(ResourcesTranslator.getTranslator()).addTranslator(PropertiesTranslator.getTranslator()) - .addTranslator(PeopleTranslator.getTranslator()).addTranslator(RegionsTranslator.getTranslator()) - .addTranslator(ReportsTranslator.getTranslator()) - .addInputFilePath(filePath.resolve(fileName), PersonResourceReportPluginDataInput.class) - .addOutputFilePath(filePath.resolve(fileName), PersonResourceReportPluginData.class).build(); + .addTranslationEngine(ProtobufTranslationEngine.builder() + .addTranslator(ResourcesTranslator.getTranslator()) + .addTranslator(PropertiesTranslator.getTranslator()) + .addTranslator(PeopleTranslator.getTranslator()) + .addTranslator(RegionsTranslator.getTranslator()) + .addTranslator(ReportsTranslator.getTranslator()) + .build()) + .addInputFilePath(filePath.resolve(fileName), PersonResourceReportPluginDataInput.class, + TranslationEngineType.PROTOBUF) + .addOutputFilePath(filePath.resolve(fileName), PersonResourceReportPluginData.class, + TranslationEngineType.PROTOBUF) + .build(); long seed = 524805676405822016L; RandomGenerator randomGenerator = RandomGeneratorProvider.getRandomGenerator(seed); @@ -132,12 +145,18 @@ public void testResourcePropertyReportTranslatorSpec() { TestResourceHelper.createTestOutputFile(filePath, fileName); TranslationController translatorController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) - .addTranslator(ResourcesTranslator.getTranslator()).addTranslator(PropertiesTranslator.getTranslator()) - .addTranslator(PeopleTranslator.getTranslator()).addTranslator(RegionsTranslator.getTranslator()) - .addTranslator(ReportsTranslator.getTranslator()) - .addInputFilePath(filePath.resolve(fileName), ResourcePropertyReportPluginDataInput.class) - .addOutputFilePath(filePath.resolve(fileName), ResourcePropertyReportPluginData.class).build(); + .addTranslationEngine(ProtobufTranslationEngine.builder() + .addTranslator(ResourcesTranslator.getTranslator()) + .addTranslator(PropertiesTranslator.getTranslator()) + .addTranslator(PeopleTranslator.getTranslator()) + .addTranslator(RegionsTranslator.getTranslator()) + .addTranslator(ReportsTranslator.getTranslator()) + .build()) + .addInputFilePath(filePath.resolve(fileName), ResourcePropertyReportPluginDataInput.class, + TranslationEngineType.PROTOBUF) + .addOutputFilePath(filePath.resolve(fileName), ResourcePropertyReportPluginData.class, + TranslationEngineType.PROTOBUF) + .build(); ReportLabel reportLabel = new SimpleReportLabel("resource property report label"); @@ -165,12 +184,18 @@ public void testResourceReportTranslatorSpec() { TestResourceHelper.createTestOutputFile(filePath, fileName); TranslationController translatorController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) - .addTranslator(ResourcesTranslator.getTranslator()).addTranslator(PropertiesTranslator.getTranslator()) - .addTranslator(PeopleTranslator.getTranslator()).addTranslator(RegionsTranslator.getTranslator()) - .addTranslator(ReportsTranslator.getTranslator()) - .addInputFilePath(filePath.resolve(fileName), ResourceReportPluginDataInput.class) - .addOutputFilePath(filePath.resolve(fileName), ResourceReportPluginData.class).build(); + .addTranslationEngine(ProtobufTranslationEngine.builder() + .addTranslator(ResourcesTranslator.getTranslator()) + .addTranslator(PropertiesTranslator.getTranslator()) + .addTranslator(PeopleTranslator.getTranslator()) + .addTranslator(RegionsTranslator.getTranslator()) + .addTranslator(ReportsTranslator.getTranslator()) + .build()) + .addInputFilePath(filePath.resolve(fileName), ResourceReportPluginDataInput.class, + TranslationEngineType.PROTOBUF) + .addOutputFilePath(filePath.resolve(fileName), ResourceReportPluginData.class, + TranslationEngineType.PROTOBUF) + .build(); long seed = 524805676405822016L; RandomGenerator randomGenerator = RandomGeneratorProvider.getRandomGenerator(seed); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_PersonResourceReportPluginDataTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_PersonResourceReportPluginDataTranslationSpec.java index 5787119..e867b83 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_PersonResourceReportPluginDataTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_PersonResourceReportPluginDataTranslationSpec.java @@ -10,20 +10,19 @@ import org.apache.commons.math3.random.RandomGenerator; import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; +import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportPeriod; +import gov.hhs.aspr.ms.gcm.plugins.reports.support.SimpleReportLabel; +import gov.hhs.aspr.ms.gcm.plugins.resources.reports.PersonResourceReportPluginData; +import gov.hhs.aspr.ms.gcm.plugins.resources.support.ResourceId; +import gov.hhs.aspr.ms.gcm.plugins.resources.testsupport.TestResourceId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.ResourcesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.reports.input.PersonResourceReportPluginDataInput; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel; -import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportPeriod; -import gov.hhs.aspr.ms.gcm.plugins.reports.support.SimpleReportLabel; -import gov.hhs.aspr.ms.gcm.plugins.resources.reports.PersonResourceReportPluginData; -import gov.hhs.aspr.ms.gcm.plugins.resources.support.ResourceId; -import gov.hhs.aspr.ms.gcm.plugins.resources.testsupport.TestResourceId; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -40,8 +39,7 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(ResourcesTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) @@ -49,9 +47,6 @@ public void testConvertObject() { .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - PersonResourceReportPluginDataTranslationSpec translationSpec = new PersonResourceReportPluginDataTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_ResourceFilterTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_ResourceFilterTranslationSpec.java index e0c5059..9cae0f5 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_ResourceFilterTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_ResourceFilterTranslationSpec.java @@ -15,7 +15,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.ResourcesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.support.input.ResourceFilterInput; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -32,8 +31,7 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(ResourcesTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) @@ -42,9 +40,6 @@ public void testConvertObject() { .addTranslator(PartitionsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - ResourceFilterTranslationSpec translationSpec = new ResourceFilterTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_ResourceIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_ResourceIdTranslationSpec.java index e1f54d7..8058012 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_ResourceIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_ResourceIdTranslationSpec.java @@ -5,16 +5,15 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.resources.support.ResourceId; +import gov.hhs.aspr.ms.gcm.plugins.resources.testsupport.TestResourceId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.ResourcesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.support.input.ResourceIdInput; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.resources.support.ResourceId; -import gov.hhs.aspr.ms.gcm.plugins.resources.testsupport.TestResourceId; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -30,8 +29,7 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(ResourcesTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) @@ -39,9 +37,6 @@ public void testConvertObject() { .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - ResourceIdTranslationSpec translationSpec = new ResourceIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_ResourceInitializationTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_ResourceInitializationTranslationSpec.java index 645365d..1b75cbd 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_ResourceInitializationTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_ResourceInitializationTranslationSpec.java @@ -13,7 +13,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.ResourcesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.support.input.ResourceInitializationInput; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -30,8 +29,7 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(ResourcesTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) @@ -39,9 +37,6 @@ public void testConvertObject() { .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - ResourceInitializationTranslationSpec translationSpec = new ResourceInitializationTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_ResourcePropertyIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_ResourcePropertyIdTranslationSpec.java index f574643..177fb0c 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_ResourcePropertyIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_ResourcePropertyIdTranslationSpec.java @@ -13,7 +13,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.ResourcesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.support.input.ResourcePropertyIdInput; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -30,8 +29,7 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(ResourcesTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) @@ -39,9 +37,6 @@ public void testConvertObject() { .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - ResourcePropertyIdTranslationSpec translationSpec = new ResourcePropertyIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_ResourcePropertyReportPluginDataTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_ResourcePropertyReportPluginDataTranslationSpec.java index 07460aa..f7bb0d8 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_ResourcePropertyReportPluginDataTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_ResourcePropertyReportPluginDataTranslationSpec.java @@ -14,7 +14,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.ResourcesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.reports.input.ResourcePropertyReportPluginDataInput; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -31,8 +30,7 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(ResourcesTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) @@ -40,9 +38,6 @@ public void testConvertObject() { .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - ResourcePropertyReportPluginDataTranslationSpec translationSpec = new ResourcePropertyReportPluginDataTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_ResourceReportPluginDataTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_ResourceReportPluginDataTranslationSpec.java index 9e4b27b..5f6ba88 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_ResourceReportPluginDataTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_ResourceReportPluginDataTranslationSpec.java @@ -22,7 +22,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.ResourcesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.reports.input.ResourceReportPluginDataInput; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -40,8 +39,7 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(ResourcesTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) @@ -49,9 +47,6 @@ public void testConvertObject() { .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - ResourceReportPluginDataTranslationSpec translationSpec = new ResourceReportPluginDataTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_ResourcesPluginDataTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_ResourcesPluginDataTranslationSpec.java index 13c0280..e5d5cb6 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_ResourcesPluginDataTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_ResourcesPluginDataTranslationSpec.java @@ -17,7 +17,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.ResourcesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.data.input.ResourcesPluginDataInput; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -34,8 +33,7 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(ResourcesTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) @@ -43,9 +41,6 @@ public void testConvertObject() { .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - ResourcesPluginDataTranslationSpec translationSpec = new ResourcesPluginDataTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_TestResourceIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_TestResourceIdTranslationSpec.java index e936139..4b823db 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_TestResourceIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_TestResourceIdTranslationSpec.java @@ -5,15 +5,14 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.resources.testsupport.TestResourceId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.people.PeopleTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.PropertiesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.regions.RegionsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.ResourcesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.testsupport.input.TestResourceIdInput; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.resources.testsupport.TestResourceId; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -29,8 +28,7 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(ResourcesTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) @@ -38,9 +36,6 @@ public void testConvertObject() { .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - TestResourceIdTranslationSpec translationSpec = new TestResourceIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_TestResourcePropertyIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_TestResourcePropertyIdTranslationSpec.java index 3fe77e5..22016bb 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_TestResourcePropertyIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/resources/translationSpecs/AT_TestResourcePropertyIdTranslationSpec.java @@ -12,7 +12,6 @@ import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.ReportsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.ResourcesTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.resources.testsupport.input.TestResourcePropertyIdInput; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -29,8 +28,7 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(ResourcesTranslator.getTranslator()) .addTranslator(PropertiesTranslator.getTranslator()) .addTranslator(PeopleTranslator.getTranslator()) @@ -38,9 +36,6 @@ public void testConvertObject() { .addTranslator(ReportsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - TestResourcePropertyIdTranslationSpec translationSpec = new TestResourcePropertyIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/IT_StochasticsTranslator.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/IT_StochasticsTranslator.java index 7616153..68a504f 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/IT_StochasticsTranslator.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/IT_StochasticsTranslator.java @@ -15,6 +15,7 @@ import gov.hhs.aspr.ms.gcm.plugins.stochastics.testsupport.TestRandomGeneratorId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.stochastics.data.input.StochasticsPluginDataInput; import gov.hhs.aspr.ms.taskit.core.TranslationController; +import gov.hhs.aspr.ms.taskit.core.TranslationEngineType; import gov.hhs.aspr.ms.taskit.core.testsupport.TestResourceHelper; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestForCoverage; @@ -31,10 +32,13 @@ public void testStochasticsTranslator() { TestResourceHelper.createTestOutputFile(filePath, fileName); TranslationController translatorController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) - .addTranslator(StochasticsTranslator.getTranslator()) - .addInputFilePath(filePath.resolve(fileName), StochasticsPluginDataInput.class) - .addOutputFilePath(filePath.resolve(fileName), StochasticsPluginData.class) + .addTranslationEngine(ProtobufTranslationEngine.builder() + .addTranslator(StochasticsTranslator.getTranslator()) + .build()) + .addInputFilePath(filePath.resolve(fileName), StochasticsPluginDataInput.class, + TranslationEngineType.PROTOBUF) + .addOutputFilePath(filePath.resolve(fileName), StochasticsPluginData.class, + TranslationEngineType.PROTOBUF) .build(); long seed = 524805676405822016L; diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/translationSpecs/AT_RandomNumberGeneratorIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/translationSpecs/AT_RandomNumberGeneratorIdTranslationSpec.java index 21bb2b2..ae1b171 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/translationSpecs/AT_RandomNumberGeneratorIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/translationSpecs/AT_RandomNumberGeneratorIdTranslationSpec.java @@ -9,7 +9,6 @@ import gov.hhs.aspr.ms.gcm.plugins.stochastics.testsupport.TestRandomGeneratorId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.stochastics.StochasticsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.stochastics.support.input.RandomNumberGeneratorIdInput; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; @@ -26,14 +25,10 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(StochasticsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - RandomNumberGeneratorIdTranslationSpec translationSpec = new RandomNumberGeneratorIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/translationSpecs/AT_StochasticsPluginDataTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/translationSpecs/AT_StochasticsPluginDataTranslationSpec.java index 04f260a..de8bb97 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/translationSpecs/AT_StochasticsPluginDataTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/translationSpecs/AT_StochasticsPluginDataTranslationSpec.java @@ -5,10 +5,6 @@ import org.junit.jupiter.api.Test; -import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.stochastics.StochasticsTranslator; -import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.stochastics.data.input.StochasticsPluginDataInput; -import gov.hhs.aspr.ms.taskit.core.TranslationController; -import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import gov.hhs.aspr.ms.gcm.plugins.stochastics.datamanagers.StochasticsDataManager; import gov.hhs.aspr.ms.gcm.plugins.stochastics.datamanagers.StochasticsPluginData; import gov.hhs.aspr.ms.gcm.plugins.stochastics.support.RandomNumberGeneratorId; @@ -16,6 +12,9 @@ import gov.hhs.aspr.ms.gcm.plugins.stochastics.support.WellState; import gov.hhs.aspr.ms.gcm.plugins.stochastics.testsupport.StochasticsTestPluginFactory; import gov.hhs.aspr.ms.gcm.plugins.stochastics.testsupport.TestRandomGeneratorId; +import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.stochastics.StochasticsTranslator; +import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.stochastics.data.input.StochasticsPluginDataInput; +import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -31,14 +30,10 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(StochasticsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - StochasticsPluginDataTranslationSpec translationSpec = new StochasticsPluginDataTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/translationSpecs/AT_TestRandomGeneratorIdTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/translationSpecs/AT_TestRandomGeneratorIdTranslationSpec.java index d7b27a3..2182e64 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/translationSpecs/AT_TestRandomGeneratorIdTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/translationSpecs/AT_TestRandomGeneratorIdTranslationSpec.java @@ -5,11 +5,10 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.stochastics.testsupport.TestRandomGeneratorId; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.stochastics.StochasticsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.stochastics.testsupport.input.TestRandomGeneratorIdInput; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.stochastics.testsupport.TestRandomGeneratorId; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -25,14 +24,10 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(StochasticsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - TestRandomGeneratorIdTranslationSpec translationSpec = new TestRandomGeneratorIdTranslationSpec(); translationSpec.init(protobufTranslationEngine); diff --git a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/translationSpecs/AT_WellStateTranslationSpec.java b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/translationSpecs/AT_WellStateTranslationSpec.java index 732eb56..c71b337 100644 --- a/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/translationSpecs/AT_WellStateTranslationSpec.java +++ b/protobuf/src/test/java/gov/hhs/aspr/ms/gcm/taskit/protobuf/plugins/stochastics/translationSpecs/AT_WellStateTranslationSpec.java @@ -5,11 +5,10 @@ import org.junit.jupiter.api.Test; +import gov.hhs.aspr.ms.gcm.plugins.stochastics.support.WellState; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.stochastics.StochasticsTranslator; import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.stochastics.support.input.WellStateInput; -import gov.hhs.aspr.ms.taskit.core.TranslationController; import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationEngine; -import gov.hhs.aspr.ms.gcm.plugins.stochastics.support.WellState; import util.annotations.UnitTestConstructor; import util.annotations.UnitTestForCoverage; import util.annotations.UnitTestMethod; @@ -25,14 +24,10 @@ public void testConstructor() { @Test @UnitTestForCoverage public void testConvertObject() { - TranslationController translationController = TranslationController.builder() - .setTranslationEngineBuilder(ProtobufTranslationEngine.builder()) + ProtobufTranslationEngine protobufTranslationEngine = ProtobufTranslationEngine.builder() .addTranslator(StochasticsTranslator.getTranslator()) .build(); - ProtobufTranslationEngine protobufTranslationEngine = translationController - .getTranslationEngine(ProtobufTranslationEngine.class); - WellStateTranslationSpec translationSpec = new WellStateTranslationSpec(); translationSpec.init(protobufTranslationEngine);