メタデータの書き込みに対応

This commit is contained in:
r-ca 2024-01-08 12:23:48 +09:00
parent f000addbce
commit 5c16ea6e21
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -70,7 +70,7 @@ public class DocumentProcessorImpl implements DocumentProcessor{
if (fileManager.isExist("meta.xml")) { if (fileManager.isExist("meta.xml")) {
logger.debug("init", "meta.xml found"); logger.debug("init", "meta.xml found");
try { try {
// xmlMetaModel = xmlMetaParser.parse(fileManager.loadText("meta.xml")); xmlMetaModel = xmlMetaParser.deserialize(fileManager.loadDocument("meta.xml"));
} catch (Exception e) { } catch (Exception e) {
logger.debug("init", "meta.xml parse failed"); logger.debug("init", "meta.xml parse failed");
e.printStackTrace(); e.printStackTrace();
@ -85,14 +85,12 @@ public class DocumentProcessorImpl implements DocumentProcessor{
xmlMetaModel.setDefaultBranch(documentDetail.getDefaultBranch()); xmlMetaModel.setDefaultBranch(documentDetail.getDefaultBranch());
xmlMetaModel.setPages(new ArrayList<>()); xmlMetaModel.setPages(new ArrayList<>());
// try { try {
// fileManager.createFile("meta.xml"); fileManager.saveDocument(xmlMetaParser.serialize(xmlMetaModel), "meta.xml");
// fileManager.saveText(xmlMetaParser.serialize(xmlMetaModel), "meta.xml"); } catch (Exception e) {
// logger.info("init", "meta.xml created"); logger.debug("init", "meta.xml save failed");
// } catch (Exception e) { e.printStackTrace();
// logger.debug("init", "meta.xml create failed"); }
// e.printStackTrace();
// }
} }
} }