mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
修正
This commit is contained in:
parent
5fb938c263
commit
fe3d332a36
|
@ -56,10 +56,13 @@ public class DocumentProcessorImpl implements DocumentProcessor{
|
||||||
logger.debug("init", "documentRootPath: " + this.documentRootPath);
|
logger.debug("init", "documentRootPath: " + this.documentRootPath);
|
||||||
|
|
||||||
this.fileManager = fileManagerFactory.create(this.documentRootPath).enableAutoCreateParent(); //Initialize FileManager
|
this.fileManager = fileManagerFactory.create(this.documentRootPath).enableAutoCreateParent(); //Initialize FileManager
|
||||||
|
|
||||||
|
FileManager initFileManager = this.fileManager.getNewInstance();
|
||||||
|
|
||||||
logger.debug("init", "fileManager created");
|
logger.debug("init", "fileManager created");
|
||||||
|
|
||||||
// xmlファイルの読み込み
|
// xmlファイルの読み込み
|
||||||
if (fileManager.isExist("meta.xml")) {
|
if (initFileManager.isExist("meta.xml")) {
|
||||||
logger.debug("init", "meta.xml found");
|
logger.debug("init", "meta.xml found");
|
||||||
try {
|
try {
|
||||||
this.xmlMetaModel = xmlMetaParser.deserialize(this.fileManager.loadXml("meta.xml"));
|
this.xmlMetaModel = xmlMetaParser.deserialize(this.fileManager.loadXml("meta.xml"));
|
||||||
|
@ -79,7 +82,7 @@ public class DocumentProcessorImpl implements DocumentProcessor{
|
||||||
xmlMetaModel.setPages(new ArrayList<>());
|
xmlMetaModel.setPages(new ArrayList<>());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.fileManager.createFile("meta.xml").saveXml(xmlMetaParser.serialize(xmlMetaModel));
|
initFileManager.createFileIfNotExist("meta.xml").saveXml(xmlMetaParser.serialize(xmlMetaModel), "meta.xml");
|
||||||
logger.debug("init", "meta.xml saved");
|
logger.debug("init", "meta.xml saved");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("init", "meta.xml save failed");
|
logger.error("init", "meta.xml save failed");
|
||||||
|
@ -148,14 +151,12 @@ public class DocumentProcessorImpl implements DocumentProcessor{
|
||||||
@Override
|
@Override
|
||||||
public void close() throws Exception{
|
public void close() throws Exception{
|
||||||
logger.debug("close", "called");
|
logger.debug("close", "called");
|
||||||
if (this.fileManager.isExist("meta.xml")) {
|
|
||||||
try {
|
try {
|
||||||
this.fileManager.createFile("meta.xml").saveXml(xmlMetaParser.serialize(xmlMetaModel));
|
this.fileManager.createFileIfNotExist("meta.xml").saveXml(xmlMetaParser.serialize(xmlMetaModel), "meta.xml");
|
||||||
logger.debug("close", "meta.xml saved");
|
logger.debug("close", "meta.xml saved");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("close", "meta.xml save failed");
|
logger.error("close", "meta.xml save failed");
|
||||||
logger.trace("close", e.getMessage());
|
logger.trace("close", e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user