From 5c16ea6e213e0c11687c9222dcdf913bcfd3e72e Mon Sep 17 00:00:00 2001 From: r-ca Date: Mon, 8 Jan 2024 12:23:48 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=A1=E3=82=BF=E3=83=87=E3=83=BC=E3=82=BF?= =?UTF-8?q?=E3=81=AE=E6=9B=B8=E3=81=8D=E8=BE=BC=E3=81=BF=E3=81=AB=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../processor/impl/DocumentProcessorImpl.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java b/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java index 6a9e7ca6..074dd369 100644 --- a/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java +++ b/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java @@ -70,7 +70,7 @@ public class DocumentProcessorImpl implements DocumentProcessor{ if (fileManager.isExist("meta.xml")) { logger.debug("init", "meta.xml found"); try { -// xmlMetaModel = xmlMetaParser.parse(fileManager.loadText("meta.xml")); + xmlMetaModel = xmlMetaParser.deserialize(fileManager.loadDocument("meta.xml")); } catch (Exception e) { logger.debug("init", "meta.xml parse failed"); e.printStackTrace(); @@ -85,14 +85,12 @@ public class DocumentProcessorImpl implements DocumentProcessor{ xmlMetaModel.setDefaultBranch(documentDetail.getDefaultBranch()); xmlMetaModel.setPages(new ArrayList<>()); -// try { -// fileManager.createFile("meta.xml"); -// fileManager.saveText(xmlMetaParser.serialize(xmlMetaModel), "meta.xml"); -// logger.info("init", "meta.xml created"); -// } catch (Exception e) { -// logger.debug("init", "meta.xml create failed"); -// e.printStackTrace(); -// } + try { + fileManager.saveDocument(xmlMetaParser.serialize(xmlMetaModel), "meta.xml"); + } catch (Exception e) { + logger.debug("init", "meta.xml save failed"); + e.printStackTrace(); + } } }