From 17bf162341898c1d2c9b11e9c303dcf0cc47a5b4 Mon Sep 17 00:00:00 2001 From: r-ca Date: Thu, 14 Dec 2023 04:28:10 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=95=E3=83=AB=E3=83=91=E3=82=B9=E3=82=92?= =?UTF-8?q?=E8=BF=94=E3=81=99Getter=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../model/document/path/DocumentPath.java | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/model/src/main/java/one/nem/lacerta/model/document/path/DocumentPath.java b/model/src/main/java/one/nem/lacerta/model/document/path/DocumentPath.java index 9e5ba226..138bd4f8 100644 --- a/model/src/main/java/one/nem/lacerta/model/document/path/DocumentPath.java +++ b/model/src/main/java/one/nem/lacerta/model/document/path/DocumentPath.java @@ -1,4 +1,41 @@ package one.nem.lacerta.model.document.path; +import java.nio.file.Path; +import java.nio.file.Paths; + public class DocumentPath { + + String rootPath; + String path; + + // Getter + + public String getRootPath() { + return rootPath; + } + + public String getPath() { + return path; + } + + public Path getFullPath() { + // rootPathとpathを結合して返す + return Paths.get(rootPath, path); + } + + public String getFullPathString() { + // rootPathとpathを結合して返す + return Paths.get(rootPath, path).toString(); + } + + // Setter + + public void setRootPath(String rootPath) { + this.rootPath = rootPath; + } + + public void setPath(String path) { + this.path = path; + } + }