if (davServer != null) {
glossaryResource = new DavResource(davServer, getContentDir() + "/" + glossaryFileName);
} else {
glossaryResource = new FileResource(new File(getContentDir(), glossaryFileName));
}
final XmlDocument glossaryDoc = xmlService.loadXmlDocument("glossary", glossaryResource, new DtbookParser(), null);
// Set up Glossary
Databinder.ensureSession(new SessionUnit() {
public Object run(Session sess) {
glossary = GlossaryService.get().parseXmlGlossaryDocument(glossaryDoc);
return null;
}
});
}
// Load student content files
String fileList = appProperties.getProperty("isi.studentContentFiles", DEFAULT_STUDENT_CONTENT_FILE_NAMES).trim();
studentContentFiles = fileList.split("\\s*,\\s*");
documentObservers.add(new XmlDocumentObserver(getSectionElement(), getPageElement())); // Use set so sub-classed applications can add to it as well
for (String file : studentContentFiles) {
Resource resource;
if (davServer != null) {
log.debug("attempting to load DavResource file = {}", getContentDir() + "/" + file);
log.debug("loading the DavResource on the Server = {}", davServer);
resource = new DavResource(davServer, getContentDir() + "/" + file);
} else {
log.debug("attempting to load Resource file = {}", getContentDir() + "/" + file);
resource = new FileResource(new File(getContentDir(), file));
}
XmlDocument doc = xmlService.loadXmlDocument(file, resource, new DtbookParser(), documentObservers);
studentContent.add(doc);
}
// Load email content files
if (emailOn) {