mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 09:43:15 +00:00
close処理修正
This commit is contained in:
parent
7951bef6e0
commit
e8804e8f84
|
@ -18,7 +18,7 @@ public interface DocumentProcessor {
|
||||||
Bitmap getPageAtIndex(int index);
|
Bitmap getPageAtIndex(int index);
|
||||||
int getPageCount();
|
int getPageCount();
|
||||||
|
|
||||||
void close();
|
void close() throws Exception;
|
||||||
void init() throws Exception; // TODO-rca: 例外処理
|
void init() throws Exception; // TODO-rca: 例外処理
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,18 +148,16 @@ public class DocumentProcessorImpl implements DocumentProcessor{
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void close() {
|
public void close() throws Exception{
|
||||||
logger.debug("close", "called");
|
logger.debug("close", "called");
|
||||||
// TODO-rca: ここでxmlファイルを保存する
|
if (this.fileManager.isExist("meta.xml")) {
|
||||||
this.fileManager.backRootDir();
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.fileManager.saveDocument(xmlMetaParser.serialize(xmlMetaModel), "meta.xml");
|
this.fileManager.createFile("meta.xml").saveXml(xmlMetaParser.serialize(xmlMetaModel));
|
||||||
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());
|
||||||
}
|
}
|
||||||
logger.info("close", "finished");
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user