Use the ResourceWatcher - http://api.kde.org/4.x-api/kdelibs-apidocs/nepomuk-core/html/classNepomuk2_1_1ResourceWatcher.html