* or the bookmark set for this user.
*/
protected void getInitChapter(PageParameters parameters) {
// check if there is a location passed in otherwise default to the current bookmarked location
if (parameters.containsKey("loc")) {
currentLoc = new ContentLoc(parameters.getString("loc"));
} else {
currentLoc = ISIApplication.get().getBookmarkLoc();
}
// Determine which chapter is the current chapter
for (XmlSection chapter : mChapterList.getObject()) {
if (chapter.isAncestorOf(currentLoc.getSection())) {
currentChapterLoc = new ContentLoc(chapter);
} else if (chapter.equals(currentLoc.getSection())) {
currentChapterLoc = currentLoc;
}
}
// if for some reason you can't find the chapter, then load the first chapter
if (currentChapterLoc == null) {
currentChapterLoc = new ContentLoc(mChapterList.getObject().get(0));
}
}