void MasterCatalogModel::setCatalogMetadata(const QString& displayName, const QString& description){
    if ( std::find(_bookmarkedList.begin(), _bookmarkedList.end(), _currentUrl) != _bookmarkedList.end()){
        if ( _activeCatalogs.find(_currentUrl) != _activeCatalogs.end()){
        CatalogModel *model = _activeCatalogs[_currentUrl];
            model->setDisplayName(displayName);
            model->resourceRef().setDescription(description);
        }
    }
}
void MasterCatalogModel::setCatalogMetadata(const QString& displayName, const QString& description){
    CatalogModel *model = selectedCatalog();
    if ( model && _currentbookmarkid != ""){
        model->setDisplayName(displayName);
        model->resourceRef().setDescription(description); 
        QString key = "users/user-0/data-catalog-" + _currentbookmarkid;
        context()->configurationRef().putValue(key + "/label", displayName);
        context()->configurationRef().putValue(key + "/description", description);
    }
}
void MasterCatalogModel::setCatalogMetadata(const QString& displayName, const QString& description){
    if ( _selectedBookmarkIndex < 3)
        return;

    CatalogModel *model = _bookmarks[_selectedBookmarkIndex];
    if ( model ){
        model->setDisplayName(displayName);
        model->resourceRef().setDescription(description);
        QString key = "users/user-0/data-catalog-" + _bookmarkids[_selectedBookmarkIndex - 3];
        context()->configurationRef().putValue(key + "/label", displayName);
        context()->configurationRef().putValue(key + "/description", description);
        emit bookmarksChanged();
    }
}