public ResourceId handleDirectory(IdentificationResult result, ResourceId parentId, boolean restricted) {
final URI uri = result.getIdentifier().getUri();
//log.debug(String.format("handling directory [%s]", uri));
ProfileResourceNode node = new ProfileResourceNode(uri);
RequestMetaData requestMetaData = result.getMetaData();
NodeMetaData metaData = new NodeMetaData();
metaData.setName(requestMetaData.getName());
metaData.setSize(null);
metaData.setLastModified(requestMetaData.getTime());
metaData.setIdentificationMethod(IdentificationMethod.NULL);
metaData.setNodeStatus(restricted ? NodeStatus.ACCESS_DENIED : NodeStatus.DONE);
metaData.setResourceType(ResourceType.FOLDER);
node.setMetaData(metaData);
setNodeIds(node, parentId);