if ( entry == null ) return null;
String path = parentPath.getPath() + entry.getFilename();
if ( entry.isDirectory() ) path += "/";
DirectoryEntry newEntry = new DirectoryEntry();
newEntry.setId( (ObjectId) adaptIdentifier( entry.getObjectId() ) );
newEntry.setPath( new ObjectPath( path ) );
newEntry.setType( entry.getFileType().toString() );
newEntry.setSystemMetadata( adaptMetadata( entry.getSystemMetadataMap() ) );
newEntry.setUserMetadata( adaptMetadata( entry.getUserMetadataMap() ) );
return newEntry;
}