if (null != pageNum && !"".equals(pageNum)) {
try {
currentPageNum = Integer.valueOf(pageNum).intValue();
} catch (NumberFormatException nfex) {
log.error("The format of page number is incorrect: " + pageNum);
throw new DAOException("The format of page number is incorrect: " + pageNum, nfex);
}
} else {
currentPageNum = 1;
}
int total = navigateObject.getPhysicalStruct().size();
if (currentPageNum < 1) {
currentPageNum = 1;
}
if (currentPageNum > total) {
currentPageNum = total;
}
AtomicItem page = getPageItem(currentPageNum);
if (page == null) {
throw new DAOException("The page number is incorrect: " + pageNum);
}
/*
* page.setAltMessage(navigateObject.getDescription() + ": Page " +
* currentPageNum + " of " + total);
*/