- (Bookmark *)getBookmarkForRecord:(NSDictionary *)record withIdentifier:(NSString *)identifier {
	
	if ([[ record objectForKey: @"mStatus" ] unsignedIntValue] == 1)
		return [ Bookmark separator ];
	
	Bookmark *bookmark = [ Bookmark bookmarkWithTitle:[ record objectForKey: @"mTitle" ] url:[ record objectForKey: @"mURL" ] lastVisit:[ record objectForKey: @"mLastVisit" ]];
	[ bookmark setItemDescription: [ record objectForKey: @"mDescription" ]];
	[ bookmark setShortcut: [ record objectForKey: @"mKeyword" ]];
	[ bookmark setIcon: [[ NSImage alloc ] initWithData: [ record objectForKey: @"mIcon" ]]];
	[ bookmark setUUID: identifier ];
	[ bookmark setNumberOfVisits: [[ record objectForKey: @"mNumberOfVisits" ] unsignedIntValue ]];
	[ bookmark setFaviconURL: [ record objectForKey: @"mFaviconURL" ]];
	
	return bookmark;
	
}

- (BookmarkFolder *)getBookmarkFolderForRecord:(NSDictionary *)record withIdentifier:(NSString *)identifier bookmarkRecords:(NSArray *)bookmarks bookmarkFolderRecords:(NSArray *)bookmarkFolders {
	
	BookmarkFolder *folder;
	
	if([ record objectForKey: @"mIdentifier" ]) {
		folder = (BookmarkFolder *)[[ manager bookmarkRoot ] itemWithUUID: identifier ];
	}
	else {
		folder = [ BookmarkFolder bookmarkFolderWithTitle: [ record objectForKey: @"mTitle" ]];
	}
	
	[ folder setItemDescription: [ record objectForKey: @"mDescription" ]];
	[ folder setShortcut: [ record objectForKey: @"mKeyword" ]];
	[ folder setIcon: [[ NSImage alloc ] initWithData: [ record objectForKey: @"mIcon" ]]];
	[ folder setSpecialFlag: [[ record objectForKey: @"mSpecialFlag" ] unsignedIntValue ]];
	[ folder setUUID: identifier ];
	[ folder setIdentifier: [ record objectForKey: @"mIdentifier" ]];
	
	NSEnumerator *bookmarkFoldersEnumerator = [ bookmarkFolders objectEnumerator ];
	NSDictionary *addedFolder;
	while((addedFolder = [ bookmarkFoldersEnumerator nextObject ])) {
		
		NSDictionary *folderRecord = [ addedFolder objectForKey: @"record" ];
		NSString *folderIdentifier = [ addedFolder objectForKey: @"identifier" ];
		
		if([[ folderRecord objectForKey: @"mChildArray" ] containsObject: folderIdentifier ]) {
			//[ folder insertChild: [ self getBookmarkFolderForRecord: record withIdentifier: folderIdentifier bookmarkRecords: bookmarks bookmarkFolderRecords: bookmarkFolders ] atIndex: [[ folderRecord objectForKey: @"mPosition" ] unsignedIntValue ] isMove: NO ];
			[ folder appendChild: [ self getBookmarkFolderForRecord: record withIdentifier: folderIdentifier bookmarkRecords: bookmarks bookmarkFolderRecords: bookmarkFolders ]];
		}
		
	}
	
	NSEnumerator *bookmarksEnumerator = [ bookmarks objectEnumerator ];
	NSDictionary *addedBookmark;
	while((addedBookmark = [ bookmarksEnumerator nextObject ])) {
		
		NSDictionary *bookmarkRecord = [ addedBookmark objectForKey: @"record" ];
		NSString *bookmarkIdentifier = [ addedBookmark objectForKey: @"identifier" ];
		
		if([[ record objectForKey: @"mChildArray" ] containsObject: bookmarkIdentifier ]) {
			//[ folder insertChild: [ self getBookmarkForRecord: bookmarkRecord withIdentifier: bookmarkIdentifier ] atIndex: [[ bookmarkRecord objectForKey: @"mPosition" ] unsignedIntValue ] isMove: NO ];
			[ folder appendChild: [ self getBookmarkForRecord: bookmarkRecord withIdentifier: bookmarkIdentifier ]];
		}
		
	}
	
	return folder;
	
}