}
treeBean.setFirstDocNumber(((it.highwaytech.db.HierTitle) (vectHierTitle.firstElement())).docNumber());
treeBean.setLastDocNumber(((it.highwaytech.db.HierTitle) vectHierTitle.lastElement()).docNumber());
for (int index = 0; index < vectHierTitle.size(); index++) {
HierBrowserBean hierBrowserBean = new HierBrowserBean();
it.highwaytech.db.HierTitle theTitle = ((it.highwaytech.db.HierTitle) (vectHierTitle.get(index)));
String hier = theTitle.getHier(xwconn.getTheDb(), xwconn.getServerConnection(xwconn.connection), " ");
hierBrowserBean.setHier(hier);
int docNumber = theTitle.docNumber();
hierBrowserBean.setDocNumber(docNumber);
try {
it.highwaytech.db.HierPath thePath = xwconn.getHierPath(hierBrowserBean.getDocNumber());
hierBrowserBean.setHierPath(thePath);
} catch (Exception e) {
}
int depth = theTitle.depth();
hierBrowserBean.setDepth(depth);
boolean hasSons = theTitle.hasSons();
hierBrowserBean.setHasSons(hasSons);
int firstDocNumber = ((it.highwaytech.db.HierTitle) (vectHierTitle.firstElement())).docNumber();
hierBrowserBean.setFirstDocNumber(firstDocNumber);
int lastDocNumber = ((it.highwaytech.db.HierTitle) vectHierTitle.lastElement()).docNumber();
hierBrowserBean.setLastDocNumber(lastDocNumber);
boolean opened = theTitle.isOpened();
hierBrowserBean.setOpened(opened);
Title titArch = xwconn.getTitle(xwconn.connection, xwconn.getTheDb(), theTitle.docNumber());
// System.out.println("HierBrowserPageCommand.execute() title docNumber aa "+theTitle.docNumber(xwconn.getTheDb(),
// xwconn.getServerConnection(xwconn.connection),
// theTitle.depth()));
// System.out.println("HierBrowserPageCommand.execute() title docNumber bb "+theTitle.docNumber());
// System.out.println("HierBrowserPageCommand.execute() title "+title);
// System.out.println("HierBrowserPageCommand.execute() title "+titArch.getTitle());
String title = titArch.getTitle();
hierBrowserBean.setTitle(title);
boolean lastChild = theTitle.hasBrothers(theTitle.depth());
hierBrowserBean.setLastChild(!lastChild);
if (theTitle.depth() > 1) {
boolean fatherLastChild = theTitle.hasBrothers(theTitle.depth() - 1);
hierBrowserBean.setFatherLastChild(!fatherLastChild);
}
if (theTitle.depth() > 1) {
boolean[] fathers = new boolean[theTitle.depth() - 1];
for (int i = theTitle.depth() - 2; i > 0; i--) {
fathers[(theTitle.depth() - 2) - i] = !theTitle.hasBrothers(theTitle.depth() - i);
}
hierBrowserBean.setFathersLastChild(fathers);
}
treeBean.getVectHierBrowserBean().addElement(hierBrowserBean);
}
}