bool Ilwis3CatalogConnector::loadItems()
{
    QUrl location = _location.url();
    QStringList namefilter;
    namefilter << "*.mpr" << "*.mpa" << "*.mps" << "*.mpp" << "*.tbt" << "*.dom" << "*.rpr" << "*.csy" << "*.grf" << "*.mpl";

    QFileInfoList fileList = loadFolders(namefilter);

    // remove duplicates, shoudnt happen but better save than sorry
    QSet<QFileInfo> reduced = fileList.toSet();
    fileList.clear();
    fileList = QList<QFileInfo>::fromSet(reduced);

    QList<ODFItem> odfitems;
    QList<Resource> folders;
    QHash<QString, quint64> names;
    foreach(QFileInfo file, fileList) {
        QUrl container = location.url();
        QString path = file.canonicalFilePath();
        QString loc = container.toLocalFile();
        if ( path.compare(loc,Qt::CaseInsensitive) == 0)
            container = file.canonicalPath();
        IlwisTypes tp = Ilwis3Connector::ilwisType(path);
        QUrl url("file:///" + path);
        if ( mastercatalog()->resource2id(url, tp) == i64UNDEF) {
            if ( tp & itILWISOBJECT ) {
                ODFItem item(path);
                odfitems.push_back(item);
                names[file.fileName().toLower()] = item.id();
            } else {
                folders.push_back(loadFolder(file, container, path, url));
            }
        }

    }