/**
* @param pageNode
* @return given a page dom4j node it returns a DocumentPage object
*/
public static DocumentPage getDocumentPage(Node pageNode) {
DocumentPage retVal = null;
try {
if (pageNode != null) {
retVal = new DocumentPage();
Node deletedNode = (Node) pageNode.selectSingleNode("@deleted");
if (deletedNode != null && deletedNode.getText().length() > 0) {
retVal.setDeleted(Boolean.valueOf(deletedNode.getText()));
}
Node numberNode = (Node) pageNode.selectSingleNode("@number");
if (numberNode != null && numberNode.getText().length() > 0) {
retVal.setPageNumber(Integer.valueOf(numberNode.getText()));
}
Node rotationNode = (Node) pageNode.selectSingleNode("@rotation");
if (rotationNode != null && rotationNode.getText().length() > 0) {
retVal.setRotation(Rotation.getRotation(Integer.valueOf(rotationNode.getText())));
}
}
} catch (Exception e) {
log.warn(GettextResource.gettext(Configuration.getInstance().getI18nResourceBundle(),