for (Node node : nodes) {
String statusImg = UDDIBrowser.images.down().getHTML();
if ("Up".equals(node.getStatus())) {
statusImg = UDDIBrowser.images.up().getHTML();
}
TreeItem nodeTree = new TreeItem(statusImg + " " + node.getName());
nodeTree.setUserObject(node);
nodeTree.setStyleName("portlet-form-field-label");
nodeTree.setState(true);
nodeTree.setUserObject(node);
if (node.getStatus().startsWith("D")) {
TreeItem statItem = new TreeItem(node.getStatus());
statItem.setStyleName("portlet-form-field-label");
statItem.setUserObject(node);
nodeTree.addItem(statItem);
}
TreeItem descItem = new TreeItem(UDDIBrowser.images.description().getHTML() + " " + node.getDescription());
descItem.setStyleName("portlet-form-field-label");
descItem.setUserObject(node);
nodeTree.addItem(descItem);
for (Subscription subcription : node.getSubscriptions()) {
TreeItem subcriptionItem = new TreeItem(UDDIBrowser.images.subscription().getHTML() + " "
+ subcription.getSubscriptionKey());
subcriptionItem.setStyleName("portlet-form-field-label");
subcription.setNode(node);
subcriptionItem.setUserObject(subcription);
nodeTree.addItem(subcriptionItem);
}
subscriptionTree.addItem(nodeTree);
}