use of cbit.vcell.desktop.VCellBasicCellRenderer.VCDocumentInfoNode in project vcell by virtualcell.
the class GeometryDbTreeModel method createOwnerSubTree.
/**
* Insert the method's description here.
* Creation date: (11/28/00 1:06:51 PM)
* @return cbit.vcell.desktop.BioModelNode
* @param docManager cbit.vcell.clientdb.DocumentManager
*/
public BioModelNode createOwnerSubTree(User owner, GeometryInfo[] geometryInfos) throws DataAccessException {
//
// for each user
//
BioModelNode rootNode = new BioModelNode(owner, true);
for (int i = 0; i < geometryInfos.length; i++) {
GeometryInfo geometryInfo = geometryInfos[i];
if (geometryInfo.getVersion().getOwner().equals(owner) && geometryInfo.getDimension() > 0) {
if (!meetSearchCriteria(geometryInfo)) {
continue;
}
BioModelNode bioModelNode = new BioModelNode(new VCDocumentInfoNode(geometryInfo), true);
rootNode.add(bioModelNode);
//
// get list of geometries with the same branch
//
Vector<GeometryInfo> geometryBranchList = new Vector<GeometryInfo>();
geometryBranchList.addElement(geometryInfo);
for (i = i + 1; i < geometryInfos.length; i++) {
if (geometryInfos[i].getVersion().getBranchID().equals(geometryInfo.getVersion().getBranchID()) && geometryInfos[i].getDimension() > 0) {
if (!meetSearchCriteria(geometryInfos[i])) {
continue;
}
geometryBranchList.add(0, geometryInfos[i]);
} else {
i--;
break;
}
}
GeometryInfo[] geometryInfosInBranch = null;
if (getLatestOnly()) {
geometryInfosInBranch = new GeometryInfo[1];
geometryInfosInBranch[0] = (GeometryInfo) geometryBranchList.elementAt(0);
} else {
geometryInfosInBranch = new GeometryInfo[geometryBranchList.size()];
geometryBranchList.copyInto(geometryInfosInBranch);
}
for (int versionCount = 0; versionCount < geometryInfosInBranch.length; versionCount++) {
bioModelNode.add(createVersionSubTree(geometryInfosInBranch[versionCount]));
}
}
}
return rootNode;
}
Aggregations