if ( node instanceof ObjectStoreDirectoryNode || node == _treeModel.getRoot() )
{
try
{
InputObjectState types = new InputObjectState();
if (_objectStore.allTypes(types))
{
try
{
boolean endOfList = false;
while (!endOfList)
{
theName = types.unpackString();
if (theName.compareTo("") == 0)
endOfList = true;
else
{
/** If the object is in the folder we are looking at then make sure it exists in the tree **/
if ( theName.startsWith(pathPrefix) )
{
String newChild = theName.substring(pathPrefix.length());
// Ensure this node doesn't contain more nodes
if ( newChild.indexOf(GROUP_DELIMITER) == -1 )
{
SubTreeNode newNode;
if ( getChildWithName(node, newChild) == null )
{
_treeModel.insertNodeInto( newNode = new ObjectStoreDirectoryNode(newChild, newChild), node, node.getChildCount() );
newNode.setIconPanelEntry(new ObjectStoreViewEntry(theName, theName, newNode));
_treeModel.insertNodeInto( new ObjectStoreDirectoryNode(this, pathPrefix), newNode, newNode.getChildCount() );
}
nodesAdded.add(newChild);
}
else
{
DefaultMutableTreeNode newNode;
String name = newChild.substring(0, newChild.indexOf(GROUP_DELIMITER));
if ( getChildWithName(node, name) == null )
{
_treeModel.insertNodeInto( newNode = new ObjectStoreDirectoryNode(name, name), node, node.getChildCount() );
((ObjectStoreBrowserNode)newNode).setIconPanelEntry(new ObjectStoreViewEntry(theName, theName, (ObjectStoreBrowserNode)newNode));
_treeModel.insertNodeInto( new ObjectStoreDirectoryNode(this, pathPrefix), newNode, newNode.getChildCount() );
}
nodesAdded.add(name);
}
}
}
}
}
catch (Exception e)
{
// End of list
}
}
theName = File.separator + pathPrefix;
if ( theName.length() > 0 )
{
InputObjectState uids = new InputObjectState();
if (_objectStore.allObjUids(theName, uids))
{
Uid theUid = new Uid();