From 4180ccd2e5c84ad2fd627fb79674fe54fbfe77db Mon Sep 17 00:00:00 2001 From: Alex Barkell Date: Mon, 28 Jun 2021 13:26:57 -0400 Subject: [PATCH] add openslide mpp --- src/main/java/org/kpmp/slides/Metadata.java | 9 +++++++ src/main/java/org/kpmp/slides/OpenSlide.java | 27 ++++++++++++++++++++ src/test/java/org/kpmp/slides/SlideTest.java | 9 +++++++ 3 files changed, 45 insertions(+) create mode 100644 src/main/java/org/kpmp/slides/OpenSlide.java diff --git a/src/main/java/org/kpmp/slides/Metadata.java b/src/main/java/org/kpmp/slides/Metadata.java index 1adbc71..ab6be73 100644 --- a/src/main/java/org/kpmp/slides/Metadata.java +++ b/src/main/java/org/kpmp/slides/Metadata.java @@ -7,6 +7,7 @@ public class Metadata { // @Field("aperio") private Aperio aperio; + private OpenSlide openslide; public Aperio getAperio() { return aperio; @@ -16,5 +17,13 @@ public void setAperio(Aperio aperio) { this.aperio = aperio; } + public OpenSlide getOpenSlide() { + return openslide; + } + + public void setOpenSlide(OpenSlide openslide) { + this.openslide = openslide; + } + } diff --git a/src/main/java/org/kpmp/slides/OpenSlide.java b/src/main/java/org/kpmp/slides/OpenSlide.java new file mode 100644 index 0000000..0a6d3a7 --- /dev/null +++ b/src/main/java/org/kpmp/slides/OpenSlide.java @@ -0,0 +1,27 @@ +package org.kpmp.slides; + +import org.springframework.data.mongodb.core.mapping.Document; + +@Document(collection = "patients") +public class OpenSlide { + + private String mpp_x; + private String mpp_y; + + public String getMpp_x() { + return mpp_x; + } + + public void setMpp_x(String mpp_x) { + this.mpp_x = mpp_x; + } + + public String getMpp_y() { + return mpp_y; + } + + public void setMpp_y(String mpp_y) { + this.mpp_y = mpp_y; + } + +} diff --git a/src/test/java/org/kpmp/slides/SlideTest.java b/src/test/java/org/kpmp/slides/SlideTest.java index da2673d..830c445 100644 --- a/src/test/java/org/kpmp/slides/SlideTest.java +++ b/src/test/java/org/kpmp/slides/SlideTest.java @@ -58,4 +58,13 @@ public void testSetAperio() { assertEquals(aperio, metadata.getAperio()); } + + @Test + public void testSetOpenSlide() { + OpenSlide openSlide = new OpenSlide(); + Metadata metadata = new Metadata(); + metadata.setOpenSlide(openSlide); + + assertEquals(openSlide, metadata.getOpenSlide()); + } }