public static TreeNode standardTraverseTree(RegistryPropertyImpl cl, TreeNode node) {
log.info("StorageBackingBean standardTraverseTree() cl.getUri(): " + cl.getUri());
StorageDigitalObjectReference[] dors = dr.list(cl.getUri());
log.info("StorageBackingBean standardTraverseTree() dors.length: " + dors.length);
TreeNode childClass = new TreeNodeImpl();
// log.info("StorageBackingBean standardTraverseTree() setData for node.addChild: " + (cl.getHumanReadableName()));
childClass.setData(new DummyRegistryProperty(cl.getHumanReadableName()));
childClass.setParent(node);
if (dors.length>0) {
node.removeChild(cl.getHumanReadableName());
node.addChild(cl.getHumanReadableName(), childClass);
}
for (int i = 0; i < dors.length; i++) {
// log.info("StorageBackingBean standardTraverseTree() currentConfiguration: " + currentConfiguration +
// ", dors[i].getLeafname(): " + dors[i].getLeafname() + ", dors[i].getUri(): " + dors[i].getUri());
// filter if filter set
// log.info("StorageBackingBean standardTraverseTree() selectedRegistry: " + selectedRegistry);
boolean allowNodes = false;
boolean containsRegisrtyName = false;
if (StorageBackingBean.registryList != null) {
for (int idx = 0; idx < StorageBackingBean.registryList.size(); idx++) {
if (dors[i].getUri().toString().contains(StorageBackingBean.registryList.get(idx))) {
containsRegisrtyName = true;
}
}
}
if (!containsRegisrtyName) {
allowNodes = true;
}
if (selectedRegistry != null && selectedRegistry.length() > 0 &&
(dors[i].getUri().toString().contains(selectedRegistry) || selectedRegistry.equals(ALL_REGISTRIES) ||
allowNodes)) {
// log.info("StorageBackingBean standardTraverseTree() process new node creation.");
try {
TreeNode child = new TreeNodeImpl();
RegistryPropertyImpl registryProperty = new RegistryPropertyImpl(dors[i]);
// log.info("StorageBackingBean standardTraverseTree() child.setData(registryProperty): " + registryProperty +
// ", rp.getUri: " + registryProperty.getURI());
child.setData(registryProperty);
// log.info("#### StorageBackingBean standardTraverseTree() childClass.addChild registryProperty.getURI(): " +
// registryProperty.getURI());
if (!dors[i].isDirectory()) {
childClass.addChild(registryProperty.getURI(), child);
}